IEEE P802.11bn/D2.0, Aug 2026, subclause 11.3.1, defines three new MLD state sub-states (4a, 4b, 4c) that apply when a non-AP MLD and its associated SMD-ME are in state 4 and an ST is in progress. Add the corresponding nl80211 STA flags to track the state changes: - NL80211_STA_FLAG_ST_PREPARED - State 4a: non-AP MLD is prepared with target AP MLD - NL80211_STA_FLAG_ST_EXECUTING - State 4b: ST execution active on current AP MLD - NL80211_STA_FLAG_ST_DL_DRAIN - State 4c: DL draining period Signed-off-by: Pooventhiran G --- include/uapi/linux/nl80211.h | 19 +++++++++++++++++++ net/wireless/nl80211.c | 25 ++++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index ed64aeb13ed2..5ef6f704be0f 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -418,6 +418,17 @@ * * Userspace indicate that the non-AP MLD has negotiated SMD with the AP MLD * by setting %NL80211_ATTR_SMD in %NL80211_CMD_NEW_STATION. + * + * When a non-AP MLD undergoes ST, userspace can indicate the current state of + * ST at the current AP MLD and target AP MLD using the STA flags + * %NL80211_STA_FLAG_ST_PREPARED, %NL80211_STA_FLAG_ST_EXECUTING, and + * %NL80211_STA_FLAG_ST_DL_DRAIN. + * %NL80211_STA_FLAG_ST_PREPARED can be set in %NL80211_CMD_NEW_STATION + * on the target AP MLD while creating the station entry. Drivers must + * keep these links in powersave at this point until successful + * ST Execution. + * %NL80211_STA_FLAG_ST_{EXECUTING,DL_DRAIN}, on the other hand, can be + * set using %NL80211_CMD_SET_STATION on the current AP MLD. */ /** @@ -4121,6 +4132,11 @@ enum nl80211_iftype { * previously added station into associated state * @NL80211_STA_FLAG_SPP_AMSDU: station supports SPP A-MSDUs * @NL80211_STA_FLAG_CIP: station has Control Integrity Protocol (CIP) enabled + * @NL80211_STA_FLAG_ST_PREPARED: station is prepared at target AP MLD + * (State 4a). + * @NL80211_STA_FLAG_ST_EXECUTING: current AP MLD is executing ST (State 4b). + * @NL80211_STA_FLAG_ST_DL_DRAIN: current AP MLD is in DL draining period + * (State 4c). * @NL80211_STA_FLAG_MAX: highest station flag number currently defined * @__NL80211_STA_FLAG_AFTER_LAST: internal use */ @@ -4135,6 +4151,9 @@ enum nl80211_sta_flags { NL80211_STA_FLAG_ASSOCIATED, NL80211_STA_FLAG_SPP_AMSDU, NL80211_STA_FLAG_CIP, + NL80211_STA_FLAG_ST_PREPARED, + NL80211_STA_FLAG_ST_EXECUTING, + NL80211_STA_FLAG_ST_DL_DRAIN, /* keep last */ __NL80211_STA_FLAG_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 003e7dae87f9..f15ddf5a94a6 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -8020,6 +8020,9 @@ static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = { [NL80211_STA_FLAG_MFP] = { .type = NLA_FLAG }, [NL80211_STA_FLAG_AUTHENTICATED] = { .type = NLA_FLAG }, [NL80211_STA_FLAG_TDLS_PEER] = { .type = NLA_FLAG }, + [NL80211_STA_FLAG_ST_PREPARED] = { .type = NLA_FLAG }, + [NL80211_STA_FLAG_ST_EXECUTING] = { .type = NLA_FLAG }, + [NL80211_STA_FLAG_ST_DL_DRAIN] = { .type = NLA_FLAG }, }; static int parse_station_flags(struct genl_info *info, @@ -8086,11 +8089,16 @@ static int parse_station_flags(struct genl_info *info, switch (iftype) { case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP_VLAN: + params->sta_flags_mask = + BIT(NL80211_STA_FLAG_ST_PREPARED) | + BIT(NL80211_STA_FLAG_ST_EXECUTING) | + BIT(NL80211_STA_FLAG_ST_DL_DRAIN); + fallthrough; case NL80211_IFTYPE_P2P_GO: - params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHORIZED) | - BIT(NL80211_STA_FLAG_SHORT_PREAMBLE) | - BIT(NL80211_STA_FLAG_WME) | - BIT(NL80211_STA_FLAG_MFP); + params->sta_flags_mask |= BIT(NL80211_STA_FLAG_AUTHORIZED) | + BIT(NL80211_STA_FLAG_SHORT_PREAMBLE) | + BIT(NL80211_STA_FLAG_WME) | + BIT(NL80211_STA_FLAG_MFP); break; case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_STATION: @@ -9298,7 +9306,7 @@ int cfg80211_check_station_change(struct wiphy *wiphy, return -EINVAL; /* When you run into this, adjust the code below for the new flag */ - BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 9); + BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 12); switch (statype) { case CFG80211_STA_MESH_PEER_KERNEL: @@ -9393,7 +9401,10 @@ int cfg80211_check_station_change(struct wiphy *wiphy, BIT(NL80211_STA_FLAG_WME) | BIT(NL80211_STA_FLAG_MFP) | BIT(NL80211_STA_FLAG_SPP_AMSDU) | - BIT(NL80211_STA_FLAG_CIP))) + BIT(NL80211_STA_FLAG_CIP) | + BIT(NL80211_STA_FLAG_ST_PREPARED) | + BIT(NL80211_STA_FLAG_ST_EXECUTING) | + BIT(NL80211_STA_FLAG_ST_DL_DRAIN))) return -EINVAL; /* but authenticated/associated only if driver handles it */ @@ -10096,7 +10107,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) return -EINVAL; /* When you run into this, adjust the code below for the new flag */ - BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 9); + BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 12); switch (wdev->iftype) { case NL80211_IFTYPE_AP: -- 2.34.1