cfg80211: parse dfs region for internal regdb option
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Tue, 17 Sep 2013 06:25:36 +0000 (08:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 1 Oct 2013 10:18:36 +0000 (12:18 +0200)
Add support for parsing and setting the dfs region (ETSI, FCC, JP)
when the internal regulatory database is used. Before this
the DFS region was being ignored even if present on the used
db.txt

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/genregdb.awk

index 9392f8cbb901d605769bbd6bb0fd048b3f884328..42ed274e81f4ca7debc59c4ae17137c35a0993d8 100644 (file)
@@ -46,6 +46,12 @@ BEGIN {
        sub(/:/, "", country)
        printf "static const struct ieee80211_regdomain regdom_%s = {\n", country
        printf "\t.alpha2 = \"%s\",\n", country
+       if ($NF ~ /DFS-ETSI/)
+               printf "\t.dfs_region = NL80211_DFS_ETSI,\n"
+       else if ($NF ~ /DFS-FCC/)
+               printf "\t.dfs_region = NL80211_DFS_FCC,\n"
+       else if ($NF ~ /DFS-JP/)
+               printf "\t.dfs_region = NL80211_DFS_JP,\n"
        printf "\t.reg_rules = {\n"
        active = 1
        regdb = regdb "\t&regdom_" country ",\n"