aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_n.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-01-17 07:03:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-19 16:39:08 -0500
commit4f4ab6cd1486fcb0ab8d689d625ac7691198f36b (patch)
tree64764c250791e5196ac32faf3c91afdb8cff8bc9 /drivers/net/wireless/b43/phy_n.c
parent53ae8e8c92b2715f27c95e8e7169bca9a8909856 (diff)
b43: N-PHY: implement chain selection
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_n.c')
-rw-r--r--drivers/net/wireless/b43/phy_n.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 229f2d0364f2..90a49cfaa965 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -438,6 +438,34 @@ static void b43_nphy_update_mimo_config(struct b43_wldev *dev, s32 preamble)
438 b43_phy_write(dev, B43_NPHY_MIMOCFG, mimocfg); 438 b43_phy_write(dev, B43_NPHY_MIMOCFG, mimocfg);
439} 439}
440 440
441/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Chains */
442static void b43_nphy_update_txrx_chain(struct b43_wldev *dev)
443{
444 struct b43_phy_n *nphy = dev->phy.n;
445
446 bool override = false;
447 u16 chain = 0x33;
448
449 if (nphy->txrx_chain == 0) {
450 chain = 0x11;
451 override = true;
452 } else if (nphy->txrx_chain == 1) {
453 chain = 0x22;
454 override = true;
455 }
456
457 b43_phy_maskset(dev, B43_NPHY_RFSEQCA,
458 ~(B43_NPHY_RFSEQCA_TXEN | B43_NPHY_RFSEQCA_RXEN),
459 chain);
460
461 if (override)
462 b43_phy_set(dev, B43_NPHY_RFSEQMODE,
463 B43_NPHY_RFSEQMODE_CAOVER);
464 else
465 b43_phy_mask(dev, B43_NPHY_RFSEQMODE,
466 ~B43_NPHY_RFSEQMODE_CAOVER);
467}
468
441/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */ 469/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */
442static void b43_nphy_rx_iq_est(struct b43_wldev *dev, struct nphy_iq_est *est, 470static void b43_nphy_rx_iq_est(struct b43_wldev *dev, struct nphy_iq_est *est,
443 u16 samps, u8 time, bool wait) 471 u16 samps, u8 time, bool wait)
@@ -2223,7 +2251,7 @@ int b43_phy_initn(struct b43_wldev *dev)
2223 b43_phy_write(dev, B43_NPHY_TXRIFS_FRDEL, 0x30); 2251 b43_phy_write(dev, B43_NPHY_TXRIFS_FRDEL, 0x30);
2224 2252
2225 b43_nphy_update_mimo_config(dev, nphy->preamble_override); 2253 b43_nphy_update_mimo_config(dev, nphy->preamble_override);
2226 /* TODO Update TX/RX chain */ 2254 b43_nphy_update_txrx_chain(dev);
2227 2255
2228 if (phy->rev < 2) { 2256 if (phy->rev < 2) {
2229 b43_phy_write(dev, B43_NPHY_DUP40_GFBL, 0xAA8); 2257 b43_phy_write(dev, B43_NPHY_DUP40_GFBL, 0xAA8);