diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-05-29 16:55:38 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-29 16:55:38 (GMT) |
commit | 737be10d8cb783d1cadb1868b061abb2b4314eae (patch) | |
tree | 1b72ea0d454affab6d6cc743939cfb316fad14b3 /net/wireless/genregdb.awk | |
parent | 03c4444650969431b3a5effde4995de767e3013a (diff) | |
parent | d3a58df87a2e4c2301ac843604202d290a48440b (diff) | |
download | linux-737be10d8cb783d1cadb1868b061abb2b4314eae.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/wireless/genregdb.awk')
-rw-r--r-- | net/wireless/genregdb.awk | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk index b35da8d..40c37fc 100644 --- a/net/wireless/genregdb.awk +++ b/net/wireless/genregdb.awk @@ -68,17 +68,7 @@ function parse_reg_rule() sub(/,/, "", units) dfs_cac = $9 if (units == "mW") { - if (power == 100) { - power = 20 - } else if (power == 200) { - power = 23 - } else if (power == 500) { - power = 27 - } else if (power == 1000) { - power = 30 - } else { - print "Unknown power value in database!" - } + power = 10 * log(power)/log(10) } else { dfs_cac = $8 } @@ -117,7 +107,7 @@ function parse_reg_rule() } flags = flags "0" - printf "\t\tREG_RULE_EXT(%d, %d, %d, %d, %d, %d, %s),\n", start, end, bw, gain, power, dfs_cac, flags + printf "\t\tREG_RULE_EXT(%d, %d, %d, %d, %.0f, %d, %s),\n", start, end, bw, gain, power, dfs_cac, flags rules++ } |