Commit a920bffb authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy

iwlagn: remove keyinfo cache

iwlagn keeps a copy of key stuff internally but
never actually uses it, so remove it.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent c10e2c10
...@@ -234,7 +234,6 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, ...@@ -234,7 +234,6 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV; keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV;
keyconf->hw_key_idx = HW_KEY_DEFAULT; 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; ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen;
memcpy(&ctx->wep_keys[keyconf->keyidx].key, &keyconf->key, 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, ...@@ -272,13 +271,6 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
spin_lock_irqsave(&priv->sta_lock, flags); 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], memcpy(&priv->stations[sta_id].sta.key.key[3],
keyconf->key, keyconf->keylen); keyconf->key, keyconf->keylen);
...@@ -323,11 +315,6 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv, ...@@ -323,11 +315,6 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
spin_lock_irqsave(&priv->sta_lock, flags); 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, memcpy(priv->stations[sta_id].sta.key.key, keyconf->key,
keyconf->keylen); keyconf->keylen);
...@@ -373,9 +360,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, ...@@ -373,9 +360,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
spin_lock_irqsave(&priv->sta_lock, flags); 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) if ((priv->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK)
== STA_KEY_FLG_NO_ENC) == STA_KEY_FLG_NO_ENC)
priv->stations[sta_id].sta.key.key_offset = priv->stations[sta_id].sta.key.key_offset =
...@@ -388,10 +372,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, ...@@ -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; 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); memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16);
spin_unlock_irqrestore(&priv->sta_lock, flags); spin_unlock_irqrestore(&priv->sta_lock, flags);
...@@ -477,8 +457,6 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, ...@@ -477,8 +457,6 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
&priv->ucode_key_table)) &priv->ucode_key_table))
IWL_ERR(priv, "index %d not used in uCode key table.\n", IWL_ERR(priv, "index %d not used in uCode key table.\n",
priv->stations[sta_id].sta.key.key_offset); 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, memset(&priv->stations[sta_id].sta.key, 0,
sizeof(struct iwl_keyinfo)); sizeof(struct iwl_keyinfo));
priv->stations[sta_id].sta.key.key_flags = priv->stations[sta_id].sta.key.key_flags =
......
...@@ -397,13 +397,6 @@ struct iwl_tid_data { ...@@ -397,13 +397,6 @@ struct iwl_tid_data {
struct iwl_ht_agg agg; struct iwl_ht_agg agg;
}; };
struct iwl_hw_key {
u32 cipher;
int keylen;
u8 keyidx;
u8 key[32];
};
union iwl_ht_rate_supp { union iwl_ht_rate_supp {
u16 rates; u16 rates;
struct { struct {
...@@ -456,7 +449,6 @@ struct iwl_station_entry { ...@@ -456,7 +449,6 @@ struct iwl_station_entry {
struct iwl_addsta_cmd sta; struct iwl_addsta_cmd sta;
struct iwl_tid_data tid[MAX_TID_COUNT]; struct iwl_tid_data tid[MAX_TID_COUNT];
u8 used, ctxid; u8 used, ctxid;
struct iwl_hw_key keyinfo;
struct iwl_link_quality_cmd *lq; struct iwl_link_quality_cmd *lq;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment