Commit aa4d282c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

staging: rt2860: change plain format of mac address to %pM in *printf()



There are many locations where MAC or BSSID is printed. The plain format
is used in such places. *printf() in kernel recognizes
%pM, %pMF and %pm format parameters to print out 6-byte array as MAC
address. This patch changes plain format to custom %pM which is widely
used in kernel.

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ef6c3c6e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -654,8 +654,8 @@ BOOLEAN BARecSessionAdd(struct rt_rtmp_adapter *pAd,
	} else {
		Status = FALSE;
		DBGPRINT(RT_DEBUG_TRACE,
			 ("Can't Accept ADDBA for %02x:%02x:%02x:%02x:%02x:%02x TID = %d\n",
			  PRINT_MAC(pEntry->Addr), TID));
			("Can't Accept ADDBA for %pM TID = %d\n",
				&pEntry->Addr[0], TID));
	}
	return (Status);
}
+1 −4
Original line number Diff line number Diff line
@@ -663,10 +663,7 @@ int RTUSBWriteHWMACAddress(struct rt_rtmp_adapter *pAd)
	StaMacReg1.field.Byte5 = pAd->CurrentAddress[5];
	StaMacReg1.field.U2MeMask = 0xff;
	DBGPRINT_RAW(RT_DEBUG_TRACE,
		     ("Local MAC = %02x:%02x:%02x:%02x:%02x:%02x\n",
		      pAd->CurrentAddress[0], pAd->CurrentAddress[1],
		      pAd->CurrentAddress[2], pAd->CurrentAddress[3],
		      pAd->CurrentAddress[4], pAd->CurrentAddress[5]));
		("Local MAC = %pM\n", &pAd->CurrentAddress[0]));

	RTUSBWriteMACRegister(pAd, MAC_ADDR_DW0, StaMacReg0.word);
	RTUSBWriteMACRegister(pAd, MAC_ADDR_DW1, StaMacReg1.word);
+2 −2
Original line number Diff line number Diff line
@@ -221,8 +221,8 @@ void WpaEAPOLKeyAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E
			break;

		DBGPRINT(RT_DEBUG_TRACE,
			 ("Receive EAPoL-Key frame from STA %02X-%02X-%02X-%02X-%02X-%02X\n",
			  PRINT_MAC(pEntry->Addr)));
			("Receive EAPoL-Key frame from STA %pMF\n",
				&pEntry->Addr[0]));

		if (((pEapol_packet->ProVer != EAPOL_VER)
		     && (pEapol_packet->ProVer != EAPOL_VER2))
+3 −4
Original line number Diff line number Diff line
@@ -1536,10 +1536,9 @@ void MlmeAutoReconnectLastSSID(struct rt_rtmp_adapter *pAd)
{
	if (pAd->StaCfg.bAutoConnectByBssid) {
		DBGPRINT(RT_DEBUG_TRACE,
			 ("Driver auto reconnect to last OID_802_11_BSSID setting - %02X:%02X:%02X:%02X:%02X:%02X\n",
			  pAd->MlmeAux.Bssid[0], pAd->MlmeAux.Bssid[1],
			  pAd->MlmeAux.Bssid[2], pAd->MlmeAux.Bssid[3],
			  pAd->MlmeAux.Bssid[4], pAd->MlmeAux.Bssid[5]));
			("Driver auto reconnect to last OID_802_11_BSSID "
				"setting - %pM\n",
				&pAd->MlmeAux.Bssid[0]));

		pAd->MlmeAux.Channel = pAd->CommonCfg.Channel;
		MlmeEnqueue(pAd,
+3 −9
Original line number Diff line number Diff line
@@ -749,13 +749,7 @@ void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr)
		/*      pAd->PermanentAddress[5] = RandomByte(pAd)&0xf8; */

		DBGPRINT_RAW(RT_DEBUG_TRACE,
			     ("E2PROM MAC: =%02x:%02x:%02x:%02x:%02x:%02x\n",
			      pAd->PermanentAddress[0],
			      pAd->PermanentAddress[1],
			      pAd->PermanentAddress[2],
			      pAd->PermanentAddress[3],
			      pAd->PermanentAddress[4],
			      pAd->PermanentAddress[5]));
			("E2PROM MAC: =%pM\n", &pAd->PermanentAddress[0]));
		if (pAd->bLocalAdminMAC == FALSE) {
			MAC_DW0_STRUC csr2;
			MAC_DW1_STRUC csr3;
@@ -772,8 +766,8 @@ void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr)
			csr3.field.U2MeMask = 0xff;
			RTMP_IO_WRITE32(pAd, MAC_ADDR_DW1, csr3.word);
			DBGPRINT_RAW(RT_DEBUG_TRACE,
				     ("E2PROM MAC: =%02x:%02x:%02x:%02x:%02x:%02x\n",
				      PRINT_MAC(pAd->PermanentAddress)));
				("E2PROM MAC: =%pM\n",
					&pAd->PermanentAddress[0]));
		}
	}

Loading