]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mac80211: remove chanctx to link back-references
authorJohannes Berg <johannes.berg@intel.com>
Wed, 5 Nov 2025 15:03:43 +0000 (16:03 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 10 Nov 2025 09:38:49 +0000 (10:38 +0100)
commita1dc648aa76d61d8e75692cecea043b1bfdfeda6
tree04ff4239a21fcec7a40d993ae7cc3603e312ef65
parent29cc798e7061e603843091af2f17b5b25009e7b8
wifi: mac80211: remove chanctx to link back-references

Each link can currently use a chanctx and have another one
reserved, and both of these are also tracked backwards in
the assigned_links and reserved_links lists. If we consider
that there aren't *that* many links, this duplicate book-
keeping isn't necessary.
(I think it used to be necessary before the wiphy locking
changes, when chanctx_mtx existed, because we couldn't do
any interface iterations while holding only chanctx_mtx.)

Additionally, for NAN, we're going to want to track which
chanctxs are in use by the (group of) NAN interfaces. For
those, links don't really make sense as such, so chanctxs
need to be assigned to a different data structure.

Thus, as a first step, remove those back-lists of users
(right now only links) of each channel context. This is a
very basic conversion, ieee80211_vif_use_reserved_switch()
should made to iterate smarter.

Link: https://patch.msgid.link/20251105160431.dbeea1c42e76.I8d273c407274e1c05a4778aa20b56a9f326e87a7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ieee80211_i.h
net/mac80211/link.c
net/mac80211/util.c