]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211: support configuration of S1G station capabilities
authorLachlan Hodges <lachlan.hodges@morsemicro.com>
Tue, 17 Jun 2025 08:06:07 +0000 (18:06 +1000)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Jun 2025 13:19:28 +0000 (15:19 +0200)
Currently there is no support for initialising a peers S1G capabilities,
this patch adds support for configuring an S1G station.

Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20250617080610.756048-2-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c

index 0003733b1e77082aa7fcaa91f052dc233e34bff6..4a092da3a9de80df62e9c0e8792377a7bf65c739 100644 (file)
@@ -560,7 +560,7 @@ struct ieee80211_sta_s1g_cap {
  * @vht_cap: VHT capabilities in this band
  * @s1g_cap: S1G capabilities in this band
  * @edmg_cap: EDMG capabilities in this band
- * @s1g_cap: S1G capabilities in this band (S1B band only, of course)
+ * @s1g_cap: S1G capabilities in this band (S1G band only, of course)
  * @n_iftype_data: number of iftype data entries
  * @iftype_data: interface type data entries.  Note that the bits in
  *     @types_mask inside this structure cannot overlap (i.e. only
@@ -1653,6 +1653,7 @@ struct sta_txpwr {
  * @he_6ghz_capa: HE 6 GHz Band capabilities of station
  * @eht_capa: EHT capabilities of station
  * @eht_capa_len: the length of the EHT capabilities
+ * @s1g_capa: S1G capabilities of station
  */
 struct link_station_parameters {
        const u8 *mld_mac;
@@ -1671,6 +1672,7 @@ struct link_station_parameters {
        const struct ieee80211_he_6ghz_capa *he_6ghz_capa;
        const struct ieee80211_eht_cap_elem *eht_capa;
        u8 eht_capa_len;
+       const struct ieee80211_s1g_cap *s1g_capa;
 };
 
 /**
index 70bfe2bfdcc7137a250b92736e8235ac8b63da7b..70ca74a75f228d27057d0fdf4b13bd2fba3f2536 100644 (file)
@@ -7856,6 +7856,10 @@ static int nl80211_set_station_tdls(struct genl_info *info,
                }
        }
 
+       if (info->attrs[NL80211_ATTR_S1G_CAPABILITY])
+               params->link_sta_params.s1g_capa =
+                       nla_data(info->attrs[NL80211_ATTR_S1G_CAPABILITY]);
+
        err = nl80211_parse_sta_channel_info(info, params);
        if (err)
                return err;
@@ -8182,6 +8186,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
                params.link_sta_params.he_6ghz_capa =
                        nla_data(info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]);
 
+       if (info->attrs[NL80211_ATTR_S1G_CAPABILITY])
+               params.link_sta_params.s1g_capa =
+                       nla_data(info->attrs[NL80211_ATTR_S1G_CAPABILITY]);
+
        if (info->attrs[NL80211_ATTR_OPMODE_NOTIF]) {
                params.link_sta_params.opmode_notif_used = true;
                params.link_sta_params.opmode_notif =