mac80211: skip antenna gain when compiling regdb.txt (#15397)
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 28 Mar 2014 16:05:46 +0000 (16:05 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 28 Mar 2014 16:05:46 +0000 (16:05 +0000)
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

package/kernel/mac80211/patches/005-make-genregdb.awk-skip-antenna-gain.patch [new file with mode: 0644]
package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch
package/kernel/mac80211/patches/920-wlcore-don-t-switch-channels-on-disconnected-STA-vif.patch

diff --git a/package/kernel/mac80211/patches/005-make-genregdb.awk-skip-antenna-gain.patch b/package/kernel/mac80211/patches/005-make-genregdb.awk-skip-antenna-gain.patch
new file mode 100644 (file)
index 0000000..5ee2d14
--- /dev/null
@@ -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 = ""
index 308ee6eb7715f36cf2e57eacc6ff50aea5783c41..8f2adc9d0f362c19c80bf72af0c7aa81f5aa48b2 100644 (file)
@@ -77,7 +77,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
                                  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_tx_power = ieee80211_set_tx_power,
        .get_tx_power = ieee80211_get_tx_power,
  };
  
  /* 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;
 +
 +              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;
index 3c2c14ad85dc1f50305ecf4cd7378b8452e1698e..d15e9eb6a3c6b71ee58296a3fd84acc0ba9e07bd 100644 (file)
@@ -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
-