* [PATCH 1/2] staging: rtl8188eu: remove MacAddr_isBcst macro
@ 2018-07-16 14:23 Michael Straube
2018-07-16 14:23 ` [PATCH 2/2] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
0 siblings, 1 reply; 2+ messages in thread
From: Michael Straube @ 2018-07-16 14:23 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Use is_broadcast_ether_addr instead of the MacAddr_isBcst macro.
The macro is not used anywhere else, so remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
drivers/staging/rtl8188eu/include/wifi.h | 7 -------
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 53c65d5463c0..2edc3a8242b1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -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)
diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h
index a41e8eda02fb..4a56e54e38f6 100644
--- a/drivers/staging/rtl8188eu/include/wifi.h
+++ b/drivers/staging/rtl8188eu/include/wifi.h
@@ -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)
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] staging: rtl8188eu: use is_multicast_ether_addr
2018-07-16 14:23 [PATCH 1/2] staging: rtl8188eu: remove MacAddr_isBcst macro Michael Straube
@ 2018-07-16 14:23 ` Michael Straube
0 siblings, 0 replies; 2+ messages in thread
From: Michael Straube @ 2018-07-16 14:23 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
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.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 2edc3a8242b1..48e12b5439eb 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -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)
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-16 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 14:23 [PATCH 1/2] staging: rtl8188eu: remove MacAddr_isBcst macro Michael Straube
2018-07-16 14:23 ` [PATCH 2/2] staging: rtl8188eu: use is_multicast_ether_addr Michael Straube
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.