Staging: rtl8187x: Use %pM for mac address output
authorJoe Perches <joe@perches.com>
Sun, 6 Dec 2009 19:34:52 +0000 (11:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:29 +0000 (16:42 -0800)
Uncompiled.  Doesn't currently build anyway.

Converted MAC_FMT to %pM
Converted some %02x%02x%02x%02x%02x%02x to %pm
Converted MAC_ARG to direct use
Removed MAC_FMT and MAC_ARG macros

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
40 files changed:
drivers/staging/rtl8187se/ieee80211/ieee80211.h
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
drivers/staging/rtl8192e/ieee80211.h
drivers/staging/rtl8192e/ieee80211/ieee80211.h
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c
drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c
drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192e/r8192E_core.c
drivers/staging/rtl8192su/ieee80211/ieee80211.h
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c
drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192su/r8192U_core.c
drivers/staging/rtl8192su/r8192U_dm.c
drivers/staging/rtl8192u/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192u/r8192U_core.c

index 0d490c164db6c8a94527ebc01ddde62b9a0ee229..04a48e7e76e691c8e0402b591a9c175d54b53a1d 100644 (file)
@@ -161,10 +161,6 @@ do { if (ieee80211_debug_level & (level)) \
 #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
 #endif /* CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \
-                  ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5]
-
 /*
  * To use the debug system;
  *
index 172e8f3ae6c1e5851b77f47de9ed83851ce8de23..40f1b99faad29d6f44d82837ab62302fc181ae0f 100644 (file)
@@ -285,7 +285,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "CCMP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                key->dot11RSNAStatsCCMPFormatErrors++;
                return -2;
@@ -298,9 +298,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!key->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "CCMP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -315,11 +315,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 
        if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT
-                              " previous PN %02x%02x%02x%02x%02x%02x "
-                              "received PN %02x%02x%02x%02x%02x%02x\n",
-                              MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
-                              MAC_ARG(pn));
+                       printk(KERN_DEBUG "CCMP: replay detected: STA=%pM"
+                              " previous PN %pm received PN %pm\n",
+                              hdr->addr2, key->rx_pn, pn);
                }
                key->dot11RSNAStatsCCMPReplays++;
                return -4;
@@ -347,7 +345,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "CCMP: decrypt failed: STA="
-                              MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              "%pM\n", hdr->addr2);
                }
                key->dot11RSNAStatsCCMPDecryptErrors++;
                return -5;
@@ -423,11 +421,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv)
 {
        struct ieee80211_ccmp_data *ccmp = priv;
        p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
-                    "tx_pn=%02x%02x%02x%02x%02x%02x "
-                    "rx_pn=%02x%02x%02x%02x%02x%02x "
+                    "tx_pn=%pm rx_pn=%pm "
                     "format_errors=%d replays=%d decrypt_errors=%d\n",
                     ccmp->key_idx, ccmp->key_set,
-                    MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn),
+                    ccmp->tx_pn, ccmp->rx_pn,
                     ccmp->dot11RSNAStatsCCMPFormatErrors,
                     ccmp->dot11RSNAStatsCCMPReplays,
                     ccmp->dot11RSNAStatsCCMPDecryptErrors);
index e6d8385e1d885f02ae548a0c25fdcb9d5f6f72a7..a5254111d9a1c09ffb2c3e2ad9181e8823fcd004 100644 (file)
@@ -385,7 +385,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "TKIP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                return -2;
        }
@@ -397,9 +397,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!tkey->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "TKIP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -410,9 +410,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (iv32 < tkey->rx_iv32 ||
            (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT
+                       printk(KERN_DEBUG "TKIP: replay detected: STA=%pM"
                               " previous TSC %08x%04x received TSC "
-                              "%08x%04x\n", MAC_ARG(hdr->addr2),
+                              "%08x%04x\n", hdr->addr2,
                               tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
                }
                tkey->dot11RSNAStatsTKIPReplays++;
@@ -431,8 +431,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG ": TKIP: failed to decrypt "
-                              "received packet from " MAC_FMT "\n",
-                              MAC_ARG(hdr->addr2));
+                              "received packet from %pM\n",
+                              hdr->addr2);
                }
                return -7;
        }
@@ -450,7 +450,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                }
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "TKIP: ICV error detected: STA="
-                              MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              "%pM\n", hdr->addr2);
                }
                tkey->dot11RSNAStatsTKIPICVErrors++;
                return -5;
@@ -604,8 +604,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
                struct ieee80211_hdr_4addr *hdr;
                hdr = (struct ieee80211_hdr_4addr *)skb->data;
                printk(KERN_DEBUG "%s: Michael MIC verification failed for "
-                      "MSDU from " MAC_FMT " keyidx=%d\n",
-                      skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2),
+                      "MSDU from %pM keyidx=%d\n",
+                      skb->dev ? skb->dev->name : "N/A", hdr->addr2,
                       keyidx);
                if (skb->dev)
                        ieee80211_michael_mic_failure(skb->dev, hdr, keyidx);
index 9128c181bc7d07a96a5a984d534f921e32e00ffc..2b7080cc2c0584385af17fdbdbf9746a287828fb 100644 (file)
@@ -311,8 +311,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
            strcmp(crypt->ops->name, "TKIP") == 0) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "received packet from " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(hdr->addr2));
+                              "received packet from %pM\n",
+                              ieee->dev->name, hdr->addr2);
                }
                return -1;
        }
@@ -323,8 +323,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                IEEE80211_DEBUG_DROP(
-                       "decryption failed (SA=" MAC_FMT
-                       ") res=%d\n", MAC_ARG(hdr->addr2), res);
+                       "decryption failed (SA=%pM"
+                       ") res=%d\n", hdr->addr2, res);
                if (res == -2)
                        IEEE80211_DEBUG_DROP("Decryption failed ICV "
                                             "mismatch (key %d)\n",
@@ -356,8 +356,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-                      " (SA=" MAC_FMT " keyidx=%d)\n",
-                      ieee->dev->name, MAC_ARG(hdr->addr2), keyidx);
+                      " (SA=%pM keyidx=%d)\n",
+                      ieee->dev->name, hdr->addr2, keyidx);
                return -1;
        }
 
@@ -550,8 +550,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                         * frames silently instead of filling system log with
                         * these reports. */
                        IEEE80211_DEBUG_DROP("Decryption failed (not set)"
-                                            " (SA=" MAC_FMT ")\n",
-                                            MAC_ARG(hdr->addr2));
+                                            " (SA=%pM)\n",
+                                            hdr->addr2);
                        ieee->ieee_stats.rx_discards_undecryptable++;
                        goto rx_dropped;
                }
@@ -709,8 +709,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                } else {
                        IEEE80211_DEBUG_DROP(
                                "encryption configured, but RX "
-                               "frame not encrypted (SA=" MAC_FMT ")\n",
-                               MAC_ARG(hdr->addr2));
+                               "frame not encrypted (SA=%pM)\n",
+                               hdr->addr2);
                        goto rx_dropped;
                }
        }
