aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/005-make-genregdb.awk-skip-antenna-gain.patch
blob: 5ee2d14b18c2abfa8f390066df7edcd9be12ead8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Date: Wed, 23 Oct 2013 14:55:36 -0400
Subject: [RFC] cfg80211: make genregdb.awk skip antenna gain

Now that wireless-regdb doesn't include
antenna gain lets skip parsing it completely
for when CONFIG_CFG80211_INTERNAL_REGDB is
enabled.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/genregdb.awk | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 net/wireless/genregdb.awk

--- a/net/wireless/genregdb.awk
+++ b/net/wireless/genregdb.awk
@@ -56,14 +56,11 @@ function parse_reg_rule()
 	end = $3
 	bw = $5
 	sub(/\),/, "", bw)
-	gain = $6
-	sub(/\(/, "", gain)
-	sub(/,/, "", gain)
-	power = $7
-	sub(/\)/, "", power)
+	power = $6
+	sub(/\(/, "", power)
 	sub(/,/, "", power)
 	# power might be in mW...
-	units = $8
+	units = $7
 	sub(/\)/, "", units)
 	sub(/,/, "", units)
 	if (units == "mW") {
@@ -80,7 +77,7 @@ function parse_reg_rule()
 		}
 	}
 	flagstr = ""
-	for (i=8; i<=NF; i++)
+	for (i=7; i<=NF; i++)
 		flagstr = flagstr $i
 	split(flagstr, flagarray, ",")
 	flags = ""