aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-06-20 05:54:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-27 09:09:15 -0400
commit9ae705cfd390f9077eec856ea4dff374d166de33 (patch)
treeb1863f1da5d9905a37abcec08309185eaa0ea9ed /net
parentf225763a7d6c92c4932dbd528437997078496fcc (diff)
mac80211: rename TKIP debugging Kconfig symbol
... to MAC80211_TKIP_DEBUG rather than TKIP_DEBUG. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/Kconfig2
-rw-r--r--net/mac80211/tkip.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig
index 590e00b2766c..0d3661d9b6a0 100644
--- a/net/mac80211/Kconfig
+++ b/net/mac80211/Kconfig
@@ -150,7 +150,7 @@ config MAC80211_LOWTX_FRAME_DUMP
150 If unsure, say N and insert the debugging code 150 If unsure, say N and insert the debugging code
151 you require into the driver you are debugging. 151 you require into the driver you are debugging.
152 152
153config TKIP_DEBUG 153config MAC80211_TKIP_DEBUG
154 bool "TKIP debugging" 154 bool "TKIP debugging"
155 depends on MAC80211_DEBUG 155 depends on MAC80211_DEBUG
156 156
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index e710243d82e2..699807889988 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -167,7 +167,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
167 tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY]; 167 tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY];
168 ctx = &key->u.tkip.tx; 168 ctx = &key->u.tkip.tx;
169 169
170#ifdef CONFIG_TKIP_DEBUG 170#ifdef CONFIG_MAC80211_TKIP_DEBUG
171 printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n", 171 printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n",
172 iv16, iv32); 172 iv16, iv32);
173 173
@@ -177,7 +177,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
177 printk(KERN_DEBUG "Wrap around of iv16 in the middle of a " 177 printk(KERN_DEBUG "Wrap around of iv16 in the middle of a "
178 "fragmented packet\n"); 178 "fragmented packet\n");
179 } 179 }
180#endif /* CONFIG_TKIP_DEBUG */ 180#endif
181 181
182 /* Update the p1k only when the iv16 in the packet wraps around, this 182 /* Update the p1k only when the iv16 in the packet wraps around, this
183 * might occur after the wrap around of iv16 in the key in case of 183 * might occur after the wrap around of iv16 in the key in case of
@@ -240,7 +240,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
240 keyid = pos[3]; 240 keyid = pos[3];
241 iv32 = get_unaligned_le32(pos + 4); 241 iv32 = get_unaligned_le32(pos + 4);
242 pos += 8; 242 pos += 8;
243#ifdef CONFIG_TKIP_DEBUG 243#ifdef CONFIG_MAC80211_TKIP_DEBUG
244 { 244 {
245 int i; 245 int i;
246 printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); 246 printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len);
@@ -250,7 +250,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
250 printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", 250 printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n",
251 iv16, iv32); 251 iv16, iv32);
252 } 252 }
253#endif /* CONFIG_TKIP_DEBUG */ 253#endif
254 254
255 if (!(keyid & (1 << 5))) 255 if (!(keyid & (1 << 5)))
256 return TKIP_DECRYPT_NO_EXT_IV; 256 return TKIP_DECRYPT_NO_EXT_IV;
@@ -262,14 +262,14 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
262 (iv32 < key->u.tkip.rx[queue].iv32 || 262 (iv32 < key->u.tkip.rx[queue].iv32 ||
263 (iv32 == key->u.tkip.rx[queue].iv32 && 263 (iv32 == key->u.tkip.rx[queue].iv32 &&
264 iv16 <= key->u.tkip.rx[queue].iv16))) { 264 iv16 <= key->u.tkip.rx[queue].iv16))) {
265#ifdef CONFIG_TKIP_DEBUG 265#ifdef CONFIG_MAC80211_TKIP_DEBUG
266 DECLARE_MAC_BUF(mac); 266 DECLARE_MAC_BUF(mac);
267 printk(KERN_DEBUG "TKIP replay detected for RX frame from " 267 printk(KERN_DEBUG "TKIP replay detected for RX frame from "
268 "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", 268 "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n",
269 print_mac(mac, ta), 269 print_mac(mac, ta),
270 iv32, iv16, key->u.tkip.rx[queue].iv32, 270 iv32, iv16, key->u.tkip.rx[queue].iv32,
271 key->u.tkip.rx[queue].iv16); 271 key->u.tkip.rx[queue].iv16);
272#endif /* CONFIG_TKIP_DEBUG */ 272#endif
273 return TKIP_DECRYPT_REPLAY; 273 return TKIP_DECRYPT_REPLAY;
274 } 274 }
275 275
@@ -283,7 +283,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
283 key->u.tkip.rx[queue].iv32 != iv32) { 283 key->u.tkip.rx[queue].iv32 != iv32) {
284 /* IV16 wrapped around - perform TKIP phase 1 */ 284 /* IV16 wrapped around - perform TKIP phase 1 */
285 tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); 285 tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32);
286#ifdef CONFIG_TKIP_DEBUG 286#ifdef CONFIG_MAC80211_TKIP_DEBUG
287 { 287 {
288 int i; 288 int i;
289 DECLARE_MAC_BUF(mac); 289 DECLARE_MAC_BUF(mac);
@@ -299,7 +299,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
299 printk("%04x ", key->u.tkip.rx[queue].p1k[i]); 299 printk("%04x ", key->u.tkip.rx[queue].p1k[i]);
300 printk("\n"); 300 printk("\n");
301 } 301 }
302#endif /* CONFIG_TKIP_DEBUG */ 302#endif
303 if (key->local->ops->update_tkip_key && 303 if (key->local->ops->update_tkip_key &&
304 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { 304 key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) {
305 u8 bcast[ETH_ALEN] = 305 u8 bcast[ETH_ALEN] =
@@ -316,7 +316,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
316 } 316 }
317 317
318 tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); 318 tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key);
319#ifdef CONFIG_TKIP_DEBUG 319#ifdef CONFIG_MAC80211_TKIP_DEBUG
320 { 320 {
321 int i; 321 int i;
322 printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); 322 printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key=");
@@ -324,7 +324,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
324 printk("%02x ", rc4key[i]); 324 printk("%02x ", rc4key[i]);
325 printk("\n"); 325 printk("\n");
326 } 326 }
327#endif /* CONFIG_TKIP_DEBUG */ 327#endif
328 328
329 res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); 329 res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
330 done: 330 done: