From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796207352; b=gpcf6QLmZpobd7H16KiFLE7OiwvzRq+DiDxuWpSL5g47Xi+m7zgc4fndDc7GKEQnFErV HNZsdfpjN1l5sjvUCc9APqH9n4s4u7n3ts8HC/Dfa7Wlib1KMH6XyRaiQSdURVUbdfJN7 SW8r5ydBCRHZKpNEtmqYMrMmWWtSaUYYEpXGtwTwKS51CD2hqAg3Tt+pYM8ujAx7fyy45 afnoONIDdvrBVNc37etdgDZ+1/izTUEfZd3adT4sykGb1GwZjJfXEzb7SnVksSb55IwD8 pDCOe7OA3kmCEuomy6sF6XfIWeEqkkrq3/3LhWAqaEHt7WxWfQ2E+mfu1HDPQVgiOiw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796207352; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=qxv7CNZSwhvE8LlGH64ALmwyZuASIv8eUUKq+KUzF9Y=; b=TlB29HynSoGuUryROmpjF7W7FFeY+VMeS4F6gffIoeCTxbLKupQo+VSrcKOx2G4JnrUf cwTuS9KisUeSp0LBwJuyNFEo1BdPMXIGPIUy3tIQzH4+eI1Wes0SMAHF0E/hBwx96ubN/ Nnukcw3zvOTRgptdqPX47aJzaX8fUlMABCyJDnIKffeaHL5ygDOHOP9j5JFNivpqy5iwG 2a1szNVifue8ZuyWyaiilvHGR3r7aFuvBapEiTwVzob+sws4gw6Ovbzd465BcaGdOMe4E rm7QyYRFPnGg1scuwX2EhosjHxZ43kFX++AqMEuQtW5FoxlCHEafoC2ljBMcFYSYdwA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b="Q+M3/4wu"; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=DjAmAfWp; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99930606A337 for ; Wed, 2 Dec 2026 10:29:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 99930606A337 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Q+M3/4wu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=DjAmAfWp Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B26p6LA2382949 for ; Wed, 2 Dec 2026 10:29:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= qxv7CNZSwhvE8LlGH64ALmwyZuASIv8eUUKq+KUzF9Y=; b=Q+M3/4wuBEitjBGO Xr+VIYgPdFOgFLL68Ze+f07b/QtQ5EpvLem0OZlxb8JdmDabfNKxm1FG5Yrjj4h9 ND7OKNBNwKraaXBhTbEaZHJN1ZQ3PnfcIREwmqitBh+tOaf78NCEVAtdFZdaKhX/ Bp91H6FzPDPLAWcWE+NlKTdvhozN2uAysiOk6a4JT0+ukVL5N57ayOPqojdpMwDe 13HzW26TLVILePkDr81Qx0P11FOhhMcpK84XHfUBMLpHGWGnF2+BT1YE5Ycl5ypV B19U+Cn4dlM+kx0TFzvi++15FkPGe/+Pgy+otQXxg5qgV3YOHbZDFN99qRrJvvxM mP7LIw== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja5p9jv9f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 10:29:10 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-8a0688a43d3so9673284b3a.0 for ; Wed, 02 Dec 2026 02:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796207350; x=1796812150; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qxv7CNZSwhvE8LlGH64ALmwyZuASIv8eUUKq+KUzF9Y=; b=DjAmAfWpItb1+8HjQKrCRfEQxzYeoOOWjDqvsbbdceprVUV/kv862dZYJmvpShOBaZ yFHiZ+Iyi9ctC1vWvCgwTeV0Aibb2NizKQNBzWkZEouqHzvvy8G9BLZSTgPbwmMYqMvs ZDvtF6c8GyQ6bBvmJQ24KzLku8jrLEHGYwi8NWhHpkxsq6yVXl4xl/9+b6l26H8k+JoG GlNrxscLshI2YHGwSTVnU8aucg5LSosH5h2mNjpkWwvU/s3a9C08NXJUmJPySTzPtKn8 yN0E1Mxck28FYnEj//Gv10YqKNQVWsg7tTQBQLJVclr5YTBJGBsytOP/n9Sqjvb4l8XM VihQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796207350; x=1796812150; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qxv7CNZSwhvE8LlGH64ALmwyZuASIv8eUUKq+KUzF9Y=; b=hQqn7IM8rotrwZ4XBwty+6BZXrnRACYSXC7xFHWAcv4j7UzcJquT+JnCZ/QXBPCq99 N6QAWO6PmKhcB2krtS4rdZoOiCiYdIR8fLtjW+aZm1XdeSUwCXcUXWa1JmRCpUaoGUPl jYa8TUM2jSVfzya84+3sD2f2NrWDFRL4HsYEoVa3TUiLMv7LLRVt3Kc22OAzW6YZaDip 5CYNyaJwjTuig5xg4bUn8qJcK4mkkL+NekXycQ5sO50BL1FwW4W5JgF6TG/edZLCbYml ZlJU8Vbk3MqtdFtfslLLykJvdp0IYp0kIUCu0BtU0KcwX9t80/QbRVeeuGXpCGYVVjdb f5JQ== X-Forwarded-Encrypted: i=1; AL+hErE7+L868Sf8j8xbTKGEEydXs/ZYUJapnocX5vOMiqv4W84jv8gKQXVF931/gS30pMgPKi0B1ogWnRf80G0=@vger.kernel.org X-Gm-Message-State: APuU4Z83a8EroRtA+Z877fEdupAajIgOyiIl/nE+9+MyjgRhqCzpMR7i lAwrCIEMylBcakaqPBklqhHQok1Cwkp0rOmFcJVTK77ZKX+Puy9VfeG8A2gLNAlcO+1/iEFeiHQ E9UrDb5xw0tn4tUzmFO8mpBzJNbH3knXC3rkuVr8G/8ItbpEGR9GT9Z051GkWIOfJ4Z3pdyaoQA == X-Gm-Gg: AZFdTZegPxpJJ//YuxwIrw2US1fordhAA75KvrTxJ5mZrc52gny6VlhIEe6ehFwd3P3 ErRPZh3Um7SFLYQDeBiswoDOoBP6opk00Ecul5oAmrp4YQKDA1wu1FUp1b/m3EkOnS6UgY8YHws piJd0Jv46ZtdvPFvJrRfi2BTSHFyEkovcUxDPbZNo0r8Eikwi0hXwQHtlBY1gQXA9b7HuRetFKo doiKTBdoCLUgyz3V54/SAQoE/UjAzTwiDzwHAI7aNAmWaCrea68XHRRk2nkBbqLZHmFxGNnHftR qtJmlo3FpDv3CLcpwpGSbML76hrk51439Z43bxhrhbqy4eqKatDw5WZACj/9/2eGkhWwFzeYEYd Q7ypfbcGKbyn6+TGfxRRHTv+4QN3PNbotgEmcHAIfGcobE9rKTMYqt40JcPrur8OV9RuTGEW53Z fqpCqY1ZgCN2tSuWEcrnqNbFyNDkHyFVYTv0teeBy+2PjoAWidFCowas70uMPdkSXmTIYuT0s= X-Received: by 2002:a05:6a21:7988:b0:3fa:84a8:fade with SMTP id adf61e73a8af0-4014e4535e5mr32673254637.49.1796207349693; Wed, 02 Dec 2026 02:29:09 -0800 (PST) X-Received: by 2002:a05:6a21:7988:b0:3fa:84a8:fade with SMTP id adf61e73a8af0-4014e4535e5mr32673236637.49.1796207349157; Wed, 02 Dec 2026 02:29:09 -0800 (PST) Received: from hu-pooventh-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cde6d026d6fsm21699027a12.19.2026.12.02.02.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 02:29:08 -0800 (PST) From: Pooventhiran G Date: Wed, 02 Dec 2026 15:58:11 +0530 Subject: [PATCH wireless-next v5 16/19] wifi: mac80211: handle UHR Link Reconfiguration frame X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-smd-v5-16-1b020be65c7c@oss.qualcomm.com> References: <20261202-smd-v5-0-1b020be65c7c@oss.qualcomm.com> In-Reply-To: <20261202-smd-v5-0-1b020be65c7c@oss.qualcomm.com> To: Johannes Berg Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, pooventhiran.g@oss.qualcomm.com X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=Ft6QbGrq c=1 sm=1 tr=0 ts=6b0ff2f6 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=mmNMiK8mH_XHg-uE2pIA:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA0MSBTYWx0ZWRfX5LOd5FY4htlv 4PwwDg0d7eowUzeZ5X//weIOGTutYmBteeDZ8LZo5ko49SuFhaUD0uNvlZkddaF2hX+i7l1mq6V 3DRMYMxSNf0LtwgGAUnzAVl0jABZIYY= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA0MSBTYWx0ZWRfX1LR2VCbUxHcr VFjWjykP5VjAFEJmPGldiS7l1itPRf5ltWklXg740qzfqKgZgKA9z+m7GGNSwxSk4+LQ2xByVa3 8LkMPR+J42Tr6lopi/qAFoUE5hrH7SRUs535eau+erIvpBdOhNrHKJmhQoI5qJcLh6h2jgNwzts X+EX1vK29BMQ/R8TEKS0pgdyj2fJ7H3C3OOQTCZEUxxBvuL/D1npEWkQZJsguXyWa1SvcNK1sAv lm2mOjfcYtqYg8h2wlFua+n5lWucV0nnF2z+7C356ChQzCmJTrGSmZeOvtByQGyfiQFtE00sN4t zoqk/Tf0ucGksFngdmzQVkYiB5iJDkfhidegadw8UZG/WrPCK/sat6LBbVsihHXkzW0a1xox65O CaRk88QaRMO6zGptsttn9klN/ARQnqPqRvhMi5vWOH+NsB5IUAao3ZG1zQO7Q02+1lAnNcukrNX QzEEhdHXfvRSI7vaadQ== X-Proofpoint-ORIG-GUID: 0IitLgEpRa6sttts5udgb6GzGlRDD3_Q X-Proofpoint-GUID: 0IitLgEpRa6sttts5udgb6GzGlRDD3_Q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_02,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020041 A UHR Link Reconfiguration Request frame (ST Preparation or Execution) 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 possible context can grow too big, attach the pointer to the context to the frame. Add handling for UHR ST Preparation and Execution Request frames so that the associated context is propagated through cfg80211 and nl80211 for userspace reporting. Signed-off-by: Pooventhiran G --- include/net/mac80211.h | 10 +++++++++- net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/rx.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 63de0df466dd..be8406bb0d73 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1733,6 +1733,10 @@ 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. + * @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 @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 @@ -1774,12 +1778,15 @@ enum mac80211_rx_encoding { * mac80211 internally, it uses @freq set by the driver to identify the * 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 { u64 mactime; union { u64 boottime_ns; ktime_t ack_tx_hwtstamp; + struct ieee80211_st_ctx *st_ctx; }; u32 device_timestamp; u32 ampdu_reference; @@ -1813,7 +1820,8 @@ struct ieee80211_rx_status { u8 chains; s8 chain_signal[IEEE80211_MAX_CHAINS]; u8 zero_length_psdu_type; - u8 link_id:4; + u8 link_id:4, + st_ctx_valid:1; }; static_assert(sizeof(struct ieee80211_rx_status) <= sizeof_field(struct sk_buff, cb)); diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a74b1e711733..e77eebb62886 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -279,6 +279,8 @@ struct ieee80211_rx_data { }; u8 link_addrs[3 * ETH_ALEN]; + + struct ieee80211_st_ctx *st_ctx; }; struct ieee80211_csa_settings { diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d7d662c9ccd5..c2f1a30d5c12 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4006,6 +4006,22 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) return RX_QUEUED; } +static void +ieee80211_rx_h_userspace_mgmt_st_req_frame(struct cfg80211_rx_info *info, + struct ieee80211_rx_data *rx) +{ + struct ieee80211_mgmt *mgmt = (void *)info->buf; + u8 type; + + if (!rx->st_ctx) + return; + + type = mgmt->u.action.uhr_link_reconf_req.type; + + info->st_info.type = type; + info->st_info.ctx = rx->st_ctx; +} + static ieee80211_rx_result debug_noinline ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) { @@ -4017,6 +4033,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) .link_id = rx->link_id, .have_link_id = rx->link_id >= 0, .no_sta = !rx->sta, + .st_info.ctx = NULL, }; /* skip known-bad action frames and return them in the next handler */ @@ -4038,6 +4055,9 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) ieee80211_is_ftm(rx->skb)) { info.rx_tstamp = ktime_to_ns(skb_hwtstamps(rx->skb)->hwtstamp); info.ack_tstamp = ktime_to_ns(status->ack_tx_hwtstamp); + } else if (ieee80211_is_st_prep_req(rx->skb) || + ieee80211_is_st_exec_req(rx->skb)) { + ieee80211_rx_h_userspace_mgmt_st_req_frame(&info, rx); } if (cfg80211_rx_mgmt_ext(&rx->sdata->wdev, &info)) { @@ -5687,10 +5707,18 @@ 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_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->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)) goto drop; @@ -5822,6 +5850,12 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, kcov_remote_start_common(skb_get_kcov_handle(skb)); + rx.st_ctx = st_ctx; + + if (WARN_ONCE((status->flag & RX_FLAG_8023) && rx.st_ctx, + "802.3 packet but with IEEE P802.11bn ST context")) + goto drop; + /* * Frames with failed FCS/PLCP checksum are not returned, * all other frames are returned without radiotap header @@ -5841,10 +5875,12 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, __ieee80211_rx_handle_packet(hw, link_pubsta, skb, list, &rx); } + kfree(st_ctx); kcov_remote_stop(); return; drop: + kfree(st_ctx); kfree_skb(skb); } EXPORT_SYMBOL(ieee80211_rx_list); -- 2.34.1