diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-27 18:59:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-27 20:06:18 -0400 |
commit | e174961ca1a0b28f7abf0be47973ad57cb74e5f0 (patch) | |
tree | e8f74ecd420a0e380a71670e5aec5c2a0c15640a /net/ieee80211/ieee80211_crypt_ccmp.c | |
parent | 0c68ae2605dbcf67414d8d1f19af93be44b355fb (diff) |
net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.
I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee80211/ieee80211_crypt_ccmp.c')
-rw-r--r-- | net/ieee80211/ieee80211_crypt_ccmp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index 208bf35b5546..bea04af0b482 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c | |||
@@ -296,7 +296,6 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
296 | int i, blocks, last, len; | 296 | int i, blocks, last, len; |
297 | size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN - CCMP_MIC_LEN; | 297 | size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN - CCMP_MIC_LEN; |
298 | u8 *mic = skb->data + skb->len - CCMP_MIC_LEN; | 298 | u8 *mic = skb->data + skb->len - CCMP_MIC_LEN; |
299 | DECLARE_MAC_BUF(mac); | ||
300 | 299 | ||
301 | if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { | 300 | if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { |
302 | key->dot11RSNAStatsCCMPFormatErrors++; | 301 | key->dot11RSNAStatsCCMPFormatErrors++; |
@@ -309,7 +308,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
309 | if (!(keyidx & (1 << 5))) { | 308 | if (!(keyidx & (1 << 5))) { |
310 | if (net_ratelimit()) { | 309 | if (net_ratelimit()) { |
311 | printk(KERN_DEBUG "CCMP: received packet without ExtIV" | 310 | printk(KERN_DEBUG "CCMP: received packet without ExtIV" |
312 | " flag from %s\n", print_mac(mac, hdr->addr2)); | 311 | " flag from %pM\n", hdr->addr2); |
313 | } | 312 | } |
314 | key->dot11RSNAStatsCCMPFormatErrors++; | 313 | key->dot11RSNAStatsCCMPFormatErrors++; |
315 | return -2; | 314 | return -2; |
@@ -322,9 +321,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
322 | } | 321 | } |
323 | if (!key->key_set) { | 322 | if (!key->key_set) { |
324 | if (net_ratelimit()) { | 323 | if (net_ratelimit()) { |
325 | printk(KERN_DEBUG "CCMP: received packet from %s" | 324 | printk(KERN_DEBUG "CCMP: received packet from %pM" |
326 | " with keyid=%d that does not have a configured" | 325 | " with keyid=%d that does not have a configured" |
327 | " key\n", print_mac(mac, hdr->addr2), keyidx); | 326 | " key\n", hdr->addr2, keyidx); |
328 | } | 327 | } |
329 | return -3; | 328 | return -3; |
330 | } | 329 | } |
@@ -339,10 +338,10 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
339 | 338 | ||
340 | if (ccmp_replay_check(pn, key->rx_pn)) { | 339 | if (ccmp_replay_check(pn, key->rx_pn)) { |
341 | if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) { | 340 | if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) { |
342 | IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%s " | 341 | IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%pM " |
343 | "previous PN %02x%02x%02x%02x%02x%02x " | 342 | "previous PN %02x%02x%02x%02x%02x%02x " |
344 | "received PN %02x%02x%02x%02x%02x%02x\n", | 343 | "received PN %02x%02x%02x%02x%02x%02x\n", |
345 | print_mac(mac, hdr->addr2), | 344 | hdr->addr2, |
346 | key->rx_pn[0], key->rx_pn[1], key->rx_pn[2], | 345 | key->rx_pn[0], key->rx_pn[1], key->rx_pn[2], |
347 | key->rx_pn[3], key->rx_pn[4], key->rx_pn[5], | 346 | key->rx_pn[3], key->rx_pn[4], key->rx_pn[5], |
348 | pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]); | 347 | pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]); |
@@ -373,7 +372,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
373 | if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { | 372 | if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { |
374 | if (net_ratelimit()) { | 373 | if (net_ratelimit()) { |
375 | printk(KERN_DEBUG "CCMP: decrypt failed: STA=" | 374 | printk(KERN_DEBUG "CCMP: decrypt failed: STA=" |
376 | "%s\n", print_mac(mac, hdr->addr2)); | 375 | "%pM\n", hdr->addr2); |
377 | } | 376 | } |
378 | key->dot11RSNAStatsCCMPDecryptErrors++; | 377 | key->dot11RSNAStatsCCMPDecryptErrors++; |
379 | return -5; | 378 | return -5; |