summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010
diff options
context:
space:
mode:
authorPontus Fuchs <pontus.fuchs@gmail.com>2016-10-06 22:50:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-16 10:24:58 +0200
commit7a98abccd28e264a60c55df5b8cf59337ec338ba (patch)
tree32d3dcb9a882fbee36482198b360e7dbc30c0138 /drivers/staging/ks7010
parent0af454793a247b11b19506fa504ccde63d8372ac (diff)
downloadtalos-obmc-linux-7a98abccd28e264a60c55df5b8cf59337ec338ba.tar.gz
talos-obmc-linux-7a98abccd28e264a60c55df5b8cf59337ec338ba.zip
staging: ks7010: Use printk format specifier for MAC addresses
Convert to %pM instead of custom code. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r--drivers/staging/ks7010/ks_hostif.c36
-rw-r--r--drivers/staging/ks7010/ks_wlan_net.c9
2 files changed, 9 insertions, 36 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index aff3eae239ab..25c32ab8211d 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -187,13 +187,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
memcpy(wrqu.ap_addr.sa_data,
&(priv->current_ap.bssid[0]), ETH_ALEN);
DPRINTK(3,
- "IWEVENT: connect bssid=%02x:%02x:%02x:%02x:%02x:%02x\n",
- (unsigned char)wrqu.ap_addr.sa_data[0],
- (unsigned char)wrqu.ap_addr.sa_data[1],
- (unsigned char)wrqu.ap_addr.sa_data[2],
- (unsigned char)wrqu.ap_addr.sa_data[3],
- (unsigned char)wrqu.ap_addr.sa_data[4],
- (unsigned char)wrqu.ap_addr.sa_data[5]);
+ "IWEVENT: connect bssid=%pM\n", wrqu.ap_addr.sa_data);
wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL);
}
DPRINTK(4, "\n Link AP\n");
@@ -420,16 +414,11 @@ void hostif_data_indication(struct ks_wlan_private *priv)
/* needed parameters: count, keyid, key type, TSC */
sprintf(buf,
"MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr="
- "%02x:%02x:%02x:%02x:%02x:%02x)",
+ "%pM)",
auth_type - 1,
eth_hdr->
h_dest[0] & 0x01 ? "broad" :
- "uni", eth_hdr->h_source[0],
- eth_hdr->h_source[1],
- eth_hdr->h_source[2],
- eth_hdr->h_source[3],
- eth_hdr->h_source[4],
- eth_hdr->h_source[5]);
+ "uni", eth_hdr->h_source);
memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = strlen(buf);
DPRINTK(4,
@@ -560,10 +549,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
dev->dev_addr[5] = priv->eth_addr[5];
dev->dev_addr[6] = 0x00;
dev->dev_addr[7] = 0x00;
- printk(KERN_INFO
- "ks_wlan: MAC ADDRESS = %02x:%02x:%02x:%02x:%02x:%02x\n",
- priv->eth_addr[0], priv->eth_addr[1], priv->eth_addr[2],
- priv->eth_addr[3], priv->eth_addr[4], priv->eth_addr[5]);
+ printk(KERN_INFO "ks_wlan: MAC ADDRESS = %pM\n", priv->eth_addr);
break;
case DOT11_PRODUCT_VERSION:
/* firmware version */
@@ -1184,9 +1170,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
eth = (struct ethhdr *)packet->data;
if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN)) {
DPRINTK(1, "invalid mac address !!\n");
- DPRINTK(1, "ethernet->h_source=%02X:%02X:%02X:%02X:%02X:%02X\n",
- eth->h_source[0], eth->h_source[1], eth->h_source[2],
- eth->h_source[3], eth->h_source[4], eth->h_source[5]);
+ DPRINTK(1, "ethernet->h_source=%pM\n", eth->h_source);
dev_kfree_skb(packet);
kfree(pp);
return -3;
@@ -2217,10 +2201,7 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
} else {
hostif_infrastructure_set2_request(priv);
DPRINTK(2,
- "Infra bssid = %02x:%02x:%02x:%02x:%02x:%02x\n",
- priv->reg.bssid[0], priv->reg.bssid[1],
- priv->reg.bssid[2], priv->reg.bssid[3],
- priv->reg.bssid[4], priv->reg.bssid[5]);
+ "Infra bssid = %pM\n", priv->reg.bssid);
}
break;
case MODE_ADHOC:
@@ -2230,10 +2211,7 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
} else {
hostif_adhoc_set2_request(priv);
DPRINTK(2,
- "Adhoc bssid = %02x:%02x:%02x:%02x:%02x:%02x\n",
- priv->reg.bssid[0], priv->reg.bssid[1],
- priv->reg.bssid[2], priv->reg.bssid[3],
- priv->reg.bssid[4], priv->reg.bssid[5]);
+ "Adhoc bssid = %pM\n", priv->reg.bssid);
}
break;
default:
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 77a77a96ec22..b0432fc77c62 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -399,9 +399,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
return -EOPNOTSUPP;
}
- DPRINTK(2, "bssid = %02x:%02x:%02x:%02x:%02x:%02x\n",
- priv->reg.bssid[0], priv->reg.bssid[1], priv->reg.bssid[2],
- priv->reg.bssid[3], priv->reg.bssid[4], priv->reg.bssid[5]);
+ DPRINTK(2, "bssid = %pM\n", priv->reg.bssid);
/* Write it to the card */
if (priv->need_commit) {
@@ -3321,10 +3319,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr)
priv->mac_address_valid = 0;
hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST);
- netdev_info(dev,
- "ks_wlan: MAC ADDRESS = %02x:%02x:%02x:%02x:%02x:%02x\n",
- priv->eth_addr[0], priv->eth_addr[1], priv->eth_addr[2],
- priv->eth_addr[3], priv->eth_addr[4], priv->eth_addr[5]);
+ netdev_info(dev, "ks_wlan: MAC ADDRESS = %pM\n", priv->eth_addr);
return 0;
}
OpenPOWER on IntegriCloud