@@ -729,9 +729,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
            !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
                IEEE80211_DEBUG_DROP(
                        "dropped unencrypted RX data "
-                       "frame from " MAC_FMT
+                       "frame from %pM"
                        " (drop_unencrypted=1)\n",
-                       MAC_ARG(hdr->addr2));
+                       hdr->addr2);
                goto rx_dropped;
        }
 /*
@@ -1196,11 +1196,11 @@ inline int ieee80211_network_init(
        }
 
        if (network->mode == 0) {
-               IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' "
+               IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' "
                                     "network.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
-                                    MAC_ARG(network->bssid));
+                                    network->bssid);
                return 1;
        }
 
@@ -1341,9 +1341,9 @@ inline void ieee80211_process_probe_response(
        memset(&network, 0, sizeof(struct ieee80211_network));
 
        IEEE80211_DEBUG_SCAN(
-               "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
+               "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
                escape_essid(info_element->data, info_element->len),
-               MAC_ARG(beacon->header.addr3),
+               beacon->header.addr3,
                (beacon->capability & (1<<0xf)) ? '1' : '0',
                (beacon->capability & (1<<0xe)) ? '1' : '0',
                (beacon->capability & (1<<0xd)) ? '1' : '0',
@@ -1362,10 +1362,10 @@ inline void ieee80211_process_probe_response(
                (beacon->capability & (1<<0x0)) ? '1' : '0');
 
        if (ieee80211_network_init(ieee, beacon, &network, stats)) {
-               IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n",
                                     escape_essid(info_element->data,
                                                  info_element->len),
-                                    MAC_ARG(beacon->header.addr3),
+                                    beacon->header.addr3,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -1464,11 +1464,11 @@ inline void ieee80211_process_probe_response(
                        /* If there are no more slots, expire the oldest */
                        list_del(&oldest->list);
                        target = oldest;
-                       IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from "
+                       IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from "
                                             "network list.\n",
                                             escape_essid(target->ssid,
                                                          target->ssid_len),
-                                            MAC_ARG(target->bssid));
+                                            target->bssid);
                } else {
                        /* Otherwise just pull from the free list */
                        target = list_entry(ieee->network_free_list.next,
@@ -1478,10 +1478,10 @@ inline void ieee80211_process_probe_response(
 
 
 #ifdef CONFIG_IEEE80211_DEBUG
-               IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n",
                                     escape_essid(network.ssid,
                                                  network.ssid_len),
-                                    MAC_ARG(network.bssid),
+                                    network.bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -1492,10 +1492,10 @@ inline void ieee80211_process_probe_response(
                if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
                        ieee80211_softmac_new_net(ieee,&network);
        } else {
-               IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
                                     escape_essid(target->ssid,
                                                  target->ssid_len),
-                                    MAC_ARG(target->bssid),
+                                    target->bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
index c7c645af0ebb2a8627187394a6219cd979708cdd..e8cfcb85727e381ab65bd31ffa7e6a38a2ea81c7 100644 (file)
@@ -1573,7 +1573,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
                ieee80211_resp_to_assoc_rq(ieee, dest);
        }
 
-       printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest));
+       printk(KERN_INFO"New client associated: %pM\n", dest);
 }
 
 
index 69bd02164b0c39b6166e044f5d7232f166487aa5..6cb31e1760ac02dc7da99af6ce9ed9c1d693b58f 100644 (file)
@@ -198,8 +198,8 @@ int ieee80211_encrypt_fragment(
                header = (struct ieee80211_hdr_4addr *)frag->data;
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "TX packet to " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(header->addr1));
+                              "TX packet to %pM\n",
+                              ieee->dev->name, header->addr1);
                }
                return -1;
        }
@@ -407,7 +407,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
                        memcpy(&header.addr2, src, ETH_ALEN);
                        memcpy(&header.addr3, ieee->current_network.bssid, ETH_ALEN);
                }
-       //      printk(KERN_WARNING "essid MAC address is "MAC_FMT, MAC_ARG(&header.addr1));
+       //      printk(KERN_WARNING "essid MAC address is %pM", &header.addr1);
                header.frame_ctl = cpu_to_le16(fc);
                //hdr_len = IEEE80211_3ADDR_LEN;
 
index 6aad48fe2e183f4b92ed7b0798e9f79fed2e9bb7..acd1077e6396f9fb3a6919e6c20f689761c5c6f9 100644 (file)
@@ -234,10 +234,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
                        else
                                IEEE80211_DEBUG_SCAN(
                                        "Not showing network '%s ("
-                                       MAC_FMT ")' due to age (%lums).\n",
+                                       "%pM)' due to age (%lums).\n",
                                        escape_essid(network->ssid,
                                                     network->ssid_len),
-                                       MAC_ARG(network->bssid),
+                                       network->bssid,
                                        (jiffies - network->last_scanned) / (HZ / 100));
                }
        }
