Skip to content

Commit

Permalink
mwifiex: return -EBUSY if specific scan request cannot be honored
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bing Zhao authored and John W. Linville committed Oct 24, 2012
1 parent 9495b31 commit dcd5c79
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dcd5c79

Please sign in to comment.