wl1251: set rate index and preamble flag on received packets
[pandora-wifi.git] / patches / 10-add-wext-handlers-to-netdev.patch
1 The patch "wext: refactor" by Johannes Berg refactored
2 wext code so that new kernels no longer get the wext
3 handlers through struct netdevice, instead they get
4 it through the struct wiphy which is cfg80211 specific.
5
6 For old kernels this means you get not wext handlers
7 anymore when backporting code, this adds the wext handler
8 back to the netdevice wireless_handlers to let compat
9 users use wext again.
10
11 We only do this for kernels <= 2.6.32 as 2.6.33 will use
12 the struct wiphy wireless handler.
13
14 --- a/net/wireless/core.c
15 +++ b/net/wireless/core.c
16 @@ -701,6 +701,10 @@ static int cfg80211_netdev_notifier_call
17                 wdev->sme_state = CFG80211_SME_IDLE;
18                 mutex_unlock(&rdev->devlist_mtx);
19  #ifdef CONFIG_CFG80211_WEXT
20 +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,32))
21 +               if (!dev->wireless_handlers)
22 +                       dev->wireless_handlers = &cfg80211_wext_handler;
23 +#endif
24                 wdev->wext.default_key = -1;
25                 wdev->wext.default_mgmt_key = -1;
26                 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;