Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6c9d620
[nrf fromtree] manifest: nrf_wifi: Pull standalone lib support
krish2718 Dec 24, 2024
7a0f8fa
[nrf fromtree] nrf_wifi: Build OSAL as a standalone library
krish2718 Dec 23, 2024
06cd174
[nrf fromtree] drivers: nrf_wifi: Remove unused macros
krish2718 Dec 24, 2024
6eb28e9
[nrf fromtree] tests: boards: nrf70: Add tags
krish2718 Dec 24, 2024
c19f7aa
[nrf fromtree] west.yml: update `nrf_wifi` to ignore binary blobs
JordanYates Jan 20, 2025
01ab2a2
[nrf fromtree] manfiest: nrf_wifi: Pull fix for NULL checks
krish2718 Jan 21, 2025
d552a13
[nrf fromtree] drivers: nrf_wifi: Use mode specific data structures
sachinthegreen Feb 6, 2025
f4e4519
[nrf fromtree] wifi: nrf_wifi: extract `NRF70_SYSTEM_WITH_RAW_MODES`
JordanYates Jan 22, 2025
2e87ca4
[nrf fromtree] wifi: nrf_wifi: eliminate `NRF70_SYSTEM_MODE_COMMON`
JordanYates Jan 22, 2025
ea1b6e1
[nrf fromtree] drivers: nrf_wifi: Use mode specific APIs
sachinthegreen Feb 6, 2025
76f3566
[nrf fromtree] drivers: nrf_wifi: Add missing test cases
sachinthegreen Feb 10, 2025
b51833a
[nrf fromtree] drivers: nrf_wifi: Fix compilation issues for SoftAP m…
sachinthegreen Feb 10, 2025
e10a114
[nrf fromtree] manifest: nrf_wifi: Pull in fix for SAP and P2P build
sachinthegreen Feb 10, 2025
3846c68
[nrf fromtree] dts: nordic: Add wifi_spi label
bama-nordic Feb 10, 2025
58c1a22
[nrf fromtree] drivers: wifi: Create dedicated mem pool for Wi-Fi driver
rado17 Apr 29, 2024
f1f36bf
[nrf fromtree] manifest: nrf_wifi: Pull in changes for dedicated memo…
rado17 Nov 28, 2024
df0dd72
[nrf fromtree] modules: nrf_wifi: Include OSAL lib in buslib compilation
rado17 Feb 20, 2025
de537b1
[nrf fromtree] manifest: Update nrf_wifi for doc fix
kapbh Feb 27, 2025
b2a1851
[nrf fromtree] nrf_wifi: src: Fix include file path
kapbh Mar 10, 2025
768d1e8
[nrf fromtree] manifest: nrf_wifi: Pull in change to include reg chan…
sachinthegreen Mar 10, 2025
cfe7fda
[nrf fromtree] manifest: nrf_wifi: Pull fix for CI failure
sachinthegreen Mar 13, 2025
4da7a94
[nrf fromtree] drivers: nrf_wifi: Add prompt to Kconfig
kapbh Mar 20, 2025
2d7e337
[nrf fromtree] manifest: Update nrf_wifi revision to fix doxygen comm…
kapbh Mar 20, 2025
7cdd0d5
[nrf fromtree] samples: net: zperf: Fix RAM overflow for nRF70
krish2718 Mar 18, 2025
20cebe8
[nrf fromtree] samples: net: zperf: Remove fixed size config for nRF70
krish2718 Mar 18, 2025
05096ee
[nrf fromtree] samples: net: zperf: Optimize heap for nRF70 Series
krish2718 Mar 24, 2025
bbc79a4
[nrf fromtree] drivers: nrf_wifi: Implement TX zero-copy feature
krish2718 Feb 7, 2025
5e093f5
[nrf fromtree] samples: net: zperf: Fine tune memory to align zero-copy
krish2718 Mar 18, 2025
8b1a4b2
[nrf fromtree] net: l2: Add a config option to allow mismatched L3/L2…
krish2718 Feb 4, 2025
35cde21
[nrf fromtree] net: ethernet: Allow drivers to reserve net_pkt headroom
rlubos Jan 21, 2025
a917001
[nrf fromtree] net: ethernet: Remove L2 header stripping after TX
rlubos Jan 21, 2025
e01d256
[nrf fromlist] manifest: nrf_wifi: Pull fix for nRF91 series build
kapbh Mar 28, 2025
f803458
[nrf fromlist] wifi: nrf_wifi: Adjust default heap size for driver in…
rado17 Apr 1, 2025
a828f37
[nrf fromlist] drivers: nrf_wifi: Add debug shell
sachinthegreen Mar 26, 2025
f2cb716
[nrf fromlist] drivers: nrf_wifi: Move util to nrf70 shell
sachinthegreen Apr 1, 2025
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
3 changes: 3 additions & 0 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
&lfxo {
status = "okay";
};

