rtlwifi: Improve debugging by using debugfs
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 29 Dec 2017 08:31:10 +0000 (16:31 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 8 Jan 2018 17:07:45 +0000 (19:07 +0200)
commit610247f46feb23beda99d0bb44aa8f51a8dc27e1
tree1c34f56e3580ad9e18f022ade34ce816610942c6
parent981a2b6e055bce9a9f780fb074ffdf9a9bab0d47
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>
drivers/net/wireless/realtek/rtlwifi/base.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
drivers/net/wireless/realtek/rtlwifi/debug.c
drivers/net/wireless/realtek/rtlwifi/debug.h
drivers/net/wireless/realtek/rtlwifi/pci.c
drivers/net/wireless/realtek/rtlwifi/wifi.h