@@ -196,6 +196,8 @@ endif #CONFIG_PCMCIA
# autoconf.h
ifdef CONFIG_WIRELESS_EXT
CONFIG_CFG80211_WEXT=y
+else #CONFIG_CFG80211_WEXT
+$(warning "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m.")
endif #CONFIG_WIRELESS_EXT
ifneq ($(CONFIG_STAGING),)
@@ -29,12 +29,18 @@ CONFIG_WIRELESS_EXT in compat-wireless.
device_initialize(&rdev->wiphy.dev);
rdev->wiphy.dev.class = &ieee80211_class;
rdev->wiphy.dev.platform_data = rdev;
-@@ -712,6 +708,8 @@ static int cfg80211_netdev_notifier_call
+@@ -712,6 +708,14 @@ static int cfg80211_netdev_notifier_call
wdev->sme_state = CFG80211_SME_IDLE;
mutex_unlock(&rdev->devlist_mtx);
#ifdef CONFIG_CFG80211_WEXT
++#ifdef CONFIG_WIRELESS_EXT
+ if (!dev->wireless_handlers)
+ dev->wireless_handlers = &cfg80211_wext_handler;
++#else
++ printk(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;