index 3ba9e9e90bda5b2d7e79ce371237873a7627f32a..c39249eb54b558307be1ad9734f323c2c4c1b36f 100644 (file)
@@ -547,9 +547,6 @@ do { if (ieee80211_debug_level & (level)) \
 
 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-
 /*
  * To use the debug system;
  *
index aa76390487bb755159d6f6d5d60415eff82c7eda..9d91ab9fc04b3235bdbb125bc5f0f2c08ec21e46 100644 (file)
@@ -615,9 +615,6 @@ do { if (ieee80211_debug_level & (level)) \
 
 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-
 /*
  * To use the debug system;
  *
index ab871b360b5dbd08f84bbcdaca9d94bdba8e642a..609c289541d40dbd4385d9e009f4677a34afda01 100644 (file)
@@ -331,7 +331,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "CCMP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                key->dot11RSNAStatsCCMPFormatErrors++;
                return -2;
@@ -344,9 +344,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!key->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "CCMP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -361,11 +361,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 
        if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT
-                              " previous PN %02x%02x%02x%02x%02x%02x "
-                              "received PN %02x%02x%02x%02x%02x%02x\n",
-                              MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
-                              MAC_ARG(pn));
+                       printk(KERN_DEBUG "CCMP: replay detected: STA=%pM"
+                              " previous PN %pm received PN %pm\n",
+                              hdr->addr2, key->rx_pn, pn);
                }
                key->dot11RSNAStatsCCMPReplays++;
                return -4;
@@ -402,7 +400,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "CCMP: decrypt failed: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               "%pM\n", hdr->addr2);
                        }
                        key->dot11RSNAStatsCCMPDecryptErrors++;
                        return -5;
@@ -482,7 +480,7 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv)
                     "rx_pn=%02x%02x%02x%02x%02x%02x "
                     "format_errors=%d replays=%d decrypt_errors=%d\n",
                     ccmp->key_idx, ccmp->key_set,
-                    MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn),
+                    ccmp->tx_pn, ccmp->rx_pn,
                     ccmp->dot11RSNAStatsCCMPFormatErrors,
                     ccmp->dot11RSNAStatsCCMPReplays,
                     ccmp->dot11RSNAStatsCCMPDecryptErrors);
index 7a1797e6cbec77818c93d1c160ea2bd0a8ed8d15..7056d932057bf076dd8705e84b4af2a010000b2d 100644 (file)
@@ -520,7 +520,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "TKIP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                return -2;
        }
@@ -532,9 +532,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!tkey->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "TKIP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -547,9 +547,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (iv32 < tkey->rx_iv32 ||
                (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
                        if (net_ratelimit()) {
-                               printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT
+                               printk(KERN_DEBUG "TKIP: replay detected: STA=%pM"
                                " previous TSC %08x%04x received TSC "
-                               "%08x%04x\n", MAC_ARG(hdr->addr2),
+                               "%08x%04x\n", hdr->addr2,
                                tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
                        }
                        tkey->dot11RSNAStatsTKIPReplays++;
@@ -582,8 +582,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG ": TKIP: failed to decrypt "
-                                               "received packet from " MAC_FMT "\n",
-                                               MAC_ARG(hdr->addr2));
+                                               "received packet from %pM\n",
+                                               hdr->addr2);
                        }
                        return -7;
                }
@@ -606,8 +606,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                                tkey->rx_phase1_done = 0;
                        }
                        if (net_ratelimit()) {
-                               printk(KERN_DEBUG "TKIP: ICV error detected: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               printk(KERN_DEBUG
+                                      "TKIP: ICV error detected: STA=%pM\n",
+                                      hdr->addr2);
                        }
                        tkey->dot11RSNAStatsTKIPICVErrors++;
                        return -5;
@@ -816,8 +817,8 @@ static void ieee80211_michael_mic_failure(struct net_device *dev,
 
        /* TODO: needed parameters: count, keyid, key type, TSC */
        sprintf(buf, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr="
-               MAC_FMT ")", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
-               MAC_ARG(hdr->addr2));
+               "%pM)", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
+               hdr->addr2);
        memset(&wrqu, 0, sizeof(wrqu));
        wrqu.data.length = strlen(buf);
        wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
@@ -862,8 +863,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
                struct ieee80211_hdr_4addr *hdr;
                hdr = (struct ieee80211_hdr_4addr *) skb->data;
                printk(KERN_DEBUG "%s: Michael MIC verification failed for "
-                      "MSDU from " MAC_FMT " keyidx=%d\n",
-                      skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2),
+                      "MSDU from %pM keyidx=%d\n",
+                      skb->dev ? skb->dev->name : "N/A", hdr->addr2,
                       keyidx);
                if (skb->dev)
                        ieee80211_michael_mic_failure(skb->dev, hdr, keyidx);
index 06d91715143c37fddd1447c563ff13f8c5daeccf..7a500ac37acb56418e6f9df65e105d9ab27f6cee 100644 (file)
@@ -366,8 +366,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
            strcmp(crypt->ops->name, "TKIP") == 0) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "received packet from " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(hdr->addr2));
+                              "received packet from %pM\n",
+                              ieee->dev->name, hdr->addr2);
                }
                return -1;
        }
@@ -378,8 +378,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                IEEE80211_DEBUG_DROP(
-                       "decryption failed (SA=" MAC_FMT
-                       ") res=%d\n", MAC_ARG(hdr->addr2), res);
+                       "decryption failed (SA=%pM"
+                       ") res=%d\n", hdr->addr2, res);
                if (res == -2)
                        IEEE80211_DEBUG_DROP("Decryption failed ICV "
                                             "mismatch (key %d)\n",
@@ -416,8 +416,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-                      " (SA=" MAC_FMT " keyidx=%d)\n",
-                      ieee->dev->name, MAC_ARG(hdr->addr2), keyidx);
+                      " (SA=%pM keyidx=%d)\n",
+                      ieee->dev->name, hdr->addr2, keyidx);
                return -1;
        }
 
@@ -1045,8 +1045,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                         * frames silently instead of filling system log with
                         * these reports. */
                        IEEE80211_DEBUG_DROP("Decryption failed (not set)"
-                                            " (SA=" MAC_FMT ")\n",
-                                            MAC_ARG(hdr->addr2));
+                                            " (SA=%pM)\n",
+                                            hdr->addr2);
                        ieee->ieee_stats.rx_discards_undecryptable++;
                        goto rx_dropped;
                }
@@ -1114,8 +1114,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                    (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0)
                {
                        printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
-                              "from " MAC_FMT "\n", dev->name,
-                              MAC_ARG(hdr->addr2));
+                              "from %pM\n", dev->name,
+                              hdr->addr2);
                        /* TODO: could inform hostapd about this so that it
                         * could send auth failure report */
                        goto rx_dropped;
@@ -1311,8 +1311,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                } else {
                        IEEE80211_DEBUG_DROP(
                                "encryption configured, but RX "
-                               "frame not encrypted (SA=" MAC_FMT ")\n",
-                               MAC_ARG(hdr->addr2));
+                               "frame not encrypted (SA=%pM)\n",
+                               hdr->addr2);
                        goto rx_dropped;
                }
        }
@@ -1331,9 +1331,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
            !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
                IEEE80211_DEBUG_DROP(
                        "dropped unencrypted RX data "
-                       "frame from " MAC_FMT
+                       "frame from %pM"
                        " (drop_unencrypted=1)\n",
-                       MAC_ARG(hdr->addr2));
+                       hdr->addr2);
                goto rx_dropped;
        }
 /*
@@ -2369,11 +2369,11 @@ static inline int ieee80211_network_init(
        }
 
        if (network->mode == 0) {
-               IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' "
+               IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' "
                                     "network.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
-                                    MAC_ARG(network->bssid));
+                                    network->bssid);
                return 1;
        }
 
@@ -2557,9 +2557,9 @@ static inline void ieee80211_process_probe_response(
 
        memset(&network, 0, sizeof(struct ieee80211_network));
        IEEE80211_DEBUG_SCAN(
-               "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
+               "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
                escape_essid(info_element->data, info_element->len),
-               MAC_ARG(beacon->header.addr3),
+               beacon->header.addr3,
                (beacon->capability & (1<<0xf)) ? '1' : '0',
                (beacon->capability & (1<<0xe)) ? '1' : '0',
                (beacon->capability & (1<<0xd)) ? '1' : '0',
@@ -2578,10 +2578,10 @@ static inline void ieee80211_process_probe_response(
                (beacon->capability & (1<<0x0)) ? '1' : '0');
 
        if (ieee80211_network_init(ieee, beacon, &network, stats)) {
-               IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n",
                                     escape_essid(info_element->data,
                                                  info_element->len),
-                                    MAC_ARG(beacon->header.addr3),
+                                    beacon->header.addr3,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2692,11 +2692,11 @@ static inline void ieee80211_process_probe_response(
                        /* If there are no more slots, expire the oldest */
                        list_del(&oldest->list);
                        target = oldest;
