summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2014-04-09 13:47:12 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-04-11 10:00:10 +0200
commit4f267c1198cf57fc9fc444c78649bca018cc63af (patch)
treef3d18ad17fe1a2b0d5a812175df02425361b463e
parentc14a74007f3712413140b5d06d4f7691234a8d3b (diff)
cfg80211: reg: set DFS CAC time in case of custom regd
Set DFS CAC time also in case of using custom and strict regulatory from drivers. In other case we could have unset DFS CAC time directly after driver loaded and before issue regulatory set from user mode. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/wireless/reg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index bf3b0938891d..9d32633f5956 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1096,6 +1096,13 @@ static void handle_channel(struct wiphy *wiphy,
(int) MBI_TO_DBI(power_rule->max_antenna_gain);
chan->max_reg_power = chan->max_power = chan->orig_mpwr =
(int) MBM_TO_DBM(power_rule->max_eirp);
+
+ if (chan->flags & IEEE80211_CHAN_RADAR) {
+ chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
+ if (reg_rule->dfs_cac_ms)
+ chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
+ }
+
return;
}