Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 554d072e authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg
Browse files

mac80211: TDLS: don't require beaconing for AP BW

Stop downgrading TDLS chandef when reaching the AP BW. The AP provides
the necessary regulatory protection in this case.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=153961

, which
reported an infinite loop here.

Reported-by: default avatarKamil Toman <kamil.toman@gmail.com>
Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4d0bd46a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -333,10 +333,11 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata,
	if (!uc.center_freq1)
		return;

	/* proceed to downgrade the chandef until usable or the same */
	/* proceed to downgrade the chandef until usable or the same as AP BW */
	while (uc.width > max_width ||
	       (uc.width > sta->tdls_chandef.width &&
		!cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc,
					      sdata->wdev.iftype))
					       sdata->wdev.iftype)))
		ieee80211_chandef_downgrade(&uc);

	if (!cfg80211_chandef_identical(&uc, &sta->tdls_chandef)) {