lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251101201623.185575-1-rafiqul713@gmail.com>
Date: Sat,  1 Nov 2025 21:16:23 +0100
From: rafiqul713 <rafiqul713@...il.com>
To: netdev@...r.kernel.org
Cc: gregkh@...uxfoundation.org,
	linux-staging@...ts.linux.dev,
	rafiqul713 <rafiqul713@...il.com>
Subject: [PATCH] [PATCH] staging: rtl8723bs: use ether_addr_equal in rtw_ap.c

Replace memcmp() with ether_addr_equal() for MAC address comparison.
This is the preferred and more readable method in network code.

Signed-off-by: rafiqul713 <rafiqul713@...il.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 0908f2234f67..7cfd4088ce8e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -6,6 +6,7 @@
  ******************************************************************************/
 
 #include <drv_types.h>
+#include <linux/etherdevice.h>
 #include <linux/unaligned.h>
 
 void init_mlme_ap_info(struct adapter *padapter)
@@ -1185,7 +1186,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 	list_for_each(plist, phead) {
 		paclnode = list_entry(plist, struct rtw_wlan_acl_node, list);
 
-		if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
+		if (ether_addr_equal(paclnode->addr, addr)) {
 			if (paclnode->valid == true) {
 				added = true;
 				break;
@@ -1238,7 +1239,7 @@ void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
 		paclnode = list_entry(plist, struct rtw_wlan_acl_node, list);
 
 		if (
-			!memcmp(paclnode->addr, addr, ETH_ALEN) ||
+			ether_addr_equal(paclnode->addr, addr) ||
 			is_broadcast_ether_addr(addr)
 		) {
 			if (paclnode->valid) {
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