diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-05-07 04:49:15 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:09:08 -0400 |
commit | db125c787bc2c07ad97ba94707b653885d723a40 (patch) | |
tree | 7fe9c3c53e373cc32fe090bca6fea901b6d4c99c /drivers/net/wireless/iwlwifi/iwl-sta.h | |
parent | 63d4176933a5c4d9387eb79e1d50a9232e58c06e (diff) |
iwlwifi: clear driver stations when going down
During a hw restart, mac80211 will attempt to
reconfigure all stations. Currently, that fails
and leads to warnings because we still have the
stations marked active. Therefore, clear all
stations when doing down.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.h | 19 |
1 files changed, 19 insertions, 0 deletions
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, | |||
81 | void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id); | 81 | void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id); |
82 | void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt); | 82 | void 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 | */ | ||
93 | static 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 | |||
84 | static inline int iwl_sta_id(struct ieee80211_sta *sta) | 103 | static inline int iwl_sta_id(struct ieee80211_sta *sta) |
85 | { | 104 | { |
86 | if (WARN_ON(!sta)) | 105 | if (WARN_ON(!sta)) |