mac80211: skip antenna gain when compiling regdb.txt (#15397)
[openwrt/svn-archive/archive.git] / package / kernel / mac80211 / patches / 005-make-genregdb.awk-skip-antenna-gain.patch
1 From: Luis R. Rodriguez <mcgrof@do-not-panic.com>
2 Date: Wed, 23 Oct 2013 14:55:36 -0400
3 Subject: [RFC] cfg80211: make genregdb.awk skip antenna gain
4
5 Now that wireless-regdb doesn't include
6 antenna gain lets skip parsing it completely
7 for when CONFIG_CFG80211_INTERNAL_REGDB is
8 enabled.
9
10 Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 ---
12 net/wireless/genregdb.awk | 11 ++++-------
13 1 file changed, 4 insertions(+), 7 deletions(-)
14 mode change 100644 => 100755 net/wireless/genregdb.awk
15
16 --- a/net/wireless/genregdb.awk
17 +++ b/net/wireless/genregdb.awk
18 @@ -56,14 +56,11 @@ function parse_reg_rule()
19 end = $3
20 bw = $5
21 sub(/\),/, "", bw)
22 - gain = $6
23 - sub(/\(/, "", gain)
24 - sub(/,/, "", gain)
25 - power = $7
26 - sub(/\)/, "", power)
27 + power = $6
28 + sub(/\(/, "", power)
29 sub(/,/, "", power)
30 # power might be in mW...
31 - units = $8
32 + units = $7
33 sub(/\)/, "", units)
34 sub(/,/, "", units)
35 if (units == "mW") {
36 @@ -80,7 +77,7 @@ function parse_reg_rule()
37 }
38 }
39 flagstr = ""
40 - for (i=8; i<=NF; i++)
41 + for (i=7; i<=NF; i++)
42 flagstr = flagstr $i
43 split(flagstr, flagarray, ",")
44 flags = ""