]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mac80211: make ieee80211_find_chanctx link-unaware
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Fri, 20 Mar 2026 08:19:59 +0000 (10:19 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Mar 2026 15:30:59 +0000 (16:30 +0100)
commitc209f67233f1c6d895cb893f622e17a505d00397
tree5083b9e189b25677765f23dc0475cc96204428ae
parent4ca2253157925424b3ada17c96fa4a26e664bc0d
wifi: mac80211: make ieee80211_find_chanctx link-unaware

Currently we have only one user for a channel context: the link.
With NAN, a new type of the channel context user will be added - the NAN
channel.
To prepare for this, we need to separate the channel context code from
the link code.

Removes the link argument from ieee80211_find_chanctx. Since the issue that led
to commit 5e0c422d12b5 ("wifi: mac80211: reserve chanctx during find") - that
added the link argument - is relevant for any user of the channel context, add
a boolean to the chanctx itself, indicating that the chanctx is in the process
of getting used.

When this indication is set, the reference count of the channel context
will be incremented by one, so even if it is getting released from a link
(or another user) it won't be freed.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320101954.232499e2a41f.I0b735a607e1ec7aa5749ab01c794ef99dbe82b7f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ieee80211_i.h