[PATCH wireless-next] wifi: cfg80211: add SMD Transition offload support for driver-initiated ST

From: Veerendranath Jakkam

Date: Fri Dec 04 2026 - 03:33:11 EST


Add support for a driver that can perform an SMD (Seamless Mobility
Domain) Transition (ST) between AP MLDs of the same SMD entirely on
its own, e.g. in response to a BTM request.

Add NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD for drivers to advertise
this capability to userspace; it requires MLO support. Such a
transition is a roam the driver performed by itself, so it is reported
via the existing, generic cfg80211_roamed(), like any other
driver-initiated roam. Add struct cfg80211_smd_resp_params, embedded
in cfg80211_roam_info as "smd", with the four ST frames' elements
(dedicated fields, not reusing req_ie/resp_ie, which remain
association-only) and, for Per-AP MLD PTK mode, the new PTK's
KCK/KEK. cfg80211_roamed()'s existing BSS handling covers this case
unchanged.

For Per-AP MLD PTK mode the driver needs the SMD_KDK (SMD Key
Derivation Key) to derive the new PTK itself. Add a smd_kdk/smd_kdk_len
pair to struct key_params and NL80211_KEY_SMD_KDK, so it can be
configured together with the pairwise key via %NL80211_CMD_NEW_KEY at
the initial SMD-level association, mirroring NL80211_KEY_LTF_SEED.

Add NL80211_ATTR_SMD_SUPPORT, a flag attribute for
NL80211_CMD_CONNECT with which userspace indicates that it supports
SMD-level (re)association to an SMD-ME (SMD Mobility Entity), mapped
to CONNECT_REQ_SMD_SUPPORT in the connect request flags. Drivers must
not perform an SMD-level (re)association unless it is set. Since SMD
requires MLO, reject it unless NL80211_ATTR_MLO_SUPPORT is also given.

Add nl80211 attributes NL80211_ATTR_PTK_KCK, NL80211_ATTR_PTK_KEK,
NL80211_ATTR_ST_PREP_REQ_IE, NL80211_ATTR_ST_PREP_RESP_IE,
NL80211_ATTR_ST_EXEC_REQ_IE and NL80211_ATTR_ST_EXEC_RESP_IE, carried
in %NL80211_CMD_ROAM for the driver-initiated ST.

