Skip to content

Commit f6f6196

Browse files
jerome-pouillerdkalowsk
authored andcommitted
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>
1 parent b0b197f commit f6f6196

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/wifi/siwx91x/siwx91x_wifi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ static int siwx91x_ap_disable(const struct device *dev)
641641
return -EIO;
642642
}
643643

644+
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_NATIVE)) {
645+
net_if_dormant_on(sidev->iface);
646+
}
644647
wifi_mgmt_raise_ap_disable_result_event(sidev->iface, WIFI_STATUS_AP_SUCCESS);
645648
sidev->state = WIFI_STATE_INTERFACE_DISABLED;
646649
return ret;
@@ -848,6 +851,9 @@ static int siwx91x_ap_enable(const struct device *dev, struct wifi_connect_req_p
848851
wifi_mgmt_raise_ap_enable_result_event(sidev->iface, WIFI_STATUS_AP_FAIL);
849852
return -EIO;
850853
}
854+
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_NATIVE)) {
855+
net_if_dormant_off(sidev->iface);
856+
}
851857

852858
return 0;
853859
}

0 commit comments

Comments
 (0)