iwl3945: clear scanning bits upon failure
authorMohamed Abbas <mohamed.abbas@intel.com>
Tue, 4 Nov 2008 20:21:34 +0000 (12:21 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 6 Nov 2008 21:37:11 +0000 (16:37 -0500)
This patch ensures we clear any scan status bit when
an error occurs while sending the scan command. It is
the implementation of patch:
"iwlwifi: clear scanning bits upon failure"
for iwl3945.

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>
drivers/net/wireless/iwlwifi/iwl3945-base.c

index d15a2c9979549983316a1981bdc07edf27581c54..b9eac5551d829ed604659936e701e5c528d2fe58 100644 (file)
@@ -6273,6 +6273,14 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
        return;
 
  done:
+       /* can not perform scan make sure we clear scanning
+        * bits from status so next scan request can be performed.
+        * if we dont 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);