Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb840a80 authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville
Browse files

ath9k: change the default antenna settings based on diversity



change the AR_DEF_ANTENNA register settings i.e setting default antenna
setting only for antenna diversity enabled chipsets. no point in
doing this for MIMO chipsets

Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1a68abb0
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -1923,9 +1923,12 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
			skb = hdr_skb;
		}


		if (ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) {

			/*
		 * change the default rx antenna if rx diversity chooses the
		 * other antenna 3 times in a row.
			 * change the default rx antenna if rx diversity
			 * chooses the other antenna 3 times in a row.
			 */
			if (sc->rx.defant != rs.rs_antenna) {
				if (++sc->rx.rxotherant >= 3)
@@ -1934,6 +1937,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
				sc->rx.rxotherant = 0;
			}

		}

		if (rxs->flag & RX_FLAG_MMIC_STRIPPED)
			skb_trim(skb, skb->len - 8);