Signed-off-by: Veerendranath Jakkam <veerendranath.jakkam@xxxxxxxxxxxxxxxx>
---
include/net/cfg80211.h | 65 ++++++++++++++++++++++++++++++++++++++++++
include/uapi/linux/nl80211.h | 67 ++++++++++++++++++++++++++++++++++++++++++++
net/wireless/core.c | 5 ++++
net/wireless/nl80211.c | 57 +++++++++++++++++++++++++++++++++++--
net/wireless/sme.c | 47 ++++++++++++++++++++++++++++++-
net/wireless/util.c | 13 +++++++++
6 files changed, 251 insertions(+), 3 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c166f97dcf81..250a26893f9c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -832,6 +832,12 @@ struct vif_params {
* @mode: key install mode (RX_TX, NO_TX or SET_TX)
* @ltf_keyseed: LTF key seed material
* @ltf_keyseed_len: length of LTF key seed material
+ * @smd_kdk: SMD_KDK (SMD Key Derivation Key) material, installed together
+ * with the pairwise key (TK) at the initial SMD-level association when
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD is set and Per-AP MLD PTK
+ * mode is used, so the driver can derive a new PTK for a target AP MLD
+ * itself during a driver-initiated SMD Transition
+ * @smd_kdk_len: length of @smd_kdk
*/
struct key_params {
const u8 *key;
@@ -843,6 +849,8 @@ struct key_params {
enum nl80211_key_mode mode;
const u8 *ltf_keyseed;
size_t ltf_keyseed_len;
+ const u8 *smd_kdk;
+ size_t smd_kdk_len;
};

/**
@@ -3412,6 +3420,12 @@ struct cfg80211_ml_reconf_req {
* @ASSOC_REQ_DISABLE_UHR: Disable UHR
* @ASSOC_REQ_CIP: Enable Control Integrity Protocol
* @ASSOC_REQ_PROTECTED_TWT: Enable protected TWT
+ * @CONNECT_REQ_SMD_SUPPORT: Userspace indicates support for SMD-level
+ * (re)association to an SMD-ME (SMD Mobility Entity), see
+ * %NL80211_ATTR_SMD_SUPPORT. Drivers shall not perform an SMD-level
+ * (re)association if this flag is not set. Only applicable for
+ * cfg80211_connect() request (connect callback), and only set together
+ * with %CONNECT_REQ_MLO_SUPPORT.
*/
enum cfg80211_assoc_req_flags {
ASSOC_REQ_DISABLE_HT = BIT(0),
@@ -3425,6 +3439,7 @@ enum cfg80211_assoc_req_flags {
ASSOC_REQ_DISABLE_UHR = BIT(8),
ASSOC_REQ_CIP = BIT(9),
ASSOC_REQ_PROTECTED_TWT = BIT(10),
+ CONNECT_REQ_SMD_SUPPORT = BIT(11),
};

/**
@@ -4975,6 +4990,11 @@ struct mgmt_frame_regs {
* and on SMD Transition other link IDs are valid for new keys for the
* new AP MLD. The driver must validate all link IDs, even not during
* SMD Transition, if it supports it.
+ * If %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD is set, the driver must
+ * likewise validate all link IDs itself. If Per-AP MLD PTK mode is
+ * also used, @params->smd_kdk is given together with the pairwise key
+ * at the initial SMD-level association, for the driver to derive new
+ * PTKs during driver-initiated SMD Transitions.
*
* @get_key: get information about the key with the given parameters.
* @mac_addr will be %NULL when requesting information for a group
@@ -9496,6 +9516,44 @@ cfg80211_connect_timeout(struct net_device *dev, const u8 *bssid,
gfp, timeout_reason);
}

+/**
+ * struct cfg80211_smd_resp_params - driver-initiated SMD Transition data
+ *
+ * Only set for a driver-initiated SMD (Seamless Mobility Domain)
+ * Transition (ST) between AP MLDs of the same SMD, performed entirely by
+ * the driver (see %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD); left zeroed
+ * for an ordinary roam.
+ *
+ * @prep_req_ie: ST preparation request elements
+ * @prep_req_ie_len: length of @prep_req_ie
+ * @prep_resp_ie: ST preparation response elements
+ * @prep_resp_ie_len: length of @prep_resp_ie
+ * @exec_req_ie: ST execution request elements
+ * @exec_req_ie_len: length of @exec_req_ie
+ * @exec_resp_ie: ST execution response elements
+ * @exec_resp_ie_len: length of @exec_resp_ie
+ * @kck: key confirmation key (KCK) of a new PTK the driver derived for
+ * the target AP MLD; only set in Per-AP MLD PTK mode, %NULL otherwise
+ * (Per-SMD PTK mode reuses the existing PTK)
+ * @kck_len: length of @kck
+ * @kek: key encryption key (KEK) of the new PTK, see @kck
+ * @kek_len: length of @kek
+ */
+struct cfg80211_smd_resp_params {
+ const u8 *prep_req_ie;
+ size_t prep_req_ie_len;
+ const u8 *prep_resp_ie;
+ size_t prep_resp_ie_len;
+ const u8 *exec_req_ie;
+ size_t exec_req_ie_len;
+ const u8 *exec_resp_ie;
+ size_t exec_resp_ie_len;
+ const u8 *kck;
+ size_t kck_len;
+ const u8 *kek;
+ size_t kek_len;
+};
+
/**
* struct cfg80211_roam_info - driver initiated roaming information
*
@@ -9504,6 +9562,8 @@ cfg80211_connect_timeout(struct net_device *dev, const u8 *bssid,
* @resp_ie: association response IEs (may be %NULL)
* @resp_ie_len: assoc response IEs length
* @fils: FILS related roaming information.
+ * @smd: SMD-related data for this roam, see
+ * &struct cfg80211_smd_resp_params.
* @valid_links: For MLO roaming, BIT mask of the new valid links is set.
* Otherwise zero.
* @ap_mld_addr: For MLO roaming, MLD address of the new AP. Otherwise %NULL.
@@ -9524,6 +9584,7 @@ struct cfg80211_roam_info {
const u8 *resp_ie;
size_t resp_ie_len;
struct cfg80211_fils_resp_params fils;
+ struct cfg80211_smd_resp_params smd;

const u8 *ap_mld_addr;
u16 valid_links;
@@ -9552,6 +9613,10 @@ struct cfg80211_roam_info {
* rdev->event_work. In case of any failures, the reference is released
* either in cfg80211_roamed() or in __cfg80211_romed(), Otherwise, it will be
* released while disconnecting from the current bss.
+ *
+ * This is also used to report a driver-initiated SMD Transition (ST), see
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD and &struct
+ * cfg80211_smd_resp_params; fill in @info->smd for that case.
*/
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
gfp_t gfp);
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 439a08654274..936edf0ec125 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -399,6 +399,25 @@
*
* Any prepared SMD transitions are dropped when disconnecting or executing one
* of them.
+ *
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD indicates that the driver can
+ * perform an SMD Transition (ST) between AP MLDs of the same SMD entirely
+ * on its own, e.g. in response to a BTM request recommending another AP
+ * MLD in the SMD. This is reported, like any other driver-initiated roam,
+ * via %NL80211_CMD_ROAM, carrying the elements of all four ST frames
+ * (%NL80211_ATTR_ST_PREP_REQ_IE/%NL80211_ATTR_ST_PREP_RESP_IE and
+ * %NL80211_ATTR_ST_EXEC_REQ_IE/%NL80211_ATTR_ST_EXEC_RESP_IE) and, in
+ * Per-AP MLD PTK mode, the new PTK's KCK/KEK
+ * (%NL80211_ATTR_PTK_KCK/%NL80211_ATTR_PTK_KEK).
+ *
+ * For Per-AP MLD PTK mode, the driver needs the SMD_KDK to derive the new
+ * PTK; it is configured with %NL80211_KEY_SMD_KDK together with the
+ * pairwise key in %NL80211_CMD_NEW_KEY at the initial SMD-level
+ * association.
+ *
+ * With %NL80211_CMD_CONNECT, userspace indicates that it supports an
+ * SMD-level (re)association with %NL80211_ATTR_SMD_SUPPORT; without it, the
+ * driver must not perform an SMD-level (re)association.
*/

/**
@@ -768,6 +787,9 @@
* Following a %NL80211_CMD_ROAM event userspace can issue
* %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
* new BSS the card/driver roamed to.
+ * Also used to report a driver-initiated SMD Transition, see
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD (DOC: SMD Transition) for
+ * the attributes carried in that case.
* @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
* userspace that a connection was dropped by the AP or due to other
* reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
@@ -3339,6 +3361,26 @@ enum nl80211_commands {
* @NL80211_ATTR_ASSOC_PROTECTED_TWT: Enable protected TWT for the association,
* requires protected TWT support (flag attribute)
*
+ * @NL80211_ATTR_PTK_KCK: Key confirmation key (KCK) of a new PTK the
+ * driver derived itself for a driver-initiated SMD Transition, for
+ * Per-AP MLD PTK mode. Carried in %NL80211_CMD_ROAM, only when
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD is set.
+ * @NL80211_ATTR_PTK_KEK: Key encryption key (KEK) of the new PTK, used
+ * together with %NL80211_ATTR_PTK_KCK, see there.
+ * @NL80211_ATTR_ST_PREP_REQ_IE: elements of the SMD Transition (ST)
+ * preparation request frame, see %NL80211_ATTR_PTK_KCK.
+ * @NL80211_ATTR_ST_PREP_RESP_IE: elements of the ST preparation response
+ * frame, see %NL80211_ATTR_PTK_KCK.
+ * @NL80211_ATTR_ST_EXEC_REQ_IE: elements of the ST execution request
+ * frame, see %NL80211_ATTR_PTK_KCK.
+ * @NL80211_ATTR_ST_EXEC_RESP_IE: elements of the ST execution response
+ * frame, see %NL80211_ATTR_PTK_KCK.
+ * @NL80211_ATTR_SMD_SUPPORT: Flag attribute to indicate user space supports
+ * SMD-level (re)association to an SMD-ME (SMD Mobility Entity). Used
+ * with %NL80211_CMD_CONNECT, together with %NL80211_ATTR_MLO_SUPPORT.
+ * If this attribute is not included in %NL80211_CMD_CONNECT, drivers
+ * must not perform an SMD-level (re)association.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3946,6 +3988,16 @@ enum nl80211_attrs {

NL80211_ATTR_ASSOC_PROTECTED_TWT,

+ NL80211_ATTR_PTK_KCK,
+ NL80211_ATTR_PTK_KEK,
+
+ NL80211_ATTR_ST_PREP_REQ_IE,
+ NL80211_ATTR_ST_PREP_RESP_IE,
+ NL80211_ATTR_ST_EXEC_REQ_IE,
+ NL80211_ATTR_ST_EXEC_RESP_IE,
+
+ NL80211_ATTR_SMD_SUPPORT,
+
/* add attributes here, update the policy in nl80211.c */

__NL80211_ATTR_AFTER_LAST,
@@ -6025,6 +6077,13 @@ enum nl80211_key_default_types {
* of peer measurement to ensure peer measurement session is secure.
* Only valid if %NL80211_EXT_FEATURE_SET_KEY_LTF_SEED is set. This
* attribute is restricted to pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
+ * @NL80211_KEY_SMD_KDK: SMD_KDK (SMD Key Derivation Key) material,
+ * configured together with the pairwise key (%NL80211_KEY_DATA) using
+ * %NL80211_CMD_NEW_KEY at the initial SMD-level association, when
+ * %NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD is set and Per-AP MLD PTK
+ * mode is used. The driver uses it to derive new PTKs for
+ * driver-initiated SMD Transitions. This attribute is restricted to
+ * pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
*
* @__NL80211_KEY_AFTER_LAST: internal
* @NL80211_KEY_MAX: highest key attribute
@@ -6042,6 +6101,7 @@ enum nl80211_key_attributes {
NL80211_KEY_MODE,
NL80211_KEY_DEFAULT_BEACON,
NL80211_KEY_LTF_SEED,
+ NL80211_KEY_SMD_KDK,

/* keep last */
__NL80211_KEY_AFTER_LAST,
@@ -7289,6 +7349,12 @@ enum nl80211_feature_flags {
* @NL80211_EXT_FEATURE_UPDATE_BEACON: Driver supports
* %NL80211_CMD_UPDATE_BEACON.
*
+ * @NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD: Driver supports performing
+ * an SMD Transition between AP MLDs of the same SMD on its own in
+ * station mode, reported via %NL80211_CMD_ROAM, and accepts the
+ * SMD_KDK via %NL80211_KEY_SMD_KDK. Only valid for MLO-capable
+ * devices. See "SMD Transition" in the documentation above.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -7373,6 +7439,7 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_PROBE_AP,
NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD,
NL80211_EXT_FEATURE_UPDATE_BEACON,
+ NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD,

/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 96cd601cf0e0..bd55a5bb445a 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1187,6 +1187,11 @@ int wiphy_register(struct wiphy *wiphy)
!rdev->ops->abandon_st)))
return -EINVAL;

+ if (WARN_ON(wiphy_ext_feature_isset(wiphy,
+ NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD) &&
+ !(wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)))
+ return -EINVAL;
+
if (!wiphy->max_num_akm_suites)
wiphy->max_num_akm_suites = NL80211_MAX_NR_AKM_SUITES;
else if (wiphy->max_num_akm_suites < NL80211_MAX_NR_AKM_SUITES ||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8a5c9dd9d0db..0f761246e7f9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1220,6 +1220,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_ASSOC_CIP] = { .type = NLA_FLAG },
[NL80211_ATTR_CIP_CAPABILITIES] = { .type = NLA_U8 },
[NL80211_ATTR_ASSOC_PROTECTED_TWT] = { .type = NLA_FLAG },
+ [NL80211_ATTR_SMD_SUPPORT] = { .type = NLA_FLAG },
};

/* policy for the key attributes */
@@ -1237,6 +1238,10 @@ static const struct nla_policy nl80211_key_policy[NL80211_KEY_MAX + 1] = {
.type = NLA_BINARY,
.len = WLAN_MAX_SECURE_LTF_KEYSEED_LEN,
},
+ [NL80211_KEY_SMD_KDK] = {
+ .type = NLA_BINARY,
+ .len = PMK_MAX_LEN,
+ },
};

