ath11k: update debugfs support for mupltiple radios in PCI bus
PATCH 1/1 ath11k: update debugfs support for mupltiple radios in PCI bus
debugfs_ath11k struct is moved to ath11k_core, since its common for both pci and ahb.
Current ath11k_pci insmod fails if there are multiple PCI rdaios,
ath11k_pci 0000:01:00.0: Hardware name qcn9074 hw1.0
debugfs: Directory 'ath11k' with parent '/' already present! ath11k_pci 0000:01:00.0: failed to create ath11k debugfs ath11k_pci 0000:01:00.0: failed to create soc core: -17 ath11k_pci 0000:01:00.0: failed to init core: -17
ath11k_pci: probe of 0000:01:00.0 failed with error -17
To avoid the failure, debugfs directory is created with soc_name and bus_id to allow creating debugfs directory for second PCI radio.
with this Debugfs entries looks like,
# ls -l /sys/kernel/debug/ath11k/ ipq8074 hw2.0 qcn9000 hw1.0_0000:01:00.0 qcn9000 hw1.0_0001:01:00.0
# ls -l /sys/kernel/debug/ath11k/ipq8074 hw2.0/ mac0 mac1 simulate_fw_crash soc_dp_stats
# ls -l /sys/kernel/debug/ath11k/qcn9000 hw1.0_0000:01:00.0 mac0 simulate_fw_crash soc_dp_stats
# /sys/kernel/debug/ath11k/qcn9000 hw1.0_0001:01:00.0: mac0 simulate_fw_crash soc_dp_stats
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.c | 12 +++++++ drivers/net/wireless/ath/ath11k/core.h | 1 - drivers/net/wireless/ath/ath11k/debugfs.c | 57 +++++++++++++++++++++++++------ drivers/net/wireless/ath/ath11k/debugfs.h | 11 ++++++ 4 files changed, 70 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +12 -0
@@ -1111,5 +1111,17 @@ struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size, }EXPORT_SYMBOL (ath11k_core_alloc); +static int ath11k_init (void ) +{ +return ath11k_debugfs_create (); +} +module_init (ath11k_init); + +static void ath11k_exit (void ) +{ +ath11k_debugfs_destroy (); +} +module_exit (ath11k_exit); +MODULE_DESCRIPTION ("Core module for Qualcomm Atheros 802.11ax wireless LAN cards." );MODULE_LICENSE ("Dual BSD/GPL" );
drivers/net/wireless/ath/ath11k/core.h +0 -1
@@ -723,7 +723,6 @@ struct ath11k_base {enum ath11k_dfs_region dfs_region;#ifdef CONFIG_ATH11K_DEBUGFS struct dentry *debugfs_soc; -struct dentry *debugfs_ath11k;#endif struct ath11k_soc_dp_stats soc_stats;
drivers/net/wireless/ath/ath11k/debugfs.c +47 -10
97 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/debugfs.h +11 -0
@@ -104,6 +104,8 @@ enum ath11k_dbg_aggr_mode { };#ifdef CONFIG_ATH11K_DEBUGFS +int ath11k_debugfs_create (void ); +void ath11k_debugfs_destroy (void );int ath11k_debugfs_soc_create (struct ath11k_base *ab);void ath11k_debugfs_soc_destroy (struct ath11k_base *ab);int ath11k_debugfs_pdev_create (struct ath11k_base *ab);
@@ -146,6 +148,15 @@ static inline int ath11k_debugfs_rx_filter(struct ath11k *ar) }#else +static inline int ath11k_debugfs_create (void ) +{ +return 0 ; +} + +static inline void ath11k_debugfs_destroy (void ) +{ +} +static inline int ath11k_debugfs_soc_create (struct ath11k_base *ab) {return 0 ;
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 25 lines · Anilkumar Kolli
debugfs_ath11kstruct is moved toath11k_core, since its common for both pci and ahb.Current
ath11k_pciinsmod fails if there are multiple PCI rdaios,
ath11k_pci0000:01:00.0: Hardware name qcn9074 hw1.0
debugfs: Directory 'ath11k' with parent '/' already present!ath11k_pci0000:01:00.0: failed to create ath11k debugfsath11k_pci0000:01:00.0: failed to create soc core: -17ath11k_pci0000:01:00.0: failed to init core: -17
ath11k_pci: probe of 0000:01:00.0 failed with error -17To avoid the failure, debugfs directory is created with
soc_nameandbus_idto allow creating debugfs directory for second PCI radio.with this Debugfs entries looks like,
# ls -l /sys/kernel/debug/ath11k/ ipq8074 hw2.0 qcn9000 hw1.0_0000:01:00.0 qcn9000 hw1.0_0001:01:00.0# ls -l /sys/kernel/debug/ath11k/ipq8074 hw2.0/ mac0 mac1 simulate_fw_crash soc_dp_stats# ls -l /sys/kernel/debug/ath11k/qcn9000 hw1.0_0000:01:00.0 mac0 simulate_fw_crash soc_dp_stats
Quoted 6 lines
# /sys/kernel/debug/ath11k/qcn9000 hw1.0_0001:01:00.0: mac0 simulate_fw_crash soc_dp_statsTested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Anilkumar Kolli <[email protected]>
I submitted my version here:
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches