Skip to content

Commit

Permalink
mac80211: recalc min_def chanctx even when chandef is identical
Browse files Browse the repository at this point in the history
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 <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
ariknem authored and jmberg-intel committed Apr 5, 2016
1 parent 59021c6 commit aa507a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/mac80211/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit aa507a7

Please sign in to comment.