diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-06-16 01:59:20 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-17 14:22:28 -0400 |
commit | a8e827495a3e4d3a096e91b79e644e0665937927 (patch) | |
tree | 0619809ee4333f5588b0ce6d22807cad76c6c4f8 /drivers/net/wireless/b43/phy_ht.c | |
parent | 4cabd4254bc6b52a65da859a2c7591f67199ca81 (diff) | |
download | blackbird-obmc-linux-a8e827495a3e4d3a096e91b79e644e0665937927.tar.gz blackbird-obmc-linux-a8e827495a3e4d3a096e91b79e644e0665937927.zip |
b43: HT-PHY: implement switching analog
Turning it on is always done between reading PHY version and radio
version, so it was easy to find it in MMIO dumps from ndiswrapper.
Turning off is done by writing different values to the same registers.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_ht.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index e535041c4041..5777cdbc047b 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c @@ -59,6 +59,25 @@ static void b43_phy_ht_op_free(struct b43_wldev *dev) phy->ht = NULL; } +static void b43_phy_ht_op_switch_analog(struct b43_wldev *dev, bool on) +{ + if (on) { + b43_phy_write(dev, B43_PHY_HT_AFE_CTL2, 0x00cd); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0x0000); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL4, 0x00cd); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0x0000); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL6, 0x00cd); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0x0000); + } else { + b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0x07ff); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL2, 0x00fd); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0x07ff); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL4, 0x00fd); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0x07ff); + b43_phy_write(dev, B43_PHY_HT_AFE_CTL6, 0x00fd); + } +} + static unsigned int b43_phy_ht_op_get_default_chan(struct b43_wldev *dev) { if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) @@ -124,7 +143,9 @@ const struct b43_phy_operations b43_phyops_ht = { .radio_write = b43_phy_ht_op_radio_write, /* .software_rfkill = b43_phy_ht_op_software_rfkill, + */ .switch_analog = b43_phy_ht_op_switch_analog, + /* .switch_channel = b43_phy_ht_op_switch_channel, */ .get_default_chan = b43_phy_ht_op_get_default_chan, |