Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp893568lqd; Wed, 24 Apr 2024 22:58:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZJOrjbPVEMF+cZm0XPF6GrDC2Cibxk/VXjQtQNP2mafNNDKowLTrPM5znhzYieo7ViEVjOvlInJX3FljIeCoj3xz1rmZAv/t4eDcH5w== X-Google-Smtp-Source: AGHT+IG4FsmWMoiq6upeIRV3BBCuEekV3oon4RvU7+cykge50U8XvYShPx16MmcpMWSDrpmuFgwV X-Received: by 2002:a05:622a:1b09:b0:43a:45d8:c5c6 with SMTP id bb9-20020a05622a1b0900b0043a45d8c5c6mr1046490qtb.6.1714024722712; Wed, 24 Apr 2024 22:58:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714024722; cv=pass; d=google.com; s=arc-20160816; b=pklw5LHEp2jx/b3XQauJ6gkEl9w7Yitm7HdpISQ4c6oxgNBfZ/ZZsnH51rG8gh97kS HA2OxoQkE5zeIuL+ykNH04lxT53hNAjSjpYvm/95vadgL8zX8I0iFqFIQ9urJwq9z3/4 iie+Ig1L00c9ZyXPySEKdqKgQ6STkOmzAr9gxJWzIAmSZmb0ONl2P5ymDAwywwyNZn4l yMLfSxRcBN2Q61sjxuAe+3OyB1QEQbJbW4xRbGv2jjyNmrnycBwZ+Yw9kxzeQT212PRv HolRFEm6WnjISA1KDDEsoIBLD7/1aWpcRwFWGVCKJepTLFXdUJl2urZ95ExrDjegraZ1 h7sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OF7eGCkM5q6MubIGHvcoi8sqAD3+UvagDcZ4/W8v5b8=; fh=wnySVr9+WO9j7lO1L6CVbSw/CjEiK6R10EUaKUiDPbE=; b=EPz23D1+9FApuvMEJ/8QcqvGPkSb2+yhg3mgCTivd2oNBarDLWBfEeRHkxpFQaNQ3J 3q9GowT10MVIdrh3g+Q7D3QSrTenZk/hyPeEmOCrVBGwFiq3OOMhAS+YGJHqcbDCTH3W gIoG08mNRw3PIxaWC9u+FNWvi6tNZxw4H0SExu/irVMxXLfqyudEuOaVtLKKI1PujITg pM7Dt/sDdtBrX08JQHesZx3AIVj4WG6z9eRVP3lCd5z00WynxINBiU99jizPULKdsDC9 joXRzd/me8wownKEVhwv6MzSZAmrfGa8jYsrcHoWDadj2DoRxVDf241Svu4eEsSm4cXO 1uPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=b+Dizt08; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ec6-20020a05622a5b8600b00436a4873751si15053063qtb.534.2024.04.24.22.58.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 22:58:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=b+Dizt08; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6811-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6E25F1C2147B for ; Thu, 25 Apr 2024 05:58:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2EF24207A; Thu, 25 Apr 2024 05:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="b+Dizt08" 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 2FF1F3D3AC for ; Thu, 25 Apr 2024 05:58:14 +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=1714024696; cv=none; b=h87BfbUG82s02Kq6gJBcg8Q71UVLk5eZ7r0+wdBoMcM9tDdItDNp47cYsp/FXpWuugg2485QS8PfkKlSJGoTYxXR5BFFX1w/L21oqS+Z70bQ8/hUemCr0vxh+Bzbpz8KPZkl8c8DHxEdWTVgUJX5rd5INrrh1wsXbVwSUPi0bPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714024696; c=relaxed/simple; bh=hRcHMTi2aeGQmDhsVWnLuUVONN21niPN/X963tPQfNA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OTw2BiKN5yFWtJGu0M07nFNWhrvxTS94Tc/wqgMVJcm90bu6gEYVdD77Q9GzJE5+KbxWa4sKXQuBcrqI86I95odDap/Jc8W6Z8gZOIdaMemYN1UyVhfXb4OTlyySMhiocQCPu5n93hr2/IhPPZl495PNYXhZl1KUDLMzRENKw3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=b+Dizt08; 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=qualcomm.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43P42Qcl009117; Thu, 25 Apr 2024 05:58:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=qcppdkim1; bh=OF7eGCk M5q6MubIGHvcoi8sqAD3+UvagDcZ4/W8v5b8=; b=b+Dizt08kPtVKEcL8ArvpGC ARzxpgs7yfPmQ5uCe3/k19xagHYLQ1Csu04LXi4wnACeSJFNJ3DhVt5RoGwq3Zoy 5epy3cCUzk+qe8V0i4hbnYox7GQ3Doj4I+xFmbyG8d668AQn03YBv2hMEqTAPd84 NtA5DfEr0tVWN7QwTPDcOtrH7EQ6S6XEynnvV9PD8SrI+K4+ji0w0Pctn3exwPI3 URcBifo3cPxw7jZHAK+uIpzDA6Tu4yzOsmdoO2q3wRr72GpxCh69aGxaT9i8FPuo mLXU/2fcqqYh3HpzdDv+Wja343fyWxseJiWoSnUtUjhcj8QdXN4VRpcdBBm1+lQ= = Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xqenmrcv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 05:58:10 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 43P5w6r3031696; Thu, 25 Apr 2024 05:58:07 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xm6smbfp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 05:58:07 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43P5w6XH031690; Thu, 25 Apr 2024 05:58:07 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-hprem-blr.qualcomm.com [10.190.108.75]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 43P5w7G1031702 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 05:58:07 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id BBDEC41154; Thu, 25 Apr 2024 11:28:06 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy , Harshitha Prem Subject: [PATCH v2 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api Date: Thu, 25 Apr 2024 11:27:56 +0530 Message-Id: <20240425055759.1181165-6-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425055759.1181165-1-quic_hprem@quicinc.com> References: <20240425055759.1181165-1-quic_hprem@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: rC6Smdl_w8hSVIcboK8CQA0AGSJVHJeh X-Proofpoint-ORIG-GUID: rC6Smdl_w8hSVIcboK8CQA0AGSJVHJeh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-25_04,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404250041 From: Karthikeyan Periyasamy When hardware device group abstraction is introduced, in future, a group abstraction is registered to mac80211 rather than a particular device. Hence, setting ATH12K_FLAG_REGISTERED in QMI firmware ready event might not be ideal. Add changes to move set/unset of ATH12K_FLAG_REGISTERED flag inside ath12k_mac_register() and ath12k_mac_unregister() respectively. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Harshitha Prem --- drivers/net/wireless/ath/ath12k/mac.c | 2 ++ drivers/net/wireless/ath/ath12k/qmi.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 0ff526bfd104..ae0a56bb8d6d 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8892,6 +8892,7 @@ int ath12k_mac_register(struct ath12k_base *ab) goto err; } + set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); return 0; err: @@ -8911,6 +8912,7 @@ void ath12k_mac_unregister(struct ath12k_base *ab) struct ath12k_hw *ah; int i; + clear_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); for (i = ath12k_get_num_hw(ab) - 1; i >= 0; i--) { ah = ath12k_ab_to_ah(ab, i); if (!ah) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 7a1e4eb0370e..b37ab6244931 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -3327,11 +3327,9 @@ static void ath12k_qmi_driver_event_work(struct work_struct *work) &ab->dev_flags); clear_bit(ATH12K_FLAG_RECOVERY, &ab->dev_flags); ret = ath12k_core_qmi_firmware_ready(ab); - if (!ret) { + if (!ret) set_bit(ATH12K_FLAG_QMI_FW_READY_COMPLETE, &ab->dev_flags); - set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); - } break; default: -- 2.34.1