summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMohamed Abbas <mohamed.abbas@intel.com>2008-10-24 08:48:54 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-11-01 00:02:26 +0100
commit951891c7ef844919d30aac7b1fc7396fd8be23ff (patch)
tree3e8c8ba5808265c682104038f0b895451729dc7e /drivers
parentiwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets (diff)
downloadlinux-951891c7ef844919d30aac7b1fc7396fd8be23ff.tar.xz
linux-951891c7ef844919d30aac7b1fc7396fd8be23ff.zip
iwlwifi: clear scanning bits upon failure
In iwl_bg_request_scan function, if we could not send a scan command it will go to done. In done it does the right thing to call mac80211 with scan complete, but the problem is STATUS_SCAN_HW is still set causing any future scan to fail. Fix by clearing the scanning status bits if scan fails. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 3379b41fb5ee..b0abf891516f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -834,6 +834,13 @@ static void iwl_bg_request_scan(struct work_struct *data)
return;
done:
+ /* Cannot perform scan. Make sure we clear scanning
+ * bits from status so next scan request can be performed.
+ * If we don't clear scanning status bit here all next scan
+ * will fail
+ */
+ clear_bit(STATUS_SCAN_HW, &priv->status);
+ clear_bit(STATUS_SCANNING, &priv->status);
/* inform mac80211 scan aborted */
queue_work(priv->workqueue, &priv->scan_completed);
mutex_unlock(&priv->mutex);