Skip to content

Commit 8d1d8d2

Browse files
jerome-pouillerdanieldegrasse
authored andcommitted
drivers: wifi: siwx91x: Prefer WIFI_MAC_ADDR_LEN
The preferred way to reference the size of the MAC address is WIFI_MAC_ADDR_LEN. For consistency, replace ARRAY_SIZE(mac.octet) with WIFI_MAC_ADDR_LEN. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
1 parent 2ae23f7 commit 8d1d8d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/wifi/siwx91x/siwx91x_wifi_ap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ int siwx91x_ap_sta_disconnect(const struct device *dev, const uint8_t *mac_addr)
260260
return -EINVAL;
261261
}
262262

263-
memcpy(mac.octet, mac_addr, ARRAY_SIZE(mac.octet));
263+
memcpy(mac.octet, mac_addr, WIFI_MAC_ADDR_LEN);
264264

265265
ret = sl_wifi_disconnect_ap_client(SL_WIFI_AP_INTERFACE | SL_WIFI_2_4GHZ_INTERFACE,
266-
&mac, SL_WIFI_DEAUTH);
266+
&mac, SL_WIFI_DEAUTH);
267267
if (ret) {
268268
LOG_ERR("Failed to disconnect: 0x%x", ret);
269269
return -EIO;

0 commit comments

Comments
 (0)