OSDN Git Service

wifi: mac80211: consider reserved chanctx for mindef
authorJohannes Berg <johannes.berg@intel.com>
Thu, 4 May 2023 13:45:03 +0000 (16:45 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 May 2023 17:25:43 +0000 (10:25 -0700)
commitb72a455a2409fd94d6d9b4eb51d659a88213243b
treeb06f620504562e045ec9f08a2b5381cc3d0623f9
parent860e1b43da94551cd1e73adc36b3c64cc3e5dc01
wifi: mac80211: consider reserved chanctx for mindef

When a chanctx is reserved for a new vif and we recalculate
the minimal definition for it, we need to consider the new
interface it's being reserved for before we assign it, so it
can be used directly with the correct min channel width.

Fix the code to - optionally - consider that, and use that
option just before doing the reassignment.

Also, when considering channel context reservations, we
should only consider the one link we're currently working with.
Change the boolean argument to a link pointer to do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230504134511.828474-4-gregory.greenman@intel.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ieee80211_i.h
net/mac80211/util.c