/* policy for the key default flags */
@@ -1786,6 +1791,11 @@ static int nl80211_parse_key_new(struct genl_info *info, struct nlattr *key,
k->p.ltf_keyseed_len = nla_len(tb[NL80211_KEY_LTF_SEED]);
}

+ if (tb[NL80211_KEY_SMD_KDK]) {
+ k->p.smd_kdk = nla_data(tb[NL80211_KEY_SMD_KDK]);
+ k->p.smd_kdk_len = nla_len(tb[NL80211_KEY_SMD_KDK]);
+ }
+
return 0;
}

@@ -5486,7 +5496,9 @@ static int nl80211_validate_key_link_id(struct genl_info *info,
}
/* for SMD transition support the driver must check itself */
if (!(wdev->valid_links & BIT(link_id)) &&
- !(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT)) {
+ !(rdev->wiphy.flags & WIPHY_FLAG_SMD_TRANSITION_CLIENT) &&
+ !wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD)) {
GENL_SET_ERR_MSG(info, "invalid link ID for MLO group key");
return -EINVAL;
}
@@ -14781,6 +14793,16 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
if (nla_get_flag(info->attrs[NL80211_ATTR_MLO_SUPPORT]))
connect.flags |= CONNECT_REQ_MLO_SUPPORT;

