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>
This commit is contained in:
parent
9495b31ad7
commit
dcd5c79c9a
1 changed files with 5 additions and 8 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue