1: f2b856c5530f < -: ------------ wifi: nl80211: define Seamless Mobility Domain (SMD) device capability  2: 296ac6cc3096 < -: ------------ wifi: nl80211/cfg80211: define interfaces for SMD setup and STA update  3: df8283593a22 < -: ------------ wifi: nl80211: add SMD BSS Transition sub-state STA flags  4: 662c9b76d929 < -: ------------ wifi: cfg80211: define layouts for SMD BSS Transition context  5: fe89d9417c38 < -: ------------ wifi: nl80211: define interfaces for SMD BSS Transition context transfer  -: ------------ > 1: 8c452a4905d2 wifi: nl80211: define Seamless Mobility Domain (SMD) device capability  -: ------------ > 2: 138bf905dcc4 wifi: nl80211/cfg80211: define interfaces for SMD STA indications  -: ------------ > 3: 43ef9992d619 wifi: nl80211: add ST sub-state STA flags for non-AP MLD  -: ------------ > 4: 64de349648d4 wifi: cfg80211: define layouts for ST context transfer  -: ------------ > 5: 610560962dd5 wifi: nl80211: define interfaces for ST context transfer  6: cf04c14dc717 ! 6: b15a3be1b709 wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks @@ Commit message  Add APIs necessary to check whether the frame is a UHR Link Reconfiguration Request/Response/Notify frame and subtypes to invoke - necessary SMD BSS Transition handling on the AP MLD. + necessary SMD Transition handling on the AP MLD.  Signed-off-by: Pooventhiran G    7: ca8344d5b761 = 7: 0b35ad236d87 wifi: ieee80211: define API to check if frame is class 3  8: debf50c4b4d8 < -: ------------ wifi: nl80211/cfg80211: pack SMD dynamic context along with frame  9: f4ebcafaf817 < -: ------------ wifi: nl80211/cfg80211: add support for SMD context programming 10: 5fab123edc2c < -: ------------ wifi: nl80211/cfg80211: add support for querying SMD context for target AP MLD 11: 5dd3d948d02c < -: ------------ wifi: nl80211/cfg80211: define API to notify SMD Drain completion 12: f575aa00a9e3 < -: ------------ wifi: mac80211: set SMD parameters for AP setup and STA update 13: 2d4d78e5efa0 < -: ------------ wifi: mac80211: apply SMD BSS Transition STA sub-states 14: ace7c460a171 < -: ------------ wifi: mac80211: add driver_op for SMD substate changes  -: ------------ > 8: 49d5d0378c4e wifi: nl80211/cfg80211: pack ST dynamic context along with frame  -: ------------ > 9: 2af1aec01f38 wifi: nl80211/cfg80211: add support for ST context programming  -: ------------ > 10: c194b027c6d4 wifi: nl80211/cfg80211: add support for querying ST context for target AP MLD  -: ------------ > 11: a541231c915a wifi: nl80211/cfg80211: define API to notify ST Drain completion  -: ------------ > 12: a70af70cffe6 wifi: mac80211: apply SMD indication and ST sub-states to STA  -: ------------ > 13: f07d32900923 wifi: mac80211: add driver_op for ST substate changes 15: 4b715d1882b2 ! 14: e093957040d0 wifi: mac80211: filter uplink and downlink frames based on SMD states @@ Metadata Author: Pooventhiran G   ## Commit message ## - wifi: mac80211: filter uplink and downlink frames based on SMD states + wifi: mac80211: filter uplink and downlink frames based on ST states  - During SMD BSS Transition, based on the state that the non-AP MLD is - currently in, there are frame filtering conditions imposed in both - uplink and downlink directions, as per IEEE P802.11bn/D2.0, Aug 2026, - subclause 11.3.1. + During ST, based on the state that the non-AP MLD is currently in, there + are frame filtering conditions imposed in both uplink and downlink + directions, as per IEEE P802.11bn/D2.0, Aug 2026, subclause 11.3.1.  State 4a: - UL/DL: All Class 3 frames except ST Execution Request and Response @@ net/mac80211/rx.c: ieee80211_rx_h_check(struct ieee80211_rx_data *rx) }   +static ieee80211_rx_result debug_noinline -+ieee80211_rx_h_smd_state(struct ieee80211_rx_data *rx) ++ieee80211_rx_h_st_state(struct ieee80211_rx_data *rx)  +{  + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;  + __le16 fc = hdr->frame_control; @@ net/mac80211/rx.c: ieee80211_rx_h_check(struct ieee80211_rx_data *rx)  + if (!rx->sta ||  + (rx->sdata->vif.type != NL80211_IFTYPE_AP &&  + rx->sdata->vif.type != NL80211_IFTYPE_AP_VLAN) || ++ !rx->sta->sta.smd_sta ||  + !test_sta_flag(rx->sta, WLAN_STA_ASSOC) ||  + is_multicast_ether_addr(hdr->addr1))  + return RX_CONTINUE;  + -+ switch (rx->sta->smd_state) { -+ case IEEE80211_STA_SMD_NONE: ++ switch (rx->sta->st_state) { ++ case IEEE80211_STA_ST_NONE:  + break; -+ case IEEE80211_STA_SMD_PREP: ++ case IEEE80211_STA_ST_PREPARED:  + /* 4a: Class 3 disallowed except ST Execution Request */  + if (ieee80211_is_st_exec_req(rx->skb))  + break;  + if (ieee80211_is_class3(rx->skb))  + return RX_DROP_U_SMD_FILTERED;  + break; -+ case IEEE80211_STA_SMD_EXEC: ++ case IEEE80211_STA_ST_EXECUTING:  + /* 4b: Class 3 Data frames disallowed */  + if (ieee80211_is_data(fc))  + return RX_DROP_U_SMD_FILTERED;  + break; -+ case IEEE80211_STA_SMD_DRAIN: ++ case IEEE80211_STA_ST_DL_DRAIN:  + /*  + * 4c: Class 3 frames disallowed except QoS Null, Control, and  + * UHR Reconfiguration Notify frames. @@ net/mac80211/rx.c: static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_  CALL_RXH(ieee80211_rx_h_check_dup); CALL_RXH(ieee80211_rx_h_check); -+ CALL_RXH(ieee80211_rx_h_smd_state); ++ CALL_RXH(ieee80211_rx_h_st_state);  ieee80211_rx_reorder_ampdu(rx, &reorder_release);  @@ net/mac80211/tx.c: ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) }   +static ieee80211_tx_result debug_noinline -+ieee80211_tx_h_smd_state(struct ieee80211_tx_data *tx) ++ieee80211_tx_h_st_state(struct ieee80211_tx_data *tx)  +{  + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;  + __le16 fc = hdr->frame_control; @@ net/mac80211/tx.c: ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)  + if (!tx->sta ||  + (tx->sdata->vif.type != NL80211_IFTYPE_AP &&  + tx->sdata->vif.type != NL80211_IFTYPE_AP_VLAN) || ++ !tx->sta->sta.smd_sta ||  + !test_sta_flag(tx->sta, WLAN_STA_ASSOC) ||  + !(tx->flags & IEEE80211_TX_UNICAST))  + return TX_CONTINUE;  + -+ switch (tx->sta->smd_state) { -+ case IEEE80211_STA_SMD_NONE: ++ switch (tx->sta->st_state) { ++ case IEEE80211_STA_ST_NONE:  + break; -+ case IEEE80211_STA_SMD_PREP: ++ case IEEE80211_STA_ST_PREPARED:  + /* 4a: Class 3 disallowed except ST Execution Response */  + if (ieee80211_is_st_exec_resp(tx->skb))  + break;  + if (ieee80211_is_class3(tx->skb))  + return TX_DROP;  + break; -+ case IEEE80211_STA_SMD_EXEC: ++ case IEEE80211_STA_ST_EXECUTING:  + /* 4b: no restriction */  + break; -+ case IEEE80211_STA_SMD_DRAIN: ++ case IEEE80211_STA_ST_DL_DRAIN:  + /* 4c: Class 3 disallowed except Data, Control,  + * UHR Reconfiguration Notify  + */ @@ net/mac80211/tx.c: static int invoke_tx_handlers_early(struct ieee80211_tx_data  CALL_TXH(ieee80211_tx_h_dynamic_ps); CALL_TXH(ieee80211_tx_h_check_assoc); -+ CALL_TXH(ieee80211_tx_h_smd_state); ++ CALL_TXH(ieee80211_tx_h_st_state); CALL_TXH(ieee80211_tx_h_ps_buf); CALL_TXH(ieee80211_tx_h_check_control_port_protocol); CALL_TXH(ieee80211_tx_h_select_key); 16: 62b5a4791948 < -: ------------ wifi: mac80211: send BlockAck policy in AMPDU action 17: 09a0425f2bd5 ! 15: d6ed79ec4737 wifi: mac80211: pass rx_data directly from ieee80211_rx_list() @@ Commit message Signed-off-by: Pooventhiran G   ## net/mac80211/rx.c ## -@@ net/mac80211/rx.c: static bool ieee80211_rx_valid_freq(struct ieee80211_rx_status *status, +@@ net/mac80211/rx.c: ieee80211_link_from_freq(struct ieee80211_sub_if_data *sdata, int freq) static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct ieee80211_link_sta *link_pubsta, struct sk_buff *skb,  - struct list_head *list)  + struct list_head *list,  + struct ieee80211_rx_data *rx) + __must_hold_shared(RCU) { struct ieee80211_local *local = hw_to_local(hw); - struct ieee80211_sub_if_data *sdata;  @@ net/mac80211/rx.c: static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct link_sta_info *link_sta; struct sta_info *sta; @@ net/mac80211/rx.c: static void __ieee80211_rx_handle_packet(struct ieee80211_hw if (unlikely(ieee80211_is_probe_resp(hdr->frame_control) || ieee80211_is_beacon(hdr->frame_control) ||  @@ net/mac80211/rx.c: static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, - sta); + sta = sta_from_pub(link_pubsta->sta); link_sta = rcu_dereference(sta->link[link_pubsta->link_id]);   - rx.sdata = sta->sdata; @@ net/mac80211/rx.c: static void __ieee80211_rx_handle_packet(struct ieee80211_hw  continue;  @@ net/mac80211/rx.c: static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, - } + link = ieee80211_link_from_freq(sdata, status->freq);  if (rx_data_pending) {  - ieee80211_prepare_and_rx_handle(&rx, skb, false); 18: b7b8997e1aa0 ! 16: 2a65202058f9 wifi: mac80211: handle UHR Link Reconfiguration frame @@ Commit message wifi: mac80211: handle UHR Link Reconfiguration frame  A UHR Link Reconfiguration Request frame (ST Preparation or Execution) - triggers SMD BSS Transition on the current AP MLD. Userspace needs - reporting of the STA's dynamic context along with such frames so that - the same can be transported to the target AP MLD for setting up the STA - TX and RX queues. + triggers SMD Transition on the current AP MLD. Userspace needs reporting + of the STA's dynamic context along with such frames so that the same can + be transported to the target AP MLD for setting up the STA TX and RX + queues.  Reserve a field in ieee80211_rx_status that enables drivers to attach the STA's dynamic context to the corresponding frame. Since the maximum @@ include/net/mac80211.h: enum mac80211_rx_encoding { * @ack_tx_hwtstamp: Hardware timestamp for the ack TX in nanoseconds. Only * needed for Timing measurement and Fine timing measurement action frames. * Only reported by devices that have timestamping enabled. -+ * @smd_ctx: Pointer to IEEE P802.11bn SMD BSS Transition context information. ++ * @st_ctx: Pointer to IEEE P802.11bn SMD Transition context information.  + * Only needed for ST Preparation Request and ST Execution Request action  + * frames. The pointer will be consumed by mac80211; must be kmalloc-ed. -+ * Indicated by @smd_ctx_valid. ++ * Indicated by @st_ctx_valid. * @device_timestamp: arbitrary timestamp for the device, mac80211 doesn't use * it but can store it and pass it back to the driver for synchronisation * @band: the active band when this frame was received  @@ include/net/mac80211.h: enum mac80211_rx_encoding { - * @link_id: id of the link used to receive the packet. Set and used by * mac80211 internally, it uses @freq set by the driver to identify the - * correct link per vif. -+ * @smd_ctx_valid: if @smd_ctx has a valid pointer to the ST context. This flag + * correct link per vif. Set to %IEEE80211_LINK_UNSPECIFIED for non-MLD + * or if link information is not applicable. ++ * @st_ctx_valid: if @st_ctx has a valid pointer to the ST context. This flag  + * is used only for ST Preparation or ST Execution Request frames. */ struct ieee80211_rx_status { @@ include/net/mac80211.h: enum mac80211_rx_encoding { union { u64 boottime_ns; ktime_t ack_tx_hwtstamp; -+ struct ieee80211_smd_ctx *smd_ctx; ++ struct ieee80211_st_ctx *st_ctx; }; u32 device_timestamp; u32 ampdu_reference; @@ include/net/mac80211.h: struct ieee80211_rx_status { u8 zero_length_psdu_type;  - u8 link_id:4;  + u8 link_id:4, -+ smd_ctx_valid:1; ++ st_ctx_valid:1; };  static_assert(sizeof(struct ieee80211_rx_status) <= sizeof_field(struct sk_buff, cb)); @@ net/mac80211/ieee80211_i.h: struct ieee80211_rx_data {  u8 link_addrs[3 * ETH_ALEN];  + -+ struct ieee80211_smd_ctx *smd_ctx; ++ struct ieee80211_st_ctx *st_ctx; };  struct ieee80211_csa_settings { @@ net/mac80211/rx.c: ieee80211_rx_h_action(struct ieee80211_rx_data *rx)  + struct ieee80211_mgmt *mgmt = (void *)info->buf;  + u8 type;  + -+ if (!rx->smd_ctx) ++ if (!rx->st_ctx)  + return;  +  + type = mgmt->u.action.uhr_link_reconf_req.type;  +  + info->st_info.type = type; -+ info->st_info.ctx = rx->smd_ctx; ++ info->st_info.ctx = rx->st_ctx;  +}  + static ieee80211_rx_result debug_noinline @@ net/mac80211/rx.c: void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_supported_band *sband; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; -+ struct ieee80211_smd_ctx *smd_ctx = NULL; ++ struct ieee80211_st_ctx *st_ctx = NULL; struct ieee80211_rx_data rx = {};  WARN_ON_ONCE(softirq_count() == 0);   + /* cache the pointer to free it later */ -+ if (status->smd_ctx_valid) { -+ smd_ctx = status->smd_ctx; -+ status->smd_ctx = NULL; -+ status->smd_ctx_valid = false; ++ if (status->st_ctx_valid) { ++ st_ctx = status->st_ctx; ++ status->st_ctx = NULL; ++ status->st_ctx_valid = false;  + }  + if (WARN_ON(status->band >= NUM_NL80211_BANDS)) @@ net/mac80211/rx.c: void ieee80211_rx_list(struct ieee80211_hw *hw,  kcov_remote_start_common(skb_get_kcov_handle(skb));  -+ rx.smd_ctx = smd_ctx; ++ rx.st_ctx = st_ctx;  + -+ if (WARN_ONCE((status->flag & RX_FLAG_8023) && rx.smd_ctx, -+ "802.3 packet but with IEEE P802.11bn SMD context")) ++ if (WARN_ONCE((status->flag & RX_FLAG_8023) && rx.st_ctx, ++ "802.3 packet but with IEEE P802.11bn ST context"))  + goto drop;  + /* @@ net/mac80211/rx.c: void ieee80211_rx_list(struct ieee80211_hw *hw, __ieee80211_rx_handle_packet(hw, link_pubsta, skb, list, &rx); } -+ kfree(smd_ctx); ++ kfree(st_ctx);  kcov_remote_stop(); return; drop: -+ kfree(smd_ctx); ++ kfree(st_ctx); kfree_skb(skb); } EXPORT_SYMBOL(ieee80211_rx_list); 19: c10be79097f3 ! 17: e6928dab9332 wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTX @@ Metadata Author: Pooventhiran G   ## Commit message ## - wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTX + wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_ST_CTX  - cfg80211 supports NL80211_CMD_SET_SMD_CTX on the target AP MLD for + cfg80211 supports NL80211_CMD_SET_ST_CTX on the target AP MLD for userspace to program the station's dynamic context on the TX and RX queues.  @@ Commit message so that the context is installed and the target AP MLD is ready to continue data transfer with the non-AP MLD from where it may have left off at the current AP MLD. This facilitates the seamless roaming benefit - of the SMD BSS Transition procedure. + of the ST procedure.  Signed-off-by: Pooventhiran G   ## include/net/mac80211.h ## -@@ include/net/mac80211.h: enum ieee80211_sta_smd_state { - * @sta_smd_state: Notifies low level driver about IEEE 802.11bn SMD substate - * transition of a station. It must not fail while transitioning down. - * The callback can sleep. -+ * @set_smd_ctx: Set the UHR SMD context for the non-AP MLD. This is used on -+ * the target AP MLD side to program dynamic context. +@@ include/net/mac80211.h: enum ieee80211_sta_st_state { + * notification frame. + * @sta_notify_st: Notifies low level driver about IEEE 802.11bn ST substate + * transition of a station. The callback can sleep. ++ * @set_st_ctx: Set the ST context for the non-AP MLD. This is used on the ++ * target AP MLD side to program dynamic context. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw,  @@ include/net/mac80211.h: struct ieee80211_ops { - struct ieee80211_sta *sta, - enum ieee80211_sta_smd_state old_state, - enum ieee80211_sta_smd_state new_state); -+ int (*set_smd_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -+ struct ieee80211_sta *sta, -+ struct cfg80211_smd_transition_info *st_info); + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + enum ieee80211_sta_st_state state); ++ int (*set_st_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta, ++ struct cfg80211_smd_transition_info *st_info); };  /** @@ net/mac80211/cfg.c: ieee80211_set_nan_non_evac_channels(struct wiphy *wiphy, return ieee80211_nan_set_non_evac_channels(sdata, channels); }  -+static int ieee80211_set_smd_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, -+ const u8 *addr, -+ struct cfg80211_smd_transition_info *st_info) ++static int ieee80211_set_st_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, ++ const u8 *addr, ++ struct cfg80211_smd_transition_info *st_info)  +{  + struct ieee80211_local *local = wiphy_priv(wiphy);  + struct ieee80211_sub_if_data *sdata; @@ net/mac80211/cfg.c: ieee80211_set_nan_non_evac_channels(struct wiphy *wiphy,  + sta = sta_info_get_bss(sdata, addr);  + if (!sta)  + return -ENOENT; -+ if (!sta->sta.smd_params.smd_sta || -+ sta->smd_state != IEEE80211_STA_SMD_PREP) ++ if (!sta->sta.smd_sta || ++ sta->st_state != IEEE80211_STA_ST_PREPARED)  + return -EINVAL;  +  + if (!wiphy_dereference(wiphy, sta->ptk[sta->ptk_idx]))  + return -EINVAL;  + -+ return drv_set_smd_ctx(local, sdata, &sta->sta, st_info); ++ return drv_set_st_ctx(local, sdata, &sta->sta, st_info);  +}  + const struct cfg80211_ops mac80211_config_ops = { @@ net/mac80211/cfg.c: const struct cfg80211_ops mac80211_config_ops = { .nan_set_local_sched = ieee80211_set_local_nan_sched, .nan_set_peer_sched = ieee80211_set_peer_nan_sched, .nan_set_non_evac_channels = ieee80211_set_nan_non_evac_channels, -+ .set_smd_ctx = ieee80211_set_smd_ctx, ++ .set_st_ctx = ieee80211_set_st_ctx, };  ## net/mac80211/driver-ops.h ## -@@ net/mac80211/driver-ops.h: int drv_sta_smd_state(struct ieee80211_local *local, - enum ieee80211_sta_smd_state old_state, - enum ieee80211_sta_smd_state new_state); +@@ net/mac80211/driver-ops.h: void drv_sta_notify_st(struct ieee80211_local *local, + struct ieee80211_sta *sta, + enum ieee80211_sta_st_state state);  -+static inline int drv_set_smd_ctx(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, -+ struct cfg80211_smd_transition_info *st_info) ++static inline int drv_set_st_ctx(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta, ++ struct cfg80211_smd_transition_info *st_info)  +{  + int ret;  + -+ if (!local->ops->set_smd_ctx) ++ if (!local->ops->set_st_ctx)  + return -EOPNOTSUPP;  +  + sdata = get_bss_sdata(sdata); @@ net/mac80211/driver-ops.h: int drv_sta_smd_state(struct ieee80211_local *local,  + if (!check_sdata_in_driver(sdata))  + return -EIO;  + -+ trace_drv_set_smd_ctx(local, sdata, sta, st_info); -+ ret = local->ops->set_smd_ctx(&local->hw, &sdata->vif, sta, st_info); ++ trace_drv_set_st_ctx(local, sdata, sta, st_info); ++ ret = local->ops->set_st_ctx(&local->hw, &sdata->vif, sta, st_info);  + trace_drv_return_int(local, ret);  +  + return ret; @@ net/mac80211/driver-ops.h: int drv_sta_smd_state(struct ieee80211_local *local, #endif /* __MAC80211_DRIVER_OPS */  ## net/mac80211/trace.h ## -@@ net/mac80211/trace.h: TRACE_EVENT(drv_sta_smd_state, +@@ net/mac80211/trace.h: TRACE_EVENT(drv_sta_notify_st, ) );  -+TRACE_EVENT(drv_set_smd_ctx, ++TRACE_EVENT(drv_set_st_ctx,  + TP_PROTO(struct ieee80211_local *local,  + struct ieee80211_sub_if_data *sdata,  + struct ieee80211_sta *sta, @@ net/mac80211/trace.h: TRACE_EVENT(drv_sta_smd_state,  + ),  +  + TP_fast_assign( -+ struct ieee80211_smd_ctx *ctx = st_info->ctx; ++ struct ieee80211_st_ctx *ctx = st_info->ctx;  +  + LOCAL_ASSIGN;  + VIF_ASSIGN; 20: bc145c32334c ! 18: 3785adfa2dbb wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTX @@ Metadata Author: Pooventhiran G   ## Commit message ## - wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTX + wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_ST_CTX  - cfg80211 supports NL80211_CMD_GET_SMD_CTX from userspace on the current + cfg80211 supports NL80211_CMD_GET_ST_CTX from userspace on the current AP MLD to collect the station's context on the target AP MLD's behalf; this context is used by the target AP MLD to program its TX and RX queues to support seamless roaming of the non-AP MLD. @@ Commit message Add mac80211 support for the same to invoke the driver to collect the requested station context. Since context collection is asynchronous, the driver reports the collected context later via - ieee80211_get_smd_ctx_done(), which then packs the context into - NL80211_CMD_SMD_CTX_EVENT and delivers it to userspace as a multicast + ieee80211_get_st_ctx_done(), which then packs the context into + NL80211_CMD_ST_CTX_EVENT and delivers it to userspace as a multicast event.  Signed-off-by: Pooventhiran G   ## include/net/mac80211.h ## -@@ include/net/mac80211.h: enum ieee80211_sta_smd_state { - * The callback can sleep. - * @set_smd_ctx: Set the UHR SMD context for the non-AP MLD. This is used on - * the target AP MLD side to program dynamic context. -+ * @get_smd_ctx: Get the UHR SMD context for the non-AP MLD. This is used in -+ * the current AP MLD side on behalf of the target AP MLD to collect -+ * dynamic context, when the non-AP MLD sends ST Execute frame directly -+ * to the target. Since the response is asynchronous, the drivers that -+ * implement this should not store reference to @sta. +@@ include/net/mac80211.h: enum ieee80211_sta_st_state { + * transition of a station. The callback can sleep. + * @set_st_ctx: Set the ST context for the non-AP MLD. This is used on the + * target AP MLD side to program dynamic context. ++ * @get_st_ctx: Get the ST context for the non-AP MLD. This is used in the ++ * current AP MLD side on behalf of the target AP MLD to collect dynamic ++ * context, when the non-AP MLD sends ST Execute frame directly to the ++ * target. Since the response is asynchronous, the drivers that implement ++ * this should not store reference to @sta. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw,  @@ include/net/mac80211.h: struct ieee80211_ops { - int (*set_smd_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct cfg80211_smd_transition_info *st_info); -+ int (*get_smd_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -+ struct ieee80211_sta *sta, -+ enum nl80211_smd_ctx_type type); + int (*set_st_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct cfg80211_smd_transition_info *st_info); ++ int (*get_st_ctx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta, ++ enum nl80211_st_ctx_type type); };  /** @@ include/net/mac80211.h: bool ieee80211_vif_nan_started(struct ieee80211_vif *vif int ieee80211_encrypt_tx_skb(struct sk_buff *skb);  +  +/** -+ * ieee80211_get_smd_ctx_done - Deliver async get_smd_ctx result to nl80211 ++ * ieee80211_get_st_ctx_done - Deliver async get_st_ctx result to nl80211  + * @vif: virtual interface  + * @sta_addr: non-AP MLD address the context was collected for -+ * @st_info: SMD BSS Transition Info (set @st_info->ctx to NULL to indicate ++ * @st_info: SMD Transition Info (set @st_info->ctx to NULL to indicate  + * failure)  + */ -+void ieee80211_get_smd_ctx_done(struct ieee80211_vif *vif, -+ const u8 *sta_addr, -+ struct cfg80211_smd_transition_info *st_info); ++static inline ++void ieee80211_get_st_ctx_done(struct ieee80211_vif *vif, ++ const u8 *sta_addr, ++ struct cfg80211_smd_transition_info *st_info) ++{ ++ struct wireless_dev *wdev = ieee80211_vif_to_wdev(vif); ++ ++ if (wdev) ++ cfg80211_notify_get_st_ctx_done(wdev, sta_addr, st_info); ++} #endif /* MAC80211_H */  ## net/mac80211/cfg.c ## -@@ net/mac80211/cfg.c: static int ieee80211_set_smd_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, - return drv_set_smd_ctx(local, sdata, &sta->sta, st_info); +@@ net/mac80211/cfg.c: static int ieee80211_set_st_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, + return drv_set_st_ctx(local, sdata, &sta->sta, st_info); }  -+static int ieee80211_get_smd_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, -+ const u8 *addr, -+ enum nl80211_smd_ctx_type type) ++static int ieee80211_get_st_ctx(struct wiphy *wiphy, struct wireless_dev *wdev, ++ const u8 *addr, ++ enum nl80211_st_ctx_type type)  +{  + struct ieee80211_local *local = wiphy_priv(wiphy);  + struct ieee80211_sub_if_data *sdata; @@ net/mac80211/cfg.c: static int ieee80211_set_smd_ctx(struct wiphy *wiphy, struct  + sta = sta_info_get_bss(sdata, addr);  + if (!sta)  + return -ENOENT; -+ if (!sta->sta.smd_params.smd_sta) ++ if (!sta->sta.smd_sta)  + return -EINVAL;  + -+ return drv_get_smd_ctx(local, sdata, &sta->sta, type); -+} -+ -+void ieee80211_get_smd_ctx_done(struct ieee80211_vif *vif, -+ const u8 *sta_addr, -+ struct cfg80211_smd_transition_info *st_info) -+{ -+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); -+ -+ cfg80211_get_smd_ctx_done(&sdata->wdev, sta_addr, st_info); ++ return drv_get_st_ctx(local, sdata, &sta->sta, type);  +} -+EXPORT_SYMBOL(ieee80211_get_smd_ctx_done);  + const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, @@ net/mac80211/cfg.c: static int ieee80211_set_smd_ctx(struct wiphy *wiphy, struct  @@ net/mac80211/cfg.c: const struct cfg80211_ops mac80211_config_ops = { .nan_set_peer_sched = ieee80211_set_peer_nan_sched, .nan_set_non_evac_channels = ieee80211_set_nan_non_evac_channels, - .set_smd_ctx = ieee80211_set_smd_ctx, -+ .get_smd_ctx = ieee80211_get_smd_ctx, + .set_st_ctx = ieee80211_set_st_ctx, ++ .get_st_ctx = ieee80211_get_st_ctx, };  ## net/mac80211/driver-ops.h ## -@@ net/mac80211/driver-ops.h: static inline int drv_set_smd_ctx(struct ieee80211_local *local, +@@ net/mac80211/driver-ops.h: static inline int drv_set_st_ctx(struct ieee80211_local *local, return ret; }  -+static inline int drv_get_smd_ctx(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, -+ enum nl80211_smd_ctx_type type) ++static inline int drv_get_st_ctx(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta, ++ enum nl80211_st_ctx_type type)  +{  + int ret;  + -+ if (!sdata || !local->ops->get_smd_ctx) ++ if (!sdata || !local->ops->get_st_ctx)  + return -EOPNOTSUPP;  +  + sdata = get_bss_sdata(sdata); @@ net/mac80211/driver-ops.h: static inline int drv_set_smd_ctx(struct ieee80211_lo  + if (!check_sdata_in_driver(sdata))  + return -EIO;  + -+ trace_drv_get_smd_ctx(local, sdata, sta, type); -+ ret = local->ops->get_smd_ctx(&local->hw, &sdata->vif, sta, type); ++ trace_drv_get_st_ctx(local, sdata, sta, type); ++ ret = local->ops->get_st_ctx(&local->hw, &sdata->vif, sta, type);  + trace_drv_return_int(local, ret);  +  + return ret; @@ net/mac80211/driver-ops.h: static inline int drv_set_smd_ctx(struct ieee80211_lo  + #endif /* __MAC80211_DRIVER_OPS */  - ## net/mac80211/sta_info.c ## -@@ net/mac80211/sta_info.c: static int __must_check __sta_info_destroy_part1(struct sta_info *sta) - { - struct ieee80211_local *local; - struct ieee80211_sub_if_data *sdata; -+ struct wireless_dev *wdev; - int ret, i; -  - might_sleep(); -@@ net/mac80211/sta_info.c: static int __must_check __sta_info_destroy_part1(struct sta_info *sta) -  - local = sta->local; - sdata = sta->sdata; -+ wdev = &sdata->wdev; -  - lockdep_assert_wiphy(local->hw.wiphy); -  -@@ net/mac80211/sta_info.c: static int __must_check __sta_info_destroy_part1(struct sta_info *sta) - rcu_access_pointer(sdata->u.vlan.sta) == sta) - RCU_INIT_POINTER(sdata->u.vlan.sta, NULL); -  -+ if (sdata->vif.type == NL80211_IFTYPE_AP || -+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN) -+ cfg80211_free_pending_smd_ctx_req(wdev, sta->addr); -+ - return 0; - } -  - ## net/mac80211/trace.h ## -@@ net/mac80211/trace.h: TRACE_EVENT(drv_set_smd_ctx, +@@ net/mac80211/trace.h: TRACE_EVENT(drv_set_st_ctx, ) );  -+TRACE_EVENT(drv_get_smd_ctx, ++TRACE_EVENT(drv_get_st_ctx,  + TP_PROTO(struct ieee80211_local *local,  + struct ieee80211_sub_if_data *sdata,  + struct ieee80211_sta *sta, -+ enum nl80211_smd_ctx_type type), ++ enum nl80211_st_ctx_type type),  +  + TP_ARGS(local, sdata, sta, type),  + 21: 57d03359bd56 < -: ------------ wifi: mac80211: define API to invoke SMD Drain Completion event  -: ------------ > 19: 934960afe60f wifi: mac80211: define API to invoke ST Drain Completion event