Skip to content

Commit

Permalink
cfg80211: parse dfs region for internal regdb option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Janusz Dziedzic authored and Johannes Berg committed Oct 1, 2013
1 parent 55fff50 commit f082347
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/wireless/genregdb.awk
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f082347

Please sign in to comment.