All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix radar_enabled propagation
@ 2014-04-04 11:02 Michal Kazior
  2014-04-08  8:36 ` Johannes Berg
  2014-04-08  9:44 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Kazior @ 2014-04-04 11:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Michal Kazior

If chandef had non-HT width it was possible for
radar_enabled update to not be propagated properly
through drv_config(). This happened because
ieee80211_hw_conf_chan() would never see different
local->hw.conf.chandef and local->_oper_chandef.

This wasn't a problem with HT chandefs because
_oper_chandef width is reset to non-HT in
ieee80211_free_chanctx() making
ieee80211_hw_conf_chan() to kick in.

This problem led (at least) ath10k to not start
CAC if prior CAC was cancelled and both CACs were
requested for identical non-HT chandefs.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/mac80211/chan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 122033d..b472daa 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -269,7 +269,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local,
 
 	if (!local->use_chanctx) {
 		local->_oper_chandef = *chandef;
-		ieee80211_hw_config(local, 0);
+		ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
 	} else {
 		err = drv_add_chanctx(local, ctx);
 		if (err) {
@@ -306,7 +306,7 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
 			check_single_channel = true;
 		local->hw.conf.radar_enabled = false;
 
-		ieee80211_hw_config(local, 0);
+		ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
 	} else {
 		drv_remove_chanctx(local, ctx);
 	}
-- 
1.8.5.3


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

end of thread, other threads:[~2014-04-08  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 11:02 [PATCH] mac80211: fix radar_enabled propagation Michal Kazior
2014-04-08  8:36 ` Johannes Berg
2014-04-08  9:24   ` Michal Kazior
2014-04-08  9:43     ` Johannes Berg
2014-04-08  9:44 ` Johannes Berg

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.