diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2011-08-24 15:31:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-26 10:47:57 -0400 |
commit | 5fa71984f37e882d8c93e20f6db56d2ac3470178 (patch) | |
tree | cd6d3ebad9862360d51472922754cc5fd42514cd /drivers/net | |
parent | c3e5fac8e54591d2e4585d3329ead61ba059eb1d (diff) |
ath9k_htc: Add get_stats call back
currently this call back is used only in debugfs of mac80211
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 7212acb2bd6c..0248024da56a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1736,6 +1736,22 @@ out: | |||
1736 | return ret; | 1736 | return ret; |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | |||
1740 | static int ath9k_htc_get_stats(struct ieee80211_hw *hw, | ||
1741 | struct ieee80211_low_level_stats *stats) | ||
1742 | { | ||
1743 | struct ath9k_htc_priv *priv = hw->priv; | ||
1744 | struct ath_hw *ah = priv->ah; | ||
1745 | struct ath9k_mib_stats *mib_stats = &ah->ah_mibStats; | ||
1746 | |||
1747 | stats->dot11ACKFailureCount = mib_stats->ackrcv_bad; | ||
1748 | stats->dot11RTSFailureCount = mib_stats->rts_bad; | ||
1749 | stats->dot11FCSErrorCount = mib_stats->fcs_bad; | ||
1750 | stats->dot11RTSSuccessCount = mib_stats->rts_good; | ||
1751 | |||
1752 | return 0; | ||
1753 | } | ||
1754 | |||
1739 | struct ieee80211_ops ath9k_htc_ops = { | 1755 | struct ieee80211_ops ath9k_htc_ops = { |
1740 | .tx = ath9k_htc_tx, | 1756 | .tx = ath9k_htc_tx, |
1741 | .start = ath9k_htc_start, | 1757 | .start = ath9k_htc_start, |
@@ -1759,4 +1775,5 @@ struct ieee80211_ops ath9k_htc_ops = { | |||
1759 | .rfkill_poll = ath9k_htc_rfkill_poll_state, | 1775 | .rfkill_poll = ath9k_htc_rfkill_poll_state, |
1760 | .set_coverage_class = ath9k_htc_set_coverage_class, | 1776 | .set_coverage_class = ath9k_htc_set_coverage_class, |
1761 | .set_bitrate_mask = ath9k_htc_set_bitrate_mask, | 1777 | .set_bitrate_mask = ath9k_htc_set_bitrate_mask, |
1778 | .get_stats = ath9k_htc_get_stats, | ||
1762 | }; | 1779 | }; |