From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387465; b=rrrIle8y0R6Xsj/5EfjYQC+pLGkBDnyDfSWWXg7L/d4f40wvuby0j9qgT9X9kV0DlnbN mUb4muyCpskdA38nSZZFcqHNCTdIFOo7KSUC21xAdrwawuCMtQazAuCWp3qNd40cwnukj xckwn0tuV36/+tyeVHi+/C0/1/s12BwdvXlew98gzkmZnODVzWKd1Bmhbr75YX3aa2j+3 7nc6fSFcOwqEWiMQcWGsJQ0MRG2LGeu8MXIElcO6vXCtHI6yVDkkmSRgjzWz+bmBWMvpP iktjow9K/xDsURrPD+dqHxyKJ8KUIjl7hwL5WO+cm5FPIFPwEbW/7VaImkzzhdxcRQg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387465; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=zyiW4plkBknyzP9aXeeuUAgD9DC+TcJQYeBQxN1+kzI=; b=yR3Lkm4Qxj5eKiBbA410JXZbnchmscyVwlo5Tt0RvzNyhCB+SfQPseQ3x0kaLPEjAf+q /hg8k2r8vhC8k4s6dSuG0wYrPTUeszCW1PiB9D0FeQT0591XqAhXFmZXLZjeE8fA/by4h obh/Sn+z2hvX6xqZXkvvoP4cgu+1xUGslbwOkofVbxGfC8x0ahwcSTZB8OTv8Td5kGCaS JsWJVsRZabqlD3WfwiARgFFHCzxFa2m6fS+x2QiENP/f/14eVXcLxJJ374eax4HjjddjC YmNlRE1ZCJBQvmsfEY5Xqaj3ZLLJRJRfTRtDkq5Jbnf44C67BXoiHQr1RH8o5EZKLww== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OrySTGAW; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AF62606A322; Fri, 4 Dec 2026 12:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OrySTGAW Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07F611F000CE; Fri, 4 Dec 2026 12:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387465; bh=zyiW4plkBknyzP9aXeeuUAgD9DC+TcJQYeBQxN1+kzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OrySTGAWUIyeqds0nzQ0yMUy83rMNx/NDb6eqcEZSrpCqPMQlT2WK/BPeccAGKxON 61hSs/X+HaKKJFeZ85vn1EbVqjuNEOVQlyJM++gCN6VzVvGig3Z4gAxL2WOxuL+2cW uMJVO/FHKGcNswHfoYe6HDr8SQ/Kbk0+rqQohjnI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johannes Berg , Sasha Levin Subject: [PATCH 6.1 0255/1059] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup Date: Fri, 4 Dec 2026 18:56:26 +0900 Message-ID: <20261204100650.876478504@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit e035900ffe9e8978f7c0d7b61811b6b578751697 ] In ieee80211_build_hdr(), IEEE80211_TX_CTL_REQ_TX_STATUS is checked in ctrl_flags, which is wrong - IEEE80211_TX_CTL_REQ_TX_STATUS is in info->flags, so the check is for IEEE80211_TX_CTRL_PORT_CTRL_PROTO instead. This works out OK because the only place setting _that_ at a point before this gets called is in fact ieee80211_tx_control_port() which was intended here. This is actually needed for correctness, if jt were checking info->flags instead, TDLS would fill/leak the status frames created here. However, we can just fix it by using the cookie instead, that'll be set for PREAUTH frames via ieee80211_tx_control_port() as well, and no other frames. Additionally, the code also erroneously set it, but that just caused preauth frames to get it set, since storing the ACK SKB will also set the correct flag. Drop this assignment entirely. Fixes: a7528198add8 ("mac80211: support control port TX status reporting") Link: https://patch.msgid.link/20260803141309.292711-10-johannes@sipsolutions.net Signed-off-by: Johannes Berg [ sashal: Replaced the missing sk_requests_wifi_status() helper with the branch's open-coded skb->sk SKBTX_WIFI_STATUS check, while still swapping the ctrl_flags term for cookie. ] Signed-off-by: Sasha Levin --- net/mac80211/tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c3256eb8adae5..3fa10e1d56431 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2908,7 +2908,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, if (unlikely(!multicast && ((skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) || - ctrl_flags & IEEE80211_TX_CTL_REQ_TX_STATUS))) + cookie))) info_id = ieee80211_store_ack_skb(local, skb, &info_flags, cookie); @@ -6101,9 +6101,6 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev, if (unencrypted) flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; - if (cookie) - ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; - flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX; skb = dev_alloc_skb(local->hw.extra_tx_headroom + -- 2.53.0