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:
parent
b0b197fd17
commit
f6f6196cf0
1 changed files with 6 additions and 0 deletions
|
@ -641,6 +641,9 @@ static int siwx91x_ap_disable(const struct device *dev)
|
||||||
return -EIO;
|
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);
|
wifi_mgmt_raise_ap_disable_result_event(sidev->iface, WIFI_STATUS_AP_SUCCESS);
|
||||||
sidev->state = WIFI_STATE_INTERFACE_DISABLED;
|
sidev->state = WIFI_STATE_INTERFACE_DISABLED;
|
||||||
return ret;
|
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);
|
wifi_mgmt_raise_ap_enable_result_event(sidev->iface, WIFI_STATUS_AP_FAIL);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_NATIVE)) {
|
||||||
|
net_if_dormant_off(sidev->iface);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue