patches: export bp_usbnet_get_stats64() only if function is added
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 10 Sep 2017 22:10:13 +0000 (00:10 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Sep 2017 14:47:40 +0000 (16:47 +0200)
Export the bp_usbnet_get_stats64() function only on kernel < 4.11,
because this function is only available on such kernel versions.

Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
patches/0075-ndo-stats-64/usbnet.patch

index 09de2784abf4ce8269fa202fc812b663babad68c..7b48bfeb8dfd6ccf97e48037411e1d6c9957b04c 100644 (file)
@@ -1,20 +1,18 @@
-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 @@
+@@ -1014,6 +1014,9 @@ void usbnet_get_stats64(struct net_devic
        }
  }
  EXPORT_SYMBOL_GPL(usbnet_get_stats64);
++#if LINUX_VERSION_IS_LESS(4,11,0)
 +EXPORT_SYMBOL_GPL(bp_usbnet_get_stats64);
++#endif
  
  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);
+@@ -283,5 +283,9 @@ extern void usbnet_status_stop(struct us
  extern void usbnet_update_max_qlen(struct usbnet *dev);
  extern void usbnet_get_stats64(struct net_device *dev,
                               struct rtnl_link_stats64 *stats);