mac80211: Update to version 5.4-rc2
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 500-mac80211_configure_antenna_gain.patch
index 3ca34b7ec31959c7de718ef8e177ed53790750de..768cca6046422990fbf1564dde04fda826a7cafa 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -3344,6 +3344,7 @@ struct cfg80211_update_owe_info {
+@@ -3447,6 +3447,7 @@ struct cfg80211_update_owe_info {
   *    (as advertised by the nl80211 feature flag.)
   * @get_tx_power: store the current TX power into the dbm variable;
   *    return 0 if successful
@@ -8,7 +8,7 @@
   *
   * @set_wds_peer: set the WDS peer for a WDS interface
   *
-@@ -3656,6 +3657,7 @@ struct cfg80211_ops {
+@@ -3759,6 +3760,7 @@ struct cfg80211_ops {
                                enum nl80211_tx_power_setting type, int mbm);
        int     (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
                                int *dbm);
@@ -18,7 +18,7 @@
                                const u8 *addr);
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -1476,6 +1476,7 @@ enum ieee80211_smps_mode {
+@@ -1484,6 +1484,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
-@@ -1496,6 +1497,7 @@ enum ieee80211_smps_mode {
+@@ -1504,6 +1505,7 @@ enum ieee80211_smps_mode {
  struct ieee80211_conf {
        u32 flags;
        int power_level, dynamic_ps_timeout;
@@ -36,9 +36,9 @@
        u8 ps_dtim_period;
 --- a/include/uapi/linux/nl80211.h
 +++ b/include/uapi/linux/nl80211.h
-@@ -2356,6 +2356,9 @@ enum nl80211_commands {
-  *
-  * @NL80211_ATTR_TWT_RESPONDER: Enable target wait time responder support.
+@@ -2373,6 +2373,9 @@ enum nl80211_commands {
+  *    the allowed channel bandwidth configurations. (u8 attribute)
+  *    Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
   *
 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
 + *    transmit power to stay within regulatory limits. u32, dBi.
@@ -46,9 +46,9 @@
   * @NUM_NL80211_ATTR: total number of nl80211_attrs available
   * @NL80211_ATTR_MAX: highest attribute number currently defined
   * @__NL80211_ATTR_AFTER_LAST: internal use
-@@ -2813,6 +2816,8 @@ enum nl80211_attrs {
-       NL80211_ATTR_TWT_RESPONDER,
+@@ -2835,6 +2838,8 @@ enum nl80211_attrs {
+       NL80211_ATTR_WIPHY_EDMG_CHANNELS,
+       NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
  
 +      NL80211_ATTR_WIPHY_ANTENNA_GAIN,
 +
@@ -57,7 +57,7 @@
        __NL80211_ATTR_AFTER_LAST,
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -2584,6 +2584,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2582,6 +2582,19 @@ static int ieee80211_get_tx_power(struct
        return 0;
  }
  
@@ -77,7 +77,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
                                  const u8 *addr)
  {
-@@ -3997,6 +4010,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -3995,6 +4008,7 @@ const struct cfg80211_ops mac80211_confi
        .set_wiphy_params = ieee80211_set_wiphy_params,
        .set_tx_power = ieee80211_set_tx_power,
        .get_tx_power = ieee80211_get_tx_power,
 +      local->user_antenna_gain = 0;
        local->hw.uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
        local->hw.uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
-       local->user_power_level = IEEE80211_UNSET_POWER_LEVEL;
+       local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -574,6 +574,7 @@ const struct nla_policy nl80211_policy[N
-       [NL80211_ATTR_SAE_PASSWORD] = { .type = NLA_BINARY,
+@@ -624,6 +624,7 @@ const struct nla_policy nl80211_policy[N
                                        .len = SAE_PASSWORD_MAX_LEN },
        [NL80211_ATTR_TWT_RESPONDER] = { .type = NLA_FLAG },
+       [NL80211_ATTR_HE_OBSS_PD] = NLA_POLICY_NESTED(he_obss_pd_policy),
 +      [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
  };
  
  /* policy for the key attributes */
-@@ -2869,6 +2870,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -2988,6 +2989,20 @@ static int nl80211_set_wiphy(struct sk_b
                if (result)
                        return result;
        }