From patchwork Tue Feb 4 09:36:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karthikeyan Periyasamy X-Patchwork-Id: 13958866 X-Patchwork-Delegate: quic_jjohnson@quicinc.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 BD635207676 for ; Tue, 4 Feb 2025 09:39:09 +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=1738661952; cv=none; b=Kl1PrMuBiYMiL+rFgvRXSrEjti6slG6b7jA36KCxNOpjgw65bRZ5dcFnv6qGR9TlBtd6Fj3pOmgrGweAbH9yqHY+IUdxKYMcB3PBYeNWXFN2nLalMxpQUYc5jaZoZ0b6gnWgheqcmObReiwsEI1M0ZyDLf/B4az0GzVq+qKlgek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738661952; c=relaxed/simple; bh=Da/hFZDrMK5PZGfR6CNBOV0nMydGN62v9n4MDhhrDI4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=V72Jk4c4F+bYoRmA28dmwhsUBp0Oo4fMBnzUyOvKWm2uL+MWHIDMq7cFulDMC0R9Rbq2Ds7Aen+HalcEOopi/mxxHHTXlrFdZEJ8N8T4q0gOu939gT3UqSMrGstSMU8i4M+tQnjA+x2HrMrJK9bAylxSYXQ9z+XrGtAmbO6VvyM= 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=OnNBWUBA; 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="OnNBWUBA" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5141BgOI021171; Tue, 4 Feb 2025 09:39:06 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= JogUmWE3/7yCqfz6PrcYIRBhaVaKbm6u2eLsWKLdNY8=; b=OnNBWUBA/qrzjPue dlDIUEzVglZSDKW2mQ++wi8FhR22QPzw1bQKeW+rVbgyhIobMdzPT4DOjrIT1K/M L/JG1I+M+LTJSuzT43238xkDtXdoBi4g/vI2ZZhGqKelKISqQKBzvQ0VrJXhNJZo YJ6UOJkCbJYGEQd9/B7DfYRGtcVDHor2IL8G1i6Jxc7brIMsQEXTqNguPUAERW10 K1h4YHvZRTm0kx2RxR7+LxMiGbhekC+fEwsnOMkqmSyRhRt0FJ30Nak8qf3TGbKl aBH5i6JwZZMpGr4bO/eHYMS1OU6MRZt+NriSUIIF+AovUe6lrJz7hRsmpwoBntwG t51eBg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44k911gypx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Feb 2025 09:39:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5149d5th026737 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Feb 2025 09:39:05 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; Tue, 4 Feb 2025 01:39:02 -0800 From: Karthikeyan Periyasamy To: CC: , Hari Chandrakanthan , Karthikeyan Periyasamy , Nicolas Escande , Vasanthakumar Thiagarajan Subject: [PATCH v4 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Date: Tue, 4 Feb 2025 15:06:50 +0530 Message-ID: <20250204093656.3682278-2-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250204093656.3682278-1-quic_periyasa@quicinc.com> References: <20250204093656.3682278-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: -z4D8RSwggjQmdx3ZYSUnb6mKNOxP5cx X-Proofpoint-ORIG-GUID: -z4D8RSwggjQmdx3ZYSUnb6mKNOxP5cx 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-02-04_04,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 spamscore=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=797 adultscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502040077 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 Tested-by: Nicolas Escande Reviewed-by: Vasanthakumar Thiagarajan --- 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 0a85b198ec7a..12224fea9801 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -1970,6 +1970,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));