Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2458656lqb; Mon, 27 May 2024 23:37:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBx5zA5MgReOV8QeWXGLskqkxdKpDYplAkuRCkI2c6VEDcXMNgGMzP5q057QgTj4/t+mU88gdUNwlivV1cNS9EiDauqqo8CAQ+lQsbpA== X-Google-Smtp-Source: AGHT+IGkbVXouws+mltN2luBvSHwMeVmD12VzK5Xujd3hhK8FQRNyuxRWdFIEBlMIpqcDsj3UoYy X-Received: by 2002:a05:6808:1312:b0:3c9:c7a0:94f2 with SMTP id 5614622812f47-3d1a538da4amr14707449b6e.12.1716878263599; Mon, 27 May 2024 23:37:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716878263; cv=pass; d=google.com; s=arc-20160816; b=NnKeDs5fJpo9veizdzU0AQrQbCzQs2bUoHxgayQ8LpJWfazgLdoVjwDDdPeOqSR+ej sqqz0tvF5PExFuWXNYRJfjxEVxrZLXAN4bol50TBpepWNcM33omD7yHfmHljqrvntcbG 38hZGA8hR34c3mPYjT7LOMEgOwksF7Vjfqlz4A/Q8VXIAevqQG4CCAj3Wz8tmIZz88/l YmGuoEEGd0WNdDVIcx+GUvj3P6Ts0bIyxncP+5g1uWgXr8elOpoU2RAKlUxDHARSiKmS btVK8xE5qp2Q7wwmfrQroy+jeEg+e0x8q4OIFfgwyT2U2yCozD7gDsh1KXYX6FbLFItK pFbw== 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=XAxvBB0NHWZA+zpHYFCHlLOcakrCe8dRIGgnn2+MlXQMoYO/B9tCVApz23Ida4tMo4 VL8eTEgkIurIggNGn9sdcPeX96QVM5653fk1CgQzvdikepAIj3bB49peUR3OZ1tWEthz R2l+6VHs0DBCoGtOeO9VoxMzIzz8xqKR/lp6pqd3Jb3BWLcJY5ZkZTdjkZproJ8dYwLV AKnuyjZYevsdoaDNxi/vVu6m4gUB1A4wCXkjeSEuh5QCsGE48kR3mk0smUsLy4XOTybC lRV+mbwpnbLhthPCjPAaMksLJ9m4D/b9BOfB5Hh+Gm5fvELAfrldhapD7yWDtes3qM1t Ox7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ok2OZM4R; 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-8164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221c6aaf3si7901630a12.60.2024.05.27.23.37.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 23:37:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ok2OZM4R; 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-8164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8164-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 2DCA5B21AEE for ; Tue, 28 May 2024 06:36:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7359371742; Tue, 28 May 2024 06:36:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ok2OZM4R" 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 4550561FCD for ; Tue, 28 May 2024 06:36:13 +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=1716878178; cv=none; b=TnBRVojiTZl6W+a1LjM90fDgP8xIPosDMrBWcUUfdgLVXix9oE/xt/9eFVTKr9Q+Dh4vi3F1rQk5Pnmo9APhn41zaOFXiYhp6caBk5M9udN2r1Q/eILvh3w8HKCSj8THwNUVXhFiwM8qov+rDuO6KSgl7SXCugNrLT21roUf5Os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716878178; c=relaxed/simple; bh=8GmhSaFVtWVdvt9xku+kc2rQ/N1+mTiOOTAgiP4FV0Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W+Hv/LWWNbNNysWo/fgC/7AQu/fxE3tDtf2WD6zBjyIh8hDsIZa2f2mqO8/oVc4vZ4WDYghw0ONoNuFWM+17OE/USDRVhrAE/EYyhSGQYWW4ON2zXV6Y/yFNVbGUxGPHG9HcEwxVSbhTqkFwsRdhEE6wBZ+SmT0kvCBrMEyCoEo= 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=ok2OZM4R; 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 44RMVA3G031925; Tue, 28 May 2024 06:36:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=TpDzXI1XCwK cy5biNSn5A6C8x45nBCjfW3MRqwCUuqY=; b=ok2OZM4RIqW4MsiU7bbACxaWouB JNHK31IFQE1qrJRhguFCm29RudFojZ7SVQ1s7m0cPuc+CPIPvje38GVdv+zqzUKb jcIu5QWc6hXShtn4SYEfAF9TYgbqJYd7/dJZwQk+igDpdhUd5znio/dCPI8U8lJn /3ZEzlpPuHHpxzJGbOU7TJWo0sYpuLBn3ANoJHwwnOCCo88ap/YVvMLB/W2OpnCK 0b5/tfDvvX8uf+OArzKOzITOX/eXhcKtX+sJ8WEuh/NgcytLR9Szr23mfFe1LzAx gxceG86JKuePQK0P7r2J5w6FKETRFXYKDo9dbsvQX1O4g1Cjf00t3pUHjEg== 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 3yba0qd8x4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 06:36:09 +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 44S6a5ef012793; Tue, 28 May 2024 06:36:06 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3yb92kd5y4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 06:36:06 +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 44S6a6qE012801; Tue, 28 May 2024 06:36:06 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 44S6a6qc012800 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 06:36:06 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id 285A14114D; Tue, 28 May 2024 12:06:05 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy , Harshitha Prem , Jeff Johnson Subject: [PATCH v7 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api Date: Tue, 28 May 2024 12:05:44 +0530 Message-Id: <20240528063547.1400700-6-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240528063547.1400700-1-quic_hprem@quicinc.com> References: <20240528063547.1400700-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: bqTBnDCCmYWnRYbN5fHVyabPmiF3wGRU X-Proofpoint-ORIG-GUID: bqTBnDCCmYWnRYbN5fHVyabPmiF3wGRU 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-28_03,2024-05-27_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405280047 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