|
@@ -2567,12 +2567,13 @@ static void iwl3945_cancel_deferred_work(struct iwl_priv *priv);
|
|
|
static void __iwl3945_down(struct iwl_priv *priv)
|
|
|
{
|
|
|
unsigned long flags;
|
|
|
- int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status);
|
|
|
+ int exit_pending;
|
|
|
|
|
|
IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n");
|
|
|
|
|
|
- if (!exit_pending)
|
|
|
- set_bit(STATUS_EXIT_PENDING, &priv->status);
|
|
|
+ iwl_scan_cancel_timeout(priv, 200);
|
|
|
+
|
|
|
+ exit_pending = test_and_set_bit(STATUS_EXIT_PENDING, &priv->status);
|
|
|
|
|
|
/* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set
|
|
|
* to prevent rearm timer */
|
|
@@ -3172,15 +3173,6 @@ static void iwl3945_mac_stop(struct ieee80211_hw *hw)
|
|
|
|
|
|
priv->is_open = 0;
|
|
|
|
|
|
- if (iwl_is_ready_rf(priv)) {
|
|
|
- /* stop mac, cancel any scan request and clear
|
|
|
- * RXON_FILTER_ASSOC_MSK BIT
|
|
|
- */
|
|
|
- mutex_lock(&priv->mutex);
|
|
|
- iwl_scan_cancel_timeout(priv, 100);
|
|
|
- mutex_unlock(&priv->mutex);
|
|
|
- }
|
|
|
-
|
|
|
iwl3945_down(priv);
|
|
|
|
|
|
flush_workqueue(priv->workqueue);
|