]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: track AP's extended MLD capa/ops
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 Apr 2026 09:06:57 +0000 (11:06 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 May 2026 12:49:01 +0000 (14:49 +0200)
For UHR multi-link power management, the driver/device needs
to know if the AP supports it, to be able to use it. Track
the AP's extended MLD capabilities and operations so it does.

Link: https://patch.msgid.link/20260428110915.e4038a00e4b2.I323686be5d4a73e8b962019a30d51309496b86a6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/mlme.c

index d909bc1b29ff08fe9fe771f54095b96db0221ae4..ba1723e624811e9753f83c1a34f931a3a661f2cb 100644 (file)
@@ -2674,6 +2674,8 @@ struct ieee80211_link_sta {
  * @epp_peer: indicates that the peer is an EPP peer.
  * @nmi: For NDI stations, pointer to the NMI station of the peer.
  * @nan_sched: NAN peer schedule for this station. Valid only for NMI stations.
+ * @ext_mld_capa_ops: the MLD's extended MLD capabilities and operations
+ *     NOTE: currently only tracked for AP STAs
  */
 struct ieee80211_sta {
        u8 addr[ETH_ALEN] __aligned(2);
@@ -2698,6 +2700,7 @@ struct ieee80211_sta {
        struct ieee80211_txq *txq[IEEE80211_NUM_TIDS + 1];
 
        u16 valid_links;
+       u16 ext_mld_capa_ops;
        bool epp_peer;
        struct ieee80211_link_sta deflink;
        struct ieee80211_link_sta __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS];
index f404dd0fce434702b67f74360eb25e787420f01a..6e81e29b8163d102535597ce8bb1ea9278fcde0f 100644 (file)
@@ -6461,6 +6461,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
        sta->sta.spp_amsdu = assoc_data->spp_amsdu;
 
        if (ieee80211_vif_is_mld(&sdata->vif)) {
+               if (!elems->ml_basic)
+                       goto out_err;
+
+               sta->sta.ext_mld_capa_ops =
+                       ieee80211_mle_get_ext_mld_capa_op((const void *)elems->ml_basic);
+
                for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++) {
                        if (!assoc_data->link[link_id].bss)
                                continue;