Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp231921lqp; Wed, 22 May 2024 02:55:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBgdaTw/C6JhqfAkpnnDsdZikS1qOhYt9A+KetnaPI17vZjtbRtHRKYG9y9L3HxHfxPbf4KKQ2oLZrFDlz4RRR8obESPAmf7JgpVr7lw== X-Google-Smtp-Source: AGHT+IEjrcKBAodMn306Sbd/7AG/mz1YxF6xhBa+bD4B5HLikussAP4Ghcdo0+QMpQTW8ROOkUHV X-Received: by 2002:a17:902:ce8f:b0:1f3:33b:ff18 with SMTP id d9443c01a7336-1f31c964f6bmr15433285ad.11.1716371736581; Wed, 22 May 2024 02:55:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716371736; cv=pass; d=google.com; s=arc-20160816; b=to5qFRzdyQxccQ74RjzRkokX2AVPj6F9c+qzSo9ZFSySIYAtb5G2i+rPwC5LM4u4zj KLD4qxZiqD7mJEBblrNlrbHbcuWVAcmZAzyqnytdlcY/UsEdNBtlU2QhgIm+80mIaX3L 6W9sej9exWJNsqYqQCeo+8N82EZG64njSjPfyskRU5Gcx9BfNCoVX8TH54NbD3ZfoyGP /nHcxZRqi02+AyV+W6MAG21G2PLMJ3aKt44zMNtc5Dwtp9u45K6+NZecNyb7UeCZG29f W4KUrkMS1WMUIYcgvYo3IQBLok1E4dsvEUI/nbRy5oFZLPcTBpMUliMqasEeIMqpknCq 0VhA== 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=TpDzXI1XCwKcy5biNSn5A6C8x45nBCjfW3MRqwCUuqY=; fh=gjyKuI8lXSKwquXF/tvFPrzHVVLmD81gAC9iylGd+k0=; b=hyHLxAlXBDgp6kdBKwe5BNXom8tqqoL6vAzeSCYmgODcDXD1tAo3zSt1D5v87meiOs OZSRYmexhWrPabytk+5oylL3VQsTXYBZXUhR1oxSSpFnIOQJO4E9Rr6EmpyjKfRh7M0v c9uGf/ClKhOU4purcjAOwPNczrixcs2JVaarasW/TOGjbdFZxKx4Hwpps4lPeyUW5h52 AIHyFSZATteD+FYnmgPofNDHrCLquJIWQ/eSf3AJ+VU55i1hBdSL9RVxRb/J3jAzGGL6 0ujMfvzUOP88WTS/bBYi+UbR0pS5VJdC9pmY/1oEQ9sjuHPoBy7UPcCJ+M3nsklk1rGs NUVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=phtBX3JU; 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-7950-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f31c969d60si11723295ad.373.2024.05.22.02.55.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 02:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7950-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=phtBX3JU; 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-7950-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7950-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D85D92818F8 for ; Wed, 22 May 2024 09:55:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65DEA81AC7; Wed, 22 May 2024 09:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="phtBX3JU" X-Original-To: linux-wireless@vger.kernel.org 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 EA98B81AA7 for ; Wed, 22 May 2024 09:55:22 +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=1716371724; cv=none; b=Oxh3dDX90nScqCXWBEQzZvQFEgJP8T3q3bUYbOS/oWKHt20AYKo0Je46ISG69HpqESk23EhO2H64qD4ny3MhCg0adILXDQ9JacDPwKRX7ediEEEbOJ0cvq+MuVKx/j6KRFoNNUxvXgwYa+Jl1gYjL/Or+B8V+DRcSrSKV0cpx4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716371724; c=relaxed/simple; bh=8GmhSaFVtWVdvt9xku+kc2rQ/N1+mTiOOTAgiP4FV0Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oW4yo+IVQR5BhguquhfELFkFBwHyM1idr9HU7ZfohBIt73Pcp/tBRt5Zw9OE4e7dpd1ki5cDYrMMKcpaaixohVNpTfbZysti3pC5pz0NO7jHZjP+I5FSl07wfY5oWTmVqU7kpdtx9CNrpgUepfJOFsoaIYELUvnG4Fi0eGdlKYk= 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=phtBX3JU; 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=qualcomm.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44M80RiO010132; Wed, 22 May 2024 09:55:20 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=TpDzXI1 XCwKcy5biNSn5A6C8x45nBCjfW3MRqwCUuqY=; b=phtBX3JUGEyiW2xFq7m3Ccl dV6FyjliDmDcut106N9tvmhtlrZpeH8k/+qRmQyL8gqDjfITb+DEq5lMN815ZDil Q4OmebdHygPNt6E91AD84XJKDT4Q+xcpeOk4U1qvkYNvr0VVeWfz9QuPr7rkDYbD Yg2ItTBO9ol3hJG4VfHm7V9rH9xEbLyMo9S6J/ayzjKNtV7zMnNaG5SAa3UABH8F L/PlmpQe+hxUyuKVlKSwpdfQNKeo15dZlP9EAfsRM+KHbY6oYimfjWIDUGiQ7wk4 zdYEcCUEPgd0XLaO44c8936Hy7rVSo6Qjhbf200fl62N9kaPS6dhvch89o7gWWw= = Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6pqardkw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 09:55:20 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 44M9tEIL024943; Wed, 22 May 2024 09:55:17 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3y6ndkfpvn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 09:55:17 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 44M9tGdF024985; Wed, 22 May 2024 09:55:16 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-hprem-blr.qualcomm.com [10.190.108.75]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 44M9tGNh024980 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 09:55:16 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id E127541148; Wed, 22 May 2024 15:25:15 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy , Harshitha Prem , Jeff Johnson Subject: [PATCH v5 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api Date: Wed, 22 May 2024 15:24:36 +0530 Message-Id: <20240522095439.2596989-6-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522095439.2596989-1-quic_hprem@quicinc.com> References: <20240522095439.2596989-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: HS1f4-_QgnXKLAIQ0-7gp-PLWmqDjsBX X-Proofpoint-ORIG-GUID: HS1f4-_QgnXKLAIQ0-7gp-PLWmqDjsBX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_05,2024-05-21_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405220070 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 Acked-by: Jeff Johnson --- 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 66587c5ea8fd..4ab9846f154c 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -9165,6 +9165,7 @@ int ath12k_mac_register(struct ath12k_base *ab) goto err; } + set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); return 0; err: @@ -9184,6 +9185,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 4bec52afa507..cbe77507c9ec 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -3333,11 +3333,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