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

Arend van Spriel <[email protected]> Sun, 2 Aug 2026 10:39:01 +0200
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless,org.kernel.vger.stable
Message-ID <[email protected]>
On Fri, 24 Jul 2026 17:25:30 +0800, Can Peng <[email protected]> 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: [email protected]
> Signed-off-by: Can Peng <[email protected]>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Arend van Spriel <[email protected]>

Regards,
Arend