summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/antenna.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-08-01 20:57:06 +0530
committerJohn W. Linville <linville@tuxdriver.com>2013-08-01 15:52:05 -0400
commite3d5291436ff9efeeb968459724af5332305dded (patch)
tree6218c3359d1633bd8355d591bba39f2a0845788a /drivers/net/wireless/ath/ath9k/antenna.c
parent37133002f5263153e71a509191fbb8951c1de3e0 (diff)
ath9k: Add statistics for antenna diversity
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/antenna.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/antenna.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index ea4ee08cddf2..291ca019d37b 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -695,15 +695,18 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
antcomb->main_total_rssi += main_rssi;
antcomb->alt_total_rssi += alt_rssi;
- if (main_ant_conf == rx_ant_conf) {
+ if (main_ant_conf == rx_ant_conf)
antcomb->main_recv_cnt++;
- ANT_STAT_INC(ANT_MAIN, recv_cnt);
- ANT_LNA_INC(ANT_MAIN, rx_ant_conf);
- } else {
+ else
antcomb->alt_recv_cnt++;
- ANT_STAT_INC(ANT_ALT, recv_cnt);
- ANT_LNA_INC(ANT_ALT, rx_ant_conf);
- }
+ }
+
+ if (main_ant_conf == rx_ant_conf) {
+ ANT_STAT_INC(ANT_MAIN, recv_cnt);
+ ANT_LNA_INC(ANT_MAIN, rx_ant_conf);
+ } else {
+ ANT_STAT_INC(ANT_ALT, recv_cnt);
+ ANT_LNA_INC(ANT_ALT, rx_ant_conf);
}
/* Short scan check */
@@ -782,6 +785,7 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
div_comb_done:
ath_ant_div_conf_fast_divbias(&div_ant_conf, antcomb, alt_ratio);
ath9k_hw_antdiv_comb_conf_set(sc->sc_ah, &div_ant_conf);
+ ath9k_debug_stat_ant(sc, &div_ant_conf, main_rssi_avg, alt_rssi_avg);
antcomb->scan_start_time = jiffies;
antcomb->total_pkt_count = 0;