/* Get a node label for wi-fi spi to use in shield files */
wifi_spi: &spi130 {};
3 changes: 3 additions & 0 deletions boards/nordic/nrf54l15dk/nrf54l15dk_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,6 @@
pinctrl-1 = <&pwm20_sleep>;
pinctrl-names = "default", "sleep";
};

/* Get a node label for wi-fi spi to use in shield files */
wifi_spi: &spi22 {};
20 changes: 15 additions & 5 deletions drivers/wifi/nrf_wifi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ zephyr_library_sources_ifdef(CONFIG_NET_L2_WIFI_MGMT
src/wifi_mgmt_scan.c
)

zephyr_library_sources_ifdef(CONFIG_NRF70_SYSTEM_MODE_COMMON
zephyr_library_sources_ifdef(CONFIG_NRF70_SYSTEM_MODE
src/wifi_mgmt.c
)

Expand All @@ -62,6 +62,14 @@ zephyr_library_sources_ifdef(CONFIG_NRF70_UTIL
src/wifi_util.c
)

if(CONFIG_NRF70_UTIL OR CONFIG_NRF70_DEBUG_SHELL)
zephyr_library_sources(src/shell.c)
endif()

zephyr_library_sources_ifdef(CONFIG_NRF70_DEBUG_SHELL
src/debug_shell.c
)

zephyr_compile_definitions_ifdef(CONFIG_NRF70_ON_QSPI
# These are XIP related anomalies and aren't applicable for nRF7002 and cause
# throughput issues.
Expand All @@ -73,19 +81,21 @@ zephyr_compile_definitions_ifdef(CONFIG_NRF70_ON_QSPI
-DNRF53_ERRATA_159_ENABLE_WORKAROUND=0
)

target_link_libraries(nrf_wifi PRIVATE nrf70-buslib)
zephyr_library_link_libraries(nrf70-buslib nrf-wifi-shim)

if (CONFIG_NRF_WIFI_PATCHES_BUILTIN)
zephyr_blobs_verify(MODULE nrf_wifi REQUIRED)
# RPU FW patch binaries based on the selected configuration
if(CONFIG_NRF70_SYSTEM_MODE)
set(NRF70_PATCH ${FW_BINS_BASE}/default/nrf70.bin)
if (CONFIG_NRF70_SYSTEM_WITH_RAW_MODES)
set(NRF70_PATCH ${FW_BINS_BASE}/system_with_raw/nrf70.bin)
else()
set(NRF70_PATCH ${FW_BINS_BASE}/default/nrf70.bin)
endif()
elseif(CONFIG_NRF70_RADIO_TEST)
set(NRF70_PATCH ${FW_BINS_BASE}/radio_test/nrf70.bin)
elseif(CONFIG_NRF70_SCAN_ONLY)
set(NRF70_PATCH ${FW_BINS_BASE}/scan_only/nrf70.bin)
elseif (CONFIG_NRF70_SYSTEM_WITH_RAW_MODES)
set(NRF70_PATCH ${FW_BINS_BASE}/system_with_raw/nrf70.bin)
elseif(CONFIG_NRF70_OFFLOADED_RAW_TX)
set(NRF70_PATCH ${FW_BINS_BASE}/offloaded_raw_tx/nrf70.bin)
else()
Expand Down
98 changes: 56 additions & 42 deletions drivers/wifi/nrf_wifi/Kconfig.nrfwifi
Original file line number Diff line number Diff line change
Expand Up @@ -40,67 +40,57 @@ config NRF70_QSPI_LOW_POWER

choice NRF70_OPER_MODES
bool "nRF70 operating modes"
default NRF70_SYSTEM_WITH_RAW_MODES if !WIFI_NRF7000 && \
(NRF70_RAW_DATA_TX || NRF70_RAW_DATA_RX || NRF70_PROMISC_DATA_RX)
default NRF70_SYSTEM_MODE if !WIFI_NRF7000
default NRF70_SCAN_ONLY if WIFI_NRF7000
help
Select the operating mode of the nRF70 driver

config NRF70_SYSTEM_MODE
bool "nRF70 system mode"
depends on WIFI_NRF7002 || WIFI_NRF7001
select WIFI_NM_WPA_SUPPLICANT
help
Select this option to enable system mode of the nRF70 driver

config NRF70_SCAN_ONLY
bool "nRF70 scan only mode"
help
Select this option to enable scan only mode of the nRF70 driver

config NRF70_SYSTEM_MODE
bool "System mode of the nRF70 driver"
help
Select this option to enable system mode of the nRF70 driver

config NRF70_RADIO_TEST
bool "Radio test mode of the nRF70 driver"

config NRF70_OFFLOADED_RAW_TX
bool "Offloaded raw TX mode of the nRF70 driver"

config NRF70_SYSTEM_WITH_RAW_MODES
bool "nRF70 system mode with raw modes"
depends on WIFI_NRF7002 || WIFI_NRF7001
select WIFI_NM_WPA_SUPPLICANT
help
Select this option to enable system mode of the nRF70 driver with raw modes.
endchoice

config NRF70_SYSTEM_MODE_COMMON
bool
default y if NRF70_SYSTEM_MODE || NRF70_SYSTEM_WITH_RAW_MODES

config NET_L2_ETHERNET
default y if (!NRF70_RADIO_TEST && !NRF70_OFFLOADED_RAW_TX)

config HEAP_MEM_POOL_ADD_SIZE_NRF70
# Use a maximum that works for typical use cases and boards, each sample/app can override
# this value if needed by using CONFIG_HEAP_MEM_POOL_IGNORE_MIN
def_int 25000 if NRF70_SCAN_ONLY
def_int 150000

if NRF70_SYSTEM_MODE || NRF70_SYSTEM_WITH_RAW_MODES
if NRF70_SYSTEM_MODE
config NRF70_STA_MODE
bool "nRF70 STA mode"
default y
depends on WIFI_NRF7002 || WIFI_NRF7001
select WIFI_NM_WPA_SUPPLICANT
select NRF70_DATA_TX
help
Select this option to enable STA mode of the nRF70 driver.

config NRF70_AP_MODE
bool "Access point mode"
depends on WIFI_NRF7002 || WIFI_NRF7001
select NRF70_DATA_TX
depends on WIFI_NM_WPA_SUPPLICANT_AP
default y if WIFI_NM_WPA_SUPPLICANT_AP

config NRF70_P2P_MODE
bool "P2P support in driver"
endif # NRF70_SYSTEM_MODE || NRF70_SYSTEM_WITH_RAW_MODES

config NRF70_SYSTEM_WITH_RAW_MODES
bool "nRF70 system mode with raw modes"
default y if (NRF70_RAW_DATA_TX || NRF70_RAW_DATA_RX || NRF70_PROMISC_DATA_RX)
depends on WIFI_NRF7002 || WIFI_NRF7001
help
Select this option to enable system mode of the nRF70 driver with raw modes.

config NRF70_RAW_DATA_TX
bool "RAW TX data path in the driver"
Expand All @@ -117,8 +107,8 @@ config NRF70_PROMISC_DATA_RX
select NET_PROMISCUOUS_MODE

config NRF70_DATA_TX
bool "TX data path in the driver"
default y if NRF70_SYSTEM_MODE || NRF70_SYSTEM_WITH_RAW_MODES
bool
endif # NRF70_SYSTEM_MODE

config NRF_WIFI_IF_AUTO_START
bool "Wi-Fi interface auto start on boot"
Expand Down Expand Up @@ -176,18 +166,6 @@ config WIFI_NRF70_LOG_LEVEL
# Enable error by default
default 1

config NRF70_ON_QSPI
def_bool DT_HAS_NORDIC_NRF7002_QSPI_ENABLED || \
DT_HAS_NORDIC_NRF7001_QSPI_ENABLED || \
DT_HAS_NORDIC_NRF7000_QSPI_ENABLED
select NRFX_QSPI

config NRF70_ON_SPI
def_bool DT_HAS_NORDIC_NRF7002_SPI_ENABLED || \
DT_HAS_NORDIC_NRF7001_SPI_ENABLED || \
DT_HAS_NORDIC_NRF7000_SPI_ENABLED
select SPI

config NRF70_2_4G_ONLY
def_bool y if WIFI_NRF7001

Expand Down Expand Up @@ -220,6 +198,10 @@ config NRF70_UTIL
depends on SHELL
bool "Utility shell in nRF70 driver"

config NRF70_DEBUG_SHELL
depends on SHELL
bool "Debug shell in nRF70 driver"

config NRF70_QSPI_LOW_POWER
bool "low power mode in QSPI"
default y if NRF_WIFI_LOW_POWER
Expand Down Expand Up @@ -546,8 +528,19 @@ config NRF70_RSSI_STALE_TIMEOUT_MS
value as the driver does not store it and requires RPU to provide the
information.

config NRF_WIFI_CTRL_HEAP_SIZE
int "Dedicated memory pool for control plane"
default 20000

config NRF_WIFI_DATA_HEAP_SIZE
int "Dedicated memory pool for data plane"
default 8000 if NRF70_SCAN_ONLY || NRF70_RADIO_TEST #TODO: Need to optimize this.
default 110000 if !SOC_FAMILY_NORDIC_NRF
default 130000

if NETWORKING
# Finetune defaults for certain system components used by the driver

config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096

Expand Down Expand Up @@ -828,4 +821,25 @@ config NRF_WIFI_COEX_DISABLE_PRIORITY_WINDOW_FOR_SCAN
help
Enable this configuration to disable priority window for scan
in the case of coexistence with Short Range radio.

if NETWORKING
config NRF_WIFI_ZERO_COPY_TX
bool "Zero copy Transmit path [EXPERIMENTAL]"
select NET_L2_ETHERNET_RESERVE_HEADER
select EXPERIMENTAL
# 54L has lower RAM
default y if SOC_SERIES_NRF54LX
help
Enable this configuration to use zero copy Transmit path.
The driver will use the network buffer directly for transmission
without copying the data to the driver's buffer. This reduces the
driver heap memory usage without much impact on the performance.

The application should configure the network buffers to ensure that
the whole packet fits in a single buffer, else the driver will fallback
to the normal copy path, but the memory requirements would still match
to the zero copy path and may be sub-optimal for the normal copy path.

endif # NETWORKING

endif # WIFI_NRF70
4 changes: 3 additions & 1 deletion drivers/wifi/nrf_wifi/inc/fmac_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
#ifdef CONFIG_NRF70_STA_MODE
#include <drivers/driver_zephyr.h>
#endif /* CONFIG_NRF70_STA_MODE */
#include <system/fmac_api.h>
#else
#include <radio_test/fmac_api.h>
#endif /* !CONFIG_NRF70_RADIO_TEST */

#include <fmac_api.h>
#include <host_rpu_umac_if.h>

#define NRF70_DRIVER_VERSION "1."KERNEL_VERSION_STRING
Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/nrf_wifi/inc/net_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/ethernet.h>
#include <fmac_structs.h>
#include <zephyr/net/wifi_mgmt.h>
#include <system/fmac_structs.h>

#define UNICAST_MASK GENMASK(7, 1)
#define LOCAL_BIT BIT(1)
Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/nrf_wifi/off_raw_tx/inc/off_raw_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @brief File containing internal structures for the offloaded raw TX feature in the driver.
*/

#include "fmac_structs_common.h"
#include "offload_raw_tx/fmac_structs.h"
#include "osal_api.h"

struct nrf_wifi_ctx_zep {
Expand Down
30 changes: 16 additions & 14 deletions drivers/wifi/nrf_wifi/off_raw_tx/src/off_raw_tx_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <zephyr/logging/log.h>
#include <zephyr/drivers/wifi/nrf_wifi/off_raw_tx/off_raw_tx_api.h>
#include <off_raw_tx.h>
#include <fmac_api.h>
#include <offload_raw_tx/fmac_api.h>

#define DT_DRV_COMPAT nordic_wlan
LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL);
Expand Down Expand Up @@ -146,7 +146,7 @@ int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code)

key = k_spin_lock(&off_raw_tx_drv_priv.lock);

off_raw_tx_drv_priv.fmac_priv = nrf_wifi_fmac_off_raw_tx_init();
off_raw_tx_drv_priv.fmac_priv = nrf_wifi_off_raw_tx_fmac_init();

if (off_raw_tx_drv_priv.fmac_priv == NULL) {
LOG_ERR("%s: Failed to initialize nRF70 driver",
Expand All @@ -158,8 +158,8 @@ int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code)

rpu_ctx_zep->drv_priv_zep = &off_raw_tx_drv_priv;

rpu_ctx = nrf_wifi_fmac_dev_add(off_raw_tx_drv_priv.fmac_priv,
rpu_ctx_zep);
rpu_ctx = nrf_wifi_off_raw_tx_fmac_dev_add(off_raw_tx_drv_priv.fmac_priv,
rpu_ctx_zep);
if (!rpu_ctx) {
LOG_ERR("%s: Failed to add nRF70 device", __func__);
rpu_ctx_zep = NULL;
Expand Down Expand Up @@ -197,7 +197,7 @@ int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code)

configure_board_dep_params(&board_params);

status = nrf_wifi_fmac_off_raw_tx_dev_init(rpu_ctx_zep->rpu_ctx,
status = nrf_wifi_off_raw_tx_fmac_dev_init(rpu_ctx_zep->rpu_ctx,
#ifdef CONFIG_NRF_WIFI_LOW_POWER
HW_SLEEP_ENABLE,
#endif /* CONFIG_NRF_WIFI_LOW_POWER */
Expand Down Expand Up @@ -257,7 +257,7 @@ int nrf70_off_raw_tx_init(uint8_t *mac_addr, unsigned char *country_code)
return 0;
err:
if (rpu_ctx) {
nrf_wifi_fmac_off_raw_tx_dev_rem(rpu_ctx);
nrf_wifi_fmac_dev_rem(rpu_ctx);
rpu_ctx_zep->rpu_ctx = NULL;
}

Expand All @@ -278,7 +278,7 @@ void nrf70_off_raw_tx_deinit(void)
return;
}

nrf_wifi_fmac_off_raw_tx_deinit(off_raw_tx_drv_priv.fmac_priv);
nrf_wifi_fmac_deinit(off_raw_tx_drv_priv.fmac_priv);

k_spin_unlock(&off_raw_tx_drv_priv.lock, key);
}
Expand Down Expand Up @@ -361,7 +361,7 @@ int nrf70_off_raw_tx_conf_update(struct nrf_wifi_off_raw_tx_conf *conf)
goto out;
}

status = nrf_wifi_fmac_off_raw_tx_conf(fmac_dev_ctx,
status = nrf_wifi_off_raw_tx_fmac_conf(fmac_dev_ctx,
off_ctrl_params,
off_tx_params);
if (status != NRF_WIFI_STATUS_SUCCESS) {
Expand Down Expand Up @@ -398,7 +398,7 @@ int nrf70_off_raw_tx_start(struct nrf_wifi_off_raw_tx_conf *conf)
goto out;
}

status = nrf_wifi_fmac_off_raw_tx_start(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx);
status = nrf_wifi_off_raw_tx_fmac_start(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx);
if (status != NRF_WIFI_STATUS_SUCCESS) {
LOG_ERR("%s: nRF70 offloaded raw TX start failed",
__func__);
Expand All @@ -425,7 +425,7 @@ int nrf70_off_raw_tx_stop(void)
goto out;
}

status = nrf_wifi_fmac_off_raw_tx_stop(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx);
status = nrf_wifi_off_raw_tx_fmac_stop(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx);
if (status != NRF_WIFI_STATUS_SUCCESS) {
LOG_ERR("%s: nRF70 offloaded raw TX stop failed",
__func__);
Expand Down Expand Up @@ -454,10 +454,10 @@ int nrf70_off_raw_tx_stats(struct nrf_wifi_off_raw_tx_stats *off_raw_tx_stats)
{
int ret = -1;
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
struct rpu_op_stats stats;
struct rpu_off_raw_tx_op_stats stats;
k_spinlock_key_t key;

memset(&stats, 0, sizeof(struct rpu_op_stats));
memset(&stats, 0, sizeof(stats));

key = k_spin_lock(&off_raw_tx_drv_priv.lock);

Expand All @@ -466,14 +466,16 @@ int nrf70_off_raw_tx_stats(struct nrf_wifi_off_raw_tx_stats *off_raw_tx_stats)
goto out;
}

status = nrf_wifi_fmac_stats_get(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx, 0, &stats);
status = nrf_wifi_off_raw_tx_fmac_stats_get(off_raw_tx_drv_priv.rpu_ctx_zep.rpu_ctx,
0,
&stats);
if (status != NRF_WIFI_STATUS_SUCCESS) {
LOG_ERR("%s: nRF70 offloaded raw TX stats failed",
__func__);
goto out;
}

off_raw_tx_stats->off_raw_tx_pkt_sent = stats.fw.offloaded_raw_tx.offload_raw_tx_cnt;
off_raw_tx_stats->off_raw_tx_pkt_sent = stats.fw.offload_raw_tx_cnt;

ret = 0;
out:
Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/nrf_wifi/src/coex.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "coex.h"
#include "coex_struct.h"
#include "fmac_main.h"
#include "fmac_api.h"
#include "common/fmac_api_common.h"

LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL);

Expand Down
Loading
Loading