diff options
author | Bing Zhao <bzhao@marvell.com> | 2012-10-20 04:01:59 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-24 19:18:09 +0200 |
commit | dcd5c79c9a3a7ac08bdce089fec810677ce6efe8 (patch) | |
tree | 25f35578fab04079a49fff145a8a2661b9565e17 /drivers/net/wireless | |
parent | brcmfmac: fix potential NULL dereference (diff) | |
download | linux-dcd5c79c9a3a7ac08bdce089fec810677ce6efe8.tar.xz linux-dcd5c79c9a3a7ac08bdce089fec810677ce6efe8.zip |
mwifiex: return -EBUSY if specific scan request cannot be honored
Previous patch "mwifiex: return -EBUSY if scan request cannot.."
corrected regular scan request only. There is another case for
specific scan that needs the same handling.
Also, removed !req_ssid check as it has already been validated
by caller.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 00b658d3b6ec..9171aaedbccd 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c @@ -1843,21 +1843,18 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv, struct cfg80211_ssid *req_ssid) { struct mwifiex_adapter *adapter = priv->adapter; - int ret = 0; + int ret; struct mwifiex_user_scan_cfg *scan_cfg; - if (!req_ssid) - return -1; - if (adapter->scan_processing) { - dev_dbg(adapter->dev, "cmd: Scan already in process...\n"); - return ret; + dev_err(adapter->dev, "cmd: Scan already in process...\n"); + return -EBUSY; } if (priv->scan_block) { - dev_dbg(adapter->dev, + dev_err(adapter->dev, "cmd: Scan is blocked during association...\n"); - return ret; + return -EBUSY; } scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL); |