From: Johannes Berg Date: Mon, 15 Apr 2013 20:08:37 +0000 (+0200) Subject: backports: remove SET_NETDEV_DEVTYPE patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ebf78c809fa5268cdce08f8b221ae55bba2e8525;p=openwrt%2Fstaging%2Fblogic.git backports: remove SET_NETDEV_DEVTYPE patches There's no need to have those patches as struct device_type, with its name field, has been available since kernel 2.6.22. We can thus make the macro SET_NETDEV_DEVTYPE() an inline instead (to avoid "unused variable" warnings) and thus get rid of the patches for it. Signed-off-by: Johannes Berg --- diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index fb3a92f1013f..b90899a1a8a4 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -16,7 +16,10 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #define dev_change_net_namespace(a, b, c) (-EOPNOTSUPP) -#define SET_NETDEV_DEVTYPE(netdev, type) +static inline void SET_NETDEV_DEVTYPE(struct net_device *dev, void *type) +{ + /* nothing */ +} typedef int netdev_tx_t; #endif diff --git a/patches/collateral-evolutions/network/14-device-type/INFO b/patches/collateral-evolutions/network/14-device-type/INFO deleted file mode 100644 index 686985788f72..000000000000 --- a/patches/collateral-evolutions/network/14-device-type/INFO +++ /dev/null @@ -1,8 +0,0 @@ -Kernels >= 2.6.32 can identify the type of device netdevice -so that sysfs can be used to get this. We never really had a -systematic way of doing this -- now we do through the -SET_NETDEV_DEVTYPE() macro. For older kernels we make the -SET_NETDEV_DEVTYPE() be a no-op this means the wireless type -we define is unused so we ucomment it simply to avoid a -compile warning. - diff --git a/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.patch b/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.patch deleted file mode 100644 index 66dcd3881f4f..000000000000 --- a/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -1363,13 +1363,17 @@ - - // precondition: never called in_interrupt - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wlan_type = { - .name = "wlan", - }; -+#endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wwan_type = { - .name = "wwan", - }; -+#endif - - int - usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) diff --git a/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.patch b/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.patch deleted file mode 100644 index 2ba08a9b81f3..000000000000 --- a/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/net/bluetooth/bnep/core.c -+++ b/net/bluetooth/bnep/core.c -@@ -526,9 +526,11 @@ static struct device *bnep_get_device(st - return conn ? &conn->dev : NULL; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type bnep_type = { - .name = "bluetooth", - }; -+#endif - - int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) - { diff --git a/patches/collateral-evolutions/network/14-device-type/net_wireless_core.patch b/patches/collateral-evolutions/network/14-device-type/net_wireless_core.patch deleted file mode 100644 index dda66ab9cf7d..000000000000 --- a/patches/collateral-evolutions/network/14-device-type/net_wireless_core.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -839,9 +839,11 @@ void cfg80211_unregister_wdev(struct wir - } - EXPORT_SYMBOL(cfg80211_unregister_wdev); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wiphy_type = { - .name = "wlan", - }; -+#endif - - void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, - enum nl80211_iftype iftype, int num)