X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=net%2Fmac80211%2Ftdls.c;h=afca7d103684bbc8c953ae13bb0345934d8f5f35;hb=ab522e33f91799661aad47bebb691f241a9f6bb8;hp=b5d28f14b9cff950e6896b7fb6df710d5a3b7c20;hpb=a71e36045e1fd5813addad2fce878d96e2827d66;p=cascardo%2Flinux.git diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index b5d28f14b9cf..afca7d103684 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -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)) {