Re: [PATCH wireless-next v2] wifi: brcmfmac: msgbuf: count tx status only for the current flowring

From: Arend van Spriel

Date: Mon Nov 16 2026 - 05:53:46 EST


On Thu, 12 Nov 2026 18:57:54 +0100, Kordian Chmielewski wrote:
> brcmf_msgbuf_delete_flowring() waits for the outstanding_tx counter of a
> flowring to reach zero before it sends the delete. When the wait times
> out, it sets the counter to zero with packets still out. Their tx status
> still comes and takes the counter below zero, and since the counter
> lives in the commonring of the flowid and nothing resets it, the next
> flowring that gets the flowid starts from there. With the counter below
> zero, the next delete of that flowring waits until it times out as well.

[...]

> Reset the counter when a flowring is created. Give each flowid a
> generation that goes up when the flowid is released, and keep it in the
> tx pktid of every packet posted to the flowring. A tx status of an older
> generation still releases its packet, but no longer touches the counter.

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

> Signed-off-by: Kordian Chmielewski <kudzo51@xxxxxxxxx>
> ---
> .../wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 36 +++++++++++++++++++++-
> 1 file changed, 35 insertions(+), 1 deletion(-)