[PATCH v2 2/2] AP: Use is_zero_ether_addr() to check if BSSID is NULL

Manaswini Paluri quic_mpaluri at quicinc.com
Tue Jul 25 00:16:58 PDT 2023


From: Ilan Peer <ilan.peer at intel.com>

Use helper function is_zero_ether_addr() for checking empty bssid
value in hostapd_driver_init().

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri at quicinc.com>
---
 hostapd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hostapd/main.c b/hostapd/main.c
index ac9a47a48..4b730b6ef 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -218,7 +218,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
 #endif /* CONFIG_IEEE80211BE */
 
 	/* Initialize the driver interface */
-	if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
+	if (is_zero_ether_addr(b))
 		b = NULL;
 
 	os_memset(&params, 0, sizeof(params));
-- 
2.17.1




More information about the Hostap mailing list