diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-12-29 16:31:10 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-08 19:07:45 +0200 |
commit | 610247f46feb23beda99d0bb44aa8f51a8dc27e1 (patch) | |
tree | 1c34f56e3580ad9e18f022ade34ce816610942c6 /drivers/net/wireless/realtek/rtlwifi/base.c | |
parent | 981a2b6e055bce9a9f780fb074ffdf9a9bab0d47 (diff) | |
download | lwn-610247f46feb23beda99d0bb44aa8f51a8dc27e1.tar.gz lwn-610247f46feb23beda99d0bb44aa8f51a8dc27e1.zip |
rtlwifi: Improve debugging by using debugfs
Use debugfs to dump register and btcoex status, and also write registers
and h2c.
We create topdir in /sys/kernel/debug/rtlwifi/, and use the MAC address
as subdirectory with several entries to dump mac_reg, bb_reg, rf_reg etc.
An example is
/sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0
This change permits examination of device registers in a dynamic manner,
a feature not available with the current debug mechanism.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/base.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index 5605fa14aa4c..0ba9c0cc95e1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c @@ -2530,6 +2530,9 @@ static int __init rtl_core_module_init(void) if (rtl_rate_control_register()) pr_err("rtl: Unable to register rtl_rc, use default RC !!\n"); + /* add debugfs */ + rtl_debugfs_add_topdir(); + /* init some global vars */ INIT_LIST_HEAD(&rtl_global_var.glb_priv_list); spin_lock_init(&rtl_global_var.glb_list_lock); @@ -2541,6 +2544,9 @@ static void __exit rtl_core_module_exit(void) { /*RC*/ rtl_rate_control_unregister(); + + /* remove debugfs */ + rtl_debugfs_remove_topdir(); } module_init(rtl_core_module_init); |