-                       IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from "
+                       IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from "
                                             "network list.\n",
                                             escape_essid(target->ssid,
                                                          target->ssid_len),
-                                            MAC_ARG(target->bssid));
+                                            target->bssid);
                } else {
                        /* Otherwise just pull from the free list */
                        target = list_entry(ieee->network_free_list.next,
@@ -2706,10 +2706,10 @@ static inline void ieee80211_process_probe_response(
 
 
 #ifdef CONFIG_IEEE80211_DEBUG
-               IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n",
                                     escape_essid(network.ssid,
                                                  network.ssid_len),
-                                    MAC_ARG(network.bssid),
+                                    network.bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2719,10 +2719,10 @@ static inline void ieee80211_process_probe_response(
                if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
                        ieee80211_softmac_new_net(ieee,&network);
        } else {
-               IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
                                     escape_essid(target->ssid,
                                                  target->ssid_len),
-                                    MAC_ARG(target->bssid),
+                                    target->bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
index 6d1ddec39f0e943ae4cbbcdcf1ca933665f14d0d..9e923e29c455ab372dac5eae7c143a720f793a70 100644 (file)
@@ -1897,7 +1897,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
                ieee80211_resp_to_assoc_rq(ieee, dest);
        }
 
-       printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest));
+       printk(KERN_INFO"New client associated: %pM\n", dest);
        //FIXME
        #if 0
        spin_lock_irqsave(&ieee->lock,flags);
index 798fb4154c2587943aa01011af8cc2ddc5fe31b4..0710d9e30dba17d6b37f9c85ac9c87123db8137e 100644 (file)
@@ -200,8 +200,8 @@ int ieee80211_encrypt_fragment(
                header = (struct ieee80211_hdr *) frag->data;
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "TX packet to " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(header->addr1));
+                              "TX packet to %pM\n",
+                              ieee->dev->name, header->addr1);
                }
                return -1;
        }
index 3441b72dd8fa17ef517eb1b171dacd62f7fd9b30..efd61bbf06f9dcdfc25fd184ae59fd57c42de2ef 100644 (file)
@@ -386,10 +386,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
                else
                        IEEE80211_DEBUG_SCAN(
                                "Not showing network '%s ("
-                               MAC_FMT ")' due to age (%lums).\n",
+                               "%pM)' due to age (%lums).\n",
                                escape_essid(network->ssid,
                                             network->ssid_len),
-                               MAC_ARG(network->bssid),
+                               network->bssid,
                                (jiffies - network->last_scanned) / (HZ / 100));
        }
 
index e41e8a0c739c36cd38ba88ba12aaa37c596ba838..ae0e5b9e218338311dbfcb29667b2281ab004636 100644 (file)
@@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P
        u16 tmp = 0;
        u16 len = ieee->tx_headroom + 9;
        //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) +  BA Timeout Value(2) +  BA Start SeqCtrl(2)(or StatusCode(2))
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev);
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev);
        if (pBA == NULL||ieee == NULL)
        {
                IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee);
@@ -243,7 +243,7 @@ static struct sk_buff* ieee80211_DELBA(
        u16 len = 6 + ieee->tx_headroom;
 
        if (net_ratelimit())
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst));
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst);
 
        memset(&DelbaParamSet, 0, 2);
 
@@ -397,7 +397,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb)
        pBaTimeoutVal = (u16*)(tag + 5);
        pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7);
 
-       printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst));
+       printk("====================>rx ADDBAREQ from :%pM\n", dst);
 //some other capability is not ready now.
        if(     (ieee->current_network.qos_data.active == 0) ||
                (ieee->pHTInfo->bCurrentHTSupport == false)) //||
index 2816b60a08a913229608bcb6f39affd1721179e0..e2cbfd3aa00f11d564f73137253b9a0a03c61765 100644 (file)
@@ -304,7 +304,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8*      Addr, u8
                if(search_dir[dir] ==false )
                        continue;
                list_for_each_entry(pRet, psearch_list, List){
-       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
+       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
                        if (memcmp(pRet->Addr, Addr, 6) == 0)
                                if (pRet->TSpec.f.TSInfo.field.ucTSID == TID)
                                        if(pRet->TSpec.f.TSInfo.field.ucDirection == dir)
@@ -466,7 +466,7 @@ bool GetTs(
                                        ResetRxTsEntry(tmp);
                                }
 
-                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr));
+                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
                                // Prepare TS Info releated field
                                pTSInfo->field.ucTrafficType = 0;                       // Traffic type: WMM is reserved in this field
                                pTSInfo->field.ucTSID = UP;                     // TSID
@@ -552,7 +552,7 @@ void RemoveTsEntry(
 void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
 {
        PTS_COMMON_INFO pTS, pTmpTS;
-       printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr));
+       printk("===========>RemovePeerTS,%pM\n", Addr);
 #if 1
        list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
        {
index 0ca5d8b4f746a4004332dbd392e02088dc190e67..0f6954863e694741b0d7f070506c0c007a8e00a0 100644 (file)
@@ -6394,7 +6394,7 @@ void setKey(      struct net_device *dev,
        if (EntryNo >= TOTAL_CAM_ENTRY)
                RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
 
-       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr));
+       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr);
 
        if (DefaultKey)
                usConfig |= BIT15 | (KeyType<<2);
index 9a4c858b0666695d9bb81bb734cb18109881259c..159fddf628e20fce08f9e098d1253e29b56c5b56 100644 (file)
@@ -195,10 +195,6 @@ extern u32 ieee80211_debug_level;
 #define IEEE80211_DEBUG_DATA(level, data, datalen) do {} while(0)
 #endif /* CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \
