mac80211: skip antenna gain when compiling regdb.txt (#15397)
The antenna gain attribute has been removed from the upstream regulatory database. Incorperate patch from Luis R. Rodriguez to skip the parsing of the gain attribute in genregdb.awk in order to emit proper rules again. Also refresh fuzzy patches while we're at it. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40296 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
16e5a6fc8a
commit
d82118c592
|
@ -0,0 +1,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 = ""
|
|
@ -147,10 +147,11 @@
|
|||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -2105,6 +2106,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -2104,6 +2105,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
goto bad_res;
|
||||
}
|
||||
|
||||
+
|
||||
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
|
||||
+ int idx, dbi = 0;
|
||||
+
|
||||
|
@ -166,7 +167,6 @@
|
|||
+ if (result)
|
||||
+ goto bad_res;
|
||||
+ }
|
||||
+
|
||||
|
||||
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
|
||||
info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
|
||||
u32 tx_ant, rx_ant;
|
||||
|
|
|
@ -11,11 +11,9 @@ Signed-off-by: Arik Nemtsov <arik@wizery.com>
|
|||
drivers/net/wireless/ti/wlcore/main.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
|
||||
index 117e01e..a0c5a1e 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/main.c
|
||||
@@ -5224,6 +5224,10 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
|
||||
@@ -5179,6 +5179,10 @@ static void wl12xx_op_channel_switch(str
|
||||
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
|
||||
wl12xx_for_each_wlvif_sta(wl, wlvif) {
|
||||
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
||||
|
@ -26,7 +24,7 @@ index 117e01e..a0c5a1e 100644
|
|||
ieee80211_chswitch_done(vif, false);
|
||||
}
|
||||
goto out;
|
||||
@@ -5239,6 +5243,9 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
|
||||
@@ -5194,6 +5198,9 @@ static void wl12xx_op_channel_switch(str
|
||||
wl12xx_for_each_wlvif_sta(wl, wlvif) {
|
||||
unsigned long delay_usec;
|
||||
|
||||
|
@ -36,6 +34,3 @@ index 117e01e..a0c5a1e 100644
|
|||
ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
|
||||
if (ret)
|
||||
goto out_sleep;
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
|
|
Loading…
Reference in New Issue