mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 19:49:33 -04:00
wifi: ath12k: handle symlink cleanup for per pdev debugfs dentry
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 <quic_adisi@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://msgid.link/20240529043043.2488031-4-quic_adisi@quicinc.com
This commit is contained in:
committed by
Kalle Valo
parent
4e1eff38d3
commit
5a16da9cfb
@@ -474,6 +474,7 @@ struct ath12k_fw_stats {
|
||||
|
||||
struct ath12k_debug {
|
||||
struct dentry *debugfs_pdev;
|
||||
struct dentry *debugfs_pdev_symlink;
|
||||
};
|
||||
|
||||
struct ath12k_per_peer_tx_stats {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user