From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Johnny Kim <johnny.kim@atmel.com>,
Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
Chris Park <chris.park@atmel.com>,
devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] staging/wilc1000: Use %pM format specifier to print mac address
Date: Wed, 2 Sep 2015 18:37:41 -0700 [thread overview]
Message-ID: <20150903013741.GA8330@kroah.com> (raw)
In-Reply-To: <1440681048-9574-1-git-send-email-kuleshovmail@gmail.com>
On Thu, Aug 27, 2015 at 07:10:48PM +0600, Alexander Kuleshov wrote:
> printk() supports %pM format specifier for printing 6-byte MAC/FDDI
> addresses in hex notation small buffers, let's use it intead of %x:%x...
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 6 +++---
> drivers/staging/wilc1000/linux_mon.c | 2 +-
> drivers/staging/wilc1000/linux_wlan.c | 3 +--
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 6b10bbb..48ee908 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -854,7 +854,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH
> strWID.enuWIDtype = WID_STR;
> strWID.ps8WidVal = mac_buf;
> strWID.s32ValueSize = ETH_ALEN;
> - PRINT_D(GENERIC_DBG, "mac addr = :%x:%x:%x:%x:%x:%x\n", strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
> + PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", strWID.ps8WidVal);
> /*Sending Cfg*/
> s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
> if (s32Error) {
> @@ -1965,8 +1965,8 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon
> if (pstrHostIFconnectAttr->pu8bssid != NULL) {
> WILC_memcpy(u8ConnectedSSID, pstrHostIFconnectAttr->pu8bssid, ETH_ALEN);
>
> - PRINT_D(GENERIC_DBG, "save Bssid = %x:%x:%x:%x:%x:%x\n", (pstrHostIFconnectAttr->pu8bssid[0]), (pstrHostIFconnectAttr->pu8bssid[1]), (pstrHostIFconnectAttr->pu8bssid[2]), (pstrHostIFconnectAttr->pu8bssid[3]), (pstrHostIFconnectAttr->pu8bssid[4]), (pstrHostIFconnectAttr->pu8bssid[5]));
> - PRINT_D(GENERIC_DBG, "save bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5]));
> + PRINT_D(GENERIC_DBG, "save Bssid = %pM\n", pstrHostIFconnectAttr->pu8bssid);
> + PRINT_D(GENERIC_DBG, "save bssid = %pM\n", u8ConnectedSSID);
> }
>
> s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv);
> diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
> index f5296f5..c039898 100644
> --- a/drivers/staging/wilc1000/linux_mon.c
> +++ b/drivers/staging/wilc1000/linux_mon.c
> @@ -336,7 +336,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
> skb_pull(skb, rtap_len);
>
> if (skb->data[0] == 0xc0)
> - PRINT_INFO(HOSTAPD_DBG, "%x:%x:%x:%x:%x%x\n", skb->data[4], skb->data[5], skb->data[6], skb->data[7], skb->data[8], skb->data[9]);
> + PRINT_INFO(HOSTAPD_DBG, "%pM\n", skb->data[4]);
This conversion isn't correct :(
prev parent reply other threads:[~2015-09-03 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1440680785-9327-1-git-send-email-kuleshovmail@gmail.com>
2015-08-27 13:09 ` [PATCH 2/3] staging/rtl8723au: Use %pM format specifier to print mac address Alexander Kuleshov
2015-08-27 13:13 ` Jes Sorensen
2015-08-27 13:10 ` [PATCH 3/3] staging/wilc1000: " Alexander Kuleshov
2015-09-03 1:37 ` Greg Kroah-Hartman [this message]
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=20150903013741.GA8330@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chris.park@atmel.com \
--cc=dean.lee@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=johnny.kim@atmel.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rachel.kim@atmel.com \
/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;
as well as URLs for NNTP newsgroup(s).