-                  ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5]
-
 /*
  * To use the debug system;
  *
index 7bc956e1f45854046240c7efb1edc6278e9fd715..8a93f7d3eb387d48201cc7396bb5354ec8a97b8a 100644 (file)
@@ -288,7 +288,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "CCMP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                key->dot11RSNAStatsCCMPFormatErrors++;
                return -2;
@@ -301,9 +301,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!key->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "CCMP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -318,11 +318,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 
        if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT
-                              " previous PN %02x%02x%02x%02x%02x%02x "
-                              "received PN %02x%02x%02x%02x%02x%02x\n",
-                              MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
-                              MAC_ARG(pn));
+                       printk(KERN_DEBUG "CCMP: replay detected: STA=%pM"
+                              " previous PN %pm received PN %pm\n",
+                              hdr->addr2, key->rx_pn, pn);
                }
                key->dot11RSNAStatsCCMPReplays++;
                return -4;
@@ -359,7 +357,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "CCMP: decrypt failed: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               "%pM\n", hdr->addr2);
                        }
                        key->dot11RSNAStatsCCMPDecryptErrors++;
                        return -5;
@@ -435,11 +433,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv)
 {
        struct ieee80211_ccmp_data *ccmp = priv;
        p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
-                    "tx_pn=%02x%02x%02x%02x%02x%02x "
-                    "rx_pn=%02x%02x%02x%02x%02x%02x "
+                    "tx_pn=%pm rx_pn=%pm "
                     "format_errors=%d replays=%d decrypt_errors=%d\n",
                     ccmp->key_idx, ccmp->key_set,
-                    MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn),
+                    ccmp->tx_pn, ccmp->rx_pn,
                     ccmp->dot11RSNAStatsCCMPFormatErrors,
                     ccmp->dot11RSNAStatsCCMPReplays,
                     ccmp->dot11RSNAStatsCCMPDecryptErrors);
index 9b9438fb5f6090f4daa9c4be0d217b50c12f4f8b..7e48748da102dab25d1cf43e904b134f20c66864 100644 (file)
@@ -410,7 +410,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "TKIP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                return -2;
        }
@@ -422,9 +422,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!tkey->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "TKIP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -437,9 +437,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (iv32 < tkey->rx_iv32 ||
                (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
                        if (net_ratelimit()) {
-                               printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT
+                               printk(KERN_DEBUG "TKIP: replay detected: STA=%pM"
                                " previous TSC %08x%04x received TSC "
-                               "%08x%04x\n", MAC_ARG(hdr->addr2),
+                               "%08x%04x\n", hdr->addr2,
                                tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
                        }
                        tkey->dot11RSNAStatsTKIPReplays++;
@@ -460,8 +460,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG ": TKIP: failed to decrypt "
-                                               "received packet from " MAC_FMT "\n",
-                                               MAC_ARG(hdr->addr2));
+                                               "received packet from %pM\n",
+                                               hdr->addr2);
                        }
                        return -7;
                }
@@ -480,7 +480,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                        }
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "TKIP: ICV error detected: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               "%pM\n", hdr->addr2);
                        }
                        tkey->dot11RSNAStatsTKIPICVErrors++;
                        return -5;
@@ -635,8 +635,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
                struct ieee80211_hdr_4addr *hdr;
                hdr = (struct ieee80211_hdr_4addr *) skb->data;
                printk(KERN_DEBUG "%s: Michael MIC verification failed for "
-                      "MSDU from " MAC_FMT " keyidx=%d\n",
-                      skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2),
+                      "MSDU from %pM keyidx=%d\n",
+                      skb->dev ? skb->dev->name : "N/A", hdr->addr2,
                       keyidx);
                if (skb->dev)
                        ieee80211_michael_mic_failure(skb->dev, hdr, keyidx);
index fecfa120ff488b8fd956ce850cd2eefd6bf4bbe8..67b99ad88475b7993ca4cf401cc9b4e3546c08bb 100644 (file)
@@ -314,8 +314,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
            strcmp(crypt->ops->name, "TKIP") == 0) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "received packet from " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(hdr->addr2));
+                              "received packet from %pM\n",
+                              ieee->dev->name, hdr->addr2);
                }
                return -1;
        }
@@ -326,8 +326,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                IEEE80211_DEBUG_DROP(
-                       "decryption failed (SA=" MAC_FMT
-                       ") res=%d\n", MAC_ARG(hdr->addr2), res);
+                       "decryption failed (SA=%pM"
+                       ") res=%d\n", hdr->addr2, res);
                if (res == -2)
                        IEEE80211_DEBUG_DROP("Decryption failed ICV "
                                             "mismatch (key %d)\n",
@@ -364,8 +364,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-                      " (SA=" MAC_FMT " keyidx=%d)\n",
-                      ieee->dev->name, MAC_ARG(hdr->addr2), keyidx);
+                      " (SA=%pM keyidx=%d)\n",
+                      ieee->dev->name, hdr->addr2, keyidx);
                return -1;
        }
 
@@ -939,8 +939,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                         * frames silently instead of filling system log with
                         * these reports. */
                        IEEE80211_DEBUG_DROP("Decryption failed (not set)"
-                                            " (SA=" MAC_FMT ")\n",
-                                            MAC_ARG(hdr->addr2));
+                                            " (SA=%pM)\n",
+                                            hdr->addr2);
                        ieee->ieee_stats.rx_discards_undecryptable++;
                        goto rx_dropped;
                }
@@ -1143,8 +1143,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                } else {
                        IEEE80211_DEBUG_DROP(
                                "encryption configured, but RX "
-                               "frame not encrypted (SA=" MAC_FMT ")\n",
-                               MAC_ARG(hdr->addr2));
+                               "frame not encrypted (SA=%pM)\n",
+                               hdr->addr2);
                        goto rx_dropped;
                }
        }
@@ -1163,9 +1163,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
            !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
                IEEE80211_DEBUG_DROP(
                        "dropped unencrypted RX data "
-                       "frame from " MAC_FMT
+                       "frame from %pM"
                        " (drop_unencrypted=1)\n",
-                       MAC_ARG(hdr->addr2));
+                       hdr->addr2);
                goto rx_dropped;
        }
 /*
@@ -2159,11 +2159,11 @@ static inline int ieee80211_network_init(
        }
 
        if (network->mode == 0) {
-               IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' "
+               IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' "
                                     "network.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
-                                    MAC_ARG(network->bssid));
+                                    network->bssid);
                return 1;
        }
 
@@ -2345,9 +2345,9 @@ static inline void ieee80211_process_probe_response(
 
        memset(&network, 0, sizeof(struct ieee80211_network));
        IEEE80211_DEBUG_SCAN(
-               "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
+               "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
                escape_essid(info_element->data, info_element->len),
-               MAC_ARG(beacon->header.addr3),
+               beacon->header.addr3,
                (beacon->capability & (1<<0xf)) ? '1' : '0',
                (beacon->capability & (1<<0xe)) ? '1' : '0',
                (beacon->capability & (1<<0xd)) ? '1' : '0',
@@ -2366,10 +2366,10 @@ static inline void ieee80211_process_probe_response(
                (beacon->capability & (1<<0x0)) ? '1' : '0');
 
        if (ieee80211_network_init(ieee, beacon, &network, stats)) {
-               IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n",
                                     escape_essid(info_element->data,
                                                  info_element->len),
-                                    MAC_ARG(beacon->header.addr3),
+                                    beacon->header.addr3,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2478,11 +2478,11 @@ static inline void ieee80211_process_probe_response(
                        /* If there are no more slots, expire the oldest */
                        list_del(&oldest->list);
                        target = oldest;
-                       IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from "
+                       IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from "
                                             "network list.\n",
                                             escape_essid(target->ssid,
                                                          target->ssid_len),
