summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/phy_lp.c
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2009-08-27 20:49:49 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 18:40:55 (GMT)
commit64e368bf9c3690eebd4b3a5cc243f39e902ecdd1 (patch)
treef39751877ea511aa2ecc640278c6560be0301c06 /drivers/net/wireless/b43/phy_lp.c
parent867b2efe68b6bb929e3bd1c6d699ba61ff2cf847 (diff)
downloadlinux-fsl-qoriq-64e368bf9c3690eebd4b3a5cc243f39e902ecdd1.tar.xz
b43: Implement antenna diversity support for LP-PHY
The A/G-PHY changes are fallout fixes from the enum change, which in turn allows the LP-PHY code to be much simpler. The antenna_to_phyctl change is a fix for a potential existing bug that this patch may otherwise trigger. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_lp.c')
-rw-r--r--drivers/net/wireless/b43/phy_lp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 7d2a702..1ab00b0 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -2205,7 +2205,14 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
{
- //TODO
+ if (dev->phy.rev >= 2)
+ return; // rev2+ doesn't support antenna diversity
+
+ if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
+ return;
+
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
}
static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)