diff options
author | Eliad Peller <eliad@wizery.com> | 2015-01-07 18:50:09 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-14 11:37:06 +0300 |
commit | 5cbc95a749c5f3b238af0953881edede9bfe5bf6 (patch) | |
tree | 4bd05d244a56723b38bfafcba8eed0875249027e /net/mac80211/chan.c | |
parent | 50075892ba30c4c19c41235b5308ee5a1e2125d7 (diff) | |
download | linux-5cbc95a749c5f3b238af0953881edede9bfe5bf6.tar.xz |
mac80211: remove local->radar_detect_enabled
local->radar_detect_enabled should tell whether
radar_detect is enabled on any interface belonging
to local.
However, it's not getting updated correctly
in many cases (actually, when testing with hwsim
it's never been set, even when the dfs master
is beaconing).
Instead of handling all the corner cases
(e.g. channel switch), simply check whether
radar detection is enabled only when needed,
instead of caching the result.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r-- | net/mac80211/chan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index da1c12c34487..92c721dbd5af 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -388,7 +388,7 @@ ieee80211_find_chanctx(struct ieee80211_local *local, return NULL; } -static bool ieee80211_is_radar_required(struct ieee80211_local *local) +bool ieee80211_is_radar_required(struct ieee80211_local *local) { struct ieee80211_sub_if_data *sdata; @@ -567,7 +567,7 @@ static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, bool radar_enabled; lockdep_assert_held(&local->chanctx_mtx); - /* for setting local->radar_detect_enabled */ + /* for ieee80211_is_radar_required */ lockdep_assert_held(&local->mtx); radar_enabled = ieee80211_is_radar_required(local); @@ -576,7 +576,6 @@ static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, return; chanctx->conf.radar_enabled = radar_enabled; - local->radar_detect_enabled = chanctx->conf.radar_enabled; if (!local->use_chanctx) { local->hw.conf.radar_enabled = chanctx->conf.radar_enabled; |