Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258539
b: refs/heads/master
c: e1b1c08
h: refs/heads/master
i:
  258537: 2db6d8a
  258535: 266f745
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Jul 21, 2011
1 parent be74f10 commit 7e845a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbb05cb55a1b57003b17d47b5a7ac809bab60f80
refs/heads/master: e1b1c0875daa8ef396593270b5d3ec0b8483c1ea
21 changes: 11 additions & 10 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,16 @@ static u8 iwlagn_key_sta_id(struct iwl_priv *priv,
return sta_id;
}

static int iwlagn_set_dynamic_key(struct iwl_priv *priv,
struct ieee80211_key_conf *keyconf,
u8 sta_id, u32 tkip_iv32, u16 *tkip_p1k,
u32 cmd_flags)
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)
{
unsigned long flags;
__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);
Expand Down Expand Up @@ -370,8 +371,8 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
return;
}

iwlagn_set_dynamic_key(priv, keyconf, sta_id,
iv32, phase1key, CMD_ASYNC);
iwlagn_send_sta_key(priv, keyconf, sta_id,
iv32, phase1key, CMD_ASYNC);
}

int iwl_remove_dynamic_key(struct iwl_priv *priv,
Expand Down Expand Up @@ -450,16 +451,16 @@ 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,
seq.tkip.iv32, p1k, CMD_SYNC);
ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
seq.tkip.iv32, p1k, CMD_SYNC);
break;
case WLAN_CIPHER_SUITE_CCMP:
keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
/* fall through */
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
ret = iwlagn_set_dynamic_key(priv, keyconf, sta_id,
0, NULL, CMD_SYNC);
ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
0, NULL, CMD_SYNC);
break;
default:
IWL_ERR(priv, "Unknown cipher %x\n", keyconf->cipher);
Expand Down

0 comments on commit 7e845a0

Please sign in to comment.