Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi: Flash size optimizations #14415

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/wifi/nrf700x/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ elseif(CONFIG_NRF700X_RADIO_TEST)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/radio_test/nrf70.bin)
elseif(CONFIG_NRF700X_SCAN_ONLY)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/scan_only/nrf70.bin)
elseif (CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/system_with_raw/nrf70.bin)
else()
# Error
message(FATAL_ERROR "Unsupported nRF70 patch configuration")
Expand Down
25 changes: 14 additions & 11 deletions drivers/wifi/nrf700x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ config WIFI_NRF700X_BUS_LOG_LEVEL

choice NRF700X_OPER_MODES
bool "nRF700x operating modes"
default NRF700X_SYSTEM_MODE if WPA_SUPP
default NRF700X_SYSTEM_MODE if WPA_SUPP && !(NRF700X_RAW_DATA_TX || NRF700X_RAW_DATA_RX || NRF700X_PROMISC_DATA_RX)
krish2718 marked this conversation as resolved.
Show resolved Hide resolved
default NRF700X_SCAN_ONLY if !WPA_SUPP
default NRF700X_SYSTEM_WITH_RAW_MODES
help
Select the operating mode of the nRF700x driver

Expand All @@ -52,9 +53,15 @@ config NRF700X_SCAN_ONLY
config NRF700X_RADIO_TEST
bool "Radio test mode of the nRF700x driver"

config NRF700X_SYSTEM_WITH_RAW_MODES
bool "Enable nRF700X system mode with raw modes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krish2718 don't you need to select NET_L2_WIFI_MGMT here?

depends on WPA_SUPP
help
Select this option to enable system mode of the nRF700x driver with raw modes

endchoice

if NRF700X_SYSTEM_MODE
if NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

config NRF700X_STA_MODE
bool "Enable nRF700X STA mode"
Expand All @@ -69,27 +76,23 @@ config NRF700X_AP_MODE

config NRF700X_P2P_MODE
bool "Enable P2P support in driver"

endif # NRF700X_SYSTEM_MODE

config NRF700X_DATA_TX
bool "Enable TX data path in the driver"
default y if NRF700X_SYSTEM_MODE
endif # NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

config NRF700X_RAW_DATA_TX
bool "Enable RAW TX data path in the driver"
select EXPERIMENTAL
depends on NRF700X_SYSTEM_MODE

config NRF700X_RAW_DATA_RX
bool "Enable RAW RX sniffer operation in the driver"
select EXPERIMENTAL
depends on NRF700X_SYSTEM_MODE

config NRF700X_PROMISC_DATA_RX
bool "Enable promiscuous RX sniffer operation in the driver"
select EXPERIMENTAL
depends on NRF700X_SYSTEM_MODE

config NRF700X_DATA_TX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this is moved outside the if NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

bool "Enable TX data path in the driver"
default y if NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

config NRF_WIFI_IF_AUTO_START
bool "Enable Wi-Fi interface auto start on boot"
Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/nrf700x/inc/wifi_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void nrf_wifi_event_proc_get_power_save_info(void *vif_ctx,
struct nrf_wifi_umac_event_power_save_info *ps_info,
unsigned int event_len);

#ifdef CONFIG_NRF700X_SYSTEM_MODE
#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
int nrf_wifi_mode(const struct device *dev,
struct wifi_mode_info *mode);
#endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/nrf700x/src/fmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ static struct wifi_mgmt_ops nrf_wifi_mgmt_ops = {
.reg_domain = nrf_wifi_reg_domain,
.get_power_save_config = nrf_wifi_get_power_save_config,
#endif /* CONFIG_NRF700X_STA_MODE */
#ifdef CONFIG_NRF700X_SYSTEM_MODE
#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
.mode = nrf_wifi_mode,
#endif
#if defined(CONFIG_NRF700X_RAW_DATA_TX) || defined(CONFIG_NRF700X_RAW_DATA_RX)
Expand Down
4 changes: 2 additions & 2 deletions drivers/wifi/nrf700x/src/wifi_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ void nrf_wifi_event_proc_twt_sleep_zep(void *vif_ctx,
k_mutex_unlock(&vif_ctx_zep->vif_lock);
}

#ifdef CONFIG_NRF700X_SYSTEM_MODE
#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
int nrf_wifi_mode(const struct device *dev,
struct wifi_mode_info *mode)
{
Expand Down Expand Up @@ -823,7 +823,7 @@ int nrf_wifi_mode(const struct device *dev,
k_mutex_unlock(&vif_ctx_zep->vif_lock);
return ret;
}
#endif /* CONFIG_NRF700X_SYSTEM_MODE */
#endif /* CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES */

#if defined(CONFIG_NRF700X_RAW_DATA_TX) || defined(CONFIG_NRF700X_RAW_DATA_RX)
int nrf_wifi_channel(const struct device *dev,
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ manifest:
- name: nrfxlib
repo-path: sdk-nrfxlib
path: nrfxlib
revision: 957084443c17015dafe8ff68d935bcb816dc38bf
revision: 2d90eef13a5bd30971b87680a69a08ee83fb689b
- name: trusted-firmware-m
repo-path: sdk-trusted-firmware-m
path: modules/tee/tf-m/trusted-firmware-m
Expand Down
Loading