summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorBing Zhao2012-10-06 05:21:40 +0200
committerJohn W. Linville2012-10-08 21:06:02 +0200
commitc2476335313e618c0368ffbe73e05bba4d0f5f89 (patch)
treee3f699424d9767e98ce9d2cb4605a59ad918c385 /drivers/net/wireless/mwifiex/cfg80211.c
parentmac80211: call drv_get_tsf() in sleepable context (diff)
downloadkernel-qcow2-linux-c2476335313e618c0368ffbe73e05bba4d0f5f89.tar.gz
kernel-qcow2-linux-c2476335313e618c0368ffbe73e05bba4d0f5f89.tar.xz
kernel-qcow2-linux-c2476335313e618c0368ffbe73e05bba4d0f5f89.zip
mwifiex: return -EBUSY if scan request cannot be honored
There are cases we cannot scan when request is received. For example, during WPA group key negociation the scan request will be blocked. We should return an error code to cfg80211 because cfg80211_scan_done will never be called. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Paul Stewart <pstew@chromium.org> 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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 2691620393ea..675247b303d7 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1802,7 +1802,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
{
struct net_device *dev = request->wdev->netdev;
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
- int i, offset;
+ int i, offset, ret;
struct ieee80211_channel *chan;
struct ieee_types_header *ie;
@@ -1855,8 +1855,12 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
priv->user_scan_cfg->chan_list[i].scan_time = 0;
}
- if (mwifiex_scan_networks(priv, priv->user_scan_cfg))
- return -EFAULT;
+
+ ret = mwifiex_scan_networks(priv, priv->user_scan_cfg);
+ if (ret) {
+ dev_err(priv->adapter->dev, "scan failed: %d\n", ret);
+ return ret;
+ }
if (request->ie && request->ie_len) {
for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) {