1 Kernels >= 2.6.32 can identify the type of device netdevice
2 so that sysfs can be used to get this. We never really had a
3 systematic way of doing this -- now we do through the
4 SET_NETDEV_DEVTYPE() macro. For older kernels we make the
5 SET_NETDEV_DEVTYPE() be a no-op this means the wireless type
6 we define is unused so we ucomment it simply to avoid a
9 --- a/net/wireless/core.c
10 +++ b/net/wireless/core.c
11 @@ -648,9 +648,11 @@ static void wdev_cleanup_work(struct wor
12 dev_put(wdev->netdev);
15 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
16 static struct device_type wiphy_type = {
21 static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
23 --- a/net/bluetooth/bnep/core.c
24 +++ b/net/bluetooth/bnep/core.c
25 @@ -536,9 +536,11 @@ static struct device *bnep_get_device(st
26 return conn ? &conn->dev : NULL;
29 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
30 static struct device_type bnep_type = {
35 int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
37 --- a/drivers/net/usb/usbnet.c
38 +++ b/drivers/net/usb/usbnet.c
39 @@ -1252,13 +1252,17 @@ static const struct net_device_ops usbne
41 // precondition: never called in_interrupt
43 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
44 static struct device_type wlan_type = {
49 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
50 static struct device_type wwan_type = {
56 usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)