diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-03-16 09:05:23 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-03-16 09:05:27 +0100 |
commit | 4cc0dba95aacfcf235bcf2f8dee9cdd1568aacbf (patch) | |
tree | ea943a621b67860a27cf9aebb71cd382b3669cba /net/mac80211 | |
parent | eeca9fce1d71a4955855ceb0c3b13c1eb9db27c1 (diff) | |
download | blackbird-op-linux-4cc0dba95aacfcf235bcf2f8dee9cdd1568aacbf.tar.gz blackbird-op-linux-4cc0dba95aacfcf235bcf2f8dee9cdd1568aacbf.zip |
mac80211: move netdev stats to common function
Move the netdev stats accounting into the common function
ieee80211_deliver_skb() that is called in both places.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1101563357ea..bdabf349c6ee 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2043,6 +2043,9 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) struct sta_info *dsta; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); + dev->stats.rx_packets++; + dev->stats.rx_bytes += rx->skb->len; + skb = rx->skb; xmit_skb = NULL; @@ -2173,8 +2176,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx) dev_kfree_skb(rx->skb); continue; } - dev->stats.rx_packets++; - dev->stats.rx_bytes += rx->skb->len; ieee80211_deliver_skb(rx); } @@ -2397,9 +2398,6 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx) rx->skb->dev = dev; - dev->stats.rx_packets++; - dev->stats.rx_bytes += rx->skb->len; - if (local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 && !is_multicast_ether_addr( ((struct ethhdr *)rx->skb->data)->h_dest) && |