[RFC 10/30] driver: Add skeleton for ST command and events

Ilan Peer ilan.peer at intel.com
Wed Oct 21 06:43:28 PDT 2026


Add callbacks to request ST preparation, ST execution and ST abandon
and also the corresponding events.

Add feature flags to indicate driver support for SMD as a client and
SMD as an AP.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/drivers/driver.h        | 203 ++++++++++++++++++++++++++++++++++++
 src/drivers/driver_common.c |   4 +
 2 files changed, 207 insertions(+)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index e957a56ae093..f657246f49ff 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2623,6 +2623,10 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS2_ROC_ADDR_FILTER	0x0000002000000000ULL
 /** Driver supports adding OKC derived PMKID in (Re)Association Request frame */
 #define WPA_DRIVER_FLAGS2_OKC_PMKID_IN_ASSOC	0x0000004000000000ULL
+/** Driver supports SMD station functionality */
+#define WPA_DRIVER_FLAGS2_SMD_STA_SUPPORT	0x0000020000000000ULL
+/** Driver supports SMD AP functionality */
+#define WPA_DRIVER_FLAGS2_SMD_AP_SUPPORT	0x0000040000000000ULL
 	u64 flags2;
 /** Driver supports Security Profile element (IEEE P802.11bn/D2.0, 9.4.2.369
  * and 37.33) handling */
@@ -3588,6 +3592,84 @@ struct nan_peer_schedule_config {
 	} maps[MAX_NUM_NAN_MAPS];
 };
 
+/**
+ * struct st_prepare_params - ST Prepare parameters
+ *
+ * Parameters for the SMD Seamless Transition (ST) Prepare operation.
+ */
+struct st_prepare_params {
+	/**
+	 * target_ap_mld_addr - Target AP MLD address
+	 */
+	const u8 *target_ap_mld_addr;
+
+	/**
+	 * valid_links - The valid links including the association link
+	 */
+	u16 valid_links;
+
+	/**
+	 * mld_links - Link information
+	 *
+	 * Should include information on all the requested links.
+	 */
+	struct {
+		int freq;
+		const u8 *bssid;
+		const u8 *ies;
+		size_t ies_len;
+		int error;
+		bool disabled;
+	} mld_links[MAX_NUM_MLD_LINKS];
+
+	/**
+	 * ies - Extra information element(s) to add into the ST Prepare
+	 *	frames or %NULL
+	 */
+	const u8 *ies;
+
+	/**
+	 * ies_len - Length of ies in octets
+	 */
+	size_t ies_len;
+
+	/**
+	 * ext_mld_capa_ops - Extended MLD capabilities and operations
+	 */
+	u16 ext_mld_capa_ops;
+};
+
+/**
+ * struct st_execute_params - ST Execute parameters
+ *
+ * Parameters for the SMD Seamless Transition (ST) Execute operation.
+ */
+struct st_execute_params {
+	/**
+	 * target_ap_mld_addr - Target AP MLD address
+	 */
+	const u8 *target_ap_mld_addr;
+
+	/**
+	 * ies - Extra information element(s) to add into the ST Execute
+	 *	frames or %NULL
+	 */
+	const u8 *ies;
+
+	/**
+	 * ies_len - Length of ies in octets
+	 */
+	size_t ies_len;
+
+	/**
+	 * drain_tids - TID bitmap for downlink draining
+	 *
+	 * Bitmap of TIDs requested for draining. Set to 0xff for all TIDs.
+	 * A value of 0 means attribute is not sent (kernel defaults to all).
+	 */
+	u8 drain_tids;
+};
+
 /**
  * struct wpa_driver_ops - Driver interface API definition
  *
@@ -6033,6 +6115,31 @@ struct wpa_driver_ops {
 	 */
 	void (*stop_peer_measurement)(void *priv);
 #endif /* CONFIG_PR */
+
+	/**
+	 * st_prepare - Initiate SMD ST Prepare operation
+	 * @priv: Private driver interface data
+	 * @params: ST Prepare parameters
+	 * Returns: 0 on success, -1 on failure
+	 */
+	int (*st_prepare)(void *priv, struct st_prepare_params *params);
+
+	/**
+	 * st_execute - Initiate SMD ST Execute operation
+	 * @priv: Private driver interface data
+	 * @params: ST Execute parameters
+	 * Returns: 0 on success, -1 on failure
+	 */
+	int (*st_execute)(void *priv, struct st_execute_params *params);
+
+	/**
+	 * st_abandon - Abandon SMD ST operation
+	 * @priv: Private driver interface data
+	 * @addr: Target address
+	 * @local_only: If set, do not transmit a frame to the AP
+	 * Returns: 0 on success, -1 on failure
+	 */
+	int (*st_abandon)(void *priv, const u8 *addr, bool local_only);
 };
 
 /**
@@ -6764,6 +6871,39 @@ enum wpa_event_type {
 	 * is not exposed through this event interface.
 	 */
 	EVENT_ROAM_STATUS,
