summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 5bad758abfb3..7fb55bf6561e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1417,10 +1417,12 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
/* add channel contexts */
- mutex_lock(&local->chanctx_mtx);
- list_for_each_entry(ctx, &local->chanctx_list, list)
- WARN_ON(drv_add_chanctx(local, ctx));
- mutex_unlock(&local->chanctx_mtx);
+ if (local->use_chanctx) {
+ mutex_lock(&local->chanctx_mtx);
+ list_for_each_entry(ctx, &local->chanctx_list, list)
+ WARN_ON(drv_add_chanctx(local, ctx));
+ mutex_unlock(&local->chanctx_mtx);
+ }
list_for_each_entry(sdata, &local->interfaces, list) {
struct ieee80211_chanctx_conf *ctx_conf;