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> SVN-Revision: 40296
This commit is contained in:
parent
95a14e1dcd
commit
f5fce5e0da
3 changed files with 51 additions and 12 deletions
|
@ -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 = ""
|
|
@ -77,7 +77,7 @@
|
||||||
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||||
const u8 *addr)
|
const u8 *addr)
|
||||||
{
|
{
|
||||||
@@ -3924,6 +3937,7 @@ struct cfg80211_ops mac80211_config_ops
|
@@ -3924,6 +3937,7 @@ struct cfg80211_ops mac80211_config_ops
|
||||||
.set_wiphy_params = ieee80211_set_wiphy_params,
|
.set_wiphy_params = ieee80211_set_wiphy_params,
|
||||||
.set_tx_power = ieee80211_set_tx_power,
|
.set_tx_power = ieee80211_set_tx_power,
|
||||||
.get_tx_power = ieee80211_get_tx_power,
|
.get_tx_power = ieee80211_get_tx_power,
|
||||||
|
@ -147,10 +147,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/* policy for the key attributes */
|
/* 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;
|
goto bad_res;
|
||||||
}
|
}
|
||||||
|
+
|
||||||
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
|
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
|
||||||
+ int idx, dbi = 0;
|
+ int idx, dbi = 0;
|
||||||
+
|
+
|
||||||
|
@ -166,7 +167,6 @@
|
||||||
+ if (result)
|
+ if (result)
|
||||||
+ goto bad_res;
|
+ goto bad_res;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
|
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
|
||||||
info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
|
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 +++++++
|
drivers/net/wireless/ti/wlcore/main.c | 7 +++++++
|
||||||
1 file changed, 7 insertions(+)
|
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
|
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||||
+++ b/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)) {
|
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
|
||||||
wl12xx_for_each_wlvif_sta(wl, wlvif) {
|
wl12xx_for_each_wlvif_sta(wl, wlvif) {
|
||||||
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
||||||
|
@ -26,7 +24,7 @@ index 117e01e..a0c5a1e 100644
|
||||||
ieee80211_chswitch_done(vif, false);
|
ieee80211_chswitch_done(vif, false);
|
||||||
}
|
}
|
||||||
goto out;
|
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) {
|
wl12xx_for_each_wlvif_sta(wl, wlvif) {
|
||||||
unsigned long delay_usec;
|
unsigned long delay_usec;
|
||||||
|
|
||||||
|
@ -36,6 +34,3 @@ index 117e01e..a0c5a1e 100644
|
||||||
ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
|
ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_sleep;
|
goto out_sleep;
|
||||||
--
|
|
||||||
1.8.3.2
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue