summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2014-04-11 01:45:20 +0000
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2014-04-17 16:23:08 -0700
commitbe4a0f9ad7e17670d7a30c9e94d5dd918425f90a (patch)
treee357fbef6a8bd452136a59c59a0b654d666d38a8 /patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev
parent0429914b5f1cb02830dbc4200d615abd9b3f2f7c (diff)
backports: nuke support for kernels < 3.0
mcgrof@drvbp1 ~/backports (git::master)$ time ./gentree.py --clean /home/mcgrof/linux-next /home/mcgrof/build/next-20140409 Copy original source files ... Apply patches ... Modify Kconfig tree ... Rewrite Makefiles and Kconfig files ... Done! real 1m30.186s user 9m25.180s sys 0m24.428s mcgrof@drvbp1 ~/build/next-20140409 $ time ckmake --allyesconfig 1 3.0.101 [ OK ] 2 3.1.10 [ OK ] 3 3.2.54 [ OK ] 4 3.3.8 [ OK ] 5 3.4.79 [ OK ] 6 3.5.7 [ OK ] 7 3.6.11 [ OK ] 8 3.7.10 [ OK ] 9 3.8.13 [ OK ] 10 3.9.11 [ OK ] 11 3.10.29 [ OK ] 12 3.11.10 [ OK ] 13 3.12.10 [ OK ] 14 3.13.2 [ OK ] 15 3.14-rc1 [ OK ] real 26m54.859s user 744m15.764s sys 83m47.440s Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev')
-rw-r--r--patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/INFO18
-rw-r--r--patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/net_wireless_core.patch29
2 files changed, 47 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/INFO b/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/INFO
new file mode 100644
index 00000000..76149d78
--- /dev/null
+++ b/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/INFO
@@ -0,0 +1,18 @@
+The patch "wext: refactor" by Johannes Berg refactored
+wext code so that new kernels no longer get the wext
+handlers through struct netdevice, instead they get
+it through the struct wiphy which is cfg80211 specific.
+
+For old kernels this means you get not wext handlers
+anymore when backporting code, this adds the wext handler
+back to the netdevice wireless_handlers to let compat
+users use wext again.
+
+We do this for every kernel version because the struct wiphy
+is changing from kernel version to version. At least the
+struct from kernel 2.6.33 and 2.6.34 are incompatible and
+the kernel would dereference some wrong type in the struct
+and oops. The old interface is not affected by this. This
+will cause that CONFIG_CFG80211_WEXT still depends on
+CONFIG_WIRELESS_EXT in compat-drivers.
+
diff --git a/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/net_wireless_core.patch b/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/net_wireless_core.patch
new file mode 100644
index 00000000..1e7e6b29
--- /dev/null
+++ b/patches/collateral-evolutions/network/0010-add-wext-handlers-to-netdev/net_wireless_core.patch
@@ -0,0 +1,29 @@
+--- a/net/wireless/core.c
++++ b/net/wireless/core.c
+@@ -321,10 +321,6 @@ struct wiphy *wiphy_new(const struct cfg
+ INIT_WORK(&rdev->sched_scan_results_wk, __cfg80211_sched_scan_results);
+ INIT_DELAYED_WORK(&rdev->dfs_update_channels_wk,
+ cfg80211_dfs_channels_update_work);
+-#ifdef CONFIG_CFG80211_WEXT
+- rdev->wiphy.wext = &cfg80211_wext_handler;
+-#endif
+-
+ device_initialize(&rdev->wiphy.dev);
+ rdev->wiphy.dev.class = &ieee80211_class;
+ rdev->wiphy.dev.platform_data = rdev;
+@@ -844,6 +840,15 @@ static int cfg80211_netdev_notifier_call
+ }
+ wdev->netdev = dev;
+ #ifdef CONFIG_CFG80211_WEXT
++#ifdef CONFIG_WIRELESS_EXT
++ if (!dev->wireless_handlers)
++ dev->wireless_handlers = &cfg80211_wext_handler;
++#else
++ printk_once(KERN_WARNING "cfg80211: wext will not work because "
++ "kernel was compiled with CONFIG_WIRELESS_EXT=n. "
++ "Tools using wext interface, like iwconfig will "
++ "not work.\n");
++#endif
+ wdev->wext.default_key = -1;
+ wdev->wext.default_mgmt_key = -1;
+ wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;