diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 04:46:42 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 12:25:31 -0400 |
commit | 2995bafafd4d9d2f840b51b0121997be09fb8b47 (patch) | |
tree | 1e25d3888e0489687c2dbbbdc731ec0a147d6319 /drivers/net/wireless/iwlwifi/iwl-sta.c | |
parent | 95c38dd429712366739299579b0785625cba66d6 (diff) |
iwlwifi: move AP sta ID to context
Each context needs to use a different AP sta
ID, so we need to move that into the context
struct instead of hardcoding 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.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 29235626ac0b..f5500cc8a44e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -236,7 +236,7 @@ static u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
236 | u16 rate; | 236 | u16 rate; |
237 | 237 | ||
238 | if (is_ap) | 238 | if (is_ap) |
239 | sta_id = IWL_AP_ID; | 239 | sta_id = ctx->ap_sta_id; |
240 | else if (is_broadcast_ether_addr(addr)) | 240 | else if (is_broadcast_ether_addr(addr)) |
241 | sta_id = ctx->bcast_sta_id; | 241 | sta_id = ctx->bcast_sta_id; |
242 | else | 242 | else |
@@ -810,6 +810,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
810 | EXPORT_SYMBOL(iwl_remove_default_wep_key); | 810 | EXPORT_SYMBOL(iwl_remove_default_wep_key); |
811 | 811 | ||
812 | int iwl_set_default_wep_key(struct iwl_priv *priv, | 812 | int iwl_set_default_wep_key(struct iwl_priv *priv, |
813 | struct iwl_rxon_context *ctx, | ||
813 | struct ieee80211_key_conf *keyconf) | 814 | struct ieee80211_key_conf *keyconf) |
814 | { | 815 | { |
815 | int ret; | 816 | int ret; |
@@ -824,7 +825,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, | |||
824 | 825 | ||
825 | keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV; | 826 | keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV; |
826 | keyconf->hw_key_idx = HW_KEY_DEFAULT; | 827 | keyconf->hw_key_idx = HW_KEY_DEFAULT; |
827 | priv->stations[IWL_AP_ID].keyinfo.cipher = keyconf->cipher; | 828 | priv->stations[ctx->ap_sta_id].keyinfo.cipher = keyconf->cipher; |
828 | 829 | ||
829 | priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; | 830 | priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; |
830 | memcpy(&priv->wep_keys[keyconf->keyidx].key, &keyconf->key, | 831 | memcpy(&priv->wep_keys[keyconf->keyidx].key, &keyconf->key, |