mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
rtw88/rtw89: avoid duplicate top-level directory with debugfs
If people like me having multiple cards in the same system
creating the debugfs dirctory leads to a panic upon attaching
the 2nd card due to the duplicate name.
Rather than using the hard coded driver name, use the device name
(e.g., rtw880, rtw881, rtw882).
This solves two issues: it avoids the duplicate name and we get
individual debugging/statistic information for each card.
Sponsored by: The FreeBSD Foundation
X-Note: ath1[01]k and mt76 likely will need a similar change
(cherry picked from commit b4886c4ece)
This commit is contained in:
parent
c8d1d54f5b
commit
f0a184b0bb
2 changed files with 8 additions and 0 deletions
|
|
@ -1223,7 +1223,11 @@ void rtw_debugfs_init(struct rtw_dev *rtwdev)
|
|||
{
|
||||
struct dentry *debugfs_topdir;
|
||||
|
||||
#if defined(__linux__)
|
||||
debugfs_topdir = debugfs_create_dir("rtw88",
|
||||
#elif defined(__FreeBSD__)
|
||||
debugfs_topdir = debugfs_create_dir(dev_name(rtwdev->dev),
|
||||
#endif
|
||||
rtwdev->hw->wiphy->debugfsdir);
|
||||
rtw_debugfs_add_w(write_reg);
|
||||
rtw_debugfs_add_rw(read_reg);
|
||||
|
|
|
|||
|
|
@ -3974,7 +3974,11 @@ void rtw89_debugfs_init(struct rtw89_dev *rtwdev)
|
|||
{
|
||||
struct dentry *debugfs_topdir;
|
||||
|
||||
#if defined(__linux__)
|
||||
debugfs_topdir = debugfs_create_dir("rtw89",
|
||||
#elif defined(__FreeBSD__)
|
||||
debugfs_topdir = debugfs_create_dir(dev_name(rtwdev->dev),
|
||||
#endif
|
||||
rtwdev->hw->wiphy->debugfsdir);
|
||||
|
||||
rtw89_debugfs_add_rw(read_reg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue