On 12.09.2010 22:20, Johannes Berg wrote: > > On Sat, 11 Sep 2010 18:18:31 +0200, Hauke Mehrtens <hauke@xxxxxxxxxx> > wrote: >> ++#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 > > This could use printk_once :-) Yes that will be better. I will resend a new patch. > Also, if the kernel you're compiling against is new enough and was built > with cfg80211, this isn't necessary, but the normal code could be used > (which I believe this patch currently removes, rather than ifdeffing it) Using the normal code does not work because the kernel accesses the wext handler through struct wiphy which is shipped with compat-wireless. struct wiphy used in e.g. kernel 2.6.33 is different from the struct used in compat-wireless. The wext attribute is at a different position and the kernel would dereference a wrong pointer or something else. Hauke -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html