From 042007b4c48fa8cc9a569e37afbc58237af541fe Mon Sep 17 00:00:00 2001 From: Sergei Makarenkov Date: Fri, 20 Jan 2017 11:24:42 +0300 Subject: [PATCH] Fix channel switch in the monitor mode if both CONFIG_WIRELESS_EXT and CONFIG_CFG80211_WEXT are enabled --- os_dep/linux/ioctl_linux.c | 4 ++-- os_dep/linux/os_intfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index e1e8e98..2f4d870 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -1993,7 +1993,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, int ret = 0; _func_enter_; - + if(_FAIL == rtw_pwr_wakeup(padapter)) { ret= -EPERM; goto exit; @@ -13572,7 +13572,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) } #endif -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT) struct iw_handler_def rtw_handlers_def = { .standard = rtw_handlers, diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 3e4d6c3..e657b28 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1015,7 +1015,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter) //pnetdev->tx_timeout = NULL; pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */ -#ifdef CONFIG_WIRELESS_EXT +#if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT) pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def; #endif