aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/xmit.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-12-22 15:54:20 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:14 -0500
commit9db1f6d725921c413cc344beda5e7e7d011b02e7 (patch)
treed3da80ab61fce4074c18f88d31c75e900afb7c22 /drivers/net/wireless/b43/xmit.c
parente861b98d5e1be769ca6483b6df97149b956ea834 (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.c9
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,
270 phy_ctl |= B43_TX4_PHY_OFDM; 270 phy_ctl |= B43_TX4_PHY_OFDM;
271 if (dev->short_preamble) 271 if (dev->short_preamble)
272 phy_ctl |= B43_TX4_PHY_SHORTPRMBL; 272 phy_ctl |= B43_TX4_PHY_SHORTPRMBL;
273 switch (txctl->antenna_sel_tx) { 273
274 case 0: 274 switch (b43_ieee80211_antenna_sanitize(dev, txctl->antenna_sel_tx)) {
275 case 0: /* Default */
275 phy_ctl |= B43_TX4_PHY_ANTLAST; 276 phy_ctl |= B43_TX4_PHY_ANTLAST;
276 break; 277 break;
277 case 1: 278 case 1: /* Antenna 0 */
278 phy_ctl |= B43_TX4_PHY_ANT0; 279 phy_ctl |= B43_TX4_PHY_ANT0;
279 break; 280 break;
280 case 2: 281 case 2: /* Antenna 1 */
281 phy_ctl |= B43_TX4_PHY_ANT1; 282 phy_ctl |= B43_TX4_PHY_ANT1;
282 break; 283 break;
283 default: 284 default: