drivers: wifi: nxp: add soft AP status for some fields

For embedded supplicant soft AP mode, add beacon period, DTIM period
and BTWT support status fields.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This commit is contained in:
Fengming Ye 2024-12-30 17:46:17 +08:00 committed by Benjamin Cabé
commit f82de1ff09
2 changed files with 10 additions and 0 deletions

View file

@ -575,6 +575,9 @@ static int nxp_wifi_start_ap(const struct device *dev, struct wifi_connect_req_p
return -ENOENT; return -ENOENT;
} }
nxp_wlan_uap_network.beacon_period = NXP_WIFI_SAP_BEACON_PERIOD_DEFAULT;
nxp_wlan_uap_network.dtim_period = NXP_WIFI_SAP_DTIM_PERIOD_DEFAULT;
ret = wlan_add_network(&nxp_wlan_uap_network); ret = wlan_add_network(&nxp_wlan_uap_network);
if (ret != WM_SUCCESS) { if (ret != WM_SUCCESS) {
status = NXP_WIFI_RET_FAIL; status = NXP_WIFI_RET_FAIL;
@ -1085,6 +1088,10 @@ static int nxp_wifi_uap_status(const struct device *dev, struct wifi_iface_statu
status->dtim_period = nxp_wlan_uap_network.dtim_period; status->dtim_period = nxp_wlan_uap_network.dtim_period;
#ifdef CONFIG_NXP_WIFI_11AX_TWT
status->twt_capable = true;
#endif
if (if_handle->state.interface == WLAN_BSS_TYPE_STA) { if (if_handle->state.interface == WLAN_BSS_TYPE_STA) {
status->iface_mode = WIFI_MODE_INFRA; status->iface_mode = WIFI_MODE_INFRA;
} else if (if_handle->state.interface == WLAN_BSS_TYPE_UAP) { } else if (if_handle->state.interface == WLAN_BSS_TYPE_UAP) {

View file

@ -48,6 +48,9 @@
#define NXP_WIFI_SYNC_PS_GROUP \ #define NXP_WIFI_SYNC_PS_GROUP \
NXP_WIFI_EVENT_BIT(WLAN_REASON_PS_ENTER) | NXP_WIFI_EVENT_BIT(WLAN_REASON_PS_EXIT) NXP_WIFI_EVENT_BIT(WLAN_REASON_PS_ENTER) | NXP_WIFI_EVENT_BIT(WLAN_REASON_PS_EXIT)
#define NXP_WIFI_SAP_BEACON_PERIOD_DEFAULT 100
#define NXP_WIFI_SAP_DTIM_PERIOD_DEFAULT 1
enum nxp_wifi_ret { enum nxp_wifi_ret {
NXP_WIFI_RET_SUCCESS, NXP_WIFI_RET_SUCCESS,
NXP_WIFI_RET_FAIL, NXP_WIFI_RET_FAIL,