linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: fixup genregdb.awk for remove of antenna gain from wireless-regdb
@ 2014-07-01 20:17 John W. Linville
  2014-07-02  0:19 ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: John W. Linville @ 2014-07-01 20:17 UTC (permalink / raw)
  To: linux-wireless
  Cc: Luis R. Rodriguez, Johannes Berg, Janusz Dziedzic,
	John W. Linville

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(-)

diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk
index 40c37fc5b67c..c4f90ddb1a7d 100644
--- a/net/wireless/genregdb.awk
+++ b/net/wireless/genregdb.awk
@@ -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++
 }
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-14 22:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-01 20:17 [PATCH] wireless: fixup genregdb.awk for remove of antenna gain from wireless-regdb John W. Linville
2014-07-02  0:19 ` Luis R. Rodriguez
2014-07-02 14:30   ` John W. Linville
2014-07-14 21:08     ` Luis R. Rodriguez
2014-07-14 21:13       ` Kees Cook
2014-07-14 21:33         ` Luis R. Rodriguez
2014-07-14 21:37           ` Kees Cook
2014-07-14 22:36             ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).