staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pM
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 25 Aug 2011 19:07:03 +0000 (14:07 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Aug 2011 22:36:34 +0000 (15:36 -0700)
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/rtl819x_BAProc.c
drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtl_cam.c
drivers/staging/rtl8192e/rtl_dm.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
drivers/staging/rtl8192e/rtllib_crypt_tkip.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_wx.c

index 2e4085b88775343c23e43babe9420b53233dd4f7..5bdb78cdeab0813cf21628368d332136f79224b3 100644 (file)
@@ -83,8 +83,8 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
        u16 tmp = 0;
        u16 len = ieee->tx_headroom + 9;
        RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA, "========>%s(), frame(%d)"
-                    " sentd to:"MAC_FMT", ieee->dev:%p\n", __func__,
-                    type, MAC_ARG(Dst), ieee->dev);
+                    " sentd to: %pM, ieee->dev:%p\n", __func__,
+                    type, Dst, ieee->dev);
        if (pBA == NULL || ieee == NULL) {
                RTLLIB_DEBUG(RTLLIB_DL_ERR, "pBA(%p) is NULL or ieee(%p) is "
                             "NULL\n", pBA, ieee);
@@ -150,8 +150,8 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
        if (net_ratelimit())
                RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA,
                             "========>%s(), Reason"
-                            "Code(%d) sentd to:"MAC_FMT"\n", __func__,
-                            ReasonCode, MAC_ARG(dst));
+                            "Code(%d) sentd to: %pM\n", __func__,
+                            ReasonCode, dst);
 
        memset(&DelbaParamSet, 0, 2);
 
@@ -265,7 +265,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
        pBaTimeoutVal = (u16 *)(tag + 5);
        pBaStartSeqCtrl = (union sequence_control *)(req + 7);
 
-       RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst));
+       RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from : %pM\n", dst);
        if (ieee->current_network.qos_data.active == 0  ||
            (ieee->pHTInfo->bCurrentHTSupport == false) ||
            (ieee->pHTInfo->IOTAction & HT_IOT_ACT_REJECT_ADDBA_REQ)) {
@@ -347,7 +347,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
        pBaParamSet = (union ba_param_set *)(tag + 5);
        pBaTimeoutVal = (u16 *)(tag + 7);
 
-       RT_TRACE(COMP_DBG, "====>rx ADDBARSP from :"MAC_FMT"\n", MAC_ARG(dst));
+       RT_TRACE(COMP_DBG, "====>rx ADDBARSP from : %pM\n", dst);
        if (ieee->current_network.qos_data.active == 0  ||
            ieee->pHTInfo->bCurrentHTSupport == false ||
            ieee->pHTInfo->bCurrentAMPDUEnable == false) {
@@ -459,8 +459,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
                if (!GetTs(ieee, (struct ts_common_info **)&pRxTs, dst,
                    (u8)pDelBaParamSet->field.TID, RX_DIR, false)) {
                        RTLLIB_DEBUG(RTLLIB_DL_ERR,  "can't get TS for RXTS in "
-                                    "%s().dst:"MAC_FMT" TID:%d\n", __func__,
-                                    MAC_ARG(dst),
+                                    "%s().dst: %pM TID:%d\n", __func__, dst,
                                     (u8)pDelBaParamSet->field.TID);
                        return -1;
                }
index 519349f0ce4b5c37cb85cfb8a1229bcb21ca9f4f..6ebd20e8530cabf75a9b9a135ef7bd203ea63329 100644 (file)
@@ -389,9 +389,9 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
                                }
 
                                RTLLIB_DEBUG(RTLLIB_DL_TS, "to init current TS"
-                                            ", UP:%d, Dir:%d, addr:"MAC_FMT
+                                            ", UP:%d, Dir:%d, addr: %pM"
                                             " ppTs=%p\n", UP, Dir,
-                                             MAC_ARG(Addr), *ppTS);
+                                             Addr, *ppTS);
                                pTSInfo->field.ucTrafficType = 0;
                                pTSInfo->field.ucTSID = UP;
                                pTSInfo->field.ucDirection = Dir;
