summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-08-22 00:28:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-09-06 16:58:38 +0200
commit5a00d8489c7884673fb6e04ec93075ba834be1e6 (patch)
treebaadeefd109e0d270b7400fe3f09a19e34e6b708 /patches
parent74ceb0989730aaf8d733c990a21d7251f4737200 (diff)
patches: adapt the stat64 usage for usbnet
The usbnet driver shares the stat64 implementation over multiple drivers and file, the spatch is not able to handle this, add a manual patch to work around this problem. The spatch is still modifying all usbnet drivers, but the function gets exported by the usbnet main driver now. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/0075-ndo-stats-64.cocci2
-rw-r--r--patches/0075-ndo-stats-64/usbnet.patch26
2 files changed, 27 insertions, 1 deletions
diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci
index 756be958..86131824 100644
--- a/patches/0075-ndo-stats-64.cocci
+++ b/patches/0075-ndo-stats-64.cocci
@@ -18,7 +18,7 @@ identifier r.stats64_fn;
@@
void stats64_fn(...) {...}
+#if LINUX_VERSION_IS_LESS(4,11,0)
-+static struct rtnl_link_stats64 *
++struct rtnl_link_stats64 *
+stats64_fn_wrap(struct net_device *dev,
+ struct rtnl_link_stats64 *stats)
+{
diff --git a/patches/0075-ndo-stats-64/usbnet.patch b/patches/0075-ndo-stats-64/usbnet.patch
new file mode 100644
index 00000000..09de2784
--- /dev/null
+++ b/patches/0075-ndo-stats-64/usbnet.patch
@@ -0,0 +1,26 @@
+diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
+index 095bcfd..6305c41 100644
+--- a/drivers/net/usb/usbnet.c
++++ b/drivers/net/usb/usbnet.c
+@@ -1014,6 +1014,7 @@
+ }
+ }
+ EXPORT_SYMBOL_GPL(usbnet_get_stats64);
++EXPORT_SYMBOL_GPL(bp_usbnet_get_stats64);
+
+ u32 usbnet_get_link (struct net_device *net)
+ {
+diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
+index 9711637..363f6b9 100644
+--- a/include/linux/usb/usbnet.h
++++ b/include/linux/usb/usbnet.h
+@@ -283,5 +283,9 @@ extern void usbnet_status_stop(struct usbnet *dev);
+ extern void usbnet_update_max_qlen(struct usbnet *dev);
+ extern void usbnet_get_stats64(struct net_device *dev,
+ struct rtnl_link_stats64 *stats);
++#if LINUX_VERSION_IS_LESS(4,11,0)
++struct rtnl_link_stats64 *
++bp_usbnet_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats);
++#endif
+
+ #endif /* __LINUX_USB_USBNET_H */