-                                            MAC_ARG(target->bssid));
+                                            target->bssid);
                } else {
                        /* Otherwise just pull from the free list */
                        target = list_entry(ieee->network_free_list.next,
@@ -2492,10 +2492,10 @@ static inline void ieee80211_process_probe_response(
 
 
 #ifdef CONFIG_IEEE80211_DEBUG
-               IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n",
                                     escape_essid(network.ssid,
                                                  network.ssid_len),
-                                    MAC_ARG(network.bssid),
+                                    network.bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2505,10 +2505,10 @@ static inline void ieee80211_process_probe_response(
                if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
                        ieee80211_softmac_new_net(ieee,&network);
        } else {
-               IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
                                     escape_essid(target->ssid,
                                                  target->ssid_len),
-                                    MAC_ARG(target->bssid),
+                                    target->bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
index 95d4f84dcf3fff9d360b4ee37d20c91b631c86ce..e46f3bc6a21a8fcc102c86460574631d4871eb98 100644 (file)
@@ -1709,7 +1709,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
                ieee80211_resp_to_assoc_rq(ieee, dest);
        }
 
-       printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest));
+       printk(KERN_INFO"New client associated: %pM\n", dest);
        //FIXME
 }
 
index 4d54e1e62d22585b37511b5270f897ef103feac6..484c3aba5cb3a7e579cdd5aef5cd27427fd1c9c4 100644 (file)
@@ -199,8 +199,8 @@ int ieee80211_encrypt_fragment(
                header = (struct rtl_ieee80211_hdr *)frag->data;
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "TX packet to " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(header->addr1));
+                              "TX packet to %pM\n",
+                              ieee->dev->name, header->addr1);
                }
                return -1;
        }
index 85c7e96b622d669c89d90b62c475a70102bbd502..0f21ccbdedddcc09d22d8ee3be2c18868a949228 100644 (file)
@@ -261,10 +261,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
                else
                        IEEE80211_DEBUG_SCAN(
                                "Not showing network '%s ("
-                               MAC_FMT ")' due to age (%lums).\n",
+                               "%pM)' due to age (%lums).\n",
                                escape_essid(network->ssid,
                                             network->ssid_len),
-                               MAC_ARG(network->bssid),
+                               network->bssid,
                                (jiffies - network->last_scanned) / (HZ / 100));
        }
 
index 8d12ffca18face796bec83118f00dcd27e3998a3..6eb1096866af0eb9e16200c1a41e7327334553c1 100644 (file)
@@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P
        u16 tmp = 0;
        u16 len = ieee->tx_headroom + 9;
        //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) +  BA Timeout Value(2) +  BA Start SeqCtrl(2)(or StatusCode(2))
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev);
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev);
        if (pBA == NULL||ieee == NULL)
        {
                IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee);
@@ -200,7 +200,7 @@ static struct sk_buff* ieee80211_DELBA(
        u16 len = 6 + ieee->tx_headroom;
 
        if (net_ratelimit())
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst));
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst);
 
        memset(&DelbaParamSet, 0, 2);
 
@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb)
        pBaTimeoutVal = (u16*)(tag + 5);
        pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7);
 
-       printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst));
+       printk("====================>rx ADDBAREQ from :%pM\n", dst);
 //some other capability is not ready now.
        if(     (ieee->current_network.qos_data.active == 0) ||
                (ieee->pHTInfo->bCurrentHTSupport == false) ||
index ad3bf35d80e661f6991ec99a61891c0536e98727..60cf1f8781ce41f35ce27cba4cda0bb76d713915 100644 (file)
@@ -291,7 +291,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8*      Addr, u8
                if(search_dir[dir] ==false )
                        continue;
                list_for_each_entry(pRet, psearch_list, List){
-       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
+       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
                        if (memcmp(pRet->Addr, Addr, 6) == 0)
                                if (pRet->TSpec.f.TSInfo.field.ucTSID == TID)
                                        if(pRet->TSpec.f.TSInfo.field.ucDirection == dir)
@@ -447,7 +447,7 @@ bool GetTs(
                                        ResetRxTsEntry(tmp);
                                }
 
-                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr));
+                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
                                // Prepare TS Info releated field
                                pTSInfo->field.ucTrafficType = 0;                       // Traffic type: WMM is reserved in this field
                                pTSInfo->field.ucTSID = UP;                     // TSID
@@ -533,7 +533,7 @@ void RemoveTsEntry(
 void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
 {
        PTS_COMMON_INFO pTS, pTmpTS;
-       printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr));
+       printk("===========>RemovePeerTS,%pM\n", Addr);
 #if 1
        list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
        {
index ccb9d5b8cd444c154813fa270499f6cdbc407291..7fa02ac8e50085e1fd04503cfb20565398e97c4b 100644 (file)
@@ -7677,7 +7677,7 @@ void setKey(      struct net_device *dev,
        if (EntryNo >= TOTAL_CAM_ENTRY)
                RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
 
-       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr));
+       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr);
 
        if (DefaultKey)
                usConfig |= BIT15 | (KeyType<<2);
index 7891e96402726bd753fa412c81f5b4cf4e5c4049..fa5e24416ddef36734b8c496958795c5763f015a 100644 (file)
@@ -2697,7 +2697,7 @@ static void dm_check_edca_turbo(
                u8* peername[11] = {"unknown", "realtek", "realtek_92se", "broadcom", "ralink", "atheros", "cisco", "marvell", "92u_softap", "self_softap"};
                static int wb_tmp = 0;
                if (wb_tmp == 0){
-                       printk("%s():iot peer is %#x:%s, bssid:"MAC_FMT"\n",__FUNCTION__,pHTInfo->IOTPeer,peername[pHTInfo->IOTPeer], MAC_ARG(priv->ieee80211->current_network.bssid));
+                       printk("%s():iot peer is %#x:%s, bssid:%pM\n",__FUNCTION__,pHTInfo->IOTPeer,peername[pHTInfo->IOTPeer], priv->ieee80211->current_network.bssid);
                        wb_tmp = 1;
                }
        }
