diff options
author | Ben Greear <greearb@candelatech.com> | 2013-06-19 17:02:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-24 14:44:23 -0400 |
commit | 68185a4b37d8790196c7441cb3020cc489d9835f (patch) | |
tree | d04b9b9e38b434f9a1095bb2bf64779ae9f33296 /drivers/net/wireless/ath/ath9k/htc.h | |
parent | 156652bbedfbc0f3410759ccebe5c94edb7ce6c3 (diff) |
ath9k_htc: Add ethtool stats support.
This provides some of the same info found in
the ath9k_htc debugfs through the standard ethtool stats API.
This logic is only supported when ath9k_htc debugfs kernel
feature is enabled, since that is the only time stats
are actually gathered.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 6bd556d203ae..055d7c25e090 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -324,7 +324,9 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb) | |||
324 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS | 324 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS |
325 | 325 | ||
326 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) | 326 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) |
327 | #define TX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) | ||
327 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) | 328 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) |
329 | #define RX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c += a) | ||
328 | #define CAB_STAT_INC priv->debug.tx_stats.cab_queued++ | 330 | #define CAB_STAT_INC priv->debug.tx_stats.cab_queued++ |
329 | 331 | ||
330 | #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) | 332 | #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) |
@@ -337,6 +339,7 @@ struct ath_tx_stats { | |||
337 | u32 buf_completed; | 339 | u32 buf_completed; |
338 | u32 skb_queued; | 340 | u32 skb_queued; |
339 | u32 skb_success; | 341 | u32 skb_success; |
342 | u32 skb_success_bytes; | ||
340 | u32 skb_failed; | 343 | u32 skb_failed; |
341 | u32 cab_queued; | 344 | u32 cab_queued; |
342 | u32 queue_stats[IEEE80211_NUM_ACS]; | 345 | u32 queue_stats[IEEE80211_NUM_ACS]; |
@@ -345,6 +348,7 @@ struct ath_tx_stats { | |||
345 | struct ath_rx_stats { | 348 | struct ath_rx_stats { |
346 | u32 skb_allocated; | 349 | u32 skb_allocated; |
347 | u32 skb_completed; | 350 | u32 skb_completed; |
351 | u32 skb_completed_bytes; | ||
348 | u32 skb_dropped; | 352 | u32 skb_dropped; |
349 | u32 err_crc; | 353 | u32 err_crc; |
350 | u32 err_decrypt_crc; | 354 | u32 err_decrypt_crc; |
@@ -362,10 +366,20 @@ struct ath9k_debug { | |||
362 | struct ath_rx_stats rx_stats; | 366 | struct ath_rx_stats rx_stats; |
363 | }; | 367 | }; |
364 | 368 | ||
369 | void ath9k_htc_get_et_strings(struct ieee80211_hw *hw, | ||
370 | struct ieee80211_vif *vif, | ||
371 | u32 sset, u8 *data); | ||
372 | int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw, | ||
373 | struct ieee80211_vif *vif, int sset); | ||
374 | void ath9k_htc_get_et_stats(struct ieee80211_hw *hw, | ||
375 | struct ieee80211_vif *vif, | ||
376 | struct ethtool_stats *stats, u64 *data); | ||
365 | #else | 377 | #else |
366 | 378 | ||
367 | #define TX_STAT_INC(c) do { } while (0) | 379 | #define TX_STAT_INC(c) do { } while (0) |
380 | #define TX_STAT_ADD(c, a) do { } while (0) | ||
368 | #define RX_STAT_INC(c) do { } while (0) | 381 | #define RX_STAT_INC(c) do { } while (0) |
382 | #define RX_STAT_ADD(c, a) do { } while (0) | ||
369 | #define CAB_STAT_INC do { } while (0) | 383 | #define CAB_STAT_INC do { } while (0) |
370 | 384 | ||
371 | #define TX_QSTAT_INC(c) do { } while (0) | 385 | #define TX_QSTAT_INC(c) do { } while (0) |