Skip to content

Commit de61dfd

Browse files
committed
Add nRF71 new interface files support
nRF71 uses a new interface file strucutre, add support for that, the interface is much simpler and not tied with host heirarchy. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent b5e25c8 commit de61dfd

File tree

40 files changed

+213
-51
lines changed

40 files changed

+213
-51
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ target_sources(nrf-wifi-osal PRIVATE
173173
${NRF_WIFI_DIR}/utils/src/queue.c
174174
${NRF_WIFI_DIR}/utils/src/util.c
175175
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_api_common.c
176-
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_fw_patch_loader.c
177176
${NRF_WIFI_DIR}/bus_if/bal/src/bal.c
178-
${NRF_WIFI_DIR}/bus_if/bus/qspi/src/qspi.c
179177
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_cmd_common.c
180178
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_api_common.c
181179
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_util.c
@@ -188,6 +186,8 @@ if(NOT CONFIG_NRF71_ON_IPC)
188186
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_reg.c
189187
${NRF_WIFI_DIR}/hw_if/hal/src/common/hpqm.c
190188
${NRF_WIFI_DIR}/hw_if/hal/src/common/pal.c
189+
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_fw_patch_loader.c
190+
${NRF_WIFI_DIR}/bus_if/bus/qspi/src/qspi.c
191191
)
192192
endif()
193193

bus_if/bal/src/bal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
#ifdef NRF_WIFI_LOW_POWER
1616
#ifdef NRF_WIFI_LOW_POWER_DBG
17+
#ifndef NRF71_ON_IPC
1718
#include "pal.h"
19+
#endif
1820

1921
static void nrf_wifi_rpu_bal_sleep_chk(struct nrf_wifi_bal_dev_ctx *bal_ctx,
2022
unsigned long addr)

bus_if/bus/qspi/src/qspi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
#include "bal_structs.h"
1313
#include "qspi.h"
14+
#ifndef NRF71_ON_IPC
1415
#include "common/pal.h"
16+
#endif
1517

1618

1719
static int nrf_wifi_bus_qspi_irq_handler(void *data)

fw_if/umac_if/inc/common/fmac_api_common.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@
1717

1818
#include "osal_api.h"
1919
#include "common/hal_api_common.h"
20+
#ifdef NRF71_ON_IPC
21+
#include <nrf71_wifi_ctrl.h>
22+
#else
2023
#include "host_rpu_sys_if.h"
24+
#include <patch_info.h>
25+
#endif
2126
#include "fmac_cmd_common.h"
2227
#include "fmac_structs_common.h"
2328

24-
#include <patch_info.h>
2529

2630
#ifndef MIN
2731
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
@@ -49,6 +53,7 @@ void nrf_wifi_fmac_deinit(struct nrf_wifi_fmac_priv *fpriv);
4953
void nrf_wifi_fmac_dev_rem(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);
5054

5155

56+
#if (!defined(NRF71_ON_IPC) || defined(__DOXYGEN__))
5257
/**
5358
* @brief Validate the firmware header.
5459
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
@@ -129,7 +134,7 @@ enum nrf_wifi_status nrf_wifi_fmac_fw_chunk_load(struct nrf_wifi_fmac_dev_ctx *f
129134
enum nrf_wifi_status nrf_wifi_fmac_fw_load(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
130135
struct nrf_wifi_fmac_fw_info *fmac_fw);
131136

132-
137+
#endif /* !NRF71_ON_IPC */
133138
/**
134139
* @brief Get FW versions from the RPU.
135140
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.

fw_if/umac_if/inc/common/fmac_structs_common.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
#define __FMAC_STRUCTS_COMMON_H__
1818

1919
#include "osal_api.h"
20+
#ifdef NRF71_ON_IPC
21+
#include <nrf71_wifi_ctrl.h>
22+
#else
2023
#include "host_rpu_umac_if.h"
24+
#endif
2125

2226
#define NRF_WIFI_FW_CHUNK_ID_STR_LEN 16
2327

@@ -97,7 +101,7 @@ struct nrf_wifi_fmac_fw_chunk_info {
97101
unsigned int dest_addr;
98102
};
99103

100-
104+
#if (!defined(NRF71_ON_IPC) || defined(__DOXYGEN__))
101105
/**
102106
* @brief Structure to hold OTP region information.
103107
*
@@ -108,6 +112,7 @@ struct nrf_wifi_fmac_otp_info {
108112
/** Flags indicating which OTP regions are valid. */
109113
unsigned int flags;
110114
};
115+
#endif
111116

