Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1149902rdb; Tue, 30 Jan 2024 09:14:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+rxI+U0HAEF8LNvybL7MTOh6TpvqJ04WgQcvK9h2LdXJodcx6m3E14NGAt7UjoMuGo2eJ X-Received: by 2002:a17:902:ce89:b0:1d7:7004:b5e6 with SMTP id f9-20020a170902ce8900b001d77004b5e6mr7334597plg.8.1706634851238; Tue, 30 Jan 2024 09:14:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706634851; cv=pass; d=google.com; s=arc-20160816; b=E7gkX8TcTB0K2B2kGDAuRp2301OQbdTkZTRab9K28hy7VM5QpP4sBs/IYnG8NnYp/a 9u27FJi1Br6o5GjcO7qdqSM3vKnJElzRLsla+iileErVEcNW1yIbInneblQ8ROVyxBqy fCyGAq3E1i1q+Ird9aX19GWeGdI60+5nkivcxjOWh3NcACrA37fpeFkSAgCSDFfqCFmW fCxSsQXsVyx1QxMMjDrIUV/GWls2HQyHGGEkF2ot1lGinwfwSrGeXyj0FyYN003CktS+ fpbnMWfICOpipi1jutzyxpQA62eIpwoFZBss+Y0q2E7/d2mekuv6js9XwAW9hEFl4FBG pRZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=cr0YdQpnMyYKZ+s9d3f/zqHJHM8BdGvg69UMWQgzggs=; fh=6dZRuG2R6iQ+gj6GUe0L9seQSlWcPqyMAGVrU9h/Dv0=; b=v6uKeWkvmnaiTz8DKnTxdLcDUecL/bti6ngwzg1987GaSM6KgsSZCLJ1qHIqE6aWI0 W4rvEJkaXve0gTIHBpqwUKUz4vtJkAfJwzSPWBQCsGMI3ZQo+nkbU5EHxAjm+Fl8yXSg WjCq1bu7QxpOytDsFOqklOK111AeJYG+3w7I23ZIH2bpXtHMsd/29woVvf3aGedEkF3D 7FOt2vKFooTCDeBbaiAHNyx/uOTQWO6tv8UPsVuAm5V75dHTnp2E9BFwNvPePOkcmwFa 5CGA8O6uaRDsHcT/X9wyUadjzBntc4Kc+D3idC0odUD5w95up0QUHUG81j5geDpaieJn AxCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="gmChN6F/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-2837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2837-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCVeqRzPYd0D2w0xdsvqNluMNEy7OgYCMR2W2sV0FK0LjdE4d9fqxYpuc9U7ZaXfd3M+s2EuITYeVInuL0LkpV7VGF8FOlNuifqFl/iOMg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9-20020a170903230900b001d6f3a896c5si7851209plh.241.2024.01.30.09.14.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 09:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="gmChN6F/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-2837-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2837-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0D5B8B26562 for ; Tue, 30 Jan 2024 16:52:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8F2D67A0F; Tue, 30 Jan 2024 16:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gmChN6F/" X-Original-To: linux-wireless@vger.kernel.org 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 1EFF012C53F for ; Tue, 30 Jan 2024 16:51:12 +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=1706633474; cv=none; b=H5iIhJYBtZb9SDAwTPLJYQw5CLSii3pQbiEl9VYSfgg51KvSbwI4Z//0RfyecriF/ZkXLLMA0GMsynfwGGUD/ZCOtqxVuauU1RiMj/BkMmzYm9iyQRD4UOcmU3k/C49Kueyw8uFMzDzDcFrjtRiFls/bQBnnM0H18lD8MEqPMbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706633474; c=relaxed/simple; bh=7R91uwd4gIvTxNp3tM1y7bQUuXW5qFuZ7I84Co8N5SA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=HKCpA80utzyQO1/UY2yGK7MQ/CN2jeysrH6q+aQfVBdqDzaerhGRQVVgm19wmeqlvAC2jnpLcQBnezfj2gtZX3aNwQB0AozQP53NYF6UJJbvh3zY+UtuwnlXegtcoEpnI0P1I7O2S+k83aBgZJ9KJE6fU35IX79zhh/Ya1MLEfY= 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=gmChN6F/; 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 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40U9SD9e013333; Tue, 30 Jan 2024 16:51:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=cr0YdQpnMyYKZ+s9d3f/zqHJHM8BdGvg69UMWQgzggs=; b=gm ChN6F/jqIcBH1lm0up8Nrt4cla3mUvnlAlQ0o8v9h4pwoRzvsRgYqW5uSTbe+VxN +j8u3Zzti1hF1KYPrRDzMb5KnfzvKBRto44bIQ3WiQy02TfbSQOixD+CuP3JejvQ Q7S9ZSuFty3gEbQ+Y2ohIlfWpN2YW++EWCFUL8woKz0Q4utToqt580JugUBYPg85 9yyLD7Kp0K0zPP23EPyKnikwPG59H+CpAg+EEZAJMUPbv9gINWtT9LDXqNi+YJTT 0d7Y/czWMnfMdaRhyJvWeTWrDzm0X/p10yTeaWQR56ErEF+fotnFMXAn5JsXHu7u xvg8xyY7t1SjoEt68+7Q== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vxvve18ae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jan 2024 16:51:08 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40UGp7BE025862 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jan 2024 16:51:07 GMT Received: from [10.110.47.232] (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.1118.40; Tue, 30 Jan 2024 08:51:07 -0800 Message-ID: Date: Tue, 30 Jan 2024 08:51:06 -0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 02/11] wifi: ath12k: fix incorrect logic of calculating vdev_stats_id Content-Language: en-US To: Kang Yang , CC: References: <20240130040303.370590-1-quic_kangyang@quicinc.com> <20240130040303.370590-3-quic_kangyang@quicinc.com> From: Jeff Johnson In-Reply-To: <20240130040303.370590-3-quic_kangyang@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: JNw3yVpLUpfkLN5lKFbKtBlFYJNfimXr X-Proofpoint-ORIG-GUID: JNw3yVpLUpfkLN5lKFbKtBlFYJNfimXr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-30_07,2024-01-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxlogscore=915 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401300124 On 1/29/2024 8:02 PM, Kang Yang wrote: > During calculate vdev_stats_id, will compare vdev_stats_id with > ATH12K_INVAL_VDEV_STATS_ID by '<='. If vdev_stats_id is relatively > small, then assign ATH12K_INVAL_VDEV_STATS_ID to vdev_stats_id. > > This logic is incorrect. Firstly, should use '>=' instead of '<=' to > check if this u8 variable exceeds the max valid range. > > Secondly, should use the maximum value as comparison value. > > Correct comparison symbols and use the maximum value > ATH12K_MAX_VDEV_STATS_ID for comparison. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 should be blank line between unofficial Tested-on tag and official Fixes tag > Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") > And no blank line here since all the official tags should be together > Signed-off-by: Kang Yang Kalle can fix the above when he moves into the pending branch Acked-by: Jeff Johnson