Skip to contentSkip to conversation

staging: rtl8188eu: remove MacAddr_isBcst macro

PATCH New Michael Straube 1 participant 2 messages Jul 16, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: rtl8188eu: remove MacAddr_isBcst macro

Use is_broadcast_ether_addr instead of the MacAddr_isBcst macro. The macro is not used anywhere else, so remove it.

---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
 drivers/staging/rtl8188eu/include/wifi.h  | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
index 53c65d5463c0..2edc3a8242b1 100644
@@ -549,7 +549,7 @@ static void count_rx_stats(struct adapter *padapter,
 
 	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
 
-	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
+	if (!is_broadcast_ether_addr(pattrib->dst) && !IS_MCAST(pattrib->dst))
 		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
 
 	if (sta)
drivers/staging/rtl8188eu/include/wifi.h +0 -7
index a41e8eda02fb..4a56e54e38f6 100644
@@ -257,13 +257,6 @@ enum WIFI_REG_DOMAIN {
 
 #define GetAddr4Ptr(pbuf)	((unsigned char *)((size_t)(pbuf) + 24))
 
-#define MacAddr_isBcst(addr) \
-	( \
-	((addr[0] == 0xff) && (addr[1] == 0xff) && \
-	(addr[2] == 0xff) && (addr[3] == 0xff) && \
-	(addr[4] == 0xff) && (addr[5] == 0xff))  ? true : false \
-)
-
 static inline int IS_MCAST(unsigned char *da)
 {
 	if ((*da) & 0x01)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 2/2 staging: rtl8188eu: use is_multicast_ether_addr

Use is_multicast_ether_addr instead of IS_MCAST.
By definition the broadcast address is also a multicast address, so checking for !multicast in the conditional is sufficient.

---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
index 2edc3a8242b1..48e12b5439eb 100644
@@ -549,7 +549,7 @@ static void count_rx_stats(struct adapter *padapter,
 
 	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
 
-	if (!is_broadcast_ether_addr(pattrib->dst) && !IS_MCAST(pattrib->dst))
+	if (!is_multicast_ether_addr(pattrib->dst))
 		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
 
 	if (sta)
Signature · 1 line
2.18.0