mac80211: refresh patches
[openwrt/openwrt.git] / package / mac80211 / patches / 524-mac80211_configure_antenna_gain.patch
index 9bf7fc94b25b024256ef3fc4c428d4531574e05a..ada37854d60d47049ca435c1a6c823f8051c52a6 100644 (file)
  };
  
  /* policy for the key attributes */
-@@ -1604,6 +1605,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -1603,6 +1604,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;
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -1986,6 +1986,19 @@ static int ieee80211_get_tx_power(struct
+@@ -1984,6 +1984,19 @@ static int ieee80211_get_tx_power(struct
        return 0;
  }
  
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
                                  const u8 *addr)
  {
-@@ -3084,6 +3097,7 @@ struct cfg80211_ops mac80211_config_ops 
+@@ -3085,6 +3098,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,
        CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -1551,6 +1551,7 @@ struct cfg80211_gtk_rekey_data {
+@@ -1552,6 +1552,7 @@ struct cfg80211_gtk_rekey_data {
   *    the power passed is in mBm, to get dBm use MBM_TO_DBM().
   * @get_tx_power: store the current TX power into the dbm variable;
   *    return 0 if successful
   *
   * @set_wds_peer: set the WDS peer for a WDS interface
   *
-@@ -1750,6 +1751,7 @@ struct cfg80211_ops {
+@@ -1751,6 +1752,7 @@ struct cfg80211_ops {
        int     (*set_tx_power)(struct wiphy *wiphy,
                                enum nl80211_tx_power_setting type, int mbm);
        int     (*get_tx_power)(struct wiphy *wiphy, int *dbm);