summaryrefslogtreecommitdiff
path: root/net/mac80211/ethtool.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-10-16 17:54:47 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-10-21 10:08:22 +0200
commite5a9f8d04660da7ef3a98260aa74c3976f9cb4cd (patch)
treeb1497de1b8ffd34b991cdf6e21de1c7a0a65f1de /net/mac80211/ethtool.c
parent976bd9efdae6a844079ba4a7898a38d229ef246c (diff)
mac80211: move station statistics into sub-structs
Group station statistics by where they're (mostly) updated (TX, RX and TX-status) and group them into sub-structs of the struct sta_info. Also rename the variables since the grouping now makes it obvious where they belong. This makes it easier to identify where the statistics are updated in the code, and thus easier to think about them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ethtool.c')
-rw-r--r--net/mac80211/ethtool.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c
index 3fbf9c308ec5..9cc986deda61 100644
--- a/net/mac80211/ethtool.c
+++ b/net/mac80211/ethtool.c
@@ -77,19 +77,19 @@ static void ieee80211_get_stats(struct net_device *dev,
memset(data, 0, sizeof(u64) * STA_STATS_LEN);
-#define ADD_STA_STATS(sta) \
- do { \
- data[i++] += sta->rx_packets; \
- data[i++] += sta->rx_bytes; \
- data[i++] += sta->num_duplicates; \
- data[i++] += sta->rx_fragments; \
- data[i++] += sta->rx_dropped; \
- \
- data[i++] += sinfo.tx_packets; \
- data[i++] += sinfo.tx_bytes; \
- data[i++] += sta->tx_filtered_count; \
- data[i++] += sta->tx_retry_failed; \
- data[i++] += sta->tx_retry_count; \
+#define ADD_STA_STATS(sta) \
+ do { \
+ data[i++] += sta->rx_stats.packets; \
+ data[i++] += sta->rx_stats.bytes; \
+ data[i++] += sta->rx_stats.num_duplicates; \
+ data[i++] += sta->rx_stats.fragments; \
+ data[i++] += sta->rx_stats.dropped; \
+ \
+ data[i++] += sinfo.tx_packets; \
+ data[i++] += sinfo.tx_bytes; \
+ data[i++] += sta->status_stats.filtered; \
+ data[i++] += sta->status_stats.retry_failed; \
+ data[i++] += sta->status_stats.retry_count; \
} while (0)
/* For Managed stations, find the single station based on BSSID