Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90308
b: refs/heads/master
c: 2bc7508
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Mar 25, 2008
1 parent e7f9096 commit cbec788
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 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: 9ae4fda332df616ef47d5bb710c39681641d4303
refs/heads/master: 2bc750899f2b1da010625d064ad46dc3a8e9a372
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ struct iwl4965_tid_data {
struct iwl4965_hw_key {
enum ieee80211_key_alg alg;
int keylen;
struct ieee80211_key_conf *conf;
u8 key[32];
};

Expand Down
33 changes: 24 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,27 @@ static int iwl4965_set_tkip_dynamic_key_info(struct iwl_priv *priv,
struct ieee80211_key_conf *keyconf,
u8 sta_id)
{
return -EOPNOTSUPP;
unsigned long flags;
int ret = 0;

keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
keyconf->hw_key_idx = keyconf->keyidx;

spin_lock_irqsave(&priv->sta_lock, flags);

priv->stations[sta_id].keyinfo.alg = keyconf->alg;
priv->stations[sta_id].keyinfo.conf = keyconf;
priv->stations[sta_id].keyinfo.keylen = 16;

/* 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);

spin_unlock_irqrestore(&priv->sta_lock, flags);

return ret;
}

static int iwl4965_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id)
Expand Down Expand Up @@ -2341,15 +2361,10 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
break;

case ALG_TKIP:
#if 0
cmd->cmd.tx.sec_ctl = TX_CMD_SEC_TKIP;

if (last_frag)
memcpy(cmd->cmd.tx.tkip_mic.byte, skb_frag->tail - 8,
8);
else
memset(cmd->cmd.tx.tkip_mic.byte, 0, 8);
#endif
ieee80211_get_tkip_key(keyinfo->conf, skb_frag,
IEEE80211_TKIP_P2_KEY, cmd->cmd.tx.key);
IWL_DEBUG_TX("tx_cmd with tkip hwcrypto\n");
break;

case ALG_WEP:
Expand Down

0 comments on commit cbec788

Please sign in to comment.