aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.h19
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c1
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index dd26965e75f3..47563cf9cbaa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2405,6 +2405,7 @@ static void __iwl_down(struct iwl_priv *priv)
2405 2405
2406 iwl_clear_ucode_stations(priv); 2406 iwl_clear_ucode_stations(priv);
2407 iwl_dealloc_bcast_station(priv); 2407 iwl_dealloc_bcast_station(priv);
2408 iwl_clear_driver_stations(priv);
2408 2409
2409 /* Unblock any waiting calls */ 2410 /* Unblock any waiting calls */
2410 wake_up_interruptible_all(&priv->wait_command_queue); 2411 wake_up_interruptible_all(&priv->wait_command_queue);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h
index 64271487daa7..c2a453a1a991 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.h
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.h
@@ -81,6 +81,25 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta,
81void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id); 81void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id);
82void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt); 82void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt);
83 83
84/**
85 * iwl_clear_driver_stations - clear knowledge of all stations from driver
86 * @priv: iwl priv struct
87 *
88 * This is called during iwl_down() to make sure that in the case
89 * we're coming there from a hardware restart mac80211 will be
90 * able to reconfigure stations -- if we're getting there in the
91 * normal down flow then the stations will already be cleared.
92 */
93static inline void iwl_clear_driver_stations(struct iwl_priv *priv)
94{
95 unsigned long flags;
96
97 spin_lock_irqsave(&priv->sta_lock, flags);
98 memset(priv->stations, 0, sizeof(priv->stations));
99 priv->num_stations = 0;
100 spin_unlock_irqrestore(&priv->sta_lock, flags);
101}
102
84static inline int iwl_sta_id(struct ieee80211_sta *sta) 103static inline int iwl_sta_id(struct ieee80211_sta *sta)
85{ 104{
86 if (WARN_ON(!sta)) 105 if (WARN_ON(!sta))
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 4916f2365501..4c78783a6035 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2585,6 +2585,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
2585 /* Station information will now be cleared in device */ 2585 /* Station information will now be cleared in device */
2586 iwl_clear_ucode_stations(priv); 2586 iwl_clear_ucode_stations(priv);
2587 iwl_dealloc_bcast_station(priv); 2587 iwl_dealloc_bcast_station(priv);
2588 iwl_clear_driver_stations(priv);
2588 2589
2589 /* Unblock any waiting calls */ 2590 /* Unblock any waiting calls */
2590 wake_up_interruptible_all(&priv->wait_command_queue); 2591 wake_up_interruptible_all(&priv->wait_command_queue);