Skip to content

Commit

Permalink
mac80211: TDLS: always downgrade invalid chandefs
Browse files Browse the repository at this point in the history
Even if the current chandef width is equal to the station's max-BW, it
doesn't mean it's a valid width for TDLS. Make sure to always check
regulatory constraints in these cases.

Fixes: 0fabfaa ("mac80211: upgrade BW of TDLS peers when possible")
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
Arik Nemtsov authored and Johannes Berg committed Apr 5, 2016
1 parent c3732a7 commit db8d997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/tdls.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata,
return;

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

0 comments on commit db8d997

Please sign in to comment.