mac80211: backport today's brcmfmac changes
[oweals/openwrt.git] / package / kernel / mac80211 / patches / 522-mac80211_configure_antenna_gain.patch
index e13fe31d3fda47b12567cfecbd6cc63f0a278cc5..0c50a0bbbaeaeac7f01087759ee9bee98b24bd3a 100644 (file)
@@ -18,7 +18,7 @@
                                const u8 *addr);
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -1167,6 +1167,7 @@ enum ieee80211_smps_mode {
+@@ -1171,6 +1171,7 @@ enum ieee80211_smps_mode {
   *
   * @power_level: requested transmit power (in dBm), backward compatibility
   *    value only that is set to the minimum of all interfaces
@@ -26,7 +26,7 @@
   *
   * @chandef: the channel definition to tune to
   * @radar_enabled: whether radar detection is enabled
-@@ -1188,6 +1189,7 @@ struct ieee80211_conf {
+@@ -1192,6 +1193,7 @@ struct ieee80211_conf {
        u32 flags;
        int power_level, dynamic_ps_timeout;
        int max_sleep_period;
  };
  
  /* policy for the key attributes */
-@@ -2207,6 +2208,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -2206,6 +2207,20 @@ static int nl80211_set_wiphy(struct sk_b
+               if (result)
                        return result;
        }
++
 +      if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
 +              int idx, dbi = 0;
 +
 +              if (result)
 +                      return result;
 +      }
-+
        if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
            info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
-               u32 tx_ant, rx_ant;