@@ -462,7 +462,7 @@ void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs,
 void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
 {
        struct ts_common_info *pTS, *pTmpTS;
-       printk(KERN_INFO "===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr));
+       printk(KERN_INFO "===========>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 a9991a0fa1c84766a5002c03d175911fcb3e6b3b..baf3b6342e440dbb8c77faf41619e844f28a7738 100644 (file)
@@ -126,8 +126,8 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
                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));
+                "KeyType:%d, MacAddr %pM\n", dev, EntryNo, KeyIndex,
+                KeyType, MacAddr);
 
        if (DefaultKey)
                usConfig |= BIT15 | (KeyType<<2);
index 291ec3e9d22ca07f68652901650dc3d2ca9fe18b..6d201ec382761c8e75e04ec1df7efd041b560473 100644 (file)
@@ -2322,9 +2322,9 @@ static void dm_check_edca_turbo(struct net_device *dev)
                static int wb_tmp;
                if (wb_tmp == 0) {
                        printk(KERN_INFO "%s():iot peer is %s, bssid:"
-                              MAC_FMT"\n", __func__,
+                              " %pM\n", __func__,
                               peername[pHTInfo->IOTPeer],
-                              MAC_ARG(priv->rtllib->current_network.bssid));
+                              priv->rtllib->current_network.bssid);
                        wb_tmp = 1;
                }
        }
index c7b3641f30b6ebdb582592b6b56eed1e5daff356..b33caccb43a8de771b650d1500c4f958030c5a29 100644 (file)
@@ -700,10 +700,6 @@ do {                                                               \
                }                                       \
        } while (0)
 
-#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 306d6ff707afd9382cc28193744a8261d682e44d..78059b9671fc4225ec4a0b1ed02b9b30ebaaa633 100644 (file)
@@ -279,7 +279,7 @@ static int rtllib_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;
@@ -292,9 +292,9 @@ static int rtllib_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;
        }
@@ -342,7 +342,7 @@ static int rtllib_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;
@@ -418,11 +418,10 @@ static char *rtllib_ccmp_print_stats(char *p, void *priv)
 {
        struct rtllib_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 c4e490e57ad3a0cf3ba0a082357f6222a1ebc23b..6a0c878864220d2637ffef6fbe6cc95060cb76b4 100644 (file)
@@ -400,7 +400,7 @@ static int rtllib_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;
        }
@@ -412,9 +412,9 @@ static int rtllib_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;
        }
@@ -428,9 +428,8 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                    tkey->initialized) {
                        if (net_ratelimit()) {
                                printk(KERN_DEBUG "TKIP: replay detected: STA="
-                                      MAC_FMT
-                                      " previous TSC %08x%04x received TSC "
-                                     "%08x%04x\n", MAC_ARG(hdr->addr2),
+                                      " %pM previous TSC %08x%04x received "
+                                     "TSC %08x%04x\n",hdr->addr2,
                                      tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
                        }
                        tkey->dot11RSNAStatsTKIPReplays++;
@@ -453,8 +452,8 @@ static int rtllib_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;
                }
@@ -474,7 +473,7 @@ static int rtllib_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;
@@ -624,8 +623,8 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
                struct rtllib_hdr_4addr *hdr;
                hdr = (struct rtllib_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);
                printk(KERN_DEBUG "%d, force_mic_error = %d\n",
                       (memcmp(mic, skb->data + skb->len - 8, 8) != 0),\
index 205c57508497b34b91ab1512847f550703335840..35f70d6fe2ebf4dbaade41f7c75fb114bf05af38 100644 (file)
@@ -305,8 +305,8 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
        atomic_dec(&crypt->refcnt);
        if (res < 0) {
                RTLLIB_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)
                        RTLLIB_DEBUG_DROP("Decryption failed ICV "
                                             "mismatch (key %d)\n",
@@ -345,8 +345,8 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
        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;
        }
 
@@ -1028,8 +1028,8 @@ int rtllib_rx_get_crypt(struct rtllib_device *ieee, struct sk_buff *skb,
                         * frames silently instead of filling system log with
                         * these reports. */
                        RTLLIB_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++;
                        return -1;
                }
@@ -1138,8 +1138,8 @@ int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
                } else {
                        RTLLIB_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);
                        return -1;
                }
        }
