Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp404183lqb; Tue, 28 May 2024 21:31:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTgYdO+ia8x2dhTYWsxnS8ZCLiwOrHN0gEd+aem08WNQ9JkI19KM7gK5yh2stE/WYntgFi5C5JThKWFoN4Ut4vkk2qQLxH6/h1badudA== X-Google-Smtp-Source: AGHT+IEmIHPXbtSYTEjX+I+vQ0ufAf9TduZCIMOTtia9GuJRjqdKI9LPbbtq5QypDPJrBl70yUXw X-Received: by 2002:a50:a45d:0:b0:578:632e:6794 with SMTP id 4fb4d7f45d1cf-578632e6d9fmr13544885a12.10.1716957088602; Tue, 28 May 2024 21:31:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716957088; cv=pass; d=google.com; s=arc-20160816; b=cgQCuvsEG3086wKFPyTueFWPPBFY1ZAY88k+BEgVsGMFTBqzYEtwCGHypa0ah8YTbT RHTz+9etX6640XsGgvJ93Y99r+7jgwHswNOx1pyT1NAF+pLQn12tWj03Hoe0ThJun1AE eShqwMiLQq8xe7KZZ3TNGryS3TtvKhepDqhy62ZS2EjF99fABK0FaguKa/6WSxLleUBl 1tMyVJ2cQ5qn7WKz/5yBg4gz+PMxlRSYzqJNN45dBiP1HVLO/iMZMFj071EW0MPJCmhO Vo3HkmUh/aFupMI2rCaKzl7NwFr4JHlU7dqebkUG46O2Q2Q67MUn45+4xQMLUSMKzV54 GcPg== 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=QhKvaLf+cz/0/SwEWuvLpjy1RgvayoIRI+//7DEZS38=; fh=sT/JjYcIcEXEip168N+zXRdd1X9aGWcX/CIA4tSkmTo=; b=q+RlumVTGUyunNcxlb8vAvTUVDGDxweIVSu4/ZulJkdUTaQzEWrXm3DgrJ6b0TgsJI b0WwPiliy6C3mKFsQPGbx5aH6Bk0yKNvkX5hIO4HYNDdCojfHkXtYZEzw94bILo2PuPq hby78fxOscJu4fsZEV9PYB8pviIUPYiDqTKb3jmcQIi9fzWOtTdDIcgUHiM5a3+Tr3Zy ePdzUBA/PmVm1zulXf9hdkyPmg0zJFGOYanbnKjdD3Lhtl9NcMTwSZpLss2WDSpxxW5p gH1EHcjEYD9aSCFDoCH3rjjvbJNfSOOjd5f8e8O3nvzehOZX8fY9IHw4Vu4CV6ikAYcJ 7eRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lOh7WaxD; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8253-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785d5361ddsi5514354a12.655.2024.05.28.21.31.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 21:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lOh7WaxD; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8253-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 471561F2373E for ; Wed, 29 May 2024 04:31:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFBF115B158; Wed, 29 May 2024 04:31:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lOh7WaxD" 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 81A0613D899 for ; Wed, 29 May 2024 04:31:17 +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=1716957078; cv=none; b=iFuO+wn+6b/RftB4ODMs+YMEltDcMKlqZgwAOyZ7Ky8+zL80wSDjL9Vs04ANOrT28nY/tRuYlWHq32nOD56yYTMblUpPpgjsqO2CGFXUtxN9JlrHno+42wk8NgwdwFiNeX/smkahdIVPlftVeraWe/M/GZZhzgmejj0H7ev29KE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716957078; c=relaxed/simple; bh=UmSIwMM8vYBUxnX8Kub7+tNBnqVlPwhVAnhMDN+CeZg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HkhN6O5liGkRjNrE199eVBuLHBXBVYLyhRuw1UuhUqZk3L9L/NPH6hQDewrYWl0ZbT5C9nAGI/l90uhyTZHE7hjwxEJmWQHP/GLXtcq0Kn0QwSLYI0/Uot/cy8LbfdJ0yXvybRfr6d2taYyKZNBTrLwqP/YoTvgznLihqDg4lN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=lOh7WaxD; 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=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44SMGtQu010169; Wed, 29 May 2024 04:31:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= QhKvaLf+cz/0/SwEWuvLpjy1RgvayoIRI+//7DEZS38=; b=lOh7WaxDC8EHfqZ1 R9qmDZBohZaAQloMSnqy+msV4uDD7CVOzO5IW5R0Y2qRD2zvXoo5OFqWOHmaofZm rbG/mJGfWRxAmdOLMdFVUWqfeFomHHjffEQ/qykcNkyM1n9FHNLKTv8KtR30C2IG 0J+mae7BbYs/95vHpeFsV8JnEQejSE2/v3/6aSTx/dyqA19YIh9cJNyNJsN2jfhZ dPppCJ6JWf55RMlI8JFp/jWPLMtDbZD86QdyOhf+1arjzMuUvuAQY8Qad34R2Kuy hB4QlpUBKS1UMfOZ2Ox5IcLZs/lCn4gNXv+CMce26MuDMbgZ62zUE5dKmFoR4R6l PkBV4A== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yba2myx5t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 May 2024 04:31:13 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44T4VCY4030593 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 May 2024 04:31:12 GMT Received: from hu-adisi-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 28 May 2024 21:31:10 -0700 From: Aditya Kumar Singh To: CC: , Aditya Kumar Singh Subject: [PATCH 3/3] wifi: ath12k: handle symlink cleanup for per pdev debugfs dentry Date: Wed, 29 May 2024 10:00:43 +0530 Message-ID: <20240529043043.2488031-4-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240529043043.2488031-1-quic_adisi@quicinc.com> References: <20240529043043.2488031-1-quic_adisi@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 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: ozb3t9v81kMWpiU6DGDLSf_sJauKa4gP X-Proofpoint-ORIG-GUID: ozb3t9v81kMWpiU6DGDLSf_sJauKa4gP 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_14,2024-05-28_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405290025 Whenever per pdev debugfs directory is created, a symlink to it is also placed in ieee80211/phy* directory. During clean up of per pdev debugfs, this symlink also needs to be cleaned up. Add changes to clean up the symlink whenever the per pdev debugfs is removed. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh --- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/debugfs.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 7d20b09c52e6..87cb3fde68c2 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -473,6 +473,7 @@ struct ath12k_fw_stats { struct ath12k_debug { struct dentry *debugfs_pdev; + struct dentry *debugfs_pdev_symlink; }; struct ath12k_per_peer_tx_stats { diff --git a/drivers/net/wireless/ath/ath12k/debugfs.c b/drivers/net/wireless/ath/ath12k/debugfs.c index 3b464cd40da6..751a9b04386a 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs.c +++ b/drivers/net/wireless/ath/ath12k/debugfs.c @@ -80,7 +80,9 @@ void ath12k_debugfs_register(struct ath12k *ar) /* Create a symlink under ieee80211/phy* */ scnprintf(buf, sizeof(buf), "../../ath12k/%pd2", ar->debug.debugfs_pdev); - debugfs_create_symlink("ath12k", hw->wiphy->debugfsdir, buf); + ar->debug.debugfs_pdev_symlink = debugfs_create_symlink("ath12k", + hw->wiphy->debugfsdir, + buf); if (ar->mac.sbands[NL80211_BAND_5GHZ].channels) { debugfs_create_file("dfs_simulate_radar", 0200, @@ -94,7 +96,9 @@ void ath12k_debugfs_unregister(struct ath12k *ar) if (!ar->debug.debugfs_pdev) return; - /* TODO: Remove symlink under ieee80211/phy* */ + /* Remove symlink under ieee80211/phy* */ + debugfs_remove(ar->debug.debugfs_pdev_symlink); debugfs_remove_recursive(ar->debug.debugfs_pdev); + ar->debug.debugfs_pdev_symlink = NULL; ar->debug.debugfs_pdev = NULL; } -- 2.34.1