+
+	/**
+	 * EVENT_ST_PREP_STATUS - ST Prepare status notification
+	 *
+	 * This event is used to notify wpa_supplicant about the status of an
+	 * SMD Seamless Transition (ST) Prepare operation.
+	 */
+	EVENT_ST_PREP_STATUS,
+
+	/**
+	 * EVENT_ST_EXEC_STATUS - ST Execute status notification
+	 *
+	 * This event is used to notify wpa_supplicant about the status of
+	 * an SMD Seamless Transition (ST) Execute operation.
+	 */
+	EVENT_ST_EXEC_STATUS,
+
+	/**
+	 * EVENT_ST_DONE - SMD ST completed
+	 *
+	 * This event is used to notify wpa_supplicant that the SMD Seamless
+	 * Transition has been completed and the driver has switched to the
+	 * target AP MLD.
+	 */
+	EVENT_ST_DONE,
+
+	/**
+	 * EVENT_ST_ABANDONED - SMD ST preparation abandoned
+	 *
+	 * This event is used to notify wpa_supplicant that an SMD Seamless
+	 * Transition preparation has been abandoned by the driver.
+	 */
+	EVENT_ST_ABANDONED,
 };
 
 
@@ -7916,6 +8056,69 @@ union wpa_event_data {
 		u8 bssid[ETH_ALEN];
 		u8 ap_mld_addr[ETH_ALEN];
 	} roam_auth_status;
+
+	/**
+	 * struct st_prep_status_info - Data for EVENT_ST_PREP_STATUS
+	 * @ap_mld_addr: Target AP MLD address
+	 * @req_ie: Request frame elements (from NL80211_ATTR_REQ_IE)
+	 * @req_ie_len: Length of @req_ie
+	 * @resp_frame: Response frame (from NL80211_ATTR_FRAME), or %NULL
+	 *	if no response was received (timeout)
+	 * @resp_frame_len: Length of @resp_frame
+	 * @status: 0 if response received, -1 on timeout
+	 */
+	struct st_prep_status_info {
+		const u8 *ap_mld_addr;
+		const u8 *req_ie;
+		size_t req_ie_len;
+		const u8 *resp_frame;
+		size_t resp_frame_len;
+		int status;
+	} st_prep_status_info;
+
+	/**
+	 * struct st_exec_status_info - Data for EVENT_ST_EXEC_STATUS
+	 * @ap_mld_addr: Target AP MLD address
+	 * @resp_frame: Response frame (from NL80211_ATTR_FRAME), or %NULL
+	 *	if no response was received (timeout)
+	 * @resp_frame_len: Length of @resp_frame
+	 * @status: 0 if response received, -1 on timeout
+	 * @links: Bitmap of accepted link IDs for the transition
+	 * @link_info: Per-link BSSID and local address information
+	 */
+	struct st_exec_status_info {
+		const u8 *ap_mld_addr;
+		const u8 *resp_frame;
+		size_t resp_frame_len;
+		int status;
+		u16 links;
+		struct {
+			u8 bssid[ETH_ALEN];
+			u8 addr[ETH_ALEN];
+		} link_info[MAX_NUM_MLD_LINKS];
+	} st_exec_status_info;
+
+	/**
+	 * struct st_done_info - Data for EVENT_ST_DONE
+	 * @ap_mld_addr: Target AP MLD address that was transitioned to
+	 * @valid_links: Bitmap of valid link IDs after the transition
+	 * @links: Per-link BSSID information
+	 */
+	struct st_done_info {
+		const u8 *ap_mld_addr;
+		u16 valid_links;
+		struct {
+			u8 bssid[ETH_ALEN];
+		} links[MAX_NUM_MLD_LINKS];
+	} st_done_info;
+
+	/**
+	 * struct st_abandoned_info - Data for EVENT_ST_ABANDONED
+	 * @ap_mld_addr: Target AP MLD address of the abandoned preparation
+	 */
+	struct st_abandoned_info {
+		const u8 *ap_mld_addr;
+	} st_abandoned_info;
 };
 
 /**
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
index aa586083e189..b2ecad77697c 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -111,6 +111,10 @@ const char * event_to_string(enum wpa_event_type event)
 	E2S(PEER_MEASUREMENT_RESULT);
 	E2S(PEER_MEASUREMENT_COMPLETE);
 	E2S(ROAM_STATUS);
+	E2S(ST_PREP_STATUS);
+	E2S(ST_EXEC_STATUS);
+	E2S(ST_DONE);
+	E2S(ST_ABANDONED);
 	}
 
 	return "UNKNOWN";
-- 
2.55.0




More information about the Hostap mailing list