aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2011-08-20 07:51:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 14:57:14 -0400
commit52c94f413fdf5011b7e54ae68e0a2cfcb1b311df (patch)
tree236a6e652e68cc4a5a6049cf308a4fc30b6a4b97
parent0d78156eef1d8869ea4e56f8a257252a8f262f04 (diff)
ath9k: Add support for get_stats callback
this useful for debugging and to keep track of success/failure of frames such as ACK, RTS and FCS error count in a noisy environment Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 113c1df26b36..5ac4f3f2ad60 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2403,6 +2403,20 @@ skip:
2403 return sc->beacon.tx_last; 2403 return sc->beacon.tx_last;
2404} 2404}
2405 2405
2406static int ath9k_get_stats(struct ieee80211_hw *hw,
2407 struct ieee80211_low_level_stats *stats)
2408{
2409 struct ath_softc *sc = hw->priv;
2410 struct ath_hw *ah = sc->sc_ah;
2411 struct ath9k_mib_stats *mib_stats = &ah->ah_mibStats;
2412
2413 stats->dot11ACKFailureCount = mib_stats->ackrcv_bad;
2414 stats->dot11RTSFailureCount = mib_stats->rts_bad;
2415 stats->dot11FCSErrorCount = mib_stats->fcs_bad;
2416 stats->dot11RTSSuccessCount = mib_stats->rts_good;
2417 return 0;
2418}
2419
2406struct ieee80211_ops ath9k_ops = { 2420struct ieee80211_ops ath9k_ops = {
2407 .tx = ath9k_tx, 2421 .tx = ath9k_tx,
2408 .start = ath9k_start, 2422 .start = ath9k_start,
@@ -2427,5 +2441,6 @@ struct ieee80211_ops ath9k_ops = {
2427 .set_coverage_class = ath9k_set_coverage_class, 2441 .set_coverage_class = ath9k_set_coverage_class,
2428 .flush = ath9k_flush, 2442 .flush = ath9k_flush,
2429 .tx_frames_pending = ath9k_tx_frames_pending, 2443 .tx_frames_pending = ath9k_tx_frames_pending,
2430 .tx_last_beacon = ath9k_tx_last_beacon, 2444 .tx_last_beacon = ath9k_tx_last_beacon,
2445 .get_stats = ath9k_get_stats,
2431}; 2446};