1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -1840,12 +1840,29 @@ static u32 fill_chainmask(u32 cap, u32 n
7 +static bool validate_antenna_mask(struct ath_hw *ah, u32 val)
15 + return (ah->caps.rx_chainmask == 1);
21 static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
23 struct ath_softc *sc = hw->priv;
24 struct ath_hw *ah = sc->sc_ah;
26 - if (!rx_ant || !tx_ant)
27 + if (ah->caps.rx_chainmask != 1)
30 + if (!validate_antenna_mask(ah, rx_ant) || !tx_ant)