aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2012-10-19 19:19:16 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 15:20:33 -0400
commitf162cac83ba474eb71ea2aa7788bd77f1692f4d2 (patch)
treeef9e5af7642d0e390aa6267bc350a0fb7b7e5e51 /drivers/net/wireless/mwifiex/cfg80211.c
parente45a841972b9d43e19e61ab3089bbe0d52a990e8 (diff)
mwifiex: abort scan upon interface down
When the interface is down, we will abort scan by calling cfg80211_scan_done() with abort option. This fixes WARN_ON triggered by cfg80211 in wdev_cleanup_work(). Driver's internal variables/flags are cleared once we get response for current scan command. Meanwhile we will block new scan request from cfg80211. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 60461325dff..0a067bd0222 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1828,6 +1828,11 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
priv->scan_request = request;
+ if (priv->user_scan_cfg) {
+ dev_err(priv->adapter->dev, "cmd: Scan already in process..\n");
+ return -EBUSY;
+ }
+
priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg),
GFP_KERNEL);
if (!priv->user_scan_cfg) {