ath9k: enable rx for tx antennas earlier (and only for multi-stream devices) to fix...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 27 Jun 2012 01:29:56 +0000 (01:29 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 27 Jun 2012 01:29:56 +0000 (01:29 +0000)
SVN-Revision: 32509

package/mac80211/patches/561-ath9k_antenna_mask_validate.patch

index f837c686c7c7978dfd14a87bfd8a0701a308b45f..8b5005b7d8d7a7d0eeaf7a1e52f0f883f7164cd0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1929,14 +1929,29 @@ static u32 fill_chainmask(u32 cap, u32 n
+@@ -1929,12 +1929,29 @@ static u32 fill_chainmask(u32 cap, u32 n
        return filled;
  }
  
        struct ath_hw *ah = sc->sc_ah;
  
 -      if (!rx_ant || !tx_ant)
++      if (ah->caps.rx_chainmask != 1)
++              rx_ant |= tx_ant;
++
 +      if (!validate_antenna_mask(ah, rx_ant) || !tx_ant)
                return -EINVAL;
  
-+      rx_ant |= tx_ant;
        sc->ant_rx = rx_ant;
-       sc->ant_tx = tx_ant;