+ if (nla_get_flag(info->attrs[NL80211_ATTR_SMD_SUPPORT])) {
+ if (!(connect.flags & CONNECT_REQ_MLO_SUPPORT)) {
+ kfree_sensitive(connkeys);
+ GENL_SET_ERR_MSG(info,
+ "SMD support requires MLO support");
+ return -EINVAL;
+ }
+ connect.flags |= CONNECT_REQ_SMD_SUPPORT;
+ }
+
err = cfg80211_connect(rdev, dev, &connect, connkeys,
connect.prev_bssid);
if (err)
@@ -22238,6 +22260,18 @@ void nl80211_send_roamed(struct cfg80211_registered_device *rdev,
msg = nlmsg_new(100 + info->req_ie_len + info->resp_ie_len +
info->fils.kek_len + info->fils.pmk_len +
(info->fils.pmkid ? WLAN_PMKID_LEN : 0) +
+ (info->smd.prep_req_ie ?
+ nla_total_size(info->smd.prep_req_ie_len) : 0) +
+ (info->smd.prep_resp_ie ?
+ nla_total_size(info->smd.prep_resp_ie_len) : 0) +
+ (info->smd.exec_req_ie ?
+ nla_total_size(info->smd.exec_req_ie_len) : 0) +
+ (info->smd.exec_resp_ie ?
+ nla_total_size(info->smd.exec_resp_ie_len) : 0) +
+ (info->smd.kck ?
+ nla_total_size(info->smd.kck_len) : 0) +
+ (info->smd.kek ?
+ nla_total_size(info->smd.kek_len) : 0) +
link_info_size, gfp);
if (!msg)
return;
@@ -22266,7 +22300,26 @@ void nl80211_send_roamed(struct cfg80211_registered_device *rdev,
(info->fils.pmk &&
nla_put(msg, NL80211_ATTR_PMK, info->fils.pmk_len, info->fils.pmk)) ||
(info->fils.pmkid &&
- nla_put(msg, NL80211_ATTR_PMKID, WLAN_PMKID_LEN, info->fils.pmkid)))
+ nla_put(msg, NL80211_ATTR_PMKID, WLAN_PMKID_LEN,
+ info->fils.pmkid)) ||
+ (info->smd.prep_req_ie &&
+ nla_put(msg, NL80211_ATTR_ST_PREP_REQ_IE,
+ info->smd.prep_req_ie_len, info->smd.prep_req_ie)) ||
+ (info->smd.prep_resp_ie &&
+ nla_put(msg, NL80211_ATTR_ST_PREP_RESP_IE,
+ info->smd.prep_resp_ie_len, info->smd.prep_resp_ie)) ||
+ (info->smd.exec_req_ie &&
+ nla_put(msg, NL80211_ATTR_ST_EXEC_REQ_IE,
+ info->smd.exec_req_ie_len, info->smd.exec_req_ie)) ||
+ (info->smd.exec_resp_ie &&
+ nla_put(msg, NL80211_ATTR_ST_EXEC_RESP_IE,
+ info->smd.exec_resp_ie_len, info->smd.exec_resp_ie)) ||
+ (info->smd.kck &&
+ nla_put(msg, NL80211_ATTR_PTK_KCK, info->smd.kck_len,
+ info->smd.kck)) ||
+ (info->smd.kek &&
+ nla_put(msg, NL80211_ATTR_PTK_KEK, info->smd.kek_len,
+ info->smd.kek)))
goto nla_put_failure;

