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/tx.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/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 058686a721a1..da7f352a2b16 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -815,6 +815,8 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) | |||
815 | /* for pure STA mode without beacons, we can do it */ | 815 | /* for pure STA mode without beacons, we can do it */ |
816 | hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number); | 816 | hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number); |
817 | tx->sdata->sequence_number += 0x10; | 817 | tx->sdata->sequence_number += 0x10; |
818 | if (tx->sta) | ||
819 | tx->sta->tx_msdu[IEEE80211_NUM_TIDS]++; | ||
818 | return TX_CONTINUE; | 820 | return TX_CONTINUE; |
819 | } | 821 | } |
820 | 822 | ||
@@ -831,6 +833,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) | |||
831 | qc = ieee80211_get_qos_ctl(hdr); | 833 | qc = ieee80211_get_qos_ctl(hdr); |
832 | tid = *qc & IEEE80211_QOS_CTL_TID_MASK; | 834 | tid = *qc & IEEE80211_QOS_CTL_TID_MASK; |
833 | seq = &tx->sta->tid_seq[tid]; | 835 | seq = &tx->sta->tid_seq[tid]; |
836 | tx->sta->tx_msdu[tid]++; | ||
834 | 837 | ||
835 | hdr->seq_ctrl = cpu_to_le16(*seq); | 838 | hdr->seq_ctrl = cpu_to_le16(*seq); |
836 | 839 | ||