Skip to content

Commit

Permalink
mac80211: TDLS: don't require beaconing for AP BW
Browse files Browse the repository at this point in the history
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: Kamil Toman <[email protected]>
Signed-off-by: Arik Nemtsov <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
ariknem authored and jmberg-intel committed Aug 30, 2016
1 parent 4d0bd46 commit 554d072
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/mac80211/tdls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
!cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc,
sdata->wdev.iftype))
(uc.width > sta->tdls_chandef.width &&
!cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc,
sdata->wdev.iftype)))
ieee80211_chandef_downgrade(&uc);

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

0 comments on commit 554d072

Please sign in to comment.