112117
/* Maximum number of channels supported in a regulatory
113118
* currently set to 42 as hardware supports 2.4GHz and 5GHz.

fw_if/umac_if/inc/fw/host_rpu_data_if.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
#ifndef __HOST_RPU_DATA_IF_H__
1717
#define __HOST_RPU_DATA_IF_H__
1818

19+
#ifdef NRF71_ON_IPC
20+
#include <nrf71_wifi_ctrl.h>
21+
#else
1922
#include "host_rpu_common_if.h"
2023
#include "host_rpu_sys_if.h"
21-
24+
#endif
2225
#include "common/pack_def.h"
2326

2427
#define TX_BUF_HEADROOM 52

fw_if/umac_if/inc/fw/host_rpu_umac_if.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
#ifndef __HOST_RPU_UMAC_IF_H
1616
#define __HOST_RPU_UMAC_IF_H
1717

18+
#ifdef NRF71_ON_IPC
19+
#include <nrf71_wifi_ctrl.h>
20+
#else
1821
#include "host_rpu_data_if.h"
1922
#include "host_rpu_sys_if.h"
23+
#endif
2024

2125
#include "common/pack_def.h"
2226

fw_if/umac_if/inc/offload_raw_tx/fmac_api.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#ifndef __FMAC_API_H__
1616
#define __FMAC_API_H__
1717

18+
#ifdef NRF71_ON_IPC
19+
#include <nrf71_wifi_ctrl.h>
20+
#else
1821
#include "host_rpu_sys_if.h"
22+
#endif
1923
#include "common/fmac_api_common.h"
2024
#include "offload_raw_tx/fmac_structs.h"
2125
#include "util.h"

fw_if/umac_if/inc/offload_raw_tx/fmac_structs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
#ifndef __FMAC_STRUCTS_H__
1919
#define __FMAC_STRUCTS_H__
2020

21+
#ifdef NRF71_ON_IPC
22+
#include <nrf71_wifi_ctrl.h>
23+
#else
2124
#include "host_rpu_sys_if.h"
25+
#endif
2226
#include "common/fmac_structs_common.h"
23-
2427
#define NRF_WIFI_FMAC_PARAMS_RECV_TIMEOUT 100 /* ms */
2528

2629
/**

fw_if/umac_if/inc/radio_test/fmac_api.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717
#define __FMAC_API_RT_H__
1818

1919
#include "osal_api.h"
20+
#ifdef NRF71_ON_IPC
21+
#include <nrf71_wifi_ctrl.h>
22+
#else
2023
#include "host_rpu_umac_if.h"
2124
#include "host_rpu_data_if.h"
2225
#include "host_rpu_sys_if.h"
26+
#endif
2327

2428
#include "fmac_structs.h"
2529
#include "fmac_cmd.h"
@@ -269,6 +273,7 @@ enum nrf_wifi_status nrf_wifi_rt_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fma
269273
*/
270274
void nrf_wifi_rt_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);
271275

276+
#ifndef NRF71_ON_IPC
272277
/**
273278
* @brief Get the RF parameters to be programmed to the RPU.
274279
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
@@ -282,7 +287,7 @@ void nrf_wifi_rt_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);
282287
*/
283288
enum nrf_wifi_status nrf_wifi_rt_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
284289
struct nrf_wifi_phy_rf_params *rf_params);
285-
290+
#endif
286291
/**
287292
* @brief Issue a request to get stats from the RPU.
288293
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.

0 commit comments

Comments
 (0)