aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-06-22 17:18:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-06-25 15:32:48 -0400
commit8ac3a2aa7224a7d05f1a71240663c80532969791 (patch)
treee61c093b079e2201a9b950a92b0f623ce1824c76 /drivers/net/wireless/b43
parented03033e3033c98e83d45bf4cdca1efdfd86e98e (diff)
b43: N-PHY: update low-pass filter setup
Add support for external PA and clean code a bit. 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')
-rw-r--r--drivers/net/wireless/b43/phy_n.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index d9409b446ac1..0fb5e14a4554 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -3706,21 +3706,28 @@ static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable)
3706 } 3706 }
3707} 3707}
3708 3708
3709/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxLpFbw */ 3709/*
3710static void b43_nphy_tx_lp_fbw(struct b43_wldev *dev) 3710 * TX low-pass filter bandwidth setup
3711 * http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxLpFbw
3712 */
3713static void b43_nphy_tx_lpf_bw(struct b43_wldev *dev)
3711{ 3714{
3712 u16 tmp; 3715 u16 tmp;
3713 3716
3714 if (dev->phy.rev >= 3) { 3717 if (dev->phy.rev < 3 || dev->phy.rev >= 7)
3715 if (b43_nphy_ipa(dev)) { 3718 return;
3716 tmp = 4;
3717 b43_phy_write(dev, B43_NPHY_TXF_40CO_B32S2,
3718 (((((tmp << 3) | tmp) << 3) | tmp) << 3) | tmp);
3719 }
3720 3719
3721 tmp = 1; 3720 if (b43_nphy_ipa(dev))
3721 tmp = b43_is_40mhz(dev) ? 5 : 4;
3722 else
3723 tmp = b43_is_40mhz(dev) ? 3 : 1;
3724 b43_phy_write(dev, B43_NPHY_TXF_40CO_B32S2,
3725 (tmp << 9) | (tmp << 6) | (tmp << 3) | tmp);
3726
3727 if (b43_nphy_ipa(dev)) {
3728 tmp = b43_is_40mhz(dev) ? 4 : 1;
3722 b43_phy_write(dev, B43_NPHY_TXF_40CO_B1S2, 3729 b43_phy_write(dev, B43_NPHY_TXF_40CO_B1S2,
3723 (((((tmp << 3) | tmp) << 3) | tmp) << 3) | tmp); 3730 (tmp << 9) | (tmp << 6) | (tmp << 3) | tmp);
3724 } 3731 }
3725} 3732}
3726 3733
@@ -5347,7 +5354,7 @@ static int b43_phy_initn(struct b43_wldev *dev)
5347 b43_phy_write(dev, B43_NPHY_TXMACDELAY, 0x0320); 5354 b43_phy_write(dev, B43_NPHY_TXMACDELAY, 0x0320);
5348 if (phy->rev >= 3 && phy->rev <= 6) 5355 if (phy->rev >= 3 && phy->rev <= 6)
5349 b43_phy_write(dev, B43_NPHY_PLOAD_CSENSE_EXTLEN, 0x0032); 5356 b43_phy_write(dev, B43_NPHY_PLOAD_CSENSE_EXTLEN, 0x0032);
5350 b43_nphy_tx_lp_fbw(dev); 5357 b43_nphy_tx_lpf_bw(dev);
5351 if (phy->rev >= 3) 5358 if (phy->rev >= 3)
5352 b43_nphy_spur_workaround(dev); 5359 b43_nphy_spur_workaround(dev);
5353 5360
@@ -5433,7 +5440,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev,
5433 if (dev->phy.rev < 3) 5440 if (dev->phy.rev < 3)
5434 b43_nphy_adjust_lna_gain_table(dev); 5441 b43_nphy_adjust_lna_gain_table(dev);
5435 5442
5436 b43_nphy_tx_lp_fbw(dev); 5443 b43_nphy_tx_lpf_bw(dev);
5437 5444
5438 if (dev->phy.rev >= 3 && 5445 if (dev->phy.rev >= 3 &&
5439 dev->phy.n->spur_avoid != B43_SPUR_AVOID_DISABLE) { 5446 dev->phy.n->spur_avoid != B43_SPUR_AVOID_DISABLE) {