staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pM

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Larry Finger 2011-08-25 14:07:03 -05:00 committed by Greg Kroah-Hartman
parent 18d08aff87
commit ac50ddaaee
10 changed files with 55 additions and 64 deletions

View 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;
}

View 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) {

View 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);

View 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;
}
}

View 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;
*

View 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);

View 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),\

View 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");

View 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)

View 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));
}