mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
mac80211: remove TKIP debug
The TKIP code hasn't been changed in a very long time, so it seems unlikely that anyone really has a need for the TKIP debug code. Remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
c2ebea2097
commit
17efdc4ab8
@ -152,17 +152,6 @@ config MAC80211_HT_DEBUG
|
|||||||
|
|
||||||
Do not select this option.
|
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
|
config MAC80211_IBSS_DEBUG
|
||||||
bool "Verbose IBSS debugging"
|
bool "Verbose IBSS debugging"
|
||||||
depends on MAC80211_DEBUG_MENU
|
depends on MAC80211_DEBUG_MENU
|
||||||
|
@ -260,16 +260,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
|
|||||||
keyid = pos[3];
|
keyid = pos[3];
|
||||||
iv32 = get_unaligned_le32(pos + 4);
|
iv32 = get_unaligned_le32(pos + 4);
|
||||||
pos += 8;
|
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)))
|
if (!(keyid & (1 << 5)))
|
||||||
return TKIP_DECRYPT_NO_EXT_IV;
|
return TKIP_DECRYPT_NO_EXT_IV;
|
||||||
@ -280,15 +270,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
|
|||||||
if (key->u.tkip.rx[queue].state != TKIP_STATE_NOT_INIT &&
|
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 ||
|
||||||
(iv32 == key->u.tkip.rx[queue].iv32 &&
|
(iv32 == key->u.tkip.rx[queue].iv32 &&
|
||||||
iv16 <= key->u.tkip.rx[queue].iv16))) {
|
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
|
|
||||||
return TKIP_DECRYPT_REPLAY;
|
return TKIP_DECRYPT_REPLAY;
|
||||||
}
|
|
||||||
|
|
||||||
if (only_iv) {
|
if (only_iv) {
|
||||||
res = TKIP_DECRYPT_OK;
|
res = TKIP_DECRYPT_OK;
|
||||||
@ -300,21 +283,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
|
|||||||
key->u.tkip.rx[queue].iv32 != iv32) {
|
key->u.tkip.rx[queue].iv32 != iv32) {
|
||||||
/* IV16 wrapped around - perform TKIP phase 1 */
|
/* IV16 wrapped around - perform TKIP phase 1 */
|
||||||
tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32);
|
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 &&
|
if (key->local->ops->update_tkip_key &&
|
||||||
key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
|
key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
|
||||||
@ -330,15 +298,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key);
|
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);
|
res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user