Commit e7c62552 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

b43: HT-PHY: implement killing radio

Closed drivers kill radio right after reading radio version and MACCTL,
so it was easy to find related PHY ops:
 phy_read(0x0810) -> 0x0000
phy_write(0x0810) <- 0x0000
To find out the mask of above OP, MMIO hack was used to fake read val:
 phy_read(0x0810) -> 0xffff
phy_write(0x0810) <- 0x0000
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1c1236e3
...@@ -59,6 +59,19 @@ static void b43_phy_ht_op_free(struct b43_wldev *dev) ...@@ -59,6 +59,19 @@ static void b43_phy_ht_op_free(struct b43_wldev *dev)
phy->ht = NULL; phy->ht = NULL;
} }
/* http://bcm-v4.sipsolutions.net/802.11/Radio/Switch%20Radio */
static void b43_phy_ht_op_software_rfkill(struct b43_wldev *dev,
bool blocked)
{
if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED)
b43err(dev->wl, "MAC not suspended\n");
if (blocked) {
b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, ~0);
} else {
}
}
static void b43_phy_ht_op_switch_analog(struct b43_wldev *dev, bool on) static void b43_phy_ht_op_switch_analog(struct b43_wldev *dev, bool on)
{ {
if (on) { if (on) {
...@@ -141,9 +154,7 @@ const struct b43_phy_operations b43_phyops_ht = { ...@@ -141,9 +154,7 @@ const struct b43_phy_operations b43_phyops_ht = {
.phy_maskset = b43_phy_ht_op_maskset, .phy_maskset = b43_phy_ht_op_maskset,
.radio_read = b43_phy_ht_op_radio_read, .radio_read = b43_phy_ht_op_radio_read,
.radio_write = b43_phy_ht_op_radio_write, .radio_write = b43_phy_ht_op_radio_write,
/*
.software_rfkill = b43_phy_ht_op_software_rfkill, .software_rfkill = b43_phy_ht_op_software_rfkill,
*/
.switch_analog = b43_phy_ht_op_switch_analog, .switch_analog = b43_phy_ht_op_switch_analog,
/* /*
.switch_channel = b43_phy_ht_op_switch_channel, .switch_channel = b43_phy_ht_op_switch_channel,
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */ #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */
#define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */ #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */
#define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010)
#define B43_PHY_HT_AFE_CTL1 B43_PHY_EXTG(0x110) #define B43_PHY_HT_AFE_CTL1 B43_PHY_EXTG(0x110)
#define B43_PHY_HT_AFE_CTL2 B43_PHY_EXTG(0x111) #define B43_PHY_HT_AFE_CTL2 B43_PHY_EXTG(0x111)
#define B43_PHY_HT_AFE_CTL3 B43_PHY_EXTG(0x114) #define B43_PHY_HT_AFE_CTL3 B43_PHY_EXTG(0x114)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment