Commit 52c94f41 authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville

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: default avatarMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0d78156e
...@@ -2403,6 +2403,20 @@ static int ath9k_tx_last_beacon(struct ieee80211_hw *hw) ...@@ -2403,6 +2403,20 @@ static int ath9k_tx_last_beacon(struct ieee80211_hw *hw)
return sc->beacon.tx_last; return sc->beacon.tx_last;
} }
static int ath9k_get_stats(struct ieee80211_hw *hw,
struct ieee80211_low_level_stats *stats)
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath9k_mib_stats *mib_stats = &ah->ah_mibStats;
stats->dot11ACKFailureCount = mib_stats->ackrcv_bad;
stats->dot11RTSFailureCount = mib_stats->rts_bad;
stats->dot11FCSErrorCount = mib_stats->fcs_bad;
stats->dot11RTSSuccessCount = mib_stats->rts_good;
return 0;
}
struct ieee80211_ops ath9k_ops = { struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx, .tx = ath9k_tx,
.start = ath9k_start, .start = ath9k_start,
...@@ -2428,4 +2442,5 @@ struct ieee80211_ops ath9k_ops = { ...@@ -2428,4 +2442,5 @@ struct ieee80211_ops ath9k_ops = {
.flush = ath9k_flush, .flush = ath9k_flush,
.tx_frames_pending = ath9k_tx_frames_pending, .tx_frames_pending = ath9k_tx_frames_pending,
.tx_last_beacon = ath9k_tx_last_beacon, .tx_last_beacon = ath9k_tx_last_beacon,
.get_stats = ath9k_get_stats,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment