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>
This commit is contained in:
@@ -2314,6 +2314,15 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
|
||||
if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
|
||||
return RX_DROP_MONITOR;
|
||||
|
||||
if (rx->sta) {
|
||||
/* The security index has the same property as needed
|
||||
* for the rx_msdu field, i.e. it is IEEE80211_NUM_TIDS
|
||||
* for non-QoS-data frames. Here we know it's a data
|
||||
* frame, so count MSDUs.
|
||||
*/
|
||||
rx->sta->rx_msdu[rx->security_idx]++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send unexpected-4addr-frame event to hostapd. For older versions,
|
||||
* also drop the frame to cooked monitor interfaces.
|
||||
|
Reference in New Issue
Block a user