Commit 9b4816f5 authored by Michal Kazior's avatar Michal Kazior Committed by Johannes Berg

mac80211: fix radar_enabled propagation

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: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7b8a9cdd
...@@ -249,7 +249,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local, ...@@ -249,7 +249,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local,
if (!local->use_chanctx) { if (!local->use_chanctx) {
local->_oper_chandef = *chandef; local->_oper_chandef = *chandef;
ieee80211_hw_config(local, 0); ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
} else { } else {
err = drv_add_chanctx(local, ctx); err = drv_add_chanctx(local, ctx);
if (err) { if (err) {
...@@ -286,7 +286,7 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local, ...@@ -286,7 +286,7 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
check_single_channel = true; check_single_channel = true;
local->hw.conf.radar_enabled = false; local->hw.conf.radar_enabled = false;
ieee80211_hw_config(local, 0); ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
} else { } else {
drv_remove_chanctx(local, ctx); drv_remove_chanctx(local, ctx);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment