Skip to content

Commit 5c3cc37

Browse files
kapbhdleach02
authored andcommitted
drivers: nrfwifi: Create separate offloaded raw tx mode
Create separate offloaded raw tx mode which will work as stand-alone compile-time mode. Signed-off-by: Kapil Bhatt <[email protected]>
1 parent 5371eff commit 5c3cc37

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

drivers/wifi/nrfwifi/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ zephyr_include_directories_ifdef(CONFIG_NRF70_RADIO_TEST
3030
)
3131

3232
zephyr_include_directories_ifndef(CONFIG_NRF70_RADIO_TEST
33-
${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/default
33+
{OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/default
3434
)
3535

3636
zephyr_library_sources_ifdef(CONFIG_NRF70_SR_COEX
@@ -57,12 +57,15 @@ zephyr_library_sources(
5757
src/shim.c
5858
src/work.c
5959
src/timer.c
60-
src/fmac_main.c
6160
src/qspi/src/device.c
6261
src/qspi/src/rpu_hw_if.c
6362
src/qspi/src/ficr_prog.c
6463
)
6564

65+
zephyr_library_sources_ifndef(CONFIG_NRF70_OFFLOADED_RAW_TX
66+
src/fmac_main.c
67+
)
68+
6669
zephyr_library_sources_ifdef(CONFIG_NRF_WIFI_PATCHES_BUILTIN
6770
src/fw_load.c
6871
)
@@ -231,6 +234,10 @@ zephyr_compile_definitions_ifdef(CONFIG_NRF70_RADIO_TEST
231234
-DNRF70_RADIO_TEST
232235
)
233236

237+
zephyr_compile_definitions_ifdef(CONFIG_NRF70_OFFLOADED_RAW_TX
238+
-DNRF70_OFFLOADED_RAW_TX
239+
)
240+
234241
zephyr_compile_definitions_ifdef(CONFIG_NRF70_TCP_IP_CHECKSUM_OFFLOAD
235242
-DNRF70_TCP_IP_CHECKSUM_OFFLOAD
236243
)

drivers/wifi/nrfwifi/Kconfig.nrfwifi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ config NRF70_SCAN_ONLY
6969
config NRF70_RADIO_TEST
7070
bool "Radio test mode of the nRF70 driver"
7171

72+
config NRF70_OFFLOADED_RAW_TX
73+
bool "Offloaded raw Tx mode of the nRF70 driver"
74+
7275
config NRF70_SYSTEM_WITH_RAW_MODES
7376
bool "nRF70 system mode with raw modes"
7477
depends on WIFI_NRF7002 || WIFI_NRF7001
@@ -83,7 +86,7 @@ config NRF70_SYSTEM_MODE_COMMON
8386
default y if NRF70_SYSTEM_MODE || NRF70_SYSTEM_WITH_RAW_MODES
8487

8588
config NET_L2_ETHERNET
86-
default y if !NRF70_RADIO_TEST
89+
default y if (!NRF70_RADIO_TEST && !NRF70_OFFLOADED_RAW_TX)
8790

8891
config HEAP_MEM_POOL_ADD_SIZE_NRF70
8992
# Use a maximum that works for typical usecases and boards, each sample/app can override

drivers/wifi/nrfwifi/inc/fmac_main.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#define NRF70_DRIVER_VERSION "1."KERNEL_VERSION_STRING
3636

37+
#ifndef CONFIG_NRF70_OFFLOADED_RAW_TX
3738
#ifndef CONFIG_NRF70_RADIO_TEST
3839
struct nrf_wifi_vif_ctx_zep {
3940
const struct device *zep_dev_ctx;
@@ -119,13 +120,15 @@ struct nrf_wifi_drv_priv_zep {
119120
extern struct nrf_wifi_drv_priv_zep rpu_drv_priv_zep;
120121

121122
void nrf_wifi_scan_timeout_work(struct k_work *work);
123+
122124
void configure_tx_pwr_settings(struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params,
123125
struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params);
124126
void configure_board_dep_params(struct nrf_wifi_board_params *board_params);
125127
void set_tx_pwr_ceil_default(struct nrf_wifi_tx_pwr_ceil_params *pwr_ceil_params);
126128
const char *nrf_wifi_get_drv_version(void);
127129
enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv_priv_zep);
128130
enum nrf_wifi_status nrf_wifi_fmac_dev_rem_zep(struct nrf_wifi_drv_priv_zep *drv_priv_zep);
131+
#endif /* !CONFIG_NRF_WIFI_BUILD_ONLY_MODE */
129132
#ifdef CONFIG_NRF_WIFI_BUILD_ONLY_MODE
130133
inline enum nrf_wifi_status nrf_wifi_fw_load(void *rpu_ctx)
131134
{
@@ -136,9 +139,10 @@ inline enum nrf_wifi_status nrf_wifi_fw_load(void *rpu_ctx)
136139
#else
137140
enum nrf_wifi_status nrf_wifi_fw_load(void *rpu_ctx);
138141
#endif /* CONFIG_NRF_WIFI_BUILD_ONLY_MODE */
142+
#ifndef CONFIG_NRF70_OFFLOADED_RAW_TX
139143
struct nrf_wifi_vif_ctx_zep *nrf_wifi_get_vif_ctx(struct net_if *iface);
140144
void nrf_wifi_rpu_recovery_cb(void *vif_ctx,
141145
void *event_data,
142146
unsigned int event_len);
143-
147+
#endif /* !CONFIG_NRF_WIFI_BUILD_ONLY_MODE */
144148
#endif /* __ZEPHYR_FMAC_MAIN_H__ */

drivers/wifi/nrfwifi/src/wifi_util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int nrf_wifi_util_show_vers(const struct shell *sh,
435435
return status;
436436
}
437437

438-
#ifndef CONFIG_NRF70_RADIO_TEST
438+
#if !defined(CONFIG_NRF70_RADIO_TEST) && !defined(CONFIG_NRF70_OFFLOADED_RAW_TX)
439439
static int nrf_wifi_util_dump_rpu_stats(const struct shell *sh,
440440
size_t argc,
441441
const char *argv[])
@@ -849,7 +849,7 @@ static int nrf_wifi_util_dump_rpu_stats(const struct shell *sh,
849849

850850
return 0;
851851
}
852-
#endif /* CONFIG_NRF70_RADIO_TEST */
852+
#endif /* !CONFIG_NRF70_RADIO_TEST && !CONFIG_NRF70_OFFLOADED_RAW_TX */
853853

854854
#ifdef CONFIG_NRF_WIFI_RPU_RECOVERY
855855
static int nrf_wifi_util_trigger_rpu_recovery(const struct shell *sh,
@@ -964,15 +964,15 @@ SHELL_STATIC_SUBCMD_SET_CREATE(
964964
nrf_wifi_util_show_vers,
965965
1,
966966
0),
967-
#ifndef CONFIG_NRF70_RADIO_TEST
967+
#if !defined(CONFIG_NRF70_RADIO_TEST) && !defined(CONFIG_NRF70_OFFLOADED_RAW_TX)
968968
SHELL_CMD_ARG(rpu_stats,
969969
NULL,
970970
"Display RPU stats "
971971
"Parameters: umac or lmac or phy or all (default)",
972972
nrf_wifi_util_dump_rpu_stats,
973973
1,
974974
1),
975-
#endif /* CONFIG_NRF70_RADIO_TEST */
975+
#endif /* !CONFIG_NRF70_RADIO_TEST && !CONFIG_NRF70_OFFLOADED_RAW_TX*/
976976
#ifdef CONFIG_NRF_WIFI_RPU_RECOVERY
977977
SHELL_CMD_ARG(rpu_recovery_test,
978978
NULL,

0 commit comments

Comments
 (0)