Skip to content

wifi: Add Seamless Mobility Domain (SMD) AP support

Pooventhiran G linux-wireless lkml 5 versions – In review

Get series with b4
b4 am [email protected] change-id 20260908-smd-16986850d725

Versions newest first

  1. v4 Latest21 patches 46 repliesIn review
  2. v321 patches 0 repliesSuperseded
  3. v216 patches 13 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v1 posting 2/218 patches11 repliesSuperseded
v1 posting 1/218 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Fixed clang warning in ieee80211_tx_h_smd_state
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21wifi: nl80211: define Seamless Mobility Domain (SMD) device capabilityinclude/net/cfg80211.h include/uapi/linux/nl80211.h net/wireless/nl80211.c+35 -05 replies
2/21wifi: nl80211/cfg80211: define interfaces for SMD setup and STA updateinclude/net/cfg80211.h include/uapi/linux/nl80211.h net/wireless/nl80211.c+86 -71 reply
3/21wifi: nl80211: add SMD BSS Transition sub-state STA flagsinclude/uapi/linux/nl80211.h net/wireless/nl80211.c+32 -43 replies
4/21wifi: cfg80211: define layouts for SMD BSS Transition contextinclude/net/cfg80211.h+82 -04 replies
5/21wifi: nl80211: define interfaces for SMD BSS Transition context transferinclude/uapi/linux/nl80211.h net/wireless/nl80211.c+238 -02 replies
6/21wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checksinclude/linux/ieee80211-uhr.h+125 -00 replies
7/21wifi: ieee80211: define API to check if frame is class 3include/linux/ieee80211.h+43 -00 replies
8/21wifi: nl80211/cfg80211: pack SMD dynamic context along with frameinclude/net/cfg80211.h net/wireless/nl80211.c+298 -17 replies
9/21wifi: nl80211/cfg80211: add support for SMD context programminginclude/net/cfg80211.h net/wireless/nl80211.c net/wireless/rdev-ops.h +1 more+403 -04 replies
10/21wifi: nl80211/cfg80211: add support for querying SMD context for target AP MLDinclude/net/cfg80211.h net/wireless/core.c net/wireless/mlme.c +4 more+295 -44 replies
11/21wifi: nl80211/cfg80211: define API to notify SMD Drain completioninclude/net/cfg80211.h include/uapi/linux/nl80211.h net/wireless/mlme.c +2 more+68 -04 replies
12/21wifi: mac80211: set SMD parameters for AP setup and STA updateinclude/net/mac80211.h net/mac80211/cfg.c net/mac80211/debugfs_sta.c +1 more+20 -00 replies
13/21wifi: mac80211: apply SMD BSS Transition STA sub-statesnet/mac80211/cfg.c net/mac80211/debugfs_sta.c net/mac80211/sta_info.h+71 -02 replies
14/21wifi: mac80211: add driver_op for SMD substate changesinclude/net/mac80211.h net/mac80211/cfg.c net/mac80211/driver-ops.c +4 more+284 -134 replies
15/21wifi: mac80211: filter uplink and downlink frames based on SMD statesnet/mac80211/drop.h net/mac80211/rx.c net/mac80211/tx.c+87 -00 replies
16/21wifi: mac80211: send BlockAck policy in AMPDU actioninclude/net/mac80211.h net/mac80211/agg-rx.c net/mac80211/trace.h+21 -32 replies
17/21wifi: mac80211: pass rx_data directly from ieee80211_rx_list()net/mac80211/rx.c+30 -300 replies
18/21wifi: mac80211: handle UHR Link Reconfiguration frameinclude/net/mac80211.h net/mac80211/ieee80211_i.h net/mac80211/rx.c+47 -10 replies
19/21wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTXinclude/net/mac80211.h net/mac80211/cfg.c net/mac80211/driver-ops.h +1 more+95 -00 replies
20/21wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTXinclude/net/mac80211.h net/mac80211/cfg.c net/mac80211/driver-ops.h +2 more+112 -02 replies
21/21wifi: mac80211: define API to invoke SMD Drain Completion eventinclude/net/mac80211.h net/mac80211/cfg.c+34 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH wireless-next v4 00/21] wifi: Add Seamless Mobility Domain (SMD) AP support

IEEE P802.11bn introduces the Seamless Mobility Domain (SMD) - a mobility domain uniquely identified by the SMD identifier MAC address - where a non-AP MLD that is associated to the SMD Management Entity (SMD-ME) can transition from its current AP MLD to a non-colocated target AP MLD without requiring reassociation via SMD BSS Transition (ST) procedure.

This series implements the nl80211, cfg80211, and mac80211 support for SMD BSS Transition in AP mode. Along with a summary of the ST procedure, the design of this series and patch structure are presented below.

The ST procedure broadly involves
- ST Discovery and association to SMD-ME
- ST Preparation
- ST Execution and Downlink Draining
- ST Context

The communication between the current AP MLD and target AP MLD are via Inter-AP (IAP) communication (solicited and unsolicited) over the backhaul which is managed entirely within userspace (hostapd) - as per the discussions on the RFC [1].

