diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-08-20 09:23:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:33:16 -0400 |
commit | b62177a0aa0521fd07cd7501534c0c3b256ebce6 (patch) | |
tree | 09969b36f8ebd4e93ddd2f5598094f699254957c /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 268bae0b6879f238ba57f5f801958d1254e136f7 (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/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 3ced9ea9c5fe..26bc0482dd9e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2764,6 +2764,11 @@ static void __iwl_down(struct iwl_priv *priv) | |||
2764 | if (!exit_pending) | 2764 | if (!exit_pending) |
2765 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 2765 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
2766 | 2766 | ||
2767 | /* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set | ||
2768 | * to prevent rearm timer */ | ||
2769 | if (priv->cfg->ops->lib->recover_from_tx_stall) | ||
2770 | del_timer_sync(&priv->monitor_recover); | ||
2771 | |||
2767 | iwl_clear_ucode_stations(priv); | 2772 | iwl_clear_ucode_stations(priv); |
2768 | iwl_dealloc_bcast_station(priv); | 2773 | iwl_dealloc_bcast_station(priv); |
2769 | iwl_clear_driver_stations(priv); | 2774 | iwl_clear_driver_stations(priv); |
@@ -3870,8 +3875,6 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) | |||
3870 | cancel_work_sync(&priv->beacon_update); | 3875 | cancel_work_sync(&priv->beacon_update); |
3871 | del_timer_sync(&priv->statistics_periodic); | 3876 | del_timer_sync(&priv->statistics_periodic); |
3872 | del_timer_sync(&priv->ucode_trace); | 3877 | del_timer_sync(&priv->ucode_trace); |
3873 | if (priv->cfg->ops->lib->recover_from_tx_stall) | ||
3874 | del_timer_sync(&priv->monitor_recover); | ||
3875 | } | 3878 | } |
3876 | 3879 | ||
3877 | static void iwl_init_hw_rates(struct iwl_priv *priv, | 3880 | static void iwl_init_hw_rates(struct iwl_priv *priv, |