Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102740
b: refs/heads/master
c: 3c83809
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and John W. Linville committed May 22, 2008
1 parent 0f08cf1 commit ab07ca4
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 82a57447fa66bf138cd55206f33eea21ee257335
refs/heads/master: 3c83809917dce9bbd880f6b08edc2d0ccac14a25
17 changes: 7 additions & 10 deletions trunk/net/mac80211/tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ static void tkip_mixing_phase1(struct ieee80211_key *key, const u8 *ta,
ctx->initialized = 1;
}

static void tkip_mixing_phase2(const u16 *p1k, const u8 *tk, u16 tsc_IV16,
u8 *rc4key)
static void tkip_mixing_phase2(struct ieee80211_key *key, struct tkip_ctx *ctx,
u16 tsc_IV16, u8 *rc4key)
{
u16 ppk[6];
const u16 *p1k = ctx->p1k;
const u8 *tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY];
int i;

ppk[0] = p1k[0];
Expand Down Expand Up @@ -152,9 +154,7 @@ static void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
if (key->u.tkip.tx.iv16 == 0 || !key->u.tkip.tx.initialized)
tkip_mixing_phase1(key, ta, &key->u.tkip.tx, key->u.tkip.tx.iv32);

tkip_mixing_phase2(key->u.tkip.tx.p1k,
&key->conf.key[ALG_TKIP_TEMP_ENCR_KEY],
key->u.tkip.tx.iv16, rc4key);
tkip_mixing_phase2(key, &key->u.tkip.tx, key->u.tkip.tx.iv16, rc4key);
}

void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
Expand Down Expand Up @@ -197,8 +197,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
return;
}

tkip_mixing_phase2(key->u.tkip.tx.p1k,
&key->conf.key[ALG_TKIP_TEMP_ENCR_KEY], iv16, outkey);
tkip_mixing_phase2(key, &key->u.tkip.tx, iv16, outkey);
}
EXPORT_SYMBOL(ieee80211_get_tkip_key);

Expand Down Expand Up @@ -315,9 +314,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
}
}

tkip_mixing_phase2(key->u.tkip.rx[queue].p1k,
&key->conf.key[ALG_TKIP_TEMP_ENCR_KEY],
iv16, rc4key);
tkip_mixing_phase2(key, &key->u.tkip.rx[queue], iv16, rc4key);
#ifdef CONFIG_TKIP_DEBUG
{
int i;
Expand Down

0 comments on commit ab07ca4

Please sign in to comment.