summaryrefslogtreecommitdiff
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 6aa305839f53..d0bfb1216401 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -654,8 +654,19 @@ static void _ieee80211_change_chanctx(struct ieee80211_local *local,
};
u32 changed = 0;
- /* expected to handle only 20/40/80/160/320 channel widths */
+ /* 5/10 MHz not handled here */
switch (chandef->width) {
+ case NL80211_CHAN_WIDTH_1:
+ case NL80211_CHAN_WIDTH_2:
+ case NL80211_CHAN_WIDTH_4:
+ case NL80211_CHAN_WIDTH_8:
+ case NL80211_CHAN_WIDTH_16:
+ /*
+ * mac80211 currently only supports sharing identical
+ * chanctx's for S1G interfaces.
+ */
+ WARN_ON(!ieee80211_chanreq_identical(&ctx_req, chanreq));
+ return;
case NL80211_CHAN_WIDTH_20_NOHT:
case NL80211_CHAN_WIDTH_20:
case NL80211_CHAN_WIDTH_40:
@@ -1715,7 +1726,7 @@ static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local)
n_reserved = 0;
n_ready = 0;
- for_each_chanctx_user_assigned(local, ctx, &iter) {
+ for_each_chanctx_user_assigned(local, ctx->replace_ctx, &iter) {
n_assigned++;
if (iter.link->reserved_chanctx) {
n_reserved++;