From: Pooventhiran G <pooventhiran.g@oss.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
pooventhiran.g@oss.qualcomm.com
Subject: [PATCH wireless-next v4 03/21] wifi: nl80211: add SMD BSS Transition sub-state STA flags
Date: Fri, 06 Nov 2026 13:28:40 +0530 [thread overview]
Message-ID: <20261106-smd-v4-3-62e39487f51a@oss.qualcomm.com> (raw)
In-Reply-To: <20261106-smd-v4-0-62e39487f51a@oss.qualcomm.com>
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 SMD BSS Transition is
in progress.
Add the corresponding nl80211 STA flags to track the state changes:
- NL80211_STA_FLAG_SMD_PREP_TARGET - State 4a: non-AP MLD is prepared
with target AP MLD
- NL80211_STA_FLAG_SMD_EXEC_CURRENT - State 4b: ST execution active on
current AP MLD
- NL80211_STA_FLAG_SMD_DL_DRAIN - State 4c: DL draining period
Signed-off-by: Pooventhiran G <pooventhiran.g@oss.qualcomm.com>
---
include/uapi/linux/nl80211.h | 18 ++++++++++++++++++
net/wireless/nl80211.c | 18 ++++++++++++++----
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index cfc1bcad13f0..81c16ea2fd34 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -366,6 +366,15 @@
* the AP MLD. %NL80211_ATTR_SMD_ROAM_STA is also set on the target AP MLD
* to indicate that it is part of ST Preparation; drivers must keep these
* links in powersave at this point until successful ST Execution.
+ *
+ * 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_SMD_PREP_TARGET, %NL80211_STA_FLAG_SMD_EXEC_CURRENT, and
+ * %NL80211_STA_FLAG_SMD_DL_DRAIN.
+ * %NL80211_STA_FLAG_SMD_PREP_TARGET can be set in %NL80211_CMD_NEW_STATION
+ * on the target AP MLD while creating the station entry.
+ * %NL80211_STA_FLAG_SMD_{EXEC_CURRENT,DL_DRAIN}, on the other hand, can be
+ * set using %NL80211_CMD_SET_STATION on the current AP MLD.
*/
/**
@@ -4035,6 +4044,12 @@ enum nl80211_iftype {
* @NL80211_STA_FLAG_SPP_AMSDU: station supports SPP A-MSDUs
* @NL80211_STA_FLAG_CIP: station has Control Integrity Protocol (CIP) enabled
* @NL80211_STA_FLAG_SMD: station has negotiated SMD.
+ * @NL80211_STA_FLAG_SMD_PREP_TARGET: station is prepared at SMD target AP MLD
+ * (State 4a).
+ * @NL80211_STA_FLAG_SMD_EXEC_CURRENT: current AP MLD is executing SMD BSS
+ * Transition (State 4b).
+ * @NL80211_STA_FLAG_SMD_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
*/
@@ -4050,6 +4065,9 @@ enum nl80211_sta_flags {
NL80211_STA_FLAG_SPP_AMSDU,
NL80211_STA_FLAG_CIP,
NL80211_STA_FLAG_SMD,
+ NL80211_STA_FLAG_SMD_PREP_TARGET,
+ NL80211_STA_FLAG_SMD_EXEC_CURRENT,
+ NL80211_STA_FLAG_SMD_DL_DRAIN,
/* keep last */
__NL80211_STA_FLAG_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b06772ec8ac5..5df145ab4ab1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8025,6 +8025,9 @@ static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = {
[NL80211_STA_FLAG_AUTHENTICATED] = { .type = NLA_FLAG },
[NL80211_STA_FLAG_TDLS_PEER] = { .type = NLA_FLAG },
[NL80211_STA_FLAG_SMD] = { .type = NLA_FLAG },
+ [NL80211_STA_FLAG_SMD_PREP_TARGET] = { .type = NLA_FLAG },
+ [NL80211_STA_FLAG_SMD_EXEC_CURRENT] = { .type = NLA_FLAG },
+ [NL80211_STA_FLAG_SMD_DL_DRAIN] = { .type = NLA_FLAG },
};
static int parse_station_flags(struct genl_info *info,
@@ -8091,7 +8094,11 @@ 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_SMD);
+ params->sta_flags_mask =
+ BIT(NL80211_STA_FLAG_SMD) |
+ BIT(NL80211_STA_FLAG_SMD_PREP_TARGET) |
+ BIT(NL80211_STA_FLAG_SMD_EXEC_CURRENT) |
+ BIT(NL80211_STA_FLAG_SMD_DL_DRAIN);
fallthrough;
case NL80211_IFTYPE_P2P_GO:
params->sta_flags_mask |= BIT(NL80211_STA_FLAG_AUTHORIZED) |
@@ -9308,7 +9315,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 != 10);
+ BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 13);
switch (statype) {
case CFG80211_STA_MESH_PEER_KERNEL:
@@ -9404,7 +9411,10 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
BIT(NL80211_STA_FLAG_MFP) |
BIT(NL80211_STA_FLAG_SPP_AMSDU) |
BIT(NL80211_STA_FLAG_CIP) |
- BIT(NL80211_STA_FLAG_SMD)))
+ BIT(NL80211_STA_FLAG_SMD) |
+ BIT(NL80211_STA_FLAG_SMD_PREP_TARGET) |
+ BIT(NL80211_STA_FLAG_SMD_EXEC_CURRENT) |
+ BIT(NL80211_STA_FLAG_SMD_DL_DRAIN)))
return -EINVAL;
/* but authenticated/associated only if driver handles it */
@@ -10128,7 +10138,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 != 10);
+ BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 13);
switch (wdev->iftype) {
case NL80211_IFTYPE_AP:
--
2.34.1
next prev parent reply other threads:[~2026-11-06 7:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 7:58 [PATCH wireless-next v4 00/21] wifi: Add Seamless Mobility Domain (SMD) AP support Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 01/21] wifi: nl80211: define Seamless Mobility Domain (SMD) device capability Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 02/21] wifi: nl80211/cfg80211: define interfaces for SMD setup and STA update Pooventhiran G
2026-11-06 7:58 ` Pooventhiran G [this message]
2026-11-06 7:58 ` [PATCH wireless-next v4 04/21] wifi: cfg80211: define layouts for SMD BSS Transition context Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 05/21] wifi: nl80211: define interfaces for SMD BSS Transition context transfer Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 06/21] wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 07/21] wifi: ieee80211: define API to check if frame is class 3 Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 08/21] wifi: nl80211/cfg80211: pack SMD dynamic context along with frame Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 09/21] wifi: nl80211/cfg80211: add support for SMD context programming Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 10/21] wifi: nl80211/cfg80211: add support for querying SMD context for target AP MLD Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 11/21] wifi: nl80211/cfg80211: define API to notify SMD Drain completion Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 12/21] wifi: mac80211: set SMD parameters for AP setup and STA update Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 13/21] wifi: mac80211: apply SMD BSS Transition STA sub-states Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 14/21] wifi: mac80211: add driver_op for SMD substate changes Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 15/21] wifi: mac80211: filter uplink and downlink frames based on SMD states Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 16/21] wifi: mac80211: send BlockAck policy in AMPDU action Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 17/21] wifi: mac80211: pass rx_data directly from ieee80211_rx_list() Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 18/21] wifi: mac80211: handle UHR Link Reconfiguration frame Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 19/21] wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTX Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 20/21] wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTX Pooventhiran G
2026-11-06 7:58 ` [PATCH wireless-next v4 21/21] wifi: mac80211: define API to invoke SMD Drain Completion event Pooventhiran G
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261106-smd-v4-3-62e39487f51a@oss.qualcomm.com \
--to=pooventhiran.g@oss.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®