index 3a47f1213e8593c77e7cfcdab226526417e8fb62..9d05ed6791ee28c4f9e19674de08d736be35ba2e 100644 (file)
@@ -551,9 +551,6 @@ do { if (ieee80211_debug_level & (level)) \
 
 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-
 /*
  * To use the debug system;
  *
index 10908e123b86f7486ed3890f4879bb0bb63ddde0..3cda38bb6b7718f5ab9f12e6939b0c20c8900aa7 100644 (file)
@@ -551,9 +551,6 @@ do { if (ieee80211_debug_level & (level)) \
 
 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
 
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-
 /*
  * To use the debug system;
  *
index 0b33bf4633208a89c9041f7b86a59ad792a0d1df..0b57632bcff9e2de67bed5f6d80fd2510448b320 100644 (file)
@@ -288,7 +288,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "CCMP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                key->dot11RSNAStatsCCMPFormatErrors++;
                return -2;
@@ -301,9 +301,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!key->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "CCMP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -318,11 +318,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 
        if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT
-                              " previous PN %02x%02x%02x%02x%02x%02x "
-                              "received PN %02x%02x%02x%02x%02x%02x\n",
-                              MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
-                              MAC_ARG(pn));
+                       printk(KERN_DEBUG "CCMP: replay detected: STA=%pM"
+                              " previous PN %pm received PN %pm\n",
+                              hdr->addr2, key->rx_pn, pn);
                }
                key->dot11RSNAStatsCCMPReplays++;
                return -4;
@@ -359,7 +357,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "CCMP: decrypt failed: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               "%pM\n", hdr->addr2);
                        }
                        key->dot11RSNAStatsCCMPDecryptErrors++;
                        return -5;
@@ -435,11 +433,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv)
 {
        struct ieee80211_ccmp_data *ccmp = priv;
        p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
-                    "tx_pn=%02x%02x%02x%02x%02x%02x "
-                    "rx_pn=%02x%02x%02x%02x%02x%02x "
+                    "tx_pn=%pm rx_pn=%pm "
                     "format_errors=%d replays=%d decrypt_errors=%d\n",
                     ccmp->key_idx, ccmp->key_set,
-                    MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn),
+                    ccmp->tx_pn, ccmp->rx_pn,
                     ccmp->dot11RSNAStatsCCMPFormatErrors,
                     ccmp->dot11RSNAStatsCCMPReplays,
                     ccmp->dot11RSNAStatsCCMPDecryptErrors);
index 841b99955b7900cd2f7b380c8e8f812189f02ee7..9510507d8d059f8fadf38c23e37cc43201ed38ce 100644 (file)
@@ -410,7 +410,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        if (!(keyidx & (1 << 5))) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "TKIP: received packet without ExtIV"
-                              " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                              " flag from %pM\n", hdr->addr2);
                }
                return -2;
        }
@@ -422,9 +422,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        }
        if (!tkey->key_set) {
                if (net_ratelimit()) {
-                       printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT
+                       printk(KERN_DEBUG "TKIP: received packet from %pM"
                               " with keyid=%d that does not have a configured"
-                              " key\n", MAC_ARG(hdr->addr2), keyidx);
+                              " key\n", hdr->addr2, keyidx);
                }
                return -3;
        }
@@ -437,9 +437,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (iv32 < tkey->rx_iv32 ||
                (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
                        if (net_ratelimit()) {
-                               printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT
+                               printk(KERN_DEBUG "TKIP: replay detected: STA=%pM"
                                " previous TSC %08x%04x received TSC "
-                               "%08x%04x\n", MAC_ARG(hdr->addr2),
+                               "%08x%04x\n", hdr->addr2,
                                tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
                        }
                        tkey->dot11RSNAStatsTKIPReplays++;
@@ -460,8 +460,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG ": TKIP: failed to decrypt "
-                                               "received packet from " MAC_FMT "\n",
-                                               MAC_ARG(hdr->addr2));
+                                               "received packet from %pM\n",
+                                               hdr->addr2);
                        }
                        return -7;
                }
@@ -480,7 +480,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                        }
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "TKIP: ICV error detected: STA="
-                               MAC_FMT "\n", MAC_ARG(hdr->addr2));
+                               "%pM\n", hdr->addr2);
                        }
                        tkey->dot11RSNAStatsTKIPICVErrors++;
                        return -5;
@@ -635,8 +635,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
                struct ieee80211_hdr_4addr *hdr;
                hdr = (struct ieee80211_hdr_4addr *) skb->data;
                printk(KERN_DEBUG "%s: Michael MIC verification failed for "
-                      "MSDU from " MAC_FMT " keyidx=%d\n",
-                      skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2),
+                      "MSDU from %pM keyidx=%d\n",
+                      skb->dev ? skb->dev->name : "N/A", hdr->addr2,
                       keyidx);
                if (skb->dev)
                        ieee80211_michael_mic_failure(skb->dev, hdr, keyidx);
index 0e003c5bb0004a99e33f6618b89a73db644881ad..7e9b367594a0d38bc48a3c54f2c484cb31ba5126 100644 (file)
@@ -360,8 +360,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
            strcmp(crypt->ops->name, "TKIP") == 0) {
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "received packet from " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(hdr->addr2));
+                              "received packet from %pM\n",
+                              ieee->dev->name, hdr->addr2);
                }
                return -1;
        }
@@ -372,8 +372,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                IEEE80211_DEBUG_DROP(
-                       "decryption failed (SA=" MAC_FMT
-                       ") res=%d\n", MAC_ARG(hdr->addr2), res);
+                       "decryption failed (SA=%pM"
+                       ") res=%d\n", hdr->addr2, res);
                if (res == -2)
                        IEEE80211_DEBUG_DROP("Decryption failed ICV "
                                             "mismatch (key %d)\n",
@@ -410,8 +410,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-                      " (SA=" MAC_FMT " keyidx=%d)\n",
-                      ieee->dev->name, MAC_ARG(hdr->addr2), keyidx);
+                      " (SA=%pM keyidx=%d)\n",
+                      ieee->dev->name, hdr->addr2, keyidx);
                return -1;
        }
 
@@ -1016,8 +1016,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                         * frames silently instead of filling system log with
                         * these reports. */
                        IEEE80211_DEBUG_DROP("Decryption failed (not set)"
-                                            " (SA=" MAC_FMT ")\n",
-                                            MAC_ARG(hdr->addr2));
+                                            " (SA=%pM)\n",
+                                            hdr->addr2);
                        ieee->ieee_stats.rx_discards_undecryptable++;
                        goto rx_dropped;
                }
@@ -1256,8 +1256,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
                } else {
                        IEEE80211_DEBUG_DROP(
                                "encryption configured, but RX "
-                               "frame not encrypted (SA=" MAC_FMT ")\n",
-                               MAC_ARG(hdr->addr2));
+                               "frame not encrypted (SA=%pM)\n",
+                               hdr->addr2);
                        goto rx_dropped;
                }
        }
@@ -1276,9 +1276,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
            !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
                IEEE80211_DEBUG_DROP(
                        "dropped unencrypted RX data "
-                       "frame from " MAC_FMT
+                       "frame from %pM"
                        " (drop_unencrypted=1)\n",
-                       MAC_ARG(hdr->addr2));
+                       hdr->addr2);
                goto rx_dropped;
        }
 /*
@@ -2260,11 +2260,11 @@ static inline int ieee80211_network_init(
        }
 
        if (network->mode == 0) {
-               IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' "
+               IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' "
                                     "network.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
-                                    MAC_ARG(network->bssid));
+                                    network->bssid);
                return 1;
        }
 
@@ -2439,9 +2439,9 @@ static inline void ieee80211_process_probe_response(
 
        memset(&network, 0, sizeof(struct ieee80211_network));
        IEEE80211_DEBUG_SCAN(
-               "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
+               "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
                escape_essid(info_element->data, info_element->len),
-               MAC_ARG(beacon->header.addr3),
+               beacon->header.addr3,
                (beacon->capability & (1<<0xf)) ? '1' : '0',
                (beacon->capability & (1<<0xe)) ? '1' : '0',
                (beacon->capability & (1<<0xd)) ? '1' : '0',
@@ -2460,10 +2460,10 @@ static inline void ieee80211_process_probe_response(
                (beacon->capability & (1<<0x0)) ? '1' : '0');
 
        if (ieee80211_network_init(ieee, beacon, &network, stats)) {
-               IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n",
                                     escape_essid(info_element->data,
                                                  info_element->len),
-                                    MAC_ARG(beacon->header.addr3),
+                                    beacon->header.addr3,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2574,11 +2574,11 @@ static inline void ieee80211_process_probe_response(
                        /* If there are no more slots, expire the oldest */
                        list_del(&oldest->list);
                        target = oldest;
