summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2013-04-01 12:44:45 -0700
committerJohn W. Linville <linville@tuxdriver.com>2013-04-03 14:31:56 -0400
commit21de979ecfc7b7f9442f8aea9a54b3ab670d0151 (patch)
tree2d55b464d450f6506c9e7a822e9e0d0701adaf56 /drivers/net/wireless
parent9306a398e76df1952685e95cc293c4100fe5286d (diff)
downloadop-kernel-dev-21de979ecfc7b7f9442f8aea9a54b3ab670d0151.zip
op-kernel-dev-21de979ecfc7b7f9442f8aea9a54b3ab670d0151.tar.gz
mwifiex: complete last internal scan
We are waiting on first scan command of internal scan request before association, so we should complete on last internal scan command response. Cc: <stable@vger.kernel.org> # 3.8 Tested-by: Daniel Drake <dsd@laptop.org> Tested-by: Marco Cesarano <marco@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> 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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index d215b4d..e7f6dea 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1393,8 +1393,10 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
queue_work(adapter->workqueue, &adapter->main_work);
/* Perform internal scan synchronously */
- if (!priv->scan_request)
+ if (!priv->scan_request) {
+ dev_dbg(adapter->dev, "wait internal scan\n");
mwifiex_wait_queue_complete(adapter, cmd_node);
+ }
} else {
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
flags);
@@ -1793,7 +1795,12 @@ check_next_scan:
/* Need to indicate IOCTL complete */
if (adapter->curr_cmd->wait_q_enabled) {
adapter->cmd_wait_q.status = 0;
- mwifiex_complete_cmd(adapter, adapter->curr_cmd);
+ if (!priv->scan_request) {
+ dev_dbg(adapter->dev,
+ "complete internal scan\n");
+ mwifiex_complete_cmd(adapter,
+ adapter->curr_cmd);
+ }
}
if (priv->report_scan_result)
priv->report_scan_result = false;
OpenPOWER on IntegriCloud