drivers: wifi: siwx91x: Also update interface state on AP

It seems there is no functional impact, but it makes sense to also update
the state of the interface when AP is started/stopped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This commit is contained in:
Jérôme Pouiller 2025-06-11 18:18:09 +02:00 committed by Dan Kalowsky
commit f6f6196cf0

View file

@ -641,6 +641,9 @@ static int siwx91x_ap_disable(const struct device *dev)
return -EIO;
}
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_NATIVE)) {
net_if_dormant_on(sidev->iface);
}
wifi_mgmt_raise_ap_disable_result_event(sidev->iface, WIFI_STATUS_AP_SUCCESS);
sidev->state = WIFI_STATE_INTERFACE_DISABLED;
return ret;
@ -848,6 +851,9 @@ static int siwx91x_ap_enable(const struct device *dev, struct wifi_connect_req_p
wifi_mgmt_raise_ap_enable_result_event(sidev->iface, WIFI_STATUS_AP_FAIL);
return -EIO;
}
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_NATIVE)) {
net_if_dormant_off(sidev->iface);
}
return 0;
}