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>
This commit is contained in:

committed by
David S. Miller

parent
e861b98d5e
commit
9db1f6d725
@@ -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:
|
||||
|
Reference in New Issue
Block a user