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)
This commit is contained in:
Bjoern A. Zeeb 2024-12-28 09:52:45 +00:00
parent fde943a07e
commit bd42a25673
4 changed files with 11 additions and 2 deletions

View file

@ -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 */
};

View file

@ -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)

View file

@ -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

View file

@ -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>