blob: edfa07a418d8e56b6faf9690c9cacbd09e9cda40 [file] [log] [blame]
From d9d2bfeed54c0506a2f387354464d3ef474e1777 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 7 Aug 2023 19:00:53 +0800
Subject: [PATCH 24/61] mtk: mac80211: avoid calling switch_vif_chanctx when
use_chanctx is false
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Change-Id: I2876d763ed1ecb5b7c7e5c53b2623dcd34ece774
---
net/mac80211/chan.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 32094ef..8043d1d 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -1219,13 +1219,15 @@ ieee80211_link_use_reserved_reassign(struct ieee80211_link_data *link)
list_del(&link->reserved_chanctx_list);
link->reserved_chanctx = NULL;
- err = drv_switch_vif_chanctx(local, vif_chsw, 1,
- CHANCTX_SWMODE_REASSIGN_VIF);
- if (err) {
- if (ieee80211_chanctx_refcount(local, new_ctx) == 0)
- ieee80211_free_chanctx(local, new_ctx, false);
+ if (!local->emulate_chanctx) {
+ err = drv_switch_vif_chanctx(local, vif_chsw, 1,
+ CHANCTX_SWMODE_REASSIGN_VIF);
+ if (err) {
+ if (ieee80211_chanctx_refcount(local, new_ctx) == 0)
+ ieee80211_free_chanctx(local, new_ctx, false);
- goto out;
+ goto out;
+ }
}
list_move(&link->assigned_chanctx_list, &new_ctx->assigned_links);
--
2.39.2