From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH 06/10] staging: otus: use '%pM' format to print MAC address
Date: Sat, 11 Sep 2010 17:17:09 +0300 [thread overview]
Message-ID: <65a673d5f658daa3b274d10d190877ab99c9ac3e.1284214460.git.andy.shevchenko@gmail.com> (raw)
In-Reply-To: <735b00c1124fd4c2c68dfe9446ac05db9aa72fcd.1284214458.git.andy.shevchenko@gmail.com>
In-Reply-To: <735b00c1124fd4c2c68dfe9446ac05db9aa72fcd.1284214458.git.andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.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..405bd29 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[0]);
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
next prev parent reply other threads:[~2010-09-11 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 14:17 [PATCH 01/10] staging: rt2860: change plain format of mac address to %pM in *printf() Andy Shevchenko
2010-09-11 14:17 ` [PATCH 02/10] staging: ath6kl: use '%pM' format to print MAC address Andy Shevchenko
2010-09-11 14:17 ` [PATCH 03/10] staging: brcm80211: " Andy Shevchenko
2010-09-11 14:17 ` [PATCH 04/10] staging: cxt1e1: use '%pMF' " Andy Shevchenko
2010-09-11 14:17 ` [PATCH 05/10] staging: octeon: use '%pM' " Andy Shevchenko
2010-09-11 14:17 ` Andy Shevchenko [this message]
2010-09-11 14:17 ` [PATCH 07/10] staging: rt2870: " Andy Shevchenko
2010-09-11 14:17 ` [PATCH 08/10] staging: rtl8712: " Andy Shevchenko
2010-09-11 14:17 ` [PATCH 09/10] staging: vt6655: " Andy Shevchenko
2010-09-11 14:17 ` [PATCH 10/10] staging: wlags49_h2: " Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65a673d5f658daa3b274d10d190877ab99c9ac3e.1284214460.git.andy.shevchenko@gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®