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
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@
/tests/drivers/lpuart/ @nordic-krch @nrfconnect/ncs-low-level-test
/tests/drivers/mspi/app_fault_timer/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus
/tests/drivers/mspi/trap_handler/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus
/tests/drivers/nrf_wifi/ @sachinthegreen @krish2718
/tests/drivers/nrfx_integration_test/ @nrfconnect/ncs-co-drivers
/tests/drivers/pwm/gpio_loopback/ @nrfconnect/ncs-low-level-test
/tests/drivers/uart/ @nrfconnect/ncs-low-level-test
Expand Down
1 change: 1 addition & 0 deletions boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_cpuapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ supported:
- spi
- watchdog
- i2s
- wifi
8 changes: 8 additions & 0 deletions tests/drivers/nrf_wifi/raw_tx_rx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(nrf_wifi_tx_rx)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
58 changes: 58 additions & 0 deletions tests/drivers/nrf_wifi/raw_tx_rx/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
source "Kconfig.zephyr"

config NRF_WIFI_RAW_TX_PKT_SAMPLE_CHANNEL
int "Channel for non-connected Station mode"
range 1 233
help
Specify the Wi-Fi channel for transmitting raw TX packets in non-connected Station mode.
The valid channel range is 1 to 233.

config NRF_WIFI_RAW_RX_PKT_TIMEOUT_S
int "Wi-Fi raw RX packet timeout in seconds"
default 5000

config RAW_TX_PKT_SAMPLE_RATE_VALUE
int "MCS index or Data rate value"
default 0
help
Specify the Wi-Fi data rate value for raw TX packet transmission.
The value represents either the data rate in Mbps or Modulation and coding (MCS) index.
Note: 5.5Mbps is treated specially as 55 to avoid floating point usage.
Legacy: 1, 2, 55, 11, 6, 9, 12, 18, 24, 36, 48, 54
MCS index: 0-7

config RAW_TX_PKT_SAMPLE_RATE_FLAGS
int "Rate flag value"
range 0 4
default 1
help
Specify the rate flag value to be used for raw TX packet transmission.
Rate Flags:
0 - Legacy
1 - 11n format
2 - VHT format
3 - HE_SU
4 - HE_ER_SU

config RAW_TX_PKT_SAMPLE_QUEUE_NUM
int "Queue number"
default 0
range 0 4
help
Specify the transmission queue number for raw TX packets.
0 - Background
1 - Best effort
2 - Video
3 - Voice
4 - Beacon.

config RX_THREAD_STACK_SIZE
int "Thread Stack Size"
default 4096
help
This option sets the stack size for the threads used in the sample.
92 changes: 92 additions & 0 deletions tests/drivers/nrf_wifi/raw_tx_rx/ipc.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/ {
chosen {
zephyr,shell-uart = &uart20;
};

ipc_shm_area_cpuapp_cpuuma: memory@200C0000 {
compatible = "mmio-sram";
reg = <0x200C0000 0x2000>;
ranges = <0x0 0x200C0000 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
status = "okay";

ipc_shm_cpuapp_cpuuma_0: memory@0 {
reg = <0x0 DT_SIZE_K(2)>;
};

ipc_shm_cpuuma_cpuapp_0: memory@800 {
reg = <0x800 DT_SIZE_K(2)>;
};

ipc_shm_cpuapp_cpuuma_1: memory@1000 {
reg = <0x1000 DT_SIZE_K(2)>;
};

ipc_shm_cpuuma_cpuapp_1: memory@1800 {
reg = <0x1800 DT_SIZE_K(2)>;
};
};

ipc {
ipc0: ipc0 {
compatible = "zephyr,ipc-icmsg";
// TODO: Need shared memory between APP-WIFI
tx-region = <&ipc_shm_cpuapp_cpuuma_0>;
// TODO: Need shared memory between APP-WIFI
rx-region = <&ipc_shm_cpuuma_cpuapp_0>;
mboxes = <&wifi_bellboard 2>,
<&cpuapp_bellboard 0>;
mbox-names = "tx", "rx";
status = "okay";
};

ipc1: ipc1 {
compatible = "zephyr,ipc-icmsg";
// TODO: Need shared memory between APP-WIFI
tx-region = <&ipc_shm_cpuapp_cpuuma_1>;
// TODO: Need shared memory between APP-WIFI
rx-region = <&ipc_shm_cpuuma_cpuapp_1>;
mboxes = <&wifi_bellboard 3>,
<&cpuapp_bellboard 1>;
mbox-names = "tx", "rx";
status = "okay";
};
};
};

&cpuapp_bellboard {
status = "okay";
};

&wifi_bellboard {
status = "okay";
};

&uart20 {
status = "okay";
};

&grtc {
status = "okay";
};

&systick {
status = "disabled";
};

&psa_rng {
status = "okay";
};

&uicr {
status = "disabled";
};

&clock {
status = "disabled";
};

&cpuapp_sram {
status = "okay";
};
5 changes: 5 additions & 0 deletions tests/drivers/nrf_wifi/raw_tx_rx/overlay-nrf71-tlm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# For nRF71 TLM
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_DEBUG_OPTIMIZATIONS=y
65 changes: 65 additions & 0 deletions tests/drivers/nrf_wifi/raw_tx_rx/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_ZTEST=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_WIFI=y
CONFIG_TEST_RANDOM_GENERATOR=y
# Doesn't gel with Raw modes
CONFIG_NRF_WIFI_LOW_POWER=n
# Raw TX injection
CONFIG_NRF70_RAW_DATA_TX=y
# Enable raw data RX for nRF700x for monitor mode
CONFIG_NRF70_RAW_DATA_RX=y

# WPA supplicant (primairly for driver build dependency)
CONFIG_WIFI_NM_WPA_SUPPLICANT=y

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV4=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y

CONFIG_NET_PKT_RX_COUNT=60
CONFIG_NET_PKT_TX_COUNT=3
# Below section is the primary contributor to SRAM and is currently
# tuned for performance, but this will be revisited in the future.
CONFIG_NET_BUF_RX_COUNT=60
CONFIG_NET_BUF_TX_COUNT=6
CONFIG_HEAP_MEM_POOL_SIZE=230000
CONFIG_NET_TC_TX_COUNT=1

CONFIG_INIT_STACKS=y

CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_L2_ETHERNET_MGMT=y

CONFIG_NET_SOCKETS_POLL_MAX=10
# Memories
CONFIG_MAIN_STACK_SIZE=5400
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

# Logging
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_POSIX_CLOCK=y
CONFIG_POSIX_API=y

# printing of scan results puts pressure on queues in new locking
# design in net_mgmt. So, use a higher timeout for a crowded
# environment.
CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000

CONFIG_POSIX_API=y
CONFIG_NET_CONTEXT_RCVTIMEO=y
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE=y
CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE=5600
CONFIG_ZTEST_STACK_SIZE=5600
CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
Loading