diff --git a/drivers/wifi/nxp/Kconfig.nxp b/drivers/wifi/nxp/Kconfig.nxp index b3172e1b1b0ae..04828cd5e34c0 100644 --- a/drivers/wifi/nxp/Kconfig.nxp +++ b/drivers/wifi/nxp/Kconfig.nxp @@ -20,6 +20,13 @@ module = WIFI_NXP config WIFI_MGMT_SCAN_CHAN_MAX_MANUAL default 50 +config NXP_WIFI_BUILD_ONLY_MODE + bool "Build only mode (do not link wireless binary blob)" + help + Skip linking the binary blob into the Wi-Fi build. This will + not result in a functional application, but allows the Wi-Fi + driver to be built without binary blobs + config NXP_WIFI_CUSTOM bool "Custom NXP Wi-Fi part" help diff --git a/drivers/wifi/nxp/nxp_wifi_drv.c b/drivers/wifi/nxp/nxp_wifi_drv.c index e14bebb033db8..71041c3360ea9 100644 --- a/drivers/wifi/nxp/nxp_wifi_drv.c +++ b/drivers/wifi/nxp/nxp_wifi_drv.c @@ -769,47 +769,6 @@ static int nxp_wifi_version(const struct device *dev, struct wifi_version *param return 0; } -static int nxp_wifi_ap_bandwidth(const struct device *dev, struct wifi_ap_params *params) -{ - int status = NXP_WIFI_RET_SUCCESS; - int ret = WM_SUCCESS; - struct interface *if_handle = (struct interface *)dev->data; - - if (if_handle->state.interface != WLAN_BSS_TYPE_UAP) { - LOG_ERR("Wi-Fi not in uAP mode"); - return -EIO; - } - - if (s_nxp_wifi_State != NXP_WIFI_STARTED) { - status = NXP_WIFI_RET_NOT_READY; - } - - if (status == NXP_WIFI_RET_SUCCESS) { - - if (params->oper == WIFI_MGMT_SET) { - - ret = wlan_uap_set_bandwidth(params->bandwidth); - - if (ret != WM_SUCCESS) { - status = NXP_WIFI_RET_FAIL; - } - } else { - ret = wlan_uap_get_bandwidth(¶ms->bandwidth); - - if (ret != WM_SUCCESS) { - status = NXP_WIFI_RET_FAIL; - } - } - } - - if (status != NXP_WIFI_RET_SUCCESS) { - LOG_ERR("Failed to get/set Wi-Fi AP bandwidth"); - return -EAGAIN; - } - - return 0; -} - static int nxp_wifi_connect(const struct device *dev, struct wifi_connect_req_params *params) { int status = NXP_WIFI_RET_SUCCESS; @@ -958,68 +917,6 @@ static inline enum wifi_security_type nxp_wifi_security_type(enum wlan_security_ } } -#ifndef CONFIG_WIFI_NM_WPA_SUPPLICANT -static int nxp_wifi_uap_status(const struct device *dev, struct wifi_iface_status *status) -{ - enum wlan_connection_state connection_state = WLAN_DISCONNECTED; - struct interface *if_handle = (struct interface *)&g_uap; - - wlan_get_uap_connection_state(&connection_state); - - if (connection_state == WLAN_UAP_STARTED) { - - if (!wlan_get_current_uap_network(&nxp_wlan_network)) { - strncpy(status->ssid, nxp_wlan_network.ssid, WIFI_SSID_MAX_LEN); - status->ssid[WIFI_SSID_MAX_LEN - 1] = 0; - status->ssid_len = strlen(status->ssid); - - memcpy(status->bssid, nxp_wlan_network.bssid, WIFI_MAC_ADDR_LEN); - - status->rssi = nxp_wlan_network.rssi; - - status->channel = nxp_wlan_network.channel; - - status->beacon_interval = nxp_wlan_network.beacon_period; - - status->dtim_period = nxp_wlan_network.dtim_period; - - if (if_handle->state.interface == WLAN_BSS_TYPE_STA) { - status->iface_mode = WIFI_MODE_INFRA; - } -#ifdef CONFIG_NXP_WIFI_SOFTAP_SUPPORT - else if (if_handle->state.interface == WLAN_BSS_TYPE_UAP) { - status->iface_mode = WIFI_MODE_AP; - } -#endif - -#ifdef CONFIG_NXP_WIFI_11AX - if (nxp_wlan_network.dot11ax) { - status->link_mode = WIFI_6; - } -#endif -#ifdef CONFIG_NXP_WIFI_11AC - else if (nxp_wlan_network.dot11ac) { - status->link_mode = WIFI_5; - } -#endif - else if (nxp_wlan_network.dot11n) { - status->link_mode = WIFI_4; - } else { - status->link_mode = WIFI_3; - } - - status->band = nxp_wlan_network.channel > 14 ? WIFI_FREQ_BAND_5_GHZ - : WIFI_FREQ_BAND_2_4_GHZ; - status->security = nxp_wifi_security_type(nxp_wlan_network.security.type); - status->mfp = nxp_wlan_network.security.mfpr ? WIFI_MFP_REQUIRED : - (nxp_wlan_network.security.mfpc ? WIFI_MFP_OPTIONAL : 0); - } - } - - return 0; -} -#endif - static int nxp_wifi_status(const struct device *dev, struct wifi_iface_status *status) { enum wlan_connection_state connection_state = WLAN_DISCONNECTED; @@ -1443,12 +1340,10 @@ static int nxp_wifi_set_twt(const struct device *dev, struct wifi_twt_params *pa twt_setup_conf.implicit = params->setup.implicit; twt_setup_conf.announced = params->setup.announce; twt_setup_conf.trigger_enabled = params->setup.trigger; - twt_setup_conf.twt_info_disabled = params->setup.twt_info_disable; twt_setup_conf.negotiation_type = params->negotiation_type; twt_setup_conf.twt_wakeup_duration = params->setup.twt_wake_interval; twt_setup_conf.flow_identifier = params->flow_id; twt_setup_conf.hard_constraint = 1; - twt_setup_conf.twt_exponent = params->setup.exponent; twt_setup_conf.twt_mantissa = params->setup.twt_interval; twt_setup_conf.twt_request = params->setup.responder; ret = wlan_set_twt_setup_cfg(&twt_setup_conf); @@ -1462,25 +1357,6 @@ static int nxp_wifi_set_twt(const struct device *dev, struct wifi_twt_params *pa return ret; } -static int nxp_wifi_set_btwt(const struct device *dev, struct wifi_twt_params *params) -{ - wlan_btwt_config_t btwt_config; - int ret = -1; - - btwt_config.action = 1; - btwt_config.sub_id = params->btwt.sub_id; - btwt_config.nominal_wake = params->btwt.nominal_wake; - btwt_config.max_sta_support = params->btwt.max_sta_support; - btwt_config.twt_mantissa = params->btwt.twt_interval; - btwt_config.twt_offset = params->btwt.twt_offset; - btwt_config.twt_exponent = params->btwt.twt_exponent; - btwt_config.sp_gap = params->btwt.sp_gap; - - ret = wlan_set_btwt_cfg(&btwt_config); - - return ret; -} - static void nxp_wifi_sta_init(struct net_if *iface) { const struct device *dev = net_if_get_device(iface); @@ -1758,7 +1634,6 @@ static const struct wifi_mgmt_ops nxp_wifi_sta_mgmt = { .reg_domain = nxp_wifi_reg_domain, #ifdef CONFIG_NXP_WIFI_SOFTAP_SUPPORT .ap_enable = nxp_wifi_start_ap, - .ap_bandwidth = nxp_wifi_ap_bandwidth, .ap_disable = nxp_wifi_stop_ap, #endif .iface_status = nxp_wifi_status, @@ -1837,8 +1712,6 @@ static const struct wifi_mgmt_ops nxp_wifi_uap_mgmt = { #endif .set_power_save = nxp_wifi_power_save, .get_power_save_config = nxp_wifi_get_power_save, - .set_btwt = nxp_wifi_set_btwt, - .ap_bandwidth = nxp_wifi_ap_bandwidth, .ap_config_params = nxp_wifi_ap_config_params, }; diff --git a/modules/hostap/src/supp_main.c b/modules/hostap/src/supp_main.c index b47b322e2aa3a..826e15e9d8d3d 100644 --- a/modules/hostap/src/supp_main.c +++ b/modules/hostap/src/supp_main.c @@ -94,11 +94,9 @@ DEFINE_WIFI_NM_INSTANCE(wifi_supplicant, &mgmt_ops); #ifdef CONFIG_WIFI_NM_HOSTAPD_AP static const struct wifi_mgmt_ops mgmt_ap_ops = { - .set_btwt = supplicant_set_btwt, .ap_enable = supplicant_ap_enable, .ap_disable = supplicant_ap_disable, .ap_sta_disconnect = supplicant_ap_sta_disconnect, - .ap_bandwidth = supplicant_ap_bandwidth, .iface_status = supplicant_ap_status, #ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP .dpp_dispatch = hapd_dpp_dispatch, diff --git a/modules/hostap/src/supp_main.h b/modules/hostap/src/supp_main.h index e80ced0343184..b28869c2bd3bb 100644 --- a/modules/hostap/src/supp_main.h +++ b/modules/hostap/src/supp_main.h @@ -15,7 +15,7 @@ !defined(CONFIG_EAP_PSK) && !defined(CONFIG_EAP_PAX) && \ !defined(CONFIG_EAP_SAKE) && !defined(CONFIG_EAP_GPSK) && \ !defined(CONFIG_EAP_PWD) && !defined(CONFIG_EAP_EKE) && \ - !defined(CONFIG_EAP_IKEV2 && !defined(CONFIG_EAP_GTC) + !defined(CONFIG_EAP_IKEV2) && !defined(CONFIG_EAP_GTC) #error "At least one of the following EAP methods need to be defined \ CONFIG_EAP_TLS \ CONFIG_EAP_TTLS \ diff --git a/samples/net/wifi/boards/rd_rw612_bga.conf b/samples/net/wifi/boards/rd_rw612_bga.conf index d6435e874b77e..ba24138eb52aa 100644 --- a/samples/net/wifi/boards/rd_rw612_bga.conf +++ b/samples/net/wifi/boards/rd_rw612_bga.conf @@ -75,33 +75,6 @@ CONFIG_NET_SOCKETS_SERVICE_THREAD_PRIO=3 CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO=y CONFIG_NET_CONTEXT_PRIORITY=y -CONFIG_WIFI_NM_WPA_SUPPLICANT=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_CLI=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_INF_MON=n -CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES=2 -CONFIG_SAE_PWE_EARLY_EXIT=y -CONFIG_WIFI_NM_HOSTAPD_AP=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS=y - -# Enable mbedtls -CONFIG_MBEDTLS=y -CONFIG_MBEDTLS_BUILTIN=y -CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y -CONFIG_MBEDTLS_USER_CONFIG_FILE="wpa_supp_els_pkc_mbedtls_config.h" -CONFIG_MBEDTLS_HAVE_TIME_DATE=y - -# Include els_pkc in build -CONFIG_ENTROPY_GENERATOR=y -CONFIG_MBEDTLS_PSA_CRYPTO_C=y -CONFIG_MBEDTLS_ENTROPY_C=y -CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y -CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192 - # power management CONFIG_PM=y CONFIG_PM_DEVICE=y @@ -116,8 +89,6 @@ CONFIG_NET_MGMT_EVENT_STACK_SIZE=4608 CONFIG_NET_TCP_WORKQ_STACK_SIZE=2048 CONFIG_MAIN_STACK_SIZE=4096 CONFIG_NET_SOCKETS_SERVICE_STACK_SIZE=4096 -CONFIG_WIFI_NM_WPA_SUPPLICANT_WQ_STACK_SIZE=12288 -CONFIG_WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE=12288 # optimization level # refer to Kconfig.zephyr for Optimizations Level @@ -152,7 +123,4 @@ CONFIG_NET_STATISTICS_USER_API=y # comment out for -O0 CONFIG_CODE_DATA_RELOCATION_SRAM=y #CONFIG_WIFI_NM_WPA_SUPPLICANT_DEBUG_LEVEL=2 -CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y -CONFIG_WIFI_NM_WPA_SUPPLICANT_WQ_PRIO=3 -CONFIG_WIFI_NM_WPA_SUPPLICANT_PRIO=3 CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=80000 diff --git a/samples/net/wifi/sample.yaml b/samples/net/wifi/sample.yaml index 828e4b4c8967d..2c14ef6fce1cd 100644 --- a/samples/net/wifi/sample.yaml +++ b/samples/net/wifi/sample.yaml @@ -68,3 +68,9 @@ tests: - thingy53/nrf5340/cpuapp integration_platforms: - thingy53/nrf5340/cpuapp + sample.net.wifi.nxp_wifi: + extra_args: + - CONFIG_NXP_WIFI_BUILD_ONLY_MODE=y + platform_allow: + - frdm_rw612 + - rd_rw612_bga diff --git a/west.yml b/west.yml index a20edb3c48779..a8d44382c9a4c 100644 --- a/west.yml +++ b/west.yml @@ -198,7 +198,7 @@ manifest: groups: - hal - name: hal_nxp - revision: 4597b16cfedf5553cb155151e65eb994d5d0ef25 + revision: pull/454/head path: modules/hal/nxp groups: - hal