diff options
author | Michael Buesch <mb@bu3sch.de> | 2007-12-22 21:54:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:09:14 -0800 |
commit | 9db1f6d725921c413cc344beda5e7e7d011b02e7 (patch) | |
tree | d3da80ab61fce4074c18f88d31c75e900afb7c22 /drivers/net/wireless/b43/xmit.c | |
parent | e861b98d5e1be769ca6483b6df97149b956ea834 (diff) |
b43: Only select allowed TX and RX antennas
This fixes antenna selection in b43. It adds a sanity check
for the antenna numbers we get from mac80211.
This patch depends on
ssb: Fix extraction of values from SPROM
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/xmit.c')
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index e60e54d59ab..3d312768588 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -270,14 +270,15 @@ static void generate_txhdr_fw4(struct b43_wldev *dev, phy_ctl |= B43_TX4_PHY_OFDM; if (dev->short_preamble) phy_ctl |= B43_TX4_PHY_SHORTPRMBL; - switch (txctl->antenna_sel_tx) { - case 0: + + switch (b43_ieee80211_antenna_sanitize(dev, txctl->antenna_sel_tx)) { + case 0: /* Default */ phy_ctl |= B43_TX4_PHY_ANTLAST; break; - case 1: + case 1: /* Antenna 0 */ phy_ctl |= B43_TX4_PHY_ANT0; break; - case 2: + case 2: /* Antenna 1 */ phy_ctl |= B43_TX4_PHY_ANT1; break; default: |