Skip to content
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
74 changes: 44 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ target_compile_definitions(
WIFI_NRF70_LOG_LEVEL=${CONFIG_WIFI_NRF70_LOG_LEVEL}
)

if (CONFIG_NRF71_ON_IPC)
target_compile_definitions(
nrf-wifi-osal
PUBLIC
NRF_WIFI_RX_BUFF_PROG_UMAC
)
endif()

target_include_directories(
nrf-wifi-osal
PUBLIC
Expand All @@ -117,51 +125,55 @@ target_include_directories(
${NRF_WIFI_DIR}/bus_if/bus/qspi/inc
${NRF_WIFI_DIR}/bus_if/bal/inc
${NRF_WIFI_DIR}/fw_if/umac_if/inc
${NRF_WIFI_DIR}/fw_load/mips/fw/inc
${NRF_WIFI_DIR}/hw_if/hal/inc
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats
)

target_include_directories_ifdef(CONFIG_NRF70_SYSTEM_MODE
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/system
)
if(NOT CONFIG_NRF71_ON_IPC)
target_include_directories(
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats
)

target_include_directories_ifdef(CONFIG_NRF70_RADIO_TEST
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/radio_test
)
target_include_directories_ifdef(CONFIG_NRF70_SYSTEM_MODE
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/system
)

target_include_directories_ifdef(CONFIG_NRF70_OFFLOADED_RAW_TX
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/offload_raw_tx
)
target_include_directories_ifdef(CONFIG_NRF70_RADIO_TEST
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/radio_test
)

target_include_directories_ifdef(CONFIG_NRF70_SCAN_ONLY
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/scan_only
)
target_include_directories_ifdef(CONFIG_NRF70_OFFLOADED_RAW_TX
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/offload_raw_tx
)

target_include_directories_ifdef(CONFIG_NRF70_SYSTEM_MODE
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/system
)
target_include_directories_ifdef(CONFIG_NRF70_SCAN_ONLY
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/scan_only
)

target_include_directories_ifdef(CONFIG_NRF70_SYSTEM_MODE
nrf-wifi-osal
PUBLIC
${NRF_WIFI_DIR}/fw_if/umac_if/inc/fw/stats/system
)
endif()

target_sources(nrf-wifi-osal PRIVATE
${NRF_WIFI_DIR}/os_if/src/osal.c
${NRF_WIFI_DIR}/utils/src/list.c
${NRF_WIFI_DIR}/utils/src/queue.c
${NRF_WIFI_DIR}/utils/src/util.c
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_api_common.c
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_fw_patch_loader.c
${NRF_WIFI_DIR}/bus_if/bal/src/bal.c
${NRF_WIFI_DIR}/bus_if/bus/qspi/src/qspi.c
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_cmd_common.c
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_api_common.c
${NRF_WIFI_DIR}/fw_if/umac_if/src/common/fmac_util.c
Expand All @@ -174,6 +186,8 @@ if(NOT CONFIG_NRF71_ON_IPC)
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_reg.c
${NRF_WIFI_DIR}/hw_if/hal/src/common/hpqm.c
${NRF_WIFI_DIR}/hw_if/hal/src/common/pal.c
${NRF_WIFI_DIR}/hw_if/hal/src/common/hal_fw_patch_loader.c
${NRF_WIFI_DIR}/bus_if/bus/qspi/src/qspi.c
)
endif()

Expand Down
2 changes: 2 additions & 0 deletions bus_if/bal/src/bal.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

#ifdef NRF_WIFI_LOW_POWER
#ifdef NRF_WIFI_LOW_POWER_DBG
#ifndef NRF71_ON_IPC
#include "pal.h"
#endif

static void nrf_wifi_rpu_bal_sleep_chk(struct nrf_wifi_bal_dev_ctx *bal_ctx,
unsigned long addr)
Expand Down
2 changes: 2 additions & 0 deletions bus_if/bus/qspi/src/qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

#include "bal_structs.h"
#include "qspi.h"
#ifndef NRF71_ON_IPC
#include "common/pal.h"
#endif


static int nrf_wifi_bus_qspi_irq_handler(void *data)
Expand Down
9 changes: 7 additions & 2 deletions fw_if/umac_if/inc/common/fmac_api_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@

#include "osal_api.h"
#include "common/hal_api_common.h"
#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_sys_if.h"
#include <patch_info.h>
#endif
#include "fmac_cmd_common.h"
#include "fmac_structs_common.h"

#include <patch_info.h>

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


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


#endif /* !NRF71_ON_IPC */
/**
* @brief Get FW versions from the RPU.
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
Expand Down
7 changes: 6 additions & 1 deletion fw_if/umac_if/inc/common/fmac_structs_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
#define __FMAC_STRUCTS_COMMON_H__

#include "osal_api.h"
#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_umac_if.h"
#endif

#define NRF_WIFI_FW_CHUNK_ID_STR_LEN 16

Expand Down Expand Up @@ -97,7 +101,7 @@ struct nrf_wifi_fmac_fw_chunk_info {
unsigned int dest_addr;
};


#if (!defined(NRF71_ON_IPC) || defined(__DOXYGEN__))
/**
* @brief Structure to hold OTP region information.
*
Expand All @@ -108,6 +112,7 @@ struct nrf_wifi_fmac_otp_info {
/** Flags indicating which OTP regions are valid. */
unsigned int flags;
};
#endif

