All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] mac80211: TDLS: always downgrade invalid chandefs
@ 2016-03-02 21:28 Emmanuel Grumbach
  2016-03-02 21:28 ` [PATCH 2/3] mac80211: TDLS: change BW calculation for WIDER_BW peers Emmanuel Grumbach
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Emmanuel Grumbach @ 2016-03-02 21:28 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Arik Nemtsov, Arik Nemtsov, Emmanuel Grumbach

From: Arik Nemtsov <arik@wizery.com>

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: dde4002 ("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>
---
 net/mac80211/tdls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index c9eeb3f..43f13abe 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -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);
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-06 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 21:28 [PATCH 1/3] mac80211: TDLS: always downgrade invalid chandefs Emmanuel Grumbach
2016-03-02 21:28 ` [PATCH 2/3] mac80211: TDLS: change BW calculation for WIDER_BW peers Emmanuel Grumbach
2016-03-02 21:28 ` [PATCH 3/3] mac80211: recalc min_def chanctx even when chandef is identical Emmanuel Grumbach
2016-03-03 15:40   ` Johannes Berg
2016-03-03 15:41     ` Arik Nemtsov
2016-03-03 15:42       ` Johannes Berg
2016-03-06 15:58 ` [PATCH 1/3] mac80211: TDLS: always downgrade invalid chandefs Jouni Malinen
2016-03-06 16:03   ` Arik Nemtsov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.