The IEEE standard defines only the type of data that may be exchanged via IAP but does not define the format and method of the IAP communication protocol and keeps it out of scope (subclause 37.16.9). So, those details are not part of this series.

ST Discovery and association to SMD-ME (subclauses 37.16.2 through 37.16.4)
===========================================================================
A non-AP MLD may use techniques like active scanning, neighbor reports, or BSS Transition Management to discover the neighboring SMD AP MLDs. Once discoverred, the non-AP MLD can perform authentication and association with the SMD-ME and negotiate SMD capabilities. While generating PTK, based on SMD PTK mode, either SMD Identifier is involved in the PTK formula or only SMD KDK is generated.

- This series supports configuring an AP MLD as managed by an SMD-ME with attributes such as SMD Identifier, SMD Preparation Timeout, SMD Type, PTK Mode, etc., via NL80211_CMD_START_AP.
- This series supports managing the associated non-AP MLD that has negotiated SMD via NL80211_CMD_NEW_STATION and NL80211_CMD_CHANGE_STATION.

ST Preparation (subclauses 37.16.5 and 37.16.6)
===============================================
The current AP MLD and non-AP MLD can use BTM frames to select a target AP MLD that the non-AP MLD can transition to. Once the target is selected, the ST procedure is invoked in two phases: ST Preparation and ST Execution.

The non-AP MLD sends an ST Preparation Request (UHR Link Reconfiguration Request frame to with Type set to ST Preparation and Per-STA Profile subelements of the setup links for the target AP MLD carried in a Reconfiguration Multi-Link element) to the current AP MLD.

On reception of this frame, the current AP MLD collects the non-AP MLD's dynamic sesion context and attach it to the same frame while delivering it to userspace. Userspace then sends this information as an IAP message to the target AP MLD. If Per-AP MLD PTK mode is used, DH key exchange happens in ST Preparation to derive the new PTK at the target AP MLD.

The target, once processed the message, will set up the links as rquested and sends back the ST Preparation Response so that the current AP MLD can send the ST Preparation Response (UHR Link Reconfiguration Response frame with Type set to ST Preparation and statuses for each setup link) to the non-AP MLD.

- This series defines the layout for STA's dynamic context and supports reporting the driver-attached STA's dynamic context along with the frame via NL80211_CMD_FRAME event (this avoids roundtrips between driver and userspace to separately request context for the recently received frame).
- The target AP MLD leverages the existing flows to set up the links (NONE -> AUTH -> ASSOC).
- This series supports moving the STA to the prepared state (4a) via the new STA flags (subclause 11.3.1).
- This series supports programming the STA's dynamic context via NL80211_CMD_SET_CTX on the target AP MLD.

NOTE:
(a) While implementing the suggestion to follow the approach similar to how radiotap headers are attached to the SKB, for tagging the STA's dynamic context to the frame SKB from driver to mac80211, an alternative approach was found.
(b) This reserves a new field in &struct ieee80211_rx_status as part of an existing union (please see this patch [2]). Since this was simpler than _pushing_ the context pointer to the frame SKB and _pulling_ back, this series follows this approach.

ST Execution and Downlink Draining (subclauses 37.16.7, 37.16.8, and 37.16.10)
==============================================================================
When the non-AP STA is ready to transition to the target AP MLD that it has already been prepared with, it can send the ST Execution Request (UHR Link Reconfiguration Request frame with Type set to ST Execution) in two ways:

Via the current AP MLD
----------------------
This path traces a similar flow to ST Preparation for context collection and reporting to userspace of the current AP MLD, transport to the target AP MLD, and ST Execution Response back to the current AP MLD and non-AP MLD. If there is a Nominal Maximum DL Draining Period Duration field is present in the ST Execution Response, the current AP MLD may start the DL draining period to drain the pendign buffered frames to the non-AP MLD.

- This series supports moving the non-AP MLD to the execution in-progress state (state 4b) via the new STA flags on the current AP MLD
upon reception of the ST Execution Rquest.
- This series supports moving the non-AP MLD to the DL draining started state (state 4c) via the new STA flags on the current AP MLD and implements proper validation for these flags as they are mutually exclusive.

Upon successful ST Execution, the non-AP MLD moves to the authorized state (state 4) on the target AP MLD and the unauthenticated and unassociated state (state 1) on the current AP MLD, without reassociation.

Via the target AP MLD
---------------------
The non-AP MLD might send the ST Execution Request directly to the target AP MLD when the current AP MLD links are not reliable (RSSI drops after ST Preparation, etc.,).

When the target AP MLD receives such a frame, it cannot collect the STA's dynamic context. Hence, the context is requested from the current AP MLD via IAP and then programmed on the target AP MLD. There is no DL draining in this path.

- This series supports fetching of context on the current AP MLD on behalf of the target AP MLD via NL80211_CMD_GET_SMD_CTX and NL80211_CMD_SMD_CTX_EVENT.

ST Context (subclause 37.16.9)
==============================
The following information are part of the STA's dynamic context and transferred from the current AP MLD to the target AP MLD during ST Preparation and ST Execution:
- Block-ack parameters and timeout per TID
- Next DL sequence numbers per TID
- Duplicate receiver cache entries
- Replay counters
- Starting PN for DL individually addressed frames
- SCS stream descriptors
- MSCS Descriptor
- EPCS authorization info and priority access state
- WinStartO for existing DL block-ack agreements