/* Maximum number of channels supported in a regulatory
* currently set to 42 as hardware supports 2.4GHz and 5GHz.
Expand Down
5 changes: 4 additions & 1 deletion fw_if/umac_if/inc/fw/host_rpu_data_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#ifndef __HOST_RPU_DATA_IF_H__
#define __HOST_RPU_DATA_IF_H__

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_common_if.h"
#include "host_rpu_sys_if.h"

#endif
#include "common/pack_def.h"

#define TX_BUF_HEADROOM 52
Expand Down
4 changes: 4 additions & 0 deletions fw_if/umac_if/inc/fw/host_rpu_umac_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
#ifndef __HOST_RPU_UMAC_IF_H
#define __HOST_RPU_UMAC_IF_H

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_data_if.h"
#include "host_rpu_sys_if.h"
#endif

#include "common/pack_def.h"

Expand Down
4 changes: 4 additions & 0 deletions fw_if/umac_if/inc/offload_raw_tx/fmac_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
#ifndef __FMAC_API_H__
#define __FMAC_API_H__

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_sys_if.h"
#endif
#include "common/fmac_api_common.h"
#include "offload_raw_tx/fmac_structs.h"
#include "util.h"
Expand Down
5 changes: 4 additions & 1 deletion fw_if/umac_if/inc/offload_raw_tx/fmac_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
#ifndef __FMAC_STRUCTS_H__
#define __FMAC_STRUCTS_H__

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_sys_if.h"
#endif
#include "common/fmac_structs_common.h"

#define NRF_WIFI_FMAC_PARAMS_RECV_TIMEOUT 100 /* ms */

/**
Expand Down
7 changes: 6 additions & 1 deletion fw_if/umac_if/inc/radio_test/fmac_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
#define __FMAC_API_RT_H__

#include "osal_api.h"
#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_umac_if.h"
#include "host_rpu_data_if.h"
#include "host_rpu_sys_if.h"
#endif

#include "fmac_structs.h"
#include "fmac_cmd.h"
Expand Down Expand Up @@ -269,6 +273,7 @@ enum nrf_wifi_status nrf_wifi_rt_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fma
*/
void nrf_wifi_rt_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);

#ifndef NRF71_ON_IPC
/**
* @brief Get the RF parameters to be programmed to the RPU.
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
Expand All @@ -282,7 +287,7 @@ void nrf_wifi_rt_fmac_dev_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx);
*/
enum nrf_wifi_status nrf_wifi_rt_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
struct nrf_wifi_phy_rf_params *rf_params);

