@@ -56,21 +56,19 @@ function parse_reg_rule()
end = $3
bw = $5
sub(/\),/, "", bw)
- gain = $6
- sub(/\(/, "", gain)
- sub(/,/, "", gain)
- power = $7
+ power = $6
+ sub(/\(/, "", power)
sub(/\)/, "", power)
sub(/,/, "", power)
# power might be in mW...
- units = $8
+ units = $7
sub(/\)/, "", units)
sub(/,/, "", units)
- dfs_cac = $9
+ dfs_cac = $8
if (units == "mW") {
power = 10 * log(power)/log(10)
} else {
- dfs_cac = $8
+ dfs_cac = $7
}
sub(/,/, "", dfs_cac)
sub(/\(/, "", dfs_cac)
@@ -107,7 +105,7 @@ function parse_reg_rule()
}
flags = flags "0"
- printf "\t\tREG_RULE_EXT(%d, %d, %d, %d, %.0f, %d, %s),\n", start, end, bw, gain, power, dfs_cac, flags
+ printf "\t\tREG_RULE_EXT(%d, %d, %d, 0, %.0f, %d, %s),\n", start, end, bw, power, dfs_cac, flags
rules++
}
Since "wireless-regdb: remove antenna gain" was merged in the wireless-regdb tree, this script has been incompatible with the 'official' regulatory database. Let's fix it up. Signed-off-by: John W. Linville <linville@tuxdriver.com> --- I think the dfs_cac stuff is still broken, since it does not account for the starting offset of the flags. net/wireless/genregdb.awk | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)