Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1126085lqt; Sat, 20 Apr 2024 01:39:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUICFqjGd9Ar+RTKJ1rTHRoTEZIgcNuSuUdI8WkjgqppnqpkDd37YFUEWRWpCkCuuDWFSBd426XDZYWde+EJmPZUUCsFBdT1IOIvyNMbg== X-Google-Smtp-Source: AGHT+IEy60m5y/sxXYS0+6fBkG60Yzki/08T5V75MRY8caXe4GoDRx5/uvaWF7t7ROBx49M6h5xj X-Received: by 2002:a17:902:f7d1:b0:1e4:b70d:eb72 with SMTP id h17-20020a170902f7d100b001e4b70deb72mr4038747plw.35.1713602360662; Sat, 20 Apr 2024 01:39:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713602360; cv=pass; d=google.com; s=arc-20160816; b=rJFfuRKt4sKRZzCWljgwyZ90Avt5KeytiEjFQX9hIyl/ABRp/Nw5Xd/JqdtMUGDZ7t 5ODsmcU5xw5xVxZ8qQK0fOMiQMiMRZql+Wmw7YWh6PA0MRL2cwB8lI4GVZ+SaE/cO62+ +9nSgyP1zn2xzwRUJEFlPKek+WmzygXqj0vbdTM6El7qWyigMJxivdb2CEa3K2Lgs2oJ kN3lkgai4Ph2B662pc8mYiPyj+isbDpYC4hjoBsIxrN6wiEfMrEmwqbOh2YGq6acEl53 YRhba2UjFZ/u2ukoZW8nhRf9U+mkTbLl+Aqoka3eKnXMVdt3oRwQQj30w7svvFachVvO Syng== 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=chdbstdZsOOtOxDIt8li1dn+Nbv93FEIUMOr1qe/vq8=; fh=wnySVr9+WO9j7lO1L6CVbSw/CjEiK6R10EUaKUiDPbE=; b=yBquin7lPulcMCtUGFpAVd5ZwxF9HpfGixvV2O01lLnD6BzXs96FLmU2WRgso+qDjF jJyCkc0HUcTPdIJGQK+lD+BOtyV5GY3chD8kVOxOZl5bUQs+bIzZj8gxuor68nLoI74v TyLOGP5VzNOE1dDX6MsCR8ReJoqvWrfksGCDtd/Ce4qmTs/hLfDtk5q8bPHsf14UU5eG d8d+wqyNxLfjMYVW5pCtzwDb1i+zDpF4PmOTT0UKy9VgJZb2yyKDGwuuKnVcleE/s7iJ e8Aj+6vrHjyVdotW76H0b9wKM/i9pYLgE28ETz922mYfMvf61m4n+Ikufxdt77axVgLR 53tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FrFf42eb; 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-6597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6597-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l16-20020a170902f69000b001e54f494020si4618198plg.604.2024.04.20.01.39.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 01:39:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FrFf42eb; 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-6597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6597-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 D555CB2220A for ; Sat, 20 Apr 2024 08:38:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48E201427E; Sat, 20 Apr 2024 08:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FrFf42eb" 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 CB3F214273 for ; Sat, 20 Apr 2024 08:38:15 +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=1713602297; cv=none; b=REP2kKo2nBJhH3bR8TMeny6siG78WSr7QGqiJxPlSxB8vcUSnrWgVG4SBrpqCnmD+U4ds1zgwV9nNiDvEG8t2kay6h6t5fMMdUZdNxD8qrrZ/2PQUiLZq+BYtAMoW2G/fTlm/wQlsND4kvcBm/36ta4iFcQLJDsS6GIW6wzBO4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713602297; c=relaxed/simple; bh=7kdD8yoBAQMEc7Mn6cwWC9QJQa3PQjEs2O0r2xypXXc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tjPfAZs9atdWCW3rCefei/Ky7gl+D1tmm9q46S4rp7vbNoPe4yBpp/qhA8I32HwQO8rIMVJe3VqMBAsREPRe2NY/pQDNIU9lAXKgxHjSDkdw67iAGxfmb5Sda1IuKs+NeddIbJ1R4r6CLFtFeviiMc6wGwJgHk0lkgAkE+SvE9g= 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=FrFf42eb; 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 43K8FRH3031415; Sat, 20 Apr 2024 08:38:13 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=chdbstd ZsOOtOxDIt8li1dn+Nbv93FEIUMOr1qe/vq8=; b=FrFf42ebrGW+m8B2Ic9gqu1 Oi6ocuMHoMyTeoVFn/ZArNavJJXdHmkLYP9MMM1DeGPJtDpxxLpa69kZzG1kINrB fTkXNjZTvLWwPgh4g9FLKRrJxhWlz/pqHELFCDFl0xw8HN4C/mfZ19bihgGzypww bU77R2FyVmcP0gE9WJaIzplgWBJEXo0BGjFxyUPZSvaD8LGqwNPU7gIKd+Dh/oSX HHVfho7XphGkTFxkZ0mKB1AZdwPufVQDdxircSbMBUGs48v1eIsiKd9KsQTguWWi jikbJRFb8MIwK7rXKUCc/2ms3LPnJBEXC7zTXrftzrJ2VhsgOvCVJoIpqwRSlMA= = 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 3xm6vr8amf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 20 Apr 2024 08:38:13 +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 43K8ZpIl028229; Sat, 20 Apr 2024 08:38:09 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xm6sk95km-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 20 Apr 2024 08:38:09 +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 43K8ZsfX028305; Sat, 20 Apr 2024 08:38:09 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 43K8c9RW030919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 20 Apr 2024 08:38:09 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id D02CF41171; Sat, 20 Apr 2024 14:08:08 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy , Harshitha Prem Subject: [PATCH 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api Date: Sat, 20 Apr 2024 14:07:47 +0530 Message-Id: <20240420083750.1545670-6-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240420083750.1545670-1-quic_hprem@quicinc.com> References: <20240420083750.1545670-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: zQjUGFT3OTiL7_IDhiyN4-59jlg9fDtv X-Proofpoint-ORIG-GUID: zQjUGFT3OTiL7_IDhiyN4-59jlg9fDtv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-20_07,2024-04-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 clxscore=1015 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404200062 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 8516a0168f7b..ebfd9c828dfc 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8794,6 +8794,7 @@ int ath12k_mac_register(struct ath12k_base *ab) goto err; } + set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags); return 0; err: @@ -8813,6 +8814,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 0e34dfadf1b9..b7cfb6971fae 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -3275,11 +3275,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