From: Arik Nemtsov Date: Wed, 2 Mar 2016 21:28:33 +0000 (+0200) Subject: mac80211: recalc min_def chanctx even when chandef is identical X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa507a7bc5ab7513b83fc37ed040b5254737a518;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mac80211: recalc min_def chanctx even when chandef is identical The min_def chanctx is affected not only by the current chandef, but sometimes also by other stations on the vif. There's a valid scenario where a TDLS peer can widen its BW, thereby causing the min_def to increase. Signed-off-by: Arik Nemtsov Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 283981108ca8..74142d07ad31 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -343,8 +343,10 @@ static void ieee80211_change_chanctx(struct ieee80211_local *local, struct ieee80211_chanctx *ctx, const struct cfg80211_chan_def *chandef) { - if (cfg80211_chandef_identical(&ctx->conf.def, chandef)) + if (cfg80211_chandef_identical(&ctx->conf.def, chandef)) { + ieee80211_recalc_chanctx_min_def(local, ctx); return; + } WARN_ON(!cfg80211_chandef_compatible(&ctx->conf.def, chandef));