diff options
author | Bing Zhao <bzhao@marvell.com> | 2013-04-01 15:44:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-03 14:31:56 -0400 |
commit | 21de979ecfc7b7f9442f8aea9a54b3ab670d0151 (patch) | |
tree | 2d55b464d450f6506c9e7a822e9e0d0701adaf56 /drivers/net/wireless/mwifiex/scan.c | |
parent | 9306a398e76df1952685e95cc293c4100fe5286d (diff) |
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/mwifiex/scan.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index d215b4d3c51b..e7f6deaf715e 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, | |||
1393 | queue_work(adapter->workqueue, &adapter->main_work); | 1393 | queue_work(adapter->workqueue, &adapter->main_work); |
1394 | 1394 | ||
1395 | /* Perform internal scan synchronously */ | 1395 | /* Perform internal scan synchronously */ |
1396 | if (!priv->scan_request) | 1396 | if (!priv->scan_request) { |
1397 | dev_dbg(adapter->dev, "wait internal scan\n"); | ||
1397 | mwifiex_wait_queue_complete(adapter, cmd_node); | 1398 | mwifiex_wait_queue_complete(adapter, cmd_node); |
1399 | } | ||
1398 | } else { | 1400 | } else { |
1399 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, | 1401 | spin_unlock_irqrestore(&adapter->scan_pending_q_lock, |
1400 | flags); | 1402 | flags); |
@@ -1793,7 +1795,12 @@ check_next_scan: | |||
1793 | /* Need to indicate IOCTL complete */ | 1795 | /* Need to indicate IOCTL complete */ |
1794 | if (adapter->curr_cmd->wait_q_enabled) { | 1796 | if (adapter->curr_cmd->wait_q_enabled) { |
1795 | adapter->cmd_wait_q.status = 0; | 1797 | adapter->cmd_wait_q.status = 0; |
1796 | mwifiex_complete_cmd(adapter, adapter->curr_cmd); | 1798 | if (!priv->scan_request) { |
1799 | dev_dbg(adapter->dev, | ||
1800 | "complete internal scan\n"); | ||
1801 | mwifiex_complete_cmd(adapter, | ||
1802 | adapter->curr_cmd); | ||
1803 | } | ||
1797 | } | 1804 | } |
1798 | if (priv->report_scan_result) | 1805 | if (priv->report_scan_result) |
1799 | priv->report_scan_result = false; | 1806 | priv->report_scan_result = false; |