#endif
/**
* @brief Issue a request to get stats from the RPU.
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
Expand Down
6 changes: 6 additions & 0 deletions fw_if/umac_if/inc/radio_test/fmac_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@
#define __FMAC_STRUCTS_H__

#include "osal_api.h"

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_umac_if.h"
#include "radio_test/phy_rf_params.h"
#endif

#include "common/fmac_structs_common.h"

/**
Expand Down
4 changes: 4 additions & 0 deletions fw_if/umac_if/inc/system/fmac_ap.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
#ifndef __FMAC_AP_H__
#define __FMAC_AP_H__

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_data_if.h"
#endif
#include "system/fmac_structs.h"


Expand Down
25 changes: 24 additions & 1 deletion fw_if/umac_if/inc/system/fmac_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@
#define __FMAC_API_H__

#include "osal_api.h"

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_umac_if.h"
#include "host_rpu_data_if.h"
#include "host_rpu_sys_if.h"
#endif


#include "system/fmac_structs.h"
#include "system/fmac_cmd.h"
Expand Down Expand Up @@ -1050,6 +1056,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rpu_recovery_callback(void *mac_dev_ctx,
/** @endcond */
#endif /* CONFIG_NRF_RPU_RECOVERY */

#ifndef NRF71_ON_IPC
/**
* @brief Get the RF parameters to be programmed to the RPU.
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
Expand All @@ -1063,7 +1070,7 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_rpu_recovery_callback(void *mac_dev_ctx,
*/
enum nrf_wifi_status nrf_wifi_sys_fmac_rf_params_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
struct nrf_wifi_phy_rf_params *rf_params);

#endif /* !NRF71_ON_IPC */
#ifdef NRF70_SYSTEM_WITH_RAW_MODES
/**
* @brief Set the current mode of operation
Expand Down Expand Up @@ -1174,6 +1181,22 @@ enum nrf_wifi_status nrf_wifi_sys_fmac_conf_ltf_gi(struct nrf_wifi_fmac_dev_ctx
enum nrf_wifi_status nrf_wifi_sys_fmac_stats_get(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
enum rpu_op_mode op_mode,
struct rpu_sys_op_stats *stats);
#ifdef NRF_WIFI_RX_BUFF_PROG_UMAC
/**
* @brief Send Rx buffer details to firmware.
* @param fmac_dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
* @param nrf_wifi_rx_buf RX buffer info.
* @param num_buffs Number of buffers.
*
* This function is used to send host Rx buffers to UMAC module
*
*@retval NRF_WIFI_STATUS_SUCCESS On success
*@retval NRF_WIFI_STATUS_FAIL On failure to execute command
*/
enum nrf_wifi_status nrf_wifi_fmac_prog_rx_buf_info(void *fmac_dev_ctx,
struct nrf_wifi_rx_buf *rx_buf,
unsigned int num_buffs);
#endif /*NRF_WIFI_RX_BUFF_PROG_UMAC*/

/**
* @}
Expand Down
9 changes: 9 additions & 0 deletions fw_if/umac_if/inc/system/fmac_rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
#ifndef __FMAC_RX_H__
#define __FMAC_RX_H__

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_data_if.h"
#endif
#include "system/fmac_structs.h"
#define RX_BUF_HEADROOM 4

Expand All @@ -38,4 +42,9 @@ enum nrf_wifi_status nrf_wifi_fmac_rx_event_process(struct nrf_wifi_fmac_dev_ctx

void nrf_wifi_fmac_rx_tasklet(void *data);

#ifdef NRF_WIFI_RX_BUFF_PROG_UMAC
unsigned long nrf_wifi_fmac_get_rx_buf_map_addr(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
unsigned int desc_id);
#endif /* NRF_WIFI_RX_BUFF_PROG_UMAC */

#endif /* __FMAC_RX_H__ */
5 changes: 5 additions & 0 deletions fw_if/umac_if/inc/system/fmac_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
#define __FMAC_STRUCTS_H__

#include "osal_api.h"

#ifdef NRF71_ON_IPC
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_umac_if.h"
#endif
#include "common/fmac_structs_common.h"

#define MAX_PEERS 5
Expand Down
Loading