]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mac80211: fix packet statistics for fast-RX
authorJohannes Berg <johannes.berg@intel.com>
Mon, 20 Feb 2017 07:59:16 +0000 (08:59 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Feb 2017 13:00:26 +0000 (14:00 +0100)
When adding per-CPU statistics, which added statistics back
to mac80211 for the fast-RX path, I evidently forgot to add
the "stats->packets++" line. The reason for that is likely
that I didn't see it since it's done in defragmentation for
the regular RX path.

Add the missing line to properly count received packets in
the fast-RX case.

Fixes: c9c5962b56c1 ("mac80211: enable collecting station statistics per-CPU")
Reported-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index 50ca3828b1242edb74f2835898cbe5f6d1dce975..a8443d8bc2332377514b40a55fd5e6a8513c0d40 100644 (file)
@@ -3880,6 +3880,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
        stats->last_rate = sta_stats_encode_rate(status);
 
        stats->fragments++;
+       stats->packets++;
 
        if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) {
                stats->last_signal = status->signal;