aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorThomas Ilnseher <illth@gmx.de>2009-09-14 17:01:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-23 11:35:44 -0400
commit9308779aad721cab8434fd5f98d3c85d3716fdec (patch)
tree58f8f403682c82553c85e7726f28735ad2f2d431 /drivers/net
parent09ebe2f94373e95952ed6340b0a5d21739eb99da (diff)
b43: Add LP PHY Analog Switch Support
The current verison of b43 uses "b43_phyop_switch_analog_generic" for A, G and LP phys. According to the spec, this is the wrong behaviour for the LP PHY (see: http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore ) While no problems on the x86 plattform where seen, this leads to a crash on the BCM5354 SoC (MIPS 32 LE plattform). This patch implements the analog switch for LP PHYs according to the specs. It fixes the crash signed-off-by: Thomas Ilnseher <illth@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/phy_lp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3e02d969f683..1e318d815a5b 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -2228,6 +2228,16 @@ static enum b43_txpwr_result b43_lpphy_op_recalc_txpower(struct b43_wldev *dev,
2228 return B43_TXPWR_RES_DONE; 2228 return B43_TXPWR_RES_DONE;
2229} 2229}
2230 2230
2231void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
2232{
2233 if (on) {
2234 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8);
2235 } else {
2236 b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0x0007);
2237 b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x0007);
2238 }
2239}
2240
2231const struct b43_phy_operations b43_phyops_lp = { 2241const struct b43_phy_operations b43_phyops_lp = {
2232 .allocate = b43_lpphy_op_allocate, 2242 .allocate = b43_lpphy_op_allocate,
2233 .free = b43_lpphy_op_free, 2243 .free = b43_lpphy_op_free,
@@ -2239,7 +2249,7 @@ const struct b43_phy_operations b43_phyops_lp = {
2239 .radio_read = b43_lpphy_op_radio_read, 2249 .radio_read = b43_lpphy_op_radio_read,
2240 .radio_write = b43_lpphy_op_radio_write, 2250 .radio_write = b43_lpphy_op_radio_write,
2241 .software_rfkill = b43_lpphy_op_software_rfkill, 2251 .software_rfkill = b43_lpphy_op_software_rfkill,
2242 .switch_analog = b43_phyop_switch_analog_generic, 2252 .switch_analog = b43_lpphy_op_switch_analog,
2243 .switch_channel = b43_lpphy_op_switch_channel, 2253 .switch_channel = b43_lpphy_op_switch_channel,
2244 .get_default_chan = b43_lpphy_op_get_default_chan, 2254 .get_default_chan = b43_lpphy_op_get_default_chan,
2245 .set_rx_antenna = b43_lpphy_op_set_rx_antenna, 2255 .set_rx_antenna = b43_lpphy_op_set_rx_antenna,