Date: Mon, 10 Feb 2025 14:52:55 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: bd42a2567348 - stable/14 - LinuxKPI: 802.11: turn on debugfs for iwlwifi and rtw88 Message-ID: <202502101452.51AEqtIE028391@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bd42a2567348e88c2fafa6adeadac01b86b1a95c commit bd42a2567348e88c2fafa6adeadac01b86b1a95c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-12-28 09:52:45 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-02-10 14:52:11 +0000 LinuxKPI: 802.11: turn on debugfs for iwlwifi and rtw88 Make iwlwifi compile with debugfs after the last updates and turn it on for both iwlwifi and rtw88 in order to be able to get at least some useful information on driver/firwmare state. Sponsored by: The FreeBSD Foundation (cherry picked from commit 07f6575585bf69ae48dffe87c4578057ae4782d8) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 4 ++++ sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c | 2 ++ sys/modules/iwlwifi/Makefile | 2 +- sys/modules/rtw88/Makefile | 5 ++++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 67c291fc2b89..8872be569e44 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -737,6 +737,7 @@ struct ieee80211_sta_agg { }; struct ieee80211_link_sta { + struct ieee80211_sta *sta; uint8_t addr[ETH_ALEN]; uint8_t link_id; uint32_t supp_rates[NUM_NL80211_BANDS]; @@ -1121,6 +1122,9 @@ struct ieee80211_ops { /* #ifdef CONFIG_MAC80211_DEBUGFS */ /* Do not change depending on compile-time option. */ void (*sta_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct dentry *); + void (*vif_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *); + void (*link_sta_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_link_sta *, struct dentry *); + void (*link_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, struct dentry *); /* #endif */ }; diff --git a/sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c b/sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c index aa5058955323..0b3bc62f39a7 100644 --- a/sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c +++ b/sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c @@ -888,10 +888,12 @@ void iwl_mvm_vif_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif) void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { struct dentry *dbgfs_dir = vif->debugfs_dir; +#if defined(__linux__) struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); char buf[3 * 3 + 11 + (NL80211_WIPHY_NAME_MAXLEN + 1) + (7 + IFNAMSIZ + 1) + 6 + 1]; char name[7 + IFNAMSIZ + 1]; +#endif /* this will happen in monitor mode */ if (!dbgfs_dir) diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index e69cac51dae2..3508f29979a8 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -4,7 +4,7 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} WITH_CONFIG_PM= 0 -WITH_DEBUGFS= 0 +WITH_DEBUGFS= 1 KMOD= if_iwlwifi diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index d9613b38eadf..bc4c3eb848ea 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -4,6 +4,7 @@ DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} WITH_CONFIG_PM= 0 +WITH_DEBUGFS= 1 KMOD= if_rtw88 @@ -40,6 +41,8 @@ CFLAGS+= -DLINUXKPI_VERSION=60800 CFLAGS+= -I${DEVRTW88DIR} CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG -#CFLAGS+= -DCONFIG_RTW88_DEBUGFS +.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +CFLAGS+= -DCONFIG_RTW88_DEBUGFS +.endif .include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502101452.51AEqtIE028391>