]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: clear scanning bits upon failure
authorMohamed Abbas <mohamed.abbas@intel.com>
Fri, 24 Oct 2008 06:48:54 +0000 (23:48 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 6 Nov 2008 21:37:08 +0000 (16:37 -0500)
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>
drivers/net/wireless/iwlwifi/iwl-scan.c

index 3b0bee331a3350634c3179e86888900e562075c5..c89365e2ca58e3f4c5d142e9f9d11ed75d7642cc 100644 (file)
@@ -896,6 +896,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);