]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wl12xx/compat-wireless.git/blob - patches/14-device-type.patch
compat-wireless: turn on TESTMODE and MAC DEBUGFS, turn off BT
[wl12xx/compat-wireless.git] / patches / 14-device-type.patch
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
7 compile warning.
9 --- a/net/wireless/core.c
10 +++ b/net/wireless/core.c
11 @@ -784,9 +784,11 @@ static void wdev_cleanup_work(struct wor
12         dev_put(wdev->netdev);
13  }
14  
15 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
16  static struct device_type wiphy_type = {
17         .name   = "wlan",
18  };
19 +#endif
20  
21  static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
22                                          unsigned long state,
23 --- a/net/bluetooth/bnep/core.c
24 +++ b/net/bluetooth/bnep/core.c
25 @@ -545,9 +545,11 @@ static struct device *bnep_get_device(st
26         return conn ? &conn->dev : NULL;
27  }
28  
29 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
30  static struct device_type bnep_type = {
31         .name   = "bluetooth",
32  };
33 +#endif
34  
35  int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
36  {
37 --- a/drivers/net/usb/usbnet.c
38 +++ b/drivers/net/usb/usbnet.c
39 @@ -1290,13 +1290,17 @@ static const struct net_device_ops usbne
40  
41  // precondition: never called in_interrupt
42  
43 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
44  static struct device_type wlan_type = {
45         .name   = "wlan",
46  };
47 +#endif
48  
49 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
50  static struct device_type wwan_type = {
51         .name   = "wwan",
52  };
53 +#endif
54  
55  int
56  usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)