diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-05-05 15:22:05 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-05-11 23:46:22 +0200 |
commit | 25968394a852030b895c350b66e84121300efaae (patch) | |
tree | fbe0e87c6533d3e5f5f9c487d53dcc1968b0990c /patches | |
parent | fd6bb301116d48c50722b0a4399e26ab0237e563 (diff) |
backports: handle netdev->tstats
This adds the necessary backporting to handle netdev->tstats which
was introduced in 3.14 (and some helper macros in 3.15).
For some reason my spatch isn't reliably patching the occurrence
in net/mac80211/tx.c, so for now I'm including a manual patch.
Change-Id: Ib22e307a9bd31f6c31372ef8cc2828ca6e14fce4
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches')
3 files changed, 30 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/0055-netdev-tstats-assign.cocci b/patches/collateral-evolutions/network/0055-netdev-tstats-assign.cocci new file mode 100644 index 00000000..b41b4f17 --- /dev/null +++ b/patches/collateral-evolutions/network/0055-netdev-tstats-assign.cocci @@ -0,0 +1,10 @@ +@nd@ +identifier dev; +@@ +struct net_device *dev; +@@ +identifier nd.dev; +expression E; +@@ +-dev->tstats = E; ++netdev_assign_tstats(dev, E); diff --git a/patches/collateral-evolutions/network/0055-netdev-tstats-tx.patch b/patches/collateral-evolutions/network/0055-netdev-tstats-tx.patch new file mode 100644 index 00000000..aa79e029 --- /dev/null +++ b/patches/collateral-evolutions/network/0055-netdev-tstats-tx.patch @@ -0,0 +1,11 @@ +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -39,7 +39,7 @@ + + static inline void ieee80211_tx_stats(struct net_device *dev, u32 len) + { +- struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats); ++ struct pcpu_sw_netstats *tstats = this_cpu_ptr(netdev_tstats(dev)); + + u64_stats_update_begin(&tstats->syncp); + tstats->tx_packets++; diff --git a/patches/collateral-evolutions/network/0056-netdev-tstats.cocci b/patches/collateral-evolutions/network/0056-netdev-tstats.cocci new file mode 100644 index 00000000..99d71c05 --- /dev/null +++ b/patches/collateral-evolutions/network/0056-netdev-tstats.cocci @@ -0,0 +1,9 @@ +@nd@ +identifier dev; +@@ +struct net_device *dev; +@@ +identifier nd.dev; +@@ +-dev->tstats ++netdev_tstats(dev) |