Skip to content

Commit 28b7494

Browse files
kapbhdleach02
authored andcommitted
wifi: Add wrapper APIs for offloaded raw TX feature
Add wrapper APIs for the offloaded raw TX feature supported by nRF70 devices. Signed-off-by: Kapil Bhatt <[email protected]>
1 parent 56a5ac5 commit 28b7494

File tree

4 files changed

+788
-3
lines changed

4 files changed

+788
-3
lines changed

drivers/wifi/nrfwifi/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ zephyr_include_directories_ifdef(CONFIG_NRF70_RADIO_TEST
2929
${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/radio_test
3030
)
3131

32-
zephyr_include_directories_ifndef(CONFIG_NRF70_RADIO_TEST
33-
{OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/default
32+
zephyr_include_directories_ifdef(CONFIG_NRF70_OFFLOADED_RAW_TX
33+
${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/offload_raw_tx
34+
off_raw_tx/inc
3435
)
3536

37+
if(NOT CONFIG_NRF70_RADIO_TEST AND NOT CONFIG_NRF70_OFFLOADED_RAW_TX)
38+
zephyr_include_directories(${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc/default)
39+
endif()
40+
3641
zephyr_library_sources_ifdef(CONFIG_NRF70_SR_COEX
3742
src/coex.c
3843
)
@@ -70,13 +75,15 @@ zephyr_library_sources_ifdef(CONFIG_NRF_WIFI_PATCHES_BUILTIN
7075
src/fw_load.c
7176
)
7277

73-
zephyr_library_sources_ifndef(CONFIG_NRF70_RADIO_TEST
78+
if(NOT CONFIG_NRF70_RADIO_TEST AND NOT CONFIG_NRF70_OFFLOADED_RAW_TX)
79+
zephyr_library_sources(
7480
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/rx.c
7581
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_vif.c
7682
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_util.c
7783
src/net_if.c
7884
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/default/fmac_api.c
7985
)
86+
endif()
8087

8188
zephyr_library_sources_ifdef(CONFIG_NET_L2_WIFI_MGMT
8289
src/wifi_mgmt_scan.c
@@ -91,6 +98,12 @@ zephyr_library_sources_ifdef(CONFIG_NRF70_RADIO_TEST
9198
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_util.c
9299
)
93100

101+
zephyr_library_sources_ifdef(CONFIG_NRF70_OFFLOADED_RAW_TX
102+
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/offload_raw_tx/fmac_api.c
103+
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_util.c
104+
off_raw_tx/src/off_raw_tx_api.c
105+
)
106+
94107
zephyr_library_sources_ifdef(CONFIG_NRF70_DATA_TX
95108
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/tx.c
96109
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_peer.c
@@ -155,6 +168,8 @@ else()
155168
set(NRF70_PATCH ${FW_BINS_BASE}/scan_only/nrf70.bin)
156169
elseif (CONFIG_NRF70_SYSTEM_WITH_RAW_MODES)
157170
set(NRF70_PATCH ${FW_BINS_BASE}/system_with_raw/nrf70.bin)
171+
elseif(CONFIG_NRF70_OFFLOADED_RAW_TX)
172+
set(NRF70_PATCH ${FW_BINS_BASE}/offloaded_raw_tx/nrf70.bin)
158173
else()
159174
# Error
160175
message(FATAL_ERROR "Unsupported nRF70 patch configuration")
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/**
8+
* @brief File containing internal structures for the offloaded raw TX feature in the driver.
9+
*/
10+
11+
#include "fmac_structs_common.h"
12+
#include "osal_api.h"
13+
14+
struct nrf_wifi_ctx_zep {
15+
void *drv_priv_zep;
16+
void *rpu_ctx;
17+
uint8_t mac_addr[6];
18+
};
19+
20+
21+
struct nrf_wifi_off_raw_tx_drv_priv {
22+
struct nrf_wifi_fmac_priv *fmac_priv;
23+
/* TODO: Replace with a linked list to handle unlimited RPUs */
24+
struct nrf_wifi_ctx_zep rpu_ctx_zep;
25+
struct k_spinlock lock;
26+
};
27+
28+
enum nrf_wifi_status nrf_wifi_fw_load(void *rpu_ctx);

0 commit comments

Comments
 (0)