Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796207328; b=4GFwRTjnrkZC2fpIsPImhn6CKWqeNsvdzjRh4SzYtrxvMSvX4hL+74X70XV7x6NJkoqs X/rafA/yyHLdhd7lC8nGEkhl3b+cdRccIoNFpCPX3uWttXqOUzoxApJwYWgWcG70lw+4/ TjrG/YD+t3+KZfghSYrIxxEgmfyM0Kplp0ZUbtnfA2i1s3f8lB0OF2q4xqKt+acpCAPhx rPIAZ4cWmhd1/4KHMnRXc45St1h2/npmq4IbBC1AoBqzHw65/4hcX8JTO1xKICgqgWMpP QIUcoR8D4ihVTiitqugf3Dx+dYwkcoX+el4dcbYWrVC4fLOIiuvqqbxo6F1tgz+ecWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796207328; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature: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-GUID: X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=N3JzM6MqMyGhGPV8TBeiFc8EwrLF3WTBQLXsZUvVWUI=; b=phLGbgRxj1+oe1JXP7FrEbB0WDLeRAhobsOo+okZ9lSBQm2/TmjUQQcG8FIxVfmVFX4C x4zssM11gfX3wHAk0Po08kFq0kXqb/zNK/JoM0phZ1qojWmlC4VYorCy7z4mSNA/y4H5L 9pf5AOVHzT0wL9MuX8X0tw+Y9dl/N//2LDRZIc6Wbrce+w+SIGkQhRTjaCdCPSWNUSmn1 mLkMwRd/12pl+fSEdx7UQ7JGvD1W2+ZYz+ZOI9at0dIkOR5TuTnXLHeREckUmsCqQtqLe 12GHYifshbJKIEG8AlYFR4j9eimCIy6oGoP6zpuZovQYgilBlHO8jcjKnGi0h8j4CAQ== 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=SADGmv5r; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=JiexLG9F; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 6D449606A331 for ; Wed, 2 Dec 2026 10:28:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6D449606A331 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=SADGmv5r; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=JiexLG9F Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B26p5QV2201527 for ; Wed, 2 Dec 2026 10:28:47 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= N3JzM6MqMyGhGPV8TBeiFc8EwrLF3WTBQLXsZUvVWUI=; b=SADGmv5rnq3Z/27O BUtYnXzvrgOpE0JMf9y9IWDbBKC8xR6wI7LZik1PF4q/N8g8AppuoH3LcAHU8ZcV TvR+3ll+ErgEZwN9Ukd12BDJwDUrFyO2kvOJpwXljnkK/SF+DlsgHlXHlCe21uCr cTq8KT3CGMQeZvabsSw5SIShIJYe3pE/qJskuc2tqYxAIzvn/E36s241aGZ4mNaD bZrWgrnJf+ndbgeBMM2bbLG6+KGZDS3xxhr27SbHT0P+BjNVBFca6Phra92gsn0l EOQz0oU2bVUBPc5XkC8Z8CwIICkEETE1blAbBXogcSqxiCSeguVWV372xht4Uwvc TSg4HQ== Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja7v3jbk4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 10:28:47 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-cdb8c46e240so7738466a12.1 for ; Wed, 02 Dec 2026 02:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796207326; x=1796812126; 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=N3JzM6MqMyGhGPV8TBeiFc8EwrLF3WTBQLXsZUvVWUI=; b=JiexLG9FhSoFbvDO+mX/tg6moLdD4wI/AkE8bHliKV4lWsnYH5q/NG1hqbCt4CUjOI iZSA/HrSA58YMsKU/KVNg1dG4IAV8pto0wEKEEQ756SIgcVTf0FUi8OK/ipreeAVquvp ZaB8RAbWJ0D+vvYnGnz14bwmXipqf6T9e6OhAOHUd9WnC3VGvOZe22ez9pLTdWyhu5AB UU8AZ071eXIrninpP5UGTP1iag4rSc7reLVPcB5ZdtTWoNzXOuFZHvPm96ibPHT8gU15 FENTBO3A5hSqDU5CFzbeW2LAwjCEw/gtEPrjHfTFHgvVtbQIsIRwUBkEsKXE9M68PDUZ bLBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796207326; x=1796812126; 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=N3JzM6MqMyGhGPV8TBeiFc8EwrLF3WTBQLXsZUvVWUI=; b=OwAjh7sOWomqN3mo/gPb+OshUyTN7LshJ9vsbf3ZB4kBKgZQ+Aqqaz8seq+Up7Imy/ THy9G+4yAxXAuUlIsGNr9SFCSb2YCXZ7n4XLcT/DeCuoSHR5orcV3WOlP1tzvEwjtnEU IsepuPbeumJW2ZcI86IipVzOZfx6tVUdGLWPZ2kgEbid2eN0GK4y6bUY1j8v14LGHjlN pHVC3uWzDCVEu7SwV+DGjKCuLC7rtF5irNYap+jQ9nq3zLxW1FCWcxDzbAlFXjDQ9Iux LlLU1bwYtioBRV1K1vF0odQGESE4t0KLSAtgW86mLz5oBEzusTIPB2JgGJGdGEKBjXLw DTlw== X-Gm-Message-State: APuU4Z+ZSQPyOfs1+JkSZj/Vb2PwxUUz1azLBCL4kXRRs2O7mAJxhRIq Iz3DxhWz6FI44cto5DG++UzzW3CFkSGVDUnfTbsErUxUd0V1OZ6zysA6zFjjJBrTIDvR+izP8EP PCZZrl+9Y4vxGeo4ddeIi4N6NuvaP0XJ+Xm0DrmPq0XC9eZ816RJiVgOCzvHei63e2cC1 X-Gm-Gg: AZFdTZc2IUTdDUi5ZFsNP44P/JweuVMK9t82tnN/RtIE1ehYkVr4WhOMZyw3/Ti1+nH UEQbT14rrfE2vdC+58ncFpQqtsDNvgJKaInIUbUsbblTV7xDY5zsqp5mb4c9EWms3IVSzVB48jP R9uKcGT+giu49t/zC2slTWwZfIReHYFhDAFEwiJnF/uWLEZ1mP2FM3t2ZsCzGhDAXuoGqQ/YXU2 EQ1q7KOYjJNvxE9z+oAIaoHTJcme0MH8irsi4moev+408tMVbQMBZ9icdLm/Hh3hVn4DKkaEBci 9exPRn+jnIPRsypuzWaipuV9NvfOyMsMNYh98h+cCjCoco9kmE+ffENH5sZkyk1Mep66yY5ok7d 42qnfDimiIkkA3wxMT7D6FgGdl6WDDD0hTD4A6ei/CDB+dEcnPtAJu6XIaUJg1ONxoYXU1Uw5OZ hqOWG/biQqcU3/suVmo9IIpm1hIvdAK7Rj9pWydymTUThjbvJCnF7+cHxCgbwj8Sv4tIg4DPQ= X-Received: by 2002:a05:6300:218b:b0:3fb:5fb2:a4f7 with SMTP id adf61e73a8af0-4014db580a4mr43789601637.34.1796207326359; Wed, 02 Dec 2026 02:28:46 -0800 (PST) X-Received: by 2002:a05:6300:218b:b0:3fb:5fb2:a4f7 with SMTP id adf61e73a8af0-4014db580a4mr43789579637.34.1796207325912; Wed, 02 Dec 2026 02:28:45 -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.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 02:28:45 -0800 (PST) From: Pooventhiran G Date: Wed, 02 Dec 2026 15:58:01 +0530 Subject: [PATCH wireless-next v5 06/19] wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks X-Mailing-List: linux-wireless@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-6-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=WJ7qzXsR c=1 sm=1 tr=0 ts=6b0ff2df cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=oDYSrMgdSjg_aXkkWaUA:9 a=bFRUnEHUPHmmGGYb:21 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 X-Proofpoint-GUID: ijZ-7MNB8BIftYuWwUGKscJDyE_A16sj X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA0MSBTYWx0ZWRfX6n3c8+fWZEhb PxtSnTXi5cb2BiP7uqIOBr2rQ48yRtF7fMHPHigfJBtje90oTTHKtcaOP0XMyt82M8ACiAlRTUJ 2Ro6xKTDSrfqEu/a/sTwRotGU1mOoEw= X-Proofpoint-ORIG-GUID: ijZ-7MNB8BIftYuWwUGKscJDyE_A16sj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA0MSBTYWx0ZWRfX7ovd+3J7+jSz BXhR/ay1240mu+JnjNAgmGe3aCHRJEpsa/Wh7MAQL9BLYtwYNsr7fF9EaCmnMVxQ93Y1BnLYiJp Rj/cMT7gDDoMx/1ttwLNlDts2CcDfDQKF4JaiMkogs4xPWvqyAInASZXpWTznfZfmnjCIIsDAWh Cih0EjgIqg2rjB5ivF4QD9mnHrwFymjpVrZY+AERew6CLN/FOWfwMboPYvhYm7uLGNDeLuY6p0C 1sa/wchNBoqHLj14R/Sc1ZlT0kIGUAoiv/HNYnvBR6Jtibxm1CRcHGbKaDEUgPzlGaOC4WDpjkt rHYBq1bVuv0oztmT41exLvl+7d0obTDjO3QHVW15DwgjBchvyTEj7yxWspzDwc0Ei7TzqgzYGeT 94a6GJe3x0Q5HAwqbAs5FTjtAm9rYg06Jd47z72ZgmlnKn57eIwMyfjOsiyBj2S+DdzsQZD2sCr TFQaeDKBSBIxgkir+EQ== 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 clxscore=1015 priorityscore=1501 bulkscore=0 malwarescore=0 adultscore=0 spamscore=0 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020041 Add APIs necessary to check whether the frame is a UHR Link Reconfiguration Request/Response/Notify frame and subtypes to invoke necessary SMD Transition handling on the AP MLD. Signed-off-by: Pooventhiran G --- include/linux/ieee80211-uhr.h | 125 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/include/linux/ieee80211-uhr.h b/include/linux/ieee80211-uhr.h index b9e592e7b8bf..aefb5444c5f9 100644 --- a/include/linux/ieee80211-uhr.h +++ b/include/linux/ieee80211-uhr.h @@ -690,6 +690,131 @@ ieee80211_uhr_mode_change_tuple_next(const struct ieee80211_uhr_mode_change_tupl return (const void *)((const u8 *)tuple + needed); } +/** + * ieee80211_is_uhr_link_reconf_req - check if frame is UHR Link Reconf Request + * @skb: the SKB to check + * Return: whether or not the frame is a UHR Link Reconf Request frame + */ +static inline bool ieee80211_is_uhr_link_reconf_req(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 category, action; + + if (!ieee80211_is_action(mgmt->frame_control)) + return false; + + if (skb->len < IEEE80211_MIN_ACTION_SIZE(uhr_link_reconf_req)) + return false; + + category = mgmt->u.action.category; + action = mgmt->u.action.action_code; + + return category == WLAN_CATEGORY_PROTECTED_UHR && + action == IEEE80211_PROTECTED_UHR_ACTION_LINK_RECONFIG_REQUEST; +} + +/** + * ieee80211_is_uhr_link_reconf_resp - check if frame is UHR Link Reconf + * Response + * @skb: the SKB to check + * Return: whether or not the frame is a UHR Link Reconf Response frame + */ +static inline bool ieee80211_is_uhr_link_reconf_resp(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 category, action; + + if (!ieee80211_is_action(mgmt->frame_control)) + return false; + + if (skb->len < IEEE80211_MIN_ACTION_SIZE(uhr_link_reconf_resp)) + return false; + + category = mgmt->u.action.category; + action = mgmt->u.action.action_code; + + return category == WLAN_CATEGORY_PROTECTED_UHR && + action == IEEE80211_PROTECTED_UHR_ACTION_LINK_RECONFIG_RESPONSE; +} + +/** + * ieee80211_is_st_prep_req - check if frame is ST Preparation Request + * @skb: the SKB to check + * Return: whether or not the frame is an ST Prep request frame + */ +static inline bool ieee80211_is_st_prep_req(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 type; + + if (!ieee80211_is_uhr_link_reconf_req(skb)) + return false; + + type = mgmt->u.action.uhr_link_reconf_req.type; + + return type == IEEE80211_UHR_LINK_RECONFIG_REQUEST_ST_PREP; +} + +/** + * ieee80211_is_st_exec_req - check if frame is ST Execution Request + * @skb: the SKB to check + * Return: whether or not the frame is an ST Exec request frame + */ +static inline bool ieee80211_is_st_exec_req(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 type; + + if (!ieee80211_is_uhr_link_reconf_req(skb)) + return false; + + type = mgmt->u.action.uhr_link_reconf_req.type; + + return type == IEEE80211_UHR_LINK_RECONFIG_REQUEST_ST_EXEC; +} + +/** + * ieee80211_is_st_exec_resp - check if frame is ST Execution Response + * @skb: the SKB to check + * Return: whether or not the frame is an ST Exec response frame + */ +static inline bool ieee80211_is_st_exec_resp(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 type; + + if (!ieee80211_is_uhr_link_reconf_resp(skb)) + return false; + + type = mgmt->u.action.uhr_link_reconf_resp.type; + + return type == IEEE80211_UHR_LINK_RECONFIG_REQUEST_ST_EXEC; +} + +/** + * ieee80211_is_uhr_link_reconf_notify - check if frame is UHR Link Reconf + * Notify + * @skb: the SKB to check + * Return: whether or not the frame is a UHR Link Reconf Notify frame + */ +static inline bool ieee80211_is_uhr_link_reconf_notify(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt = (void *)skb->data; + u8 category, action; + + if (!ieee80211_is_action(mgmt->frame_control)) + return false; + + if (skb->len < IEEE80211_MIN_ACTION_SIZE(uhr_link_reconf_notif)) + return false; + + category = mgmt->u.action.category; + action = mgmt->u.action.action_code; + + return category == WLAN_CATEGORY_PROTECTED_UHR && + action == IEEE80211_PROTECTED_UHR_ACTION_LINK_RECONFIG_NOTIFY; +} + #define for_each_uhr_mode_change_tuple(data, len, tuple) \ for (tuple = (const void *)(data); \ ieee80211_uhr_mode_change_tuple_next( \ -- 2.34.1