]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cfg80211: reg: set DFS CAC time in case of custom regd
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Wed, 9 Apr 2014 11:47:12 +0000 (13:47 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 11 Apr 2014 08:00:10 +0000 (10:00 +0200)
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>
net/wireless/reg.c

index bf3b0938891db90ef35c2b8a7ea68dd6ea2c1341..9d32633f59564c57a6a89404332f17f7f148190f 100644 (file)
@@ -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;
        }