From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E9D612DDA1; Mon, 18 Aug 2025 13:02:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522136; cv=none; b=hu8a7ncxbznuopWld70q8i8j3EoCGoUZEbZiIOWSSg5KOFbxo5TuaBIpL1DMymfwlwXUjA0BIxpSYZXtYvJl/kbEkIwTqbYH90scJVUaRoJ3Cj1p6P5sqcq2iqzUjQUEOb0P6JExeQK77GBX384mhJ+oSsNHj1YeX6Y/Y8yosU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755522136; c=relaxed/simple; bh=6lgOEv1Cj/z1XejdGpg6/bv6q9EFhvIQfC4hwZZDFs4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oCQU0qP7EtoxUO44Hlo7d+BMHF8O6Bzjj/nbYULpqhff/U4PllxIovlmk5VqFhngKgMjPjY1UHwjkT/UzX7KYufCY/rchQPDLIQR5T2U5sF+8OSBwnrulk5vjXv99ugJ1OUAUnKtSuYgN4OqMB1yNLkztC7q+wCDoTthvI38xXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DnhOjTrB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DnhOjTrB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 246B9C4CEEB; Mon, 18 Aug 2025 13:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755522136; bh=6lgOEv1Cj/z1XejdGpg6/bv6q9EFhvIQfC4hwZZDFs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DnhOjTrBbbZ41gcE/VJNcIiADU41wsCndMdweKDDIKI/O5Tire3Dnm6jST0ExFcB3 XbGEXWGTnyFS4z546EnLDfWbw+CXcXe9bARxqBQQ2imXU0tWevXevme4nptfWV9UtG 0VMw1Z+zdT7YnLXvrwCwYfGS/TK/wC9gr3vBtfBs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sarika Sharma , Vasanthakumar Thiagarajan , Jeff Johnson , Sasha Levin Subject: [PATCH 6.12 227/444] wifi: ath12k: Add memset and update default rate value in wmi tx completion Date: Mon, 18 Aug 2025 14:44:13 +0200 Message-ID: <20250818124457.357028452@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124448.879659024@linuxfoundation.org> References: <20250818124448.879659024@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sarika Sharma [ Upstream commit 9903c0986f782dfc511d7638b6f15fb6e8600cd3 ] When both AP/STA and monitor interfaces are enabled, ieee80211_tx_status() is invoked from two paths: the TX completion handler for data frames and the WMI TX completion handler for management frames. In the data path, the skb->cb is properly zeroed using memset, but in the WMI path, this step is missing. As a result, mac80211 encountered uninitialized (junk) values in skb->cb when generating the radiotap header for monitor mode, leading to invalid radiotap lengths. Hence, explicitly zero the status field in the skb->cb using memset in WMI TX completion path to ensure consistent and correct behavior during WMI tx completion path. Additionally, set info->status.rates[0].idx = -1 to indicate that no valid rate information is available, avoiding misinterpretation of garbage values. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250603063512.1887652-1-quic_sarishar@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index d5892e17494f..5c5fc2b7642f 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -5229,6 +5229,11 @@ static int wmi_process_mgmt_tx_comp(struct ath12k *ar, u32 desc_id, dma_unmap_single(ar->ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); info = IEEE80211_SKB_CB(msdu); + memset(&info->status, 0, sizeof(info->status)); + + /* skip tx rate update from ieee80211_status*/ + info->status.rates[0].idx = -1; + if ((!(info->flags & IEEE80211_TX_CTL_NO_ACK)) && !status) info->flags |= IEEE80211_TX_STAT_ACK; -- 2.39.5