compat-wireles: fix compilation when you have disabled CONFIG_CFG80211_WEXT
On newer kernels you can disable CONFIG_CFG80211_WEXT. If you try to
compile compat-wireless with CONFIG_CFG80211_WEXT disabled you get:
CC [M] /home/mcgrof/devel/compat-wireless-2.6/net/wireless/core.o
/home/mcgrof/devel/compat-wireless-2.6/net/wireless/core.c: In function ‘cfg80211_netdev_notifier_call’:
/home/mcgrof/devel/compat-wireless-2.6/net/wireless/core.c:703: error: ‘struct net_device’ has no member named ‘wireless_handlers’
/home/mcgrof/devel/compat-wireless-2.6/net/wireless/core.c:704: error: ‘struct net_device’ has no member named ‘wireless_handlers’
make[3]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/wireless/core.o] Error 1
make[2]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/wireless] Error 2
make[1]: *** [_module_/home/mcgrof/devel/compat-wireless-2.6] Error 2
This is because we currently force CONFIG_CFG80211_WEXT to be enabled
on the compat_autoconf.h. Instead we should enable it conditionally
based on CONFIG_CFG80211_WEXT for older kernels and simply leave it
out for newer kernels, so we can respect your kernel config. For
newer kernels you cannot enable CONFIG_CFG80211_WEXT since
the net_device structure changes based on CONFIG_CFG80211_WEXT,
the wireless_handlers are not added to the net_device if you don't
have it enabled.
Reported-by: Mathieu Olivari <Mathieu.Olivari@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>