diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-11-21 08:26:31 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-08 09:28:20 -0500 |
commit | 79c892b85027d5074dfa670dd451c14ee649fb88 (patch) | |
tree | b01b5e649d3d0256e5e84c886eda587b73ace6e1 /net/mac80211/rx.c | |
parent | 6de39808cf1dd7b02bf42e7d8695d80f5eaf645d (diff) |
mac80211: provide per-TID RX/TX MSDU counters
Implement the new counters cfg80211 can now advertise to userspace.
The TX code is in the sequence number handler, which is a bit odd,
but that place already knows the TID and frame type, so it was
easiest and least impact there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index fa5d870655a9..3a1a3ba40bd8 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2314,6 +2314,15 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx) | |||
2314 | if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) | 2314 | if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) |
2315 | return RX_DROP_MONITOR; | 2315 | return RX_DROP_MONITOR; |
2316 | 2316 | ||
2317 | if (rx->sta) { | ||
2318 | /* The security index has the same property as needed | ||
2319 | * for the rx_msdu field, i.e. it is IEEE80211_NUM_TIDS | ||
2320 | * for non-QoS-data frames. Here we know it's a data | ||
2321 | * frame, so count MSDUs. | ||
2322 | */ | ||
2323 | rx->sta->rx_msdu[rx->security_idx]++; | ||
2324 | } | ||
2325 | |||
2317 | /* | 2326 | /* |
2318 | * Send unexpected-4addr-frame event to hostapd. For older versions, | 2327 | * Send unexpected-4addr-frame event to hostapd. For older versions, |
2319 | * also drop the frame to cooked monitor interfaces. | 2328 | * also drop the frame to cooked monitor interfaces. |