Commit dcd5c79c authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

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: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarPaul Stewart <pstew@chromium.org>
Reviewed-by: default avatarRyan Cairns <rtc@chromium.org>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9495b31a
...@@ -1843,21 +1843,18 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv, ...@@ -1843,21 +1843,18 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv,
struct cfg80211_ssid *req_ssid) struct cfg80211_ssid *req_ssid)
{ {
struct mwifiex_adapter *adapter = priv->adapter; struct mwifiex_adapter *adapter = priv->adapter;
int ret = 0; int ret;
struct mwifiex_user_scan_cfg *scan_cfg; struct mwifiex_user_scan_cfg *scan_cfg;
if (!req_ssid)
return -1;
if (adapter->scan_processing) { if (adapter->scan_processing) {
dev_dbg(adapter->dev, "cmd: Scan already in process...\n"); dev_err(adapter->dev, "cmd: Scan already in process...\n");
return ret; return -EBUSY;
} }
if (priv->scan_block) { if (priv->scan_block) {
dev_dbg(adapter->dev, dev_err(adapter->dev,
"cmd: Scan is blocked during association...\n"); "cmd: Scan is blocked during association...\n");
return ret; return -EBUSY;
} }
scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL); scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment