From nobody Tue Feb 10 17:45:55 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 60D951DC983; Fri, 24 Jan 2025 04:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737693735; cv=none; b=aRB2sgUVka2whBPLGNISCkGS8jrMKdG2tvtG0gutP+Exix+h2GxWCkN1PzzlhL/ep02tktMtru4TFWgSHV++rm2FEdPIyDDcwAeNc2klhIRcyQ3CUl84r0XYp3f7Le/eTzMteKWQFDKCGDE7Vz1qlldzOoSYXO1woBt1a53WvDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737693735; c=relaxed/simple; bh=HWvgspYJT7WVqwZaWj84cPFaO9dUFbgB4t3DdM2rzRY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=NDJoLvr2bHpPqU7MGDUxv6mY9rHqbNhgZkPVj6uKNMOZ4da5ioPDaSRET784RuQ9Krme17Vnd9StIuNa4rOnLMO7jjX6ZlD8f6vGzfgpenaw5ikV+7ZxmH6b3Zp8/Cgtk36PsX1Thu3bvbMxElb8jzfTby/vioBtJzUBIrMEzE0= 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=aBv1E1k+; arc=none smtp.client-ip=205.220.168.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="aBv1E1k+" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50O3FjSd004672; Fri, 24 Jan 2025 04:42:10 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= vgtTV1SiaVX92bK6+ZXXrad37Hj3AZ4Y9hhI2FB0mjU=; b=aBv1E1k+dxRRh+HP oGuP5IIhSsbe21fNMkdq2xcM06YTw63PRFQ0FFZQwsXm4iaRN5+tcMVmtQ9G09bf u0gOj2lfEKxO4FdznptDS6SFpHHDyOFqU/zoBBhFJXWK7113Ab8UFrZ6AZb8x9dG ygSJwnKXgOyR9U/dnrwgQkCKMrpO2yrQTAafARW2NAbwHQM92KT0YVa+GpJB49/P nvjhIdaMTb8hjlDc39+eYFlb1Hf1c/VQSTnAWa97FcPA7AvQc28nK8GmwmHbLxEe WgSfxRdid2Bqvo1xaQm9b3ndlyhSqm2oAgjebyOETvJL0+GKTQ7UcMYc0tw1Ro2G OszOsw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44c2t4850f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jan 2025 04:42:10 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50O4g9qW031051 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jan 2025 04:42:09 GMT Received: from hu-adisi-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; Thu, 23 Jan 2025 20:42:06 -0800 From: Aditya Kumar Singh Date: Fri, 24 Jan 2025 10:11:30 +0530 Subject: [PATCH v3 07/10] wifi: ath12k: fix ATH12K_FLAG_REGISTERED flag handling Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20250124-fix_reboot_issues_with_hw_grouping-v3-7-329030b18d9e@quicinc.com> References: <20250124-fix_reboot_issues_with_hw_grouping-v3-0-329030b18d9e@quicinc.com> In-Reply-To: <20250124-fix_reboot_issues_with_hw_grouping-v3-0-329030b18d9e@quicinc.com> To: Kalle Valo , Jeff Johnson , Karthikeyan Periyasamy , Harshitha Prem CC: Jeff Johnson , Kalle Valo , , , , "Aditya Kumar Singh" X-Mailer: b4 0.14.2 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-ORIG-GUID: 2_4upxyOvVzwIHRGBsS1sNJlgZ9yZWMA X-Proofpoint-GUID: 2_4upxyOvVzwIHRGBsS1sNJlgZ9yZWMA 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-24_01,2025-01-23_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 clxscore=1015 malwarescore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=955 suspectscore=0 priorityscore=1501 phishscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501240032 Commit a5686ae820fa ("wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register()") relocated the setting of the ATH12K_FLAG_REGISTERED flag to the ath12k_mac_register() function. However, this function only accesses the first device (ab) via ag->ab[0], resulting in the flag being set only for the first device in the group. Similarly, ath12k_mac_unregister() only unsets the flag for the first device. The flag should actually be set for all devices in the group to avoid issues during recovery. Hence, move setting and clearing of this flag in the function ath12k_core_hw_group_start() and ath12k_core_hw_group_stop() respectively. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Fixes: a5686ae820fa ("wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to= ath12k_mac_register()") Acked-by: Jeff Johnson Signed-off-by: Aditya Kumar Singh --- drivers/net/wireless/ath/ath12k/core.c | 5 +++++ drivers/net/wireless/ath/ath12k/mac.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/= ath/ath12k/core.c index d758fa9216cd0f53d76cd2d1a6fa02d27ad54aa8..25a5beb79e0120af2c9183ad787= 818572a41476a 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -928,6 +928,9 @@ static void ath12k_core_hw_group_stop(struct ath12k_hw_= group *ag) ab =3D ag->ab[i]; if (!ab) continue; + + clear_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); + ath12k_core_device_cleanup(ab); } =20 @@ -1033,6 +1036,8 @@ static int ath12k_core_hw_group_start(struct ath12k_h= w_group *ag) =20 mutex_lock(&ab->core_lock); =20 + set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); + ret =3D ath12k_core_pdev_create(ab); if (ret) { ath12k_err(ab, "failed to create pdev core %d\n", ret); diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/a= th/ath12k/mac.c index 329c050037219567239610d94fd60358be959b2c..ab3273466809bfad7ef4eca922a= 1998248b357ad 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -11255,7 +11255,6 @@ void ath12k_mac_mlo_teardown(struct ath12k_hw_group= *ag) =20 int ath12k_mac_register(struct ath12k_hw_group *ag) { - struct ath12k_base *ab =3D ag->ab[0]; struct ath12k_hw *ah; int i; int ret; @@ -11268,8 +11267,6 @@ int ath12k_mac_register(struct ath12k_hw_group *ag) goto err; } =20 - set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); - return 0; =20 err: @@ -11286,12 +11283,9 @@ int ath12k_mac_register(struct ath12k_hw_group *ag) =20 void ath12k_mac_unregister(struct ath12k_hw_group *ag) { - struct ath12k_base *ab =3D ag->ab[0]; struct ath12k_hw *ah; int i; =20 - clear_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); - for (i =3D ag->num_hw - 1; i >=3D 0; i--) { ah =3D ath12k_ag_to_ah(ag, i); if (!ah) --=20 2.34.1