aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-08-20 09:23:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:33:16 -0400
commitb62177a0aa0521fd07cd7501534c0c3b256ebce6 (patch)
tree09969b36f8ebd4e93ddd2f5598094f699254957c /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent268bae0b6879f238ba57f5f801958d1254e136f7 (diff)
iwlwifi: fix canceling monitor_recover timer
To make del_timer_sync() works we have to assure that timer function does not rearm the timer. To achieve that we cancel timer with STATUS_EXIT_PENDING bit set in __iwl{3945,}_down function. Patch also fix priv->txq memory usage after free for iwl3945, because it move timer cancellation before iwl3945_hw_txq_ctx_free(priv) is called. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 94d7e6e1323d..53e6cbb3aaaa 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2571,6 +2571,11 @@ static void __iwl3945_down(struct iwl_priv *priv)
2571 if (!exit_pending) 2571 if (!exit_pending)
2572 set_bit(STATUS_EXIT_PENDING, &priv->status); 2572 set_bit(STATUS_EXIT_PENDING, &priv->status);
2573 2573
2574 /* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set
2575 * to prevent rearm timer */
2576 if (priv->cfg->ops->lib->recover_from_tx_stall)
2577 del_timer_sync(&priv->monitor_recover);
2578
2574 /* Station information will now be cleared in device */ 2579 /* Station information will now be cleared in device */
2575 iwl_clear_ucode_stations(priv); 2580 iwl_clear_ucode_stations(priv);
2576 iwl_dealloc_bcast_station(priv); 2581 iwl_dealloc_bcast_station(priv);
@@ -3811,8 +3816,6 @@ static void iwl3945_cancel_deferred_work(struct iwl_priv *priv)
3811 cancel_delayed_work(&priv->alive_start); 3816 cancel_delayed_work(&priv->alive_start);
3812 cancel_work_sync(&priv->start_internal_scan); 3817 cancel_work_sync(&priv->start_internal_scan);
3813 cancel_work_sync(&priv->beacon_update); 3818 cancel_work_sync(&priv->beacon_update);
3814 if (priv->cfg->ops->lib->recover_from_tx_stall)
3815 del_timer_sync(&priv->monitor_recover);
3816} 3819}
3817 3820
3818static struct attribute *iwl3945_sysfs_entries[] = { 3821static struct attribute *iwl3945_sysfs_entries[] = {