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>
This commit is contained in:
Jérôme Pouiller 2025-06-25 10:05:22 +02:00 committed by Daniel DeGrasse
parent 2ae23f7c58
commit 8d1d8d2b86

View File

@ -260,10 +260,10 @@ int siwx91x_ap_sta_disconnect(const struct device *dev, const uint8_t *mac_addr)
return -EINVAL;
}
memcpy(mac.octet, mac_addr, ARRAY_SIZE(mac.octet));
memcpy(mac.octet, mac_addr, WIFI_MAC_ADDR_LEN);
ret = sl_wifi_disconnect_ap_client(SL_WIFI_AP_INTERFACE | SL_WIFI_2_4GHZ_INTERFACE,
&mac, SL_WIFI_DEAUTH);
&mac, SL_WIFI_DEAUTH);
if (ret) {
LOG_ERR("Failed to disconnect: 0x%x", ret);
return -EIO;