aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-13 16:27:25 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 10:30:53 -0400
commita920bffb88260aac36bfd05745696dc6aa256627 (patch)
tree76adf2b4e7299a8f7ea69f3848dd0996401691ee /drivers/net/wireless
parentc10e2c102ff180998bf91404c2d76ca66ced46a0 (diff)
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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c22
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h8
2 files changed, 0 insertions, 30 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,
234 234
235 keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV; 235 keyconf->flags &= ~IEEE80211_KEY_FLAG_GENERATE_IV;
236 keyconf->hw_key_idx = HW_KEY_DEFAULT; 236 keyconf->hw_key_idx = HW_KEY_DEFAULT;
237 priv->stations[ctx->ap_sta_id].keyinfo.cipher = keyconf->cipher;
238 237
239 ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; 238 ctx->wep_keys[keyconf->keyidx].key_size = keyconf->keylen;
240 memcpy(&ctx->wep_keys[keyconf->keyidx].key, &keyconf->key, 239 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 271
273 spin_lock_irqsave(&priv->sta_lock, flags); 272 spin_lock_irqsave(&priv->sta_lock, flags);
274 273
275 priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
276 priv->stations[sta_id].keyinfo.keylen = keyconf->keylen;
277 priv->stations[sta_id].keyinfo.keyidx = keyconf->keyidx;
278
279 memcpy(priv->stations[sta_id].keyinfo.key,
280 keyconf->key, keyconf->keylen);
281
282 memcpy(&priv->stations[sta_id].sta.key.key[3], 274 memcpy(&priv->stations[sta_id].sta.key.key[3],
283 keyconf->key, keyconf->keylen); 275 keyconf->key, keyconf->keylen);
284 276
@@ -323,11 +315,6 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
323 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 315 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
324 316
325 spin_lock_irqsave(&priv->sta_lock, flags); 317 spin_lock_irqsave(&priv->sta_lock, flags);
326 priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
327 priv->stations[sta_id].keyinfo.keylen = keyconf->keylen;
328
329 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key,
330 keyconf->keylen);
331 318
332 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 319 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key,
333 keyconf->keylen); 320 keyconf->keylen);
@@ -373,9 +360,6 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
373 360
374 spin_lock_irqsave(&priv->sta_lock, flags); 361 spin_lock_irqsave(&priv->sta_lock, flags);
375 362
376 priv->stations[sta_id].keyinfo.cipher = keyconf->cipher;
377 priv->stations[sta_id].keyinfo.keylen = 16;
378
379 if ((priv->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK) 363 if ((priv->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK)
380 == STA_KEY_FLG_NO_ENC) 364 == STA_KEY_FLG_NO_ENC)
381 priv->stations[sta_id].sta.key.key_offset = 365 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 372
389 priv->stations[sta_id].sta.key.key_flags = key_flags; 373 priv->stations[sta_id].sta.key.key_flags = key_flags;
390 374
391
392 /* This copy is acutally not needed: we get the key with each TX */
393 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
394
395 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16); 375 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16);
396 376
397 spin_unlock_irqrestore(&priv->sta_lock, flags); 377 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -477,8 +457,6 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
477 &priv->ucode_key_table)) 457 &priv->ucode_key_table))
478 IWL_ERR(priv, "index %d not used in uCode key table.\n", 458 IWL_ERR(priv, "index %d not used in uCode key table.\n",
479 priv->stations[sta_id].sta.key.key_offset); 459 priv->stations[sta_id].sta.key.key_offset);
480 memset(&priv->stations[sta_id].keyinfo, 0,
481 sizeof(struct iwl_hw_key));
482 memset(&priv->stations[sta_id].sta.key, 0, 460 memset(&priv->stations[sta_id].sta.key, 0,
483 sizeof(struct iwl_keyinfo)); 461 sizeof(struct iwl_keyinfo));
484 priv->stations[sta_id].sta.key.key_flags = 462 priv->stations[sta_id].sta.key.key_flags =
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 72ef50e319d2..da9048856a3b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -397,13 +397,6 @@ struct iwl_tid_data {
397 struct iwl_ht_agg agg; 397 struct iwl_ht_agg agg;
398}; 398};
399 399
400struct iwl_hw_key {
401 u32 cipher;
402 int keylen;
403 u8 keyidx;
404 u8 key[32];
405};
406
407union iwl_ht_rate_supp { 400union iwl_ht_rate_supp {
408 u16 rates; 401 u16 rates;
409 struct { 402 struct {
@@ -456,7 +449,6 @@ struct iwl_station_entry {
456 struct iwl_addsta_cmd sta; 449 struct iwl_addsta_cmd sta;
457 struct iwl_tid_data tid[MAX_TID_COUNT]; 450 struct iwl_tid_data tid[MAX_TID_COUNT];
458 u8 used, ctxid; 451 u8 used, ctxid;
459 struct iwl_hw_key keyinfo;
460 struct iwl_link_quality_cmd *lq; 452 struct iwl_link_quality_cmd *lq;
461}; 453};
462 454