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

Arend van Spriel <[email protected]>
Newsgroups org.kernel.vger.stable,dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.