summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-13 13:27:25 -0700
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 07:30:53 -0700
commita920bffb88260aac36bfd05745696dc6aa256627 (patch)
tree76adf2b4e7299a8f7ea69f3848dd0996401691ee /drivers/net/wireless/iwlwifi/iwl-agn-sta.c
parentc10e2c102ff180998bf91404c2d76ca66ced46a0 (diff)
downloadblackbird-op-linux-a920bffb88260aac36bfd05745696dc6aa256627.tar.gz
blackbird-op-linux-a920bffb88260aac36bfd05745696dc6aa256627.zip
iwlagn: remove keyinfo cache
iwlagn keeps a copy of key stuff internally but never actually uses it, so remove 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-agn-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 67b9c2bacc5f..395dee1c1440 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -234,7 +234,6 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV;
keyconf->hw_key_idx = HW_KEY_DEFAULT;
- priv->stations[ctx->ap_sta_id].keyinfo.cipher = keyconf->cipher;
ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen;
memcpy(&ctx->wep_keys[keyconf->keyidx].key, &keyconf->key,
@@ -272,13 +271,6 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
spin_lock_irqsave(&priv->sta_lock, flags);
- priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
- priv->stations[sta_id].keyinfo.keylen = keyconf->keylen;
- priv->stations[sta_id].keyinfo.keyidx = keyconf->keyidx;
-
- memcpy(priv->stations[sta_id].keyinfo.key,
- keyconf->key, keyconf->keylen);
-
memcpy(&priv->stations[sta_id].sta.key.key[3],
keyconf->key, keyconf->keylen);
@@ -323,11 +315,6 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
spin_lock_irqsave(&priv->sta_lock, flags);
- priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
- priv->stations[sta_id].keyinfo.keylen = keyconf->keylen;
-
- memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key,
- keyconf->keylen);
memcpy(priv->stations[sta_id].sta.key.key, keyconf->key,
keyconf->keylen);
@@ -373,9 +360,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
spin_lock_irqsave(&priv->sta_lock, flags);
- priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
- priv->stations[sta_id].keyinfo.keylen = 16;
-
if ((priv->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK)
== STA_KEY_FLG_NO_ENC)
priv->stations[sta_id].sta.key.key_offset =
@@ -388,10 +372,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
priv->stations[sta_id].sta.key.key_flags = key_flags;
-
- /* This copy is acutally not needed: we get the key with each TX */
- memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
-
memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16);
spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -477,8 +457,6 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
&priv->ucode_key_table))
IWL_ERR(priv, "index %d not used in uCode key table.\n",
priv->stations[sta_id].sta.key.key_offset);
- memset(&priv->stations[sta_id].keyinfo, 0,
- sizeof(struct iwl_hw_key));
memset(&priv->stations[sta_id].sta.key, 0,
sizeof(struct iwl_keyinfo));
priv->stations[sta_id].sta.key.key_flags =
OpenPOWER on IntegriCloud