diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2017-09-11 00:10:13 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-09-11 16:47:40 +0200 |
commit | f397828e001f422a888923ebba99b73f86571e29 (patch) | |
tree | 89bc606ae66d4a66139dd06bc47c85c1758e863f /patches/0075-ndo-stats-64/usbnet.patch | |
parent | a666844f69cc2638ef69932db5bddcece529372d (diff) |
patches: export bp_usbnet_get_stats64() only if function is added
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>
Diffstat (limited to 'patches/0075-ndo-stats-64/usbnet.patch')
-rw-r--r-- | patches/0075-ndo-stats-64/usbnet.patch | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/patches/0075-ndo-stats-64/usbnet.patch b/patches/0075-ndo-stats-64/usbnet.patch index 09de2784..7b48bfeb 100644 --- a/patches/0075-ndo-stats-64/usbnet.patch +++ b/patches/0075-ndo-stats-64/usbnet.patch @@ -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); |