net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0c68ae2605
commit
e174961ca1
@@ -19,7 +19,6 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
|
||||
{
|
||||
struct ieee80211_hdr_4addr *hdr;
|
||||
u16 fc;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
hdr = (struct ieee80211_hdr_4addr *) skb->data;
|
||||
|
||||
@@ -45,11 +44,11 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
|
||||
printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
|
||||
le16_to_cpu(hdr->seq_ctl));
|
||||
|
||||
printk(KERN_DEBUG " A1=%s", print_mac(mac, hdr->addr1));
|
||||
printk(" A2=%s", print_mac(mac, hdr->addr2));
|
||||
printk(" A3=%s", print_mac(mac, hdr->addr3));
|
||||
printk(KERN_DEBUG " A1=%pM", hdr->addr1);
|
||||
printk(" A2=%pM", hdr->addr2);
|
||||
printk(" A3=%pM", hdr->addr3);
|
||||
if (skb->len >= 30)
|
||||
printk(" A4=%s", print_mac(mac, hdr->addr4));
|
||||
printk(" A4=%pM", hdr->addr4);
|
||||
printk("\n");
|
||||
}
|
||||
|
||||
@@ -557,7 +556,6 @@ static int
|
||||
hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
|
||||
u16 fc, struct net_device **wds)
|
||||
{
|
||||
DECLARE_MAC_BUF(mac);
|
||||
/* FIX: is this really supposed to accept WDS frames only in Master
|
||||
* mode? What about Repeater or Managed with WDS frames? */
|
||||
if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) !=
|
||||
@@ -573,10 +571,10 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
|
||||
hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) {
|
||||
/* RA (or BSSID) is not ours - drop */
|
||||
PDEBUG(DEBUG_EXTRA2, "%s: received WDS frame with "
|
||||
"not own or broadcast %s=%s\n",
|
||||
"not own or broadcast %s=%pM\n",
|
||||
local->dev->name,
|
||||
fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID",
|
||||
print_mac(mac, hdr->addr1));
|
||||
hdr->addr1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -589,8 +587,8 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
|
||||
/* require that WDS link has been registered with TA or the
|
||||
* frame is from current AP when using 'AP client mode' */
|
||||
PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame "
|
||||
"from unknown TA=%s\n",
|
||||
local->dev->name, print_mac(mac, hdr->addr2));
|
||||
"from unknown TA=%pM\n",
|
||||
local->dev->name, hdr->addr2);
|
||||
if (local->ap && local->ap->autom_ap_wds)
|
||||
hostap_wds_link_oper(local, hdr->addr2, WDS_ADD);
|
||||
return -1;
|
||||
@@ -667,10 +665,8 @@ hostap_rx_frame_decrypt(local_info_t *local, 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",
|
||||
local->dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
|
||||
"received packet from %pM\n",
|
||||
local->dev->name, hdr->addr2);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -679,12 +675,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
|
||||
res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
|
||||
atomic_dec(&crypt->refcnt);
|
||||
if (res < 0) {
|
||||
printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT
|
||||
") res=%d\n",
|
||||
local->dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
|
||||
res);
|
||||
printk(KERN_DEBUG "%s: decryption failed (SA=%pM) res=%d\n",
|
||||
local->dev->name, hdr->addr2, res);
|
||||
local->comm_tallies.rx_discards_wep_undecryptable++;
|
||||
return -1;
|
||||
}
|
||||
@@ -700,7 +692,6 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
|
||||
{
|
||||
struct ieee80211_hdr_4addr *hdr;
|
||||
int res, hdrlen;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
|
||||
return 0;
|
||||
@@ -713,8 +704,8 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
|
||||
atomic_dec(&crypt->refcnt);
|
||||
if (res < 0) {
|
||||
printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
|
||||
" (SA=%s keyidx=%d)\n",
|
||||
local->dev->name, print_mac(mac, hdr->addr2), keyidx);
|
||||
" (SA=%pM keyidx=%d)\n",
|
||||
local->dev->name, hdr->addr2, keyidx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -822,10 +813,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
|
||||
* frames silently instead of filling system log with
|
||||
* these reports. */
|
||||
printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
|
||||
" (SA=" MAC_FMT ")\n",
|
||||
local->dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
|
||||
" (SA=%pM)\n",
|
||||
local->dev->name, hdr->addr2);
|
||||
#endif
|
||||
local->comm_tallies.rx_discards_wep_undecryptable++;
|
||||
goto rx_dropped;
|
||||
@@ -839,9 +828,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
|
||||
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
|
||||
{
|
||||
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
|
||||
"from " MAC_FMT "\n", dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
|
||||
"from %pM\n", dev->name, hdr->addr2);
|
||||
/* TODO: could inform hostapd about this so that it
|
||||
* could send auth failure report */
|
||||
goto rx_dropped;
|
||||
@@ -1009,10 +996,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
|
||||
"unencrypted EAPOL frame\n", local->dev->name);
|
||||
} else {
|
||||
printk(KERN_DEBUG "%s: encryption configured, but RX "
|
||||
"frame not encrypted (SA=" MAC_FMT ")\n",
|
||||
local->dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
|
||||
"frame not encrypted (SA=%pM)\n",
|
||||
local->dev->name, hdr->addr2);
|
||||
goto rx_dropped;
|
||||
}
|
||||
}
|
||||
@@ -1021,10 +1006,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
|
||||
!hostap_is_eapol_frame(local, skb)) {
|
||||
if (net_ratelimit()) {
|
||||
printk(KERN_DEBUG "%s: dropped unencrypted RX data "
|
||||
"frame from " MAC_FMT " (drop_unencrypted=1)\n",
|
||||
dev->name,
|
||||
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
|
||||
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
|
||||
"frame from %pM (drop_unencrypted=1)\n",
|
||||
dev->name, hdr->addr2);
|
||||
}
|
||||
goto rx_dropped;
|
||||
}
|
||||
|
Reference in New Issue
Block a user