mac80211: remove TKIP debug
authorJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jun 2012 09:26:47 +0000 (11:26 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jun 2012 09:26:58 +0000 (11:26 +0200)
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>
net/mac80211/Kconfig
net/mac80211/tkip.c

index 8d249d70598048741157faff91ca28c7389e4591..323aa19a39d5033432074934f71fc58bbe988f89 100644 (file)
@@ -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
index 68be47ca208fcaf7b8b6d0cf05ab6ec4525049d7..57e14d59e12f76d062e5c10183a83ef61a337cb3 100644 (file)
@@ -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;
@@ -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;
@@ -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 &&
@@ -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: