aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tkip.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-22 05:26:47 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-22 05:26:58 -0400
commit17efdc4ab8cc2ac959ca1a16c9ab04d8830c4bff (patch)
treeea994ac4f19d573f6cb71f4f173380a5fc055bb0 /net/mac80211/tkip.c
parentc2ebea2097f84f0973c58b8467c1a2236bbb307a (diff)
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>
Diffstat (limited to 'net/mac80211/tkip.c')
-rw-r--r--net/mac80211/tkip.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 68be47ca208f..57e14d59e12f 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -260,16 +260,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
260 keyid = pos[3]; 260 keyid = pos[3];
261 iv32 = get_unaligned_le32(pos + 4); 261 iv32 = get_unaligned_le32(pos + 4);
262 pos += 8; 262 pos += 8;
263#ifdef CONFIG_MAC80211_TKIP_DEBUG
264 {
265 int i;
266 pr_debug("TKIP decrypt: data(len=%zd)", payload_len);
267 for (i = 0; i < payload_len; i++)
268 printk(" %02x", payload[i]);
269 printk("\n");
270 pr_debug("TKIP decrypt: iv16=%04x iv32=%08x\n", iv16, iv32);
271 }
272#endif
273 263
274 if (!(keyid & (1 << 5))) 264 if (!(keyid & (1 << 5)))
275 return TKIP_DECRYPT_NO_EXT_IV; 265 return TKIP_DECRYPT_NO_EXT_IV;
@@ -280,15 +270,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
280 if (key->u.tkip.rx[queue].state != TKIP_STATE_NOT_INIT && 270 if (key->u.tkip.rx[queue].state != TKIP_STATE_NOT_INIT &&
281 (iv32 < key->u.tkip.rx[queue].iv32 || 271 (iv32 < key->u.tkip.rx[queue].iv32 ||
282 (iv32 == key->u.tkip.rx[queue].iv32 && 272 (iv32 == key->u.tkip.rx[queue].iv32 &&
283 iv16 <= key->u.tkip.rx[queue].iv16))) { 273 iv16 <= key->u.tkip.rx[queue].iv16)))
284#ifdef CONFIG_MAC80211_TKIP_DEBUG
285 pr_debug("TKIP replay detected for RX frame from %pM (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n",
286 ta, iv32, iv16,
287 key->u.tkip.rx[queue].iv32,
288 key->u.tkip.rx[queue].iv16);
289#endif
290 return TKIP_DECRYPT_REPLAY; 274 return TKIP_DECRYPT_REPLAY;
291 }
292 275
293 if (only_iv) { 276 if (only_iv) {
294 res = TKIP_DECRYPT_OK; 277 res = TKIP_DECRYPT_OK;
@@ -300,21 +283,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
300 key->u.tkip.rx[queue].iv32 != iv32) { 283 key->u.tkip.rx[queue].iv32 != iv32) {
301 /* IV16 wrapped around - perform TKIP phase 1 */ 284 /* IV16 wrapped around - perform TKIP phase 1 */
302 tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); 285 tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32);
303#ifdef CONFIG_MAC80211_TKIP_DEBUG
304 {
305 int i;
306 u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY;
307 pr_debug("TKIP decrypt: Phase1 TA=%pM TK=", ta);
308 for (i = 0; i < 16; i++)
309 printk("%02x ",
310 key->conf.key[key_offset + i]);
311 printk("\n");
312 pr_debug("TKIP decrypt: P1K=");
313 for (i = 0; i < 5; i++)
314 printk("%04x ", key->u.tkip.rx[queue].p1k[i]);
315 printk("\n");
316 }
317#endif
318 } 286 }
319 if (key->local->ops->update_tkip_key && 287 if (key->local->ops->update_tkip_key &&
320 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && 288 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
@@ -330,15 +298,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
330 } 298 }
331 299
332 tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); 300 tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key);
333#ifdef CONFIG_MAC80211_TKIP_DEBUG
334 {
335 int i;
336 pr_debug("TKIP decrypt: Phase2 rc4key=");
337 for (i = 0; i < 16; i++)
338 printk("%02x ", rc4key[i]);
339 printk("\n");
340 }
341#endif
342 301
343 res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); 302 res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
344 done: 303 done: