Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314868
b: refs/heads/master
c: 17efdc4
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Jun 22, 2012
1 parent a6634bc commit 5a51370
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 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: c2ebea2097f84f0973c58b8467c1a2236bbb307a
refs/heads/master: 17efdc4ab8cc2ac959ca1a16c9ab04d8830c4bff
11 changes: 0 additions & 11 deletions trunk/net/mac80211/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,6 @@ config MAC80211_HT_DEBUG

Do not select this option.

config MAC80211_TKIP_DEBUG
bool "Verbose TKIP debugging"
depends on MAC80211_DEBUG_MENU
---help---
Selecting this option causes mac80211 to print out
very verbose TKIP debugging messages. It should not
be selected on production systems as those messages
are remotely triggerable.

Do not select this option.

config MAC80211_IBSS_DEBUG
bool "Verbose IBSS debugging"
depends on MAC80211_DEBUG_MENU
Expand Down
43 changes: 1 addition & 42 deletions trunk/net/mac80211/tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
keyid = pos[3];
iv32 = get_unaligned_le32(pos + 4);
pos += 8;
#ifdef CONFIG_MAC80211_TKIP_DEBUG
{
int i;
pr_debug("TKIP decrypt: data(len=%zd)", payload_len);
for (i = 0; i < payload_len; i++)
printk(" %02x", payload[i]);
printk("\n");
pr_debug("TKIP decrypt: iv16=%04x iv32=%08x\n", iv16, iv32);
}
#endif

if (!(keyid & (1 << 5)))
return TKIP_DECRYPT_NO_EXT_IV;
Expand All @@ -280,15 +270,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
if (key->u.tkip.rx[queue].state != TKIP_STATE_NOT_INIT &&
(iv32 < key->u.tkip.rx[queue].iv32 ||
(iv32 == key->u.tkip.rx[queue].iv32 &&
iv16 <= key->u.tkip.rx[queue].iv16))) {
#ifdef CONFIG_MAC80211_TKIP_DEBUG
pr_debug("TKIP replay detected for RX frame from %pM (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n",
ta, iv32, iv16,
key->u.tkip.rx[queue].iv32,
key->u.tkip.rx[queue].iv16);
#endif
iv16 <= key->u.tkip.rx[queue].iv16)))
return TKIP_DECRYPT_REPLAY;
}

if (only_iv) {
res = TKIP_DECRYPT_OK;
Expand All @@ -300,21 +283,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
key->u.tkip.rx[queue].iv32 != iv32) {
/* IV16 wrapped around - perform TKIP phase 1 */
tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32);
#ifdef CONFIG_MAC80211_TKIP_DEBUG
{
int i;
u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY;
pr_debug("TKIP decrypt: Phase1 TA=%pM TK=", ta);
for (i = 0; i < 16; i++)
printk("%02x ",
key->conf.key[key_offset + i]);
printk("\n");
pr_debug("TKIP decrypt: P1K=");
for (i = 0; i < 5; i++)
printk("%04x ", key->u.tkip.rx[queue].p1k[i]);
printk("\n");
}
#endif
}
if (key->local->ops->update_tkip_key &&
key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
Expand All @@ -330,15 +298,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
}

tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key);
#ifdef CONFIG_MAC80211_TKIP_DEBUG
{
int i;
pr_debug("TKIP decrypt: Phase2 rc4key=");
for (i = 0; i < 16; i++)
printk("%02x ", rc4key[i]);
printk("\n");
}
#endif

res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
done:
Expand Down

0 comments on commit 5a51370

Please sign in to comment.