Re: [PATCH -next v3 00/13] wifi: cfg80211: consolidate cookie assignment for async ops

Johannes Berg <[email protected]> Sun, 02 Aug 2026 20:07:15 +0200
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On Fri, 2026-07-31 at 14:34 +0200, Arend van Spriel wrote:
> NL80211_ATTR_COOKIE is a userspace-visible u64 that correlates an async
> nl80211 operation with its completion event. Three cfg80211 ops currently
> delegate cookie generation to the driver: remain_on_channel, mgmt_tx, and
> probe_peer. This produces inconsistent strategies across drivers: some us=
e
> an incrementing counter, some use get_random_u32(), some use a CID cast t=
o
> u64, and brcmfmac's mgmt_tx always assigned zero - which is arguably brok=
en
> since cfg80211 treats zero as an invalid cookie.

Thanks for cleaning this up, I've applied it.

Incidentally, this also simplified some changes that I'm slowly
prototyping in this area - I want to queue ethernet frames on the TXQs,
initially at least for client mode, in order to build A-MSDUs at TXQ
dequeue rather than enqueue, and to be able to more easily move frames
from one place to another during SMD transition.

I guess it'll be a while before I'll post _all_ of that though, might
post some prep patches soon with some "further thoughts" in the cover
letter.

johannes