@@ -1156,9 +1156,9 @@ int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
            !rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
                RTLLIB_DEBUG_DROP(
                        "dropped unencrypted RX data "
-                       "frame from " MAC_FMT
+                       "frame from %pM"
                        " (drop_unencrypted=1)\n",
-                       MAC_ARG(hdr->addr2));
+                       hdr->addr2);
                return -1;
        }
 
@@ -2309,11 +2309,11 @@ static inline int rtllib_network_init(
        }
 
        if (network->mode == 0) {
-               RTLLIB_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' "
+               RTLLIB_DEBUG_SCAN("Filtered out '%s (%pM)' "
                                     "network.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
-                                    MAC_ARG(network->bssid));
+                                    network->bssid);
                return 1;
        }
 
@@ -2516,9 +2516,9 @@ static inline void rtllib_process_probe_response(
                return;
 
        RTLLIB_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',
@@ -2537,10 +2537,10 @@ static inline void rtllib_process_probe_response(
                (beacon->capability & (1<<0x0)) ? '1' : '0');
 
        if (rtllib_network_init(ieee, beacon, network, stats)) {
-               RTLLIB_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
+               RTLLIB_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) ==
                                  RTLLIB_STYPE_PROBE_RESP ?
                                  "PROBE RESPONSE" : "BEACON");
@@ -2604,11 +2604,11 @@ static inline void rtllib_process_probe_response(
                        /* If there are no more slots, expire the oldest */
                        list_del(&oldest->list);
                        target = oldest;
-                       RTLLIB_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from "
+                       RTLLIB_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,
@@ -2617,10 +2617,9 @@ static inline void rtllib_process_probe_response(
                }
 
 
-               RTLLIB_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
+               RTLLIB_DEBUG_SCAN("Adding '%s' ( %pM) via %s.\n",
                                  escape_essid(network->ssid,
-                                 network->ssid_len),
-                                 MAC_ARG(network->bssid),
+                                 network->ssid_len), network->bssid,
                                  WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                  RTLLIB_STYPE_PROBE_RESP ?
                                  "PROBE RESPONSE" : "BEACON");
@@ -2629,10 +2628,9 @@ static inline void rtllib_process_probe_response(
                if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
                        rtllib_softmac_new_net(ieee, network);
        } else {
-               RTLLIB_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n",
+               RTLLIB_DEBUG_SCAN("Updating '%s' ( %pM) via %s.\n",
                                  escape_essid(target->ssid,
-                                 target->ssid_len),
-                                 MAC_ARG(target->bssid),
+                                 target->ssid_len), target->bssid,
                                  WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                  RTLLIB_STYPE_PROBE_RESP ?
                                  "PROBE RESPONSE" : "BEACON");
index fa0e2afd1ed1eb4869fd4c7140e76bde42d52592..dd4dec8c53afb134349c6ef20d845a0b18ed6c9d 100644 (file)
@@ -1972,7 +1972,7 @@ static inline void rtllib_rx_assoc_rq(struct rtllib_device *ieee,
        if (assoc_rq_parse(skb, dest) != -1)
                rtllib_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);
 }
 
 void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr)
index c350f4e277dabbbb3e7d7b354403e206cfc5d776..8cea4a60e1b3f64619f06beb0e37b04ab857c720 100644 (file)
@@ -279,10 +279,10 @@ int rtllib_wx_get_scan(struct rtllib_device *ieee,
                                                    info);
                else
                        RTLLIB_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));
        }