if (info->valid_links) {
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 7a6cbc2e0102..01d18873715a 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -1207,7 +1207,10 @@ void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
ev = kzalloc(sizeof(*ev) + info->req_ie_len + info->resp_ie_len +
info->fils.kek_len + info->fils.pmk_len +
(info->fils.pmkid ? WLAN_PMKID_LEN : 0) +
- (info->ap_mld_addr ? ETH_ALEN : 0) + link_info_size, gfp);
+ (info->ap_mld_addr ? ETH_ALEN : 0) + link_info_size +
+ info->smd.prep_req_ie_len + info->smd.prep_resp_ie_len +
+ info->smd.exec_req_ie_len + info->smd.exec_resp_ie_len +
+ info->smd.kck_len + info->smd.kek_len, gfp);
if (!ev)
goto out;

@@ -1249,6 +1252,48 @@ void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
ev->rm.fils.update_erp_next_seq_num = info->fils.update_erp_next_seq_num;
if (info->fils.update_erp_next_seq_num)
ev->rm.fils.erp_next_seq_num = info->fils.erp_next_seq_num;
+ if (info->smd.prep_req_ie_len) {
+ ev->rm.smd.prep_req_ie = next;
+ ev->rm.smd.prep_req_ie_len = info->smd.prep_req_ie_len;
+ memcpy((void *)ev->rm.smd.prep_req_ie, info->smd.prep_req_ie,
+ info->smd.prep_req_ie_len);
+ next += info->smd.prep_req_ie_len;
+ }
+ if (info->smd.prep_resp_ie_len) {
+ ev->rm.smd.prep_resp_ie = next;
+ ev->rm.smd.prep_resp_ie_len = info->smd.prep_resp_ie_len;
+ memcpy((void *)ev->rm.smd.prep_resp_ie, info->smd.prep_resp_ie,
+ info->smd.prep_resp_ie_len);
+ next += info->smd.prep_resp_ie_len;
+ }
+ if (info->smd.exec_req_ie_len) {
+ ev->rm.smd.exec_req_ie = next;
+ ev->rm.smd.exec_req_ie_len = info->smd.exec_req_ie_len;
+ memcpy((void *)ev->rm.smd.exec_req_ie, info->smd.exec_req_ie,
+ info->smd.exec_req_ie_len);
+ next += info->smd.exec_req_ie_len;
+ }
+ if (info->smd.exec_resp_ie_len) {
+ ev->rm.smd.exec_resp_ie = next;
+ ev->rm.smd.exec_resp_ie_len = info->smd.exec_resp_ie_len;
+ memcpy((void *)ev->rm.smd.exec_resp_ie, info->smd.exec_resp_ie,
+ info->smd.exec_resp_ie_len);
+ next += info->smd.exec_resp_ie_len;
+ }
+ if (info->smd.kck_len) {
+ ev->rm.smd.kck = next;
+ ev->rm.smd.kck_len = info->smd.kck_len;
+ memcpy((void *)ev->rm.smd.kck, info->smd.kck,
+ info->smd.kck_len);
+ next += info->smd.kck_len;
+ }
+ if (info->smd.kek_len) {
+ ev->rm.smd.kek = next;
+ ev->rm.smd.kek_len = info->smd.kek_len;
+ memcpy((void *)ev->rm.smd.kek, info->smd.kek,
+ info->smd.kek_len);
+ next += info->smd.kek_len;
+ }
if (info->ap_mld_addr) {
ev->rm.ap_mld_addr = next;
memcpy((void *)ev->rm.ap_mld_addr, info->ap_mld_addr,
diff --git a/net/wireless/util.c b/net/wireless/util.c
index f487c3c72df2..ed1fb4f14bf7 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -584,6 +584,19 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
return -EINVAL;
}

+ if (params->smd_kdk) {
+ if (!wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_SMD_TRANSITION_OFFLOAD))
+ return -EOPNOTSUPP;
+
+ /*
+ * SMD_KDK is pairwise key material (installed alongside the
+ * TK) and must only be used with a pairwise key
+ */
+ if (!pairwise)
+ return -EINVAL;
+ }
+
return 0;
}


---
base-commit: 59b2054f5e1d7f845a07df1504977a05a0c34e8a
change-id: 20261204-smd-offload-22a830c4b7ac