From patchwork Sun Jan 19 15:29:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karthikeyan Periyasamy X-Patchwork-Id: 13944504 X-Patchwork-Delegate: kvalo@adurom.com Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 AB40B1DF27D for ; Sun, 19 Jan 2025 15:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737300582; cv=none; b=pRVeANBRyoAdBYHeT6h6mMwargwQ3VQrHCMdAoCuSXPHHgaMMsdZe9247t7mW/C9AvGbvI/FwDMyhrU8IivlSCE5D7vz7mTLIr+PSdqDYl8W/RZBpbD94WV8lhjKKCwo9uLULwKuulcw87RONbg513DRLvdfqVeQumY8TtR7PDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737300582; c=relaxed/simple; bh=5FVNvpn5Kc+aXW1hMrwoX4pA/ud6+alFwA5Ncf5Pzj0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VTIyokbOdBRbc4S8i5y8GDOVS9530OHaZ+miTvv3wDw/14qDTB4EbMINux9or+Jm2xtVDoKV/iiqQZdl0Ap86btIAsIbzOeEQQsAU3/VnPg9BAQlgfTK3cLd/DfuVn4Yoi0D1Evzk5+6y1OiFN8WfWzMLfecnoPs2nPF2Mwh7Gs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=VoZsOymg; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VoZsOymg" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50JDkg5k018040; Sun, 19 Jan 2025 15:29:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= YJRvM2aCq2dTaz5enj0I5iipNN9jouJRhygshzgfrdQ=; b=VoZsOymgcF9smwSn i+E9Oky5jHSJiuK9wt3HNkrJO3L7x0dlLMm2yms9tIbm02d8BAbouQL6buyAeMJF YMzHKln3i/vROo0PXwSTGEj1Li5BmpaUlhVwA3hxKCG+oB1qaHwjcDAjJH4qPmDV f2cVtdrCyIK9H+Y2ZHqby7bcstrOktaykPEwFXyURjA1CVeC47rM89pe5s3jT/0+ LjMduZFCKZOy8Bmgz2U2Y1u6Qp20jBSs6KExviEIU8tJL5wZlUVDAzmPm3Y+BJcj HY3T7rgZ0/2S8LSbAfGNff7Did1y4fj4uwNMiJzEA+UCviB32Farc/3YhDyLNIsR a692zA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4491t2g5hv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 19 Jan 2025 15:29:37 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50JFTaRR029211 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 19 Jan 2025 15:29:36 GMT Received: from hu-periyasa-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 19 Jan 2025 07:29:34 -0800 From: Karthikeyan Periyasamy To: CC: , Hari Chandrakanthan , Karthikeyan Periyasamy Subject: [PATCH v2 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Date: Sun, 19 Jan 2025 20:59:11 +0530 Message-ID: <20250119152917.2316514-2-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250119152917.2316514-1-quic_periyasa@quicinc.com> References: <20250119152917.2316514-1-quic_periyasa@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: IgB2gwOKEcsTHg16DRyYktBS9PkKj-0p X-Proofpoint-ORIG-GUID: IgB2gwOKEcsTHg16DRyYktBS9PkKj-0p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-19_02,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 mlxlogscore=851 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501190120 From: Hari Chandrakanthan Currently, the link_valid field is not initialized in the monitor Rx path. This can result in random values for the link_valid and link_id leads to undefined behaviour in mac80211. Therefore, initialize the link_valid field in the monitor Rx path. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Hari Chandrakanthan Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath12k/dp_mon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 7e679ce177d3..023715df1126 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -2001,6 +2001,8 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct bool is_mcbc = rxcb->is_mcbc; bool is_eapol_tkip = rxcb->is_eapol; + status->link_valid = 0; + if ((status->encoding == RX_ENC_HE) && !(status->flag & RX_FLAG_RADIOTAP_HE) && !(status->flag & RX_FLAG_SKIP_MONITOR)) { he = skb_push(msdu, sizeof(known));