Skip to content

Commit

Permalink
staging/wilc1000: Use %pM format specifier to print mac address
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
0xAX authored and gregkh committed Sep 13, 2015
1 parent 76f966e commit 310a28f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/wilc1000/host_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ static s32 Handle_SetMacAddress(tstrWILC_WFIDrv *drvHandler, tstrHostIfSetMacAdd
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) {
Expand Down Expand Up @@ -1948,8 +1948,8 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps
if (pstrHostIFconnectAttr->pu8bssid != NULL) {
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);
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/wilc1000/linux_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2013,8 +2013,7 @@ int mac_open(struct net_device *ndev)
Set_machw_change_vir_if(false);

host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add);
PRINT_D(INIT_DBG, "Mac address: %x:%x:%x:%x:%x:%x\n", mac_add[0], mac_add[1], mac_add[2],
mac_add[3], mac_add[4], mac_add[5]);
PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add);

/* loop through the NUM of supported devices and set the MAC address */
for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) {
Expand Down

0 comments on commit 310a28f

Please sign in to comment.