Skip to content

Commit 6c989de

Browse files
JordanYateskartben
authored andcommitted
wifi: nrf_wifi: add alignment requirement to buffers
The nRF lower levels (`spim_addr_check` and `qspi_addr_check`) do address alignment validation before sending or receiving data. If the buffer sizes are not aligned, errors like this are printed to the console when the interface is powered up. ``` <err> : spim_addr_check : Unaligned address ee0b2 2002b020 1 0 0 <err> : spim_addr_check : Unaligned address eeb3e 2002bb40 1 0 0 <err> : spim_addr_check : Unaligned address ef5ca 2002c660 1 0 0 <err> : spim_addr_check : Unaligned address f0056 2002d180 1 0 0 ``` Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 0918236 commit 6c989de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/wifi/nrf_wifi/src/fmac_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ BUILD_ASSERT(RPU_PKTRAM_SIZE - TOTAL_RX_SIZE >= TOTAL_TX_SIZE,
7575
BUILD_ASSERT(CONFIG_NRF70_TX_MAX_DATA_SIZE >= MAX_TX_FRAME_SIZE,
7676
"TX buffer size must be at least as big as the MTU and headroom");
7777

78+
BUILD_ASSERT(CONFIG_NRF70_TX_MAX_DATA_SIZE % 4 == 0,
79+
"TX buffer size must be a multiple of 4");
80+
BUILD_ASSERT(CONFIG_NRF70_RX_MAX_DATA_SIZE % 4 == 0,
81+
"RX buffer size must be a multiple of 4");
82+
7883
static const unsigned char aggregation = 1;
7984
static const unsigned char max_num_tx_agg_sessions = 4;
8085
static const unsigned char max_num_rx_agg_sessions = 8;

0 commit comments

Comments
 (0)