aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-17 04:44:11 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 10:32:03 -0400
commite1b1c0875daa8ef396593270b5d3ec0b8483c1ea (patch)
tree76dcb6ccc770f1f8d96693f8e64479ea83377102
parentbbb05cb55a1b57003b17d47b5a7ac809bab60f80 (diff)
iwlagn: rename iwlagn_set_dynamic_key
We now have iwlagn_set_dynamic_key() and iwl_set_dynamic_key() which is confusing, rename the former to iwlagn_send_sta_key() to better reflect what it does -- it only sends a command and doesn't change driver state. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 7a2babe0dd4e..37e624095e40 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -301,15 +301,16 @@ static u8 iwlagn_key_sta_id(struct iwl_priv *priv,
301 return sta_id; 301 return sta_id;
302} 302}
303 303
304static int iwlagn_set_dynamic_key(struct iwl_priv *priv, 304static int iwlagn_send_sta_key(struct iwl_priv *priv,
305 struct ieee80211_key_conf *keyconf, 305 struct ieee80211_key_conf *keyconf,
306 u8 sta_id, u32 tkip_iv32, u16 *tkip_p1k, 306 u8 sta_id, u32 tkip_iv32, u16 *tkip_p1k,
307 u32 cmd_flags) 307 u32 cmd_flags)
308{ 308{
309 unsigned long flags; 309 unsigned long flags;
310 __le16 key_flags; 310 __le16 key_flags;
311 struct iwl_addsta_cmd sta_cmd; 311 struct iwl_addsta_cmd sta_cmd;
312 int i; 312 int i;
313
313 spin_lock_irqsave(&priv->sta_lock, flags); 314 spin_lock_irqsave(&priv->sta_lock, flags);
314 memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(sta_cmd)); 315 memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(sta_cmd));
315 spin_unlock_irqrestore(&priv->sta_lock, flags); 316 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -370,8 +371,8 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
370 return; 371 return;
371 } 372 }
372 373
373 iwlagn_set_dynamic_key(priv, keyconf, sta_id, 374 iwlagn_send_sta_key(priv, keyconf, sta_id,
374 iv32, phase1key, CMD_ASYNC); 375 iv32, phase1key, CMD_ASYNC);
375} 376}
376 377
377int iwl_remove_dynamic_key(struct iwl_priv *priv, 378int iwl_remove_dynamic_key(struct iwl_priv *priv,
@@ -450,16 +451,16 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
450 /* pre-fill phase 1 key into device cache */ 451 /* pre-fill phase 1 key into device cache */
451 ieee80211_get_key_rx_seq(keyconf, 0, &seq); 452 ieee80211_get_key_rx_seq(keyconf, 0, &seq);
452 ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k); 453 ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k);
453 ret = iwlagn_set_dynamic_key(priv, keyconf, sta_id, 454 ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
454 seq.tkip.iv32, p1k, CMD_SYNC); 455 seq.tkip.iv32, p1k, CMD_SYNC);
455 break; 456 break;
456 case WLAN_CIPHER_SUITE_CCMP: 457 case WLAN_CIPHER_SUITE_CCMP:
457 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 458 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
458 /* fall through */ 459 /* fall through */
459 case WLAN_CIPHER_SUITE_WEP40: 460 case WLAN_CIPHER_SUITE_WEP40:
460 case WLAN_CIPHER_SUITE_WEP104: 461 case WLAN_CIPHER_SUITE_WEP104:
461 ret = iwlagn_set_dynamic_key(priv, keyconf, sta_id, 462 ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
462 0, NULL, CMD_SYNC); 463 0, NULL, CMD_SYNC);
463 break; 464 break;
464 default: 465 default:
465 IWL_ERR(priv, "Unknown cipher %x\n", keyconf->cipher); 466 IWL_ERR(priv, "Unknown cipher %x\n", keyconf->cipher);