Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102737
b: refs/heads/master
c: a7b6f0c
h: refs/heads/master
i:
  102735: a5cc6e0
v: v3
  • Loading branch information
Harvey Harrison authored and John W. Linville committed May 22, 2008
1 parent 6543e26 commit a735751
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 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: 1b19ca396621dcba573b20d4625526f5a460c886
refs/heads/master: a7b6f0c5558ad03281b8064d6a4ab2e124dea991
7 changes: 3 additions & 4 deletions trunk/net/mac80211/michael.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/types.h>
#include <linux/bitops.h>
#include <asm/unaligned.h>
Expand All @@ -28,7 +27,7 @@ static void michael_block(struct michael_mic_ctx *mctx, u32 val)
}

static void michael_mic_hdr(struct michael_mic_ctx *mctx,
u8 *key, u8 *da, u8 *sa, u8 priority)
const u8 *key, const u8 *da, const u8 *sa, u8 priority)
{
mctx->l = get_unaligned_le32(key);
mctx->r = get_unaligned_le32(key + 4);
Expand All @@ -44,8 +43,8 @@ static void michael_mic_hdr(struct michael_mic_ctx *mctx,
michael_block(mctx, priority);
}

void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority,
u8 *data, size_t data_len, u8 *mic)
void michael_mic(const u8 *key, const u8 *da, const u8 *sa, u8 priority,
const u8 *data, size_t data_len, u8 *mic)
{
u32 val;
size_t block, blocks, left;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/mac80211/michael.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct michael_mic_ctx {
u32 l, r;
};

void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority,
u8 *data, size_t data_len, u8 *mic);
void michael_mic(const u8 *key, const u8 *da, const u8 *sa, u8 priority,
const u8 *data, size_t data_len, u8 *mic);

#endif /* MICHAEL_H */
12 changes: 2 additions & 10 deletions trunk/net/mac80211/tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/types.h>
Expand Down Expand Up @@ -132,7 +131,7 @@ static void tkip_mixing_phase2(const u16 *p1k, const u8 *tk, u16 tsc_IV16,
/* Add TKIP IV and Ext. IV at @pos. @iv0, @iv1, and @iv2 are the first octets
* of the IV. Returns pointer to the octet following IVs (i.e., beginning of
* the packet payload). */
u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
u8 iv0, u8 iv1, u8 iv2)
{
*pos++ = iv0;
Expand All @@ -143,14 +142,7 @@ u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
return pos + 4;
}

void ieee80211_tkip_gen_phase1key(struct ieee80211_key *key, u8 *ta,
u16 *phase1key)
{
tkip_mixing_phase1(ta, &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY],
key->u.tkip.iv32, phase1key);
}

void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
static void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
u8 *rc4key)
{
/* Calculate per-packet key */
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/mac80211/tkip.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
u8 iv0, u8 iv1, u8 iv2);
void ieee80211_tkip_gen_phase1key(struct ieee80211_key *key, u8 *ta,
u16 *phase1key);
void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
u8 *rc4key);
void ieee80211_tkip_encrypt_data(struct crypto_blkcipher *tfm,
struct ieee80211_key *key,
u8 *pos, size_t payload_len, u8 *ta);
Expand Down

0 comments on commit a735751

Please sign in to comment.