diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2024-07-18 08:41:55 +0200 |
---|---|---|
committer | Ping-Ke Shih <pkshih@realtek.com> | 2024-07-31 07:36:52 +0200 |
commit | 8db6c1ca64664ef9b071e6eeb646023ac5b240a8 (patch) | |
tree | f53b12510e6d80ab955d7ba4a2b37dd9365b8140 /drivers/net/wireless/realtek/rtw88/main.h | |
parent | wifi: rtw88: 8821cu: Remove VID/PID 0bda:c82c (diff) | |
download | linux-8db6c1ca64664ef9b071e6eeb646023ac5b240a8.tar.xz linux-8db6c1ca64664ef9b071e6eeb646023ac5b240a8.zip |
wifi: rtw88: debugfs: support multiple adapters debugging
Originally in order to read partial registers from large area, we write
a range value stored into a static variable and read registers according
to the static variable.
However, if we install more than one adapters supported by this driver,
the static variables will be overwritten by latter adapters. To resolve
the problem, move the static variables to struct rtw_dev for each adapter.
With changes, smatch spends too much time to parse rtw_debugfs_init():
debug.c:1289 rtw_debugfs_init() parse error: turning off implications
after 60 seconds
Move stuffs of adding debugfs entries to three rtw_debugfs_add_xxx()
functions.
Reported-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Closes: https://lore.kernel.org/linux-wireless/cd6a2acf3c2c36d938b40140b52a779516f446a9.camel@realtek.com/T/#m27662022c70d9f893ba96f6c6a8dd8fce2434dfe
Tested-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240718064155.38955-1-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/main.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/main.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h index 9d21637cf5d5..b60a0f840e13 100644 --- a/drivers/net/wireless/realtek/rtw88/main.h +++ b/drivers/net/wireless/realtek/rtw88/main.h @@ -50,6 +50,7 @@ extern const struct ieee80211_ops rtw_ops; #define RTW_MAX_CHANNEL_NUM_5G 49 struct rtw_dev; +struct rtw_debugfs; enum rtw_hci_type { RTW_HCI_TYPE_PCIE, @@ -2053,7 +2054,7 @@ struct rtw_dev { bool beacon_loss; struct completion lps_leave_check; - struct dentry *debugfs; + struct rtw_debugfs *debugfs; u8 sta_cnt; u32 rts_threshold; |