drivers: wifi: nxp: return error for unsupported AP bandwidth
Starting SAP should return failure, if the bandwidth is not supported by the Wi-Fi chip. Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit is contained in:
parent
9b27a472f4
commit
02b5edd7d6
1 changed files with 6 additions and 2 deletions
|
@ -564,7 +564,11 @@ static int nxp_wifi_start_ap(const struct device *dev, struct wifi_connect_req_p
|
|||
case WIFI_FREQ_BANDWIDTH_20MHZ:
|
||||
case WIFI_FREQ_BANDWIDTH_40MHZ:
|
||||
case WIFI_FREQ_BANDWIDTH_80MHZ:
|
||||
wlan_uap_set_bandwidth(params->bandwidth);
|
||||
ret = wlan_uap_set_bandwidth(params->bandwidth);
|
||||
if (ret != WM_SUCCESS) {
|
||||
LOG_ERR("Bandwidth is not supported");
|
||||
return -EAGAIN;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERR("Invalid bandwidth");
|
||||
|
@ -670,7 +674,7 @@ static int nxp_wifi_ap_config_params(const struct device *dev, struct wifi_ap_co
|
|||
ret = wlan_uap_set_bandwidth(params->bandwidth);
|
||||
if (ret != WM_SUCCESS) {
|
||||
status = NXP_WIFI_RET_FAIL;
|
||||
LOG_ERR("Failed to set Wi-Fi AP bandwidth");
|
||||
LOG_ERR("Bandwidth is not supported");
|
||||
} else {
|
||||
LOG_INF("Set Wi-Fi AP bandwidth: %d", params->bandwidth);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue