diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-27 11:53:46 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 11:53:46 -0400 |
commit | a194e3249baf954dc34c67cdad5b8bed36f49e72 (patch) | |
tree | 2010fbba8fdae3179a1439f2038e30694a85124f /drivers/net/wireless/iwlwifi/iwl-sta.h | |
parent | 751ca305d0e37f0d44b6a261e7db31aa6b60fbf4 (diff) |
iwlwifi: contextify broadcast station
The broadcast station ID is per context, so
add a variable for the ID in the context and
use it everywhere we previously hardcoded it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h index d38a350ba0bd..8a978c6e105f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.h +++ b/drivers/net/wireless/iwlwifi/iwl-sta.h | |||
@@ -48,28 +48,29 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
48 | int iwl_set_default_wep_key(struct iwl_priv *priv, | 48 | int iwl_set_default_wep_key(struct iwl_priv *priv, |
49 | struct ieee80211_key_conf *key); | 49 | struct ieee80211_key_conf *key); |
50 | int iwl_restore_default_wep_keys(struct iwl_priv *priv); | 50 | int iwl_restore_default_wep_keys(struct iwl_priv *priv); |
51 | int iwl_set_dynamic_key(struct iwl_priv *priv, | 51 | int iwl_set_dynamic_key(struct iwl_priv *priv, struct iwl_rxon_context *ctx, |
52 | struct ieee80211_key_conf *key, u8 sta_id); | 52 | struct ieee80211_key_conf *key, u8 sta_id); |
53 | int iwl_remove_dynamic_key(struct iwl_priv *priv, | 53 | int iwl_remove_dynamic_key(struct iwl_priv *priv, |
54 | struct ieee80211_key_conf *key, u8 sta_id); | 54 | struct ieee80211_key_conf *key, u8 sta_id); |
55 | void iwl_update_tkip_key(struct iwl_priv *priv, | 55 | void iwl_update_tkip_key(struct iwl_priv *priv, |
56 | struct ieee80211_key_conf *keyconf, | 56 | struct iwl_rxon_context *ctx, |
57 | struct ieee80211_sta *sta, u32 iv32, u16 *phase1key); | 57 | struct ieee80211_key_conf *keyconf, |
58 | struct ieee80211_sta *sta, u32 iv32, u16 *phase1key); | ||
58 | 59 | ||
59 | void iwl_restore_stations(struct iwl_priv *priv); | 60 | void iwl_restore_stations(struct iwl_priv *priv); |
60 | void iwl_clear_ucode_stations(struct iwl_priv *priv); | 61 | void iwl_clear_ucode_stations(struct iwl_priv *priv); |
61 | int iwl_alloc_bcast_station(struct iwl_priv *priv, bool init_lq); | 62 | int iwl_alloc_bcast_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, |
62 | void iwl_dealloc_bcast_station(struct iwl_priv *priv); | 63 | bool init_lq); |
63 | int iwl_update_bcast_station(struct iwl_priv *priv); | 64 | void iwl_dealloc_bcast_stations(struct iwl_priv *priv); |
65 | int iwl_update_bcast_stations(struct iwl_priv *priv); | ||
64 | int iwl_get_free_ucode_key_index(struct iwl_priv *priv); | 66 | int iwl_get_free_ucode_key_index(struct iwl_priv *priv); |
65 | int iwl_send_add_sta(struct iwl_priv *priv, | 67 | int iwl_send_add_sta(struct iwl_priv *priv, |
66 | struct iwl_addsta_cmd *sta, u8 flags); | 68 | struct iwl_addsta_cmd *sta, u8 flags); |
67 | int iwl_add_bssid_station(struct iwl_priv *priv, const u8 *addr, bool init_rs, | 69 | int iwl_add_bssid_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, |
68 | u8 *sta_id_r); | 70 | const u8 *addr, bool init_rs, u8 *sta_id_r); |
69 | int iwl_add_station_common(struct iwl_priv *priv, const u8 *addr, | 71 | int iwl_add_station_common(struct iwl_priv *priv, struct iwl_rxon_context *ctx, |
70 | bool is_ap, | 72 | const u8 *addr, bool is_ap, |
71 | struct ieee80211_sta_ht_cap *ht_info, | 73 | struct ieee80211_sta_ht_cap *ht_info, u8 *sta_id_r); |
72 | u8 *sta_id_r); | ||
73 | int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id, | 74 | int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id, |
74 | const u8 *addr); | 75 | const u8 *addr); |
75 | int iwl_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 76 | int iwl_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
@@ -123,6 +124,7 @@ static inline int iwl_sta_id(struct ieee80211_sta *sta) | |||
123 | /** | 124 | /** |
124 | * iwl_sta_id_or_broadcast - return sta_id or broadcast sta | 125 | * iwl_sta_id_or_broadcast - return sta_id or broadcast sta |
125 | * @priv: iwl priv | 126 | * @priv: iwl priv |
127 | * @context: the current context | ||
126 | * @sta: mac80211 station | 128 | * @sta: mac80211 station |
127 | * | 129 | * |
128 | * In certain circumstances mac80211 passes a station pointer | 130 | * In certain circumstances mac80211 passes a station pointer |
@@ -131,12 +133,13 @@ static inline int iwl_sta_id(struct ieee80211_sta *sta) | |||
131 | * inline wraps that pattern. | 133 | * inline wraps that pattern. |
132 | */ | 134 | */ |
133 | static inline int iwl_sta_id_or_broadcast(struct iwl_priv *priv, | 135 | static inline int iwl_sta_id_or_broadcast(struct iwl_priv *priv, |
136 | struct iwl_rxon_context *context, | ||
134 | struct ieee80211_sta *sta) | 137 | struct ieee80211_sta *sta) |
135 | { | 138 | { |
136 | int sta_id; | 139 | int sta_id; |
137 | 140 | ||
138 | if (!sta) | 141 | if (!sta) |
139 | return priv->hw_params.bcast_sta_id; | 142 | return context->bcast_sta_id; |
140 | 143 | ||
141 | sta_id = iwl_sta_id(sta); | 144 | sta_id = iwl_sta_id(sta); |
142 | 145 | ||