The non-AP STA may optionally request that sequence numbers not be transferred (to reset SN at the target AP MLD).

This series suporting the SMD BSS Transition is structured as:
- nl80211/cfg80211 set of patches followed by their corresponding mac80211 set of patches.
- nl80211/cfg80211: patches 1 to 11
- mac80211: patches 12 to 21

[1] RFC: https://lore.kernel.org/linux-wireless/[email protected]/
[2] Patch ("wifi: mac80211: handle UHR Link Reconfiguration frame")

---
Changes in v4:
- Fixed clang warning in ieee80211_tx_h_smd_state
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Replaced deprecated dev_{hold,put} APIs with netdev_{hold,put} APIs.
- Split and sorted the patches to list all nl80211/cfg80211 set of patches followed by mac80211 set of patches.
- Relocated context layout and cleaned up driver context with standard fields defined - ("wifi: cfg80211: define layouts for SMD BSS Transition context").
- Split ("wifi: mac80211: handle UHR Link Reconfiguration frame") to
pass @rx directly from ieee80211_rx_list() in ("wifi: mac80211: pass rx_data directly from ieee80211_rx_list()").
- Added nl80211 DOC for AP SMD operations in corresponding patches.
- Added SMD state based frame filtering in ("wifi: mac80211: filter uplink and downlink frames based on SMD states").
- Added DL Drain early termination event support in ("wifi: mac80211:
define API to invoke SMD Drain Completion event").
- Fixed up commit texts and kdocs because of patch reorder.
- Rebased on top of the latest snapshot.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Replaced SKB extension with a mac80211-contained solution using ieee80211_rx_status to forward the ST Preparation and Execution frames along with the context.
- Fixed cover letter, commit text, and kdocs to clean up the AI-suggested style and words.
- Fixed the build failure from v1.
- Rebased onto a latest snapshot of wireless-next (6c0b7357e3c7f365ec51dd8d2b626130ee983ce1).

v1: https://lore.kernel.org/all/[email protected]/

---
Aditya Sathish (1):
wifi: nl80211/cfg80211: define interfaces for SMD setup and STA update

Pooventhiran G (19):
wifi: nl80211: define Seamless Mobility Domain (SMD) device capability
wifi: nl80211: add SMD BSS Transition sub-state STA flags
wifi: cfg80211: define layouts for SMD BSS Transition context
wifi: nl80211: define interfaces for SMD BSS Transition context transfer
wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks
wifi: ieee80211: define API to check if frame is class 3
wifi: nl80211/cfg80211: pack SMD dynamic context along with frame
wifi: nl80211/cfg80211: add support for SMD context programming
wifi: nl80211/cfg80211: add support for querying SMD context for target AP MLD
wifi: nl80211/cfg80211: define API to notify SMD Drain completion
wifi: mac80211: apply SMD BSS Transition STA sub-states
wifi: mac80211: add driver_op for SMD substate changes
wifi: mac80211: filter uplink and downlink frames based on SMD states
wifi: mac80211: send BlockAck policy in AMPDU action
wifi: mac80211: pass rx_data directly from ieee80211_rx_list()
wifi: mac80211: handle UHR Link Reconfiguration frame
wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTX
wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTX
wifi: mac80211: define API to invoke SMD Drain Completion event

Rohan Dutta (1):
wifi: mac80211: set SMD parameters for AP setup and STA update

 include/linux/ieee80211-uhr.h | 125 ++++++
 include/linux/ieee80211.h     |  43 ++
 include/net/cfg80211.h        | 186 +++++++++
 include/net/mac80211.h        |  96 ++++-
 include/uapi/linux/nl80211.h  | 254 ++++++++++++
 net/mac80211/agg-rx.c         |   1 +
 net/mac80211/cfg.c            | 189 +++++++++
 net/mac80211/debugfs_sta.c    |   4 +
 net/mac80211/driver-ops.c     |  24 ++
 net/mac80211/driver-ops.h     |  54 +++
 net/mac80211/drop.h           |   1 +
 net/mac80211/ieee80211_i.h    |   2 +
 net/mac80211/rx.c             | 140 +++++--
 net/mac80211/sta_info.c       | 146 +++++++
 net/mac80211/sta_info.h       |  19 +
 net/mac80211/trace.h          | 104 ++++-
 net/mac80211/tx.c             |  42 ++
 net/wireless/core.c           |  25 ++
 net/wireless/mlme.c           |  41 ++
 net/wireless/nl80211.c        | 930 +++++++++++++++++++++++++++++++++++++++++-
 net/wireless/nl80211.h        |  12 +
 net/wireless/rdev-ops.h       |  28 ++
 net/wireless/trace.h          |  61 +++
 23 files changed, 2485 insertions(+), 42 deletions(-)

---
base-commit: b8e5b0ae8ff47240366d38e5d12c65f878724316
change-id: 20260908-smd-16986850d725

Best regards,