wifi: mac80211: track AP's extended MLD capa/ops

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>
This commit is contained in:
Johannes Berg 2026-04-28 11:06:57 +02:00
parent 32ae6c6f7b
commit 6765bc7429
2 changed files with 9 additions and 0 deletions

View 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];

View 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;