-                       IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from "
+                       IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from "
                                             "network list.\n",
                                             escape_essid(target->ssid,
                                                          target->ssid_len),
-                                            MAC_ARG(target->bssid));
+                                            target->bssid);
                } else {
                        /* Otherwise just pull from the free list */
                        target = list_entry(ieee->network_free_list.next,
@@ -2588,10 +2588,10 @@ static inline void ieee80211_process_probe_response(
 
 
 #ifdef CONFIG_IEEE80211_DEBUG
-               IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n",
                                     escape_essid(network.ssid,
                                                  network.ssid_len),
-                                    MAC_ARG(network.bssid),
+                                    network.bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
@@ -2601,10 +2601,10 @@ static inline void ieee80211_process_probe_response(
                if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
                        ieee80211_softmac_new_net(ieee,&network);
        } else {
-               IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
+               IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
                                     escape_essid(target->ssid,
                                                  target->ssid_len),
-                                    MAC_ARG(target->bssid),
+                                    target->bssid,
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     IEEE80211_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
index 8a86e93465c87203513921a76196170ea54104ab..27d925712cddfca52b7d92eccfc4b0c7f2499c33 100644 (file)
@@ -1731,7 +1731,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
                ieee80211_resp_to_assoc_rq(ieee, dest);
        }
 
-       printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest));
+       printk(KERN_INFO"New client associated: %pM\n", dest);
        //FIXME
 }
 
index b29c36bac377d005d7308f52c4ad024df2cb1be0..48537d948945eb5f5a68f05b77cb0fe343f5bc3d 100644 (file)
@@ -200,8 +200,8 @@ int ieee80211_encrypt_fragment(
                header = (struct ieee80211_hdr *) frag->data;
                if (net_ratelimit()) {
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-                              "TX packet to " MAC_FMT "\n",
-                              ieee->dev->name, MAC_ARG(header->addr1));
+                              "TX packet to %pM\n",
+                              ieee->dev->name, header->addr1);
                }
                return -1;
        }
index 5f12d62658c9eba5047321c75903bd8962d0e24d..da2449d290cb67a3ff7a6a04ce7607daf8735abd 100644 (file)
@@ -289,10 +289,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
                else
                        IEEE80211_DEBUG_SCAN(
                                "Not showing network '%s ("
-                               MAC_FMT ")' due to age (%lums).\n",
+                               "%pM)' due to age (%lums).\n",
                                escape_essid(network->ssid,
                                             network->ssid_len),
-                               MAC_ARG(network->bssid),
+                               network->bssid,
                                (jiffies - network->last_scanned) / (HZ / 100));
        }
 
index 512a57aebde3bc045fade27d874b0233d0fbc3c2..27d083a70eb2d7c7ed0f326d4a9d8a06c8dee1a3 100644 (file)
@@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P
        u16 tmp = 0;
        u16 len = ieee->tx_headroom + 9;
        //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) +  BA Timeout Value(2) +  BA Start SeqCtrl(2)(or StatusCode(2))
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev);
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev);
        if (pBA == NULL||ieee == NULL)
        {
                IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee);
@@ -201,7 +201,7 @@ static struct sk_buff* ieee80211_DELBA(
        u16 len = 6 + ieee->tx_headroom;
 
        if (net_ratelimit())
-       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst));
+       IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst);
 
        memset(&DelbaParamSet, 0, 2);
 
@@ -355,7 +355,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb)
        pBaTimeoutVal = (u16*)(tag + 5);
        pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7);
 
-       printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst));
+       printk("====================>rx ADDBAREQ from :%pM\n", dst);
 //some other capability is not ready now.
        if(     (ieee->current_network.qos_data.active == 0) ||
                (ieee->pHTInfo->bCurrentHTSupport == false)) //||
index 5373d565af244c8f6410427721176b37f16d44f3..d1275e887f0cdcd198903db17bd0c22b4c4f7ef2 100644 (file)
@@ -290,7 +290,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8*      Addr, u8
                if(search_dir[dir] ==false )
                        continue;
                list_for_each_entry(pRet, psearch_list, List){
-       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
+       //              IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
                        if (memcmp(pRet->Addr, Addr, 6) == 0)
                                if (pRet->TSpec.f.TSInfo.field.ucTSID == TID)
                                        if(pRet->TSpec.f.TSInfo.field.ucDirection == dir)
@@ -445,7 +445,7 @@ bool GetTs(
                                        ResetRxTsEntry(tmp);
                                }
 
-                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr));
+                               IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
                                // Prepare TS Info releated field
                                pTSInfo->field.ucTrafficType = 0;                       // Traffic type: WMM is reserved in this field
                                pTSInfo->field.ucTSID = UP;                     // TSID
@@ -531,7 +531,7 @@ void RemoveTsEntry(
 void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
 {
        PTS_COMMON_INFO pTS, pTmpTS;
-       printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr));
+       printk("===========>RemovePeerTS,%pM\n", Addr);
        list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
        {
                if (memcmp(pTS->Addr, Addr, 6) == 0)
index adade13e1e19fc98fa3c85a0ba53ebc355868f15..5afc73751043b5c35f560b7df9e365ebfd3bcf16 100644 (file)
@@ -2976,7 +2976,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev)
                memcpy(dev->dev_addr, bMac_Tmp_Addr, 6);
                //should I set IDR0 here?
        }
-       RT_TRACE(COMP_EPROM, "MAC addr:"MAC_FMT"\n", MAC_ARG(dev->dev_addr));
+       RT_TRACE(COMP_EPROM, "MAC addr:%pM\n", dev->dev_addr);
        priv->rf_type = RTL819X_DEFAULT_RF_TYPE; //default 1T2R
        priv->rf_chip = RF_8256;
 
@@ -6037,7 +6037,7 @@ void setKey(      struct net_device *dev,
        if (EntryNo >= TOTAL_CAM_ENTRY)
                RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
 
-       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr));
+       RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr);
 
        if (DefaultKey)
                usConfig |= BIT15 | (KeyType<<2);