Re: [PATCH] wifi: brcmfmac: Set DMA direction for msgbuf packet IDs

From: Arend van Spriel

Date: Sun Aug 02 2026 - 04:43:41 EST


On Fri, 24 Jul 2026 17:25:30 +0800, Can Peng <pengcan@xxxxxxxxxx> wrote:
> brcmf_msgbuf_init_pktids() takes the DMA direction from its callers,
> but never stores it in the packet ID state. Since the state is zeroed,
> pktids->direction remains DMA_BIDIRECTIONAL for both the TX and RX
> packet ID pools.
>
> All msgbuf packet ID map and unmap paths use pktids->direction. As a
> result, TX buffers requested with DMA_TO_DEVICE and RX buffers requested
> with DMA_FROM_DEVICE are mapped and unmapped as DMA_BIDIRECTIONAL
> instead.
>
> Store the caller-provided direction when initializing the packet ID
> state.
>
> Fixes: 9a1bb60250d2 ("brcmfmac: Adding msgbuf protocol.")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Can Peng <pengcan@xxxxxxxxxx>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 1 +
> 1 file changed, 1 insertion(+)

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

Regards,
Arend