Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp44238lqh; Mon, 6 May 2024 10:40:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVex22OOgZZWdHC3olrQ32NiKNqsMuiIrduQBQBH6y3GKBRT08kCt2HrYPB+tpSTc4muVzTo0HQAKUOuzWqXTGCg5dJ0B1HRGzq8oLMTg== X-Google-Smtp-Source: AGHT+IGTKjp+gEwVzEG8iTqUFvSv6qe7LMZYnuxqMCJwUD708YfKyPkhjqSG2aoF0y/JNijvOiS+ X-Received: by 2002:a19:914d:0:b0:51c:43de:b18c with SMTP id y13-20020a19914d000000b0051c43deb18cmr7252836lfj.27.1715017227219; Mon, 06 May 2024 10:40:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715017227; cv=pass; d=google.com; s=arc-20160816; b=NiuyLG7qbKr6DB7b4NbymYovg9fmFL5pKggRJbA3gFJCuXAOT0u2Q8XHH5GSZDMouM Q+LNixc26P9grmjjlAKQca5yw39SZL9Pdm1Z/9MKSH4wwwMuQizn1vidCTukHiOXhk6o BefpxjVMFea6GLteBxoWhCs3oZAQAQUaCc/wGPG//XnI2BV83HUzr+d3OMjJKdF7sgRP 1VHThmxNQ98AGZG3L5DUmgTlLOApwoxYG9HqKIybBDwe7bXVkTiJFwSvR6bfBEi0Lg/G mUPFVvmGAsS+zgekNTWJxTHrfMc3VKzJv6yyJdvX0g98tc4emRyUaxiKq+ZWCqdD6Sr2 CShQ== 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=BQ1i0uioosTUi/TYyvaSSZlapba++vdjPtZtFWq1/3g=; fh=wnySVr9+WO9j7lO1L6CVbSw/CjEiK6R10EUaKUiDPbE=; b=WFkudXFSGPVSAhY0KYwE6oD1BrrFp8SQZuLTRSVgUtVtLM2lWMyv8DnAMOE7MIqYRE +omLmnANGUVl14kmKK6b9hv4cqUkHazbtm25lei8OGaOkFuXAKKotx8fuQG3Wxkq/0eD lhBIG62Iu6zavCb0IvOb/RhsmlnIyqII/0T9yDNDFMdfuN6/KcjX90R0yI+IDXSqfk5B LyPVSqk3PbI3eZvPeKo5NPj8J6ovxLz2reHdQkT3ptApHtc4ErhTppAXO0CipSaFInjX 7TBo6xMD1ZmNO9xQHbcoJxED6MUTvCvBvJyhMU4EG0JiawWF1B5Jq1/aJh+DL/a9eQxj Jo2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nIEHFrBf; 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-7226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u6-20020aa7d0c6000000b00572a73a78b7si5210773edo.316.2024.05.06.10.40.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 10:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nIEHFrBf; 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-7226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7226-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BC7CE1F23C23 for ; Mon, 6 May 2024 17:40:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8461E158845; Mon, 6 May 2024 17:40:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nIEHFrBf" 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 18C59158204 for ; Mon, 6 May 2024 17:39:59 +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=1715017201; cv=none; b=kdK+fpojzL4xSRkdWtpd7e7Vn6AmyKH9a38Cagce7rcX12fEo5Q7Gghq+PEymoR7VtJXwHPRA9rY8XWb8DwpBHE6lO5e6TJD8m8vN36tYenybg8VRTZ/EWMuMmPc4MWBE2b8JExQJ0T0UiUodr/irlUtsOWE0cOI64HekMtBQAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715017201; c=relaxed/simple; bh=rX6p+fr3BhpEMJKfTgA9/ir4Tq3afZi824DYUA+KOdA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LmKDTk6UHxznUUSG2jpvg6V91QlFdsWs74AOUILmLc3SlQYXfuIgcLw6RuDtTsGanJFTDkw5id6Z1/cIrnsmdyoy50ALDD8q2RqCnC6TlpyUDSiNFrBBH8ianN/plu4tznfnsb5/0qXRGeGcI0Y/HU8eTpAWZELRiGPhYKHT3OE= 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=nIEHFrBf; 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 (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 446CUhLj023290; Mon, 6 May 2024 17:39:56 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=BQ1i0ui oosTUi/TYyvaSSZlapba++vdjPtZtFWq1/3g=; b=nIEHFrBfS672vUS1/SHkmq1 Vkk87+i1OL4meMza3zR8Sl4ZV4tBP1s1qENOp07K+iXhYVCQynK5YeCRw8OL2tg6 u657sv4EdjR4boyFIyJMeS2HpHzvZz2a2r6gf7fpDKJEl1W6MO8jktRq/VETvHTc 4BAy57d/9R1MbB9RKRGxux648KvQai1DmP3GMGaXQpW6l9cU9AiBVWfCFbyn1qb4 yd4ElbHF+TS7pdCQdyOSDPE1E3yMg8UKpiqWl/NFjW4peGAVS9DKlcRt4u7LzhLZ eWTH46u7LvnpUAMgCYo5o3YVLkBxCzuXuhUU19HDhL9q5AsgacbPfacx2ePD4Zg= = 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 3xxw800y4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 17:39:56 +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 446HdqMS009792; Mon, 6 May 2024 17:39:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3xwe3k9twj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 17:39:52 +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 446Hdq1R009786; Mon, 6 May 2024 17:39:52 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 446HdqBb009785 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 17:39:52 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id A9D1E4114D; Mon, 6 May 2024 23:09:51 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy , Harshitha Prem Subject: [PATCH v3 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api Date: Mon, 6 May 2024 23:09:40 +0530 Message-Id: <20240506173943.1747037-6-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240506173943.1747037-1-quic_hprem@quicinc.com> References: <20240506173943.1747037-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: ZXVGvYYfPAwYERavw6XIrdZylSN9WzkE X-Proofpoint-ORIG-GUID: ZXVGvYYfPAwYERavw6XIrdZylSN9WzkE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_12,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2405060126 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 2e0bd7cfc7bf..ada4569fbff4 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8893,6 +8893,7 @@ int ath12k_mac_register(struct ath12k_base *ab) goto err; } + set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); return 0; err: @@ -8912,6 +8913,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 19a03cf8c391..b3a8459ab4e5 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.17.1