[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b9f7be19391dafe3d913ef0418a26aa5e0c8a019.1284316739.git.andy.shevchenko@gmail.com>
Date: Mon, 13 Sep 2010 11:40:30 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCHv2 06/10] staging: otus: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
drivers/staging/otus/ioctl.c | 5 +----
drivers/staging/otus/wrap_ev.c | 15 ++++-----------
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index dc3066d..a403d9c 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -2188,10 +2188,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SET_MLME\n");
/* Translate STA's address */
- sprintf(mac_addr, "%02x:%02x:%02x:%02x:%02x:%02x",
- zdparm->sta_addr[0], zdparm->sta_addr[1],
- zdparm->sta_addr[2], zdparm->sta_addr[3],
- zdparm->sta_addr[4], zdparm->sta_addr[5]);
+ sprintf(mac_addr, "%pM", zdparm->sta_addr);
switch (zdparm->u.mlme.cmd) {
case MLME_STA_DEAUTH:
diff --git a/drivers/staging/otus/wrap_ev.c b/drivers/staging/otus/wrap_ev.c
index 29f5603..1c312ad 100644
--- a/drivers/staging/otus/wrap_ev.c
+++ b/drivers/staging/otus/wrap_ev.c
@@ -49,8 +49,7 @@ u16_t zfLnxAsocNotify(zdev_t *dev, u16_t *macAddr, u8_t *body, u16_t bodySize,
memset(&wreq, 0, sizeof(wreq));
memcpy(wreq.addr.sa_data, macAddr, ETH_ALEN);
wreq.addr.sa_family = ARPHRD_ETHER;
- printk(KERN_DEBUG "join_event of MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+ printk(KERN_DEBUG "join_event of MAC: %pM\n", addr);
for (i = 0; i < ZM_OAL_MAX_STA_SUPPORT; i++) {
for (j = 0; j < IEEE80211_ADDR_LEN; j++) {
@@ -114,9 +113,7 @@ u16_t zfLnxDisAsocNotify(zdev_t *dev, u8_t *macAddr, u16_t port)
memset(&wreq, 0, sizeof(wreq));
memcpy(wreq.addr.sa_data, macAddr, ETH_ALEN);
wreq.addr.sa_family = ARPHRD_ETHER;
- printk(KERN_DEBUG "zfwDisAsocNotify(), MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-
+ printk(KERN_DEBUG "zfwDisAsocNotify(), MAC: %pM\n", addr);
return 0;
}
@@ -131,9 +128,7 @@ u16_t zfLnxApConnectNotify(zdev_t *dev, u8_t *macAddr, u16_t port)
memset(&wreq, 0, sizeof(wreq));
memcpy(wreq.addr.sa_data, macAddr, ETH_ALEN);
wreq.addr.sa_family = ARPHRD_ETHER;
- printk(KERN_DEBUG "zfwApConnectNotify(), MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-
+ printk(KERN_DEBUG "zfwApConnectNotify(), MAC: %pM\n", addr);
return 0;
}
@@ -254,9 +249,7 @@ void zfLnxApMicFailureNotify(zdev_t *dev, u8_t *addr, zbuf_t *buf)
memset(&wreq, 0, sizeof(wreq));
memcpy(wreq.addr.sa_data, addr, ETH_ALEN);
wreq.addr.sa_family = ARPHRD_ETHER;
- printk(KERN_DEBUG "zfwApMicFailureNotify(), "
- "MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+ printk(KERN_DEBUG "zfwApMicFailureNotify(), MAC: %pM\n", addr);
return;
}
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists