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

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent bbb05cb5
......@@ -301,7 +301,7 @@ static u8 iwlagn_key_sta_id(struct iwl_priv *priv,
return sta_id;
}
static int iwlagn_set_dynamic_key(struct iwl_priv *priv,
static int iwlagn_send_sta_key(struct iwl_priv *priv,
struct ieee80211_key_conf *keyconf,
u8 sta_id, u32 tkip_iv32, u16 *tkip_p1k,
u32 cmd_flags)
......@@ -310,6 +310,7 @@ static int iwlagn_set_dynamic_key(struct iwl_priv *priv,
__le16 key_flags;
struct iwl_addsta_cmd sta_cmd;
int i;
spin_lock_irqsave(&priv->sta_lock, flags);
memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(sta_cmd));
spin_unlock_irqrestore(&priv->sta_lock, flags);
......@@ -370,7 +371,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
return;
}
iwlagn_set_dynamic_key(priv, keyconf, sta_id,
iwlagn_send_sta_key(priv, keyconf, sta_id,
iv32, phase1key, CMD_ASYNC);
}
......@@ -450,7 +451,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
/* pre-fill phase 1 key into device cache */
ieee80211_get_key_rx_seq(keyconf, 0, &seq);
ieee80211_get_tkip_rx_p1k(keyconf, addr, seq.tkip.iv32, p1k);
ret = iwlagn_set_dynamic_key(priv, keyconf, sta_id,
ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
seq.tkip.iv32, p1k, CMD_SYNC);
break;
case WLAN_CIPHER_SUITE_CCMP:
......@@ -458,7 +459,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
/* fall through */
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
ret = iwlagn_set_dynamic_key(priv, keyconf, sta_id,
ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
0, NULL, CMD_SYNC);
break;
default:
......
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