Skip to content

Commit

Permalink
ath9k: change the default antenna settings based on diversity
Browse files Browse the repository at this point in the history
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: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Nov 30, 2011
1 parent 1a68abb commit eb840a8
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,15 +1923,20 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
skb = hdr_skb;
}

/*
* 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)
ath_setdefantenna(sc, rs.rs_antenna);
} else {
sc->rx.rxotherant = 0;

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.
*/
if (sc->rx.defant != rs.rs_antenna) {
if (++sc->rx.rxotherant >= 3)
ath_setdefantenna(sc, rs.rs_antenna);
} else {
sc->rx.rxotherant = 0;
}

}

if (rxs->flag & RX_FLAG_MMIC_STRIPPED)
Expand Down

0 comments on commit eb840a8

Please sign in to comment.