From nobody Tue Jan 07 18:07:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YSJtR4NpCz5kwLb; Tue, 07 Jan 2025 18:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSJtR3jyRz4hRv; Tue, 7 Jan 2025 18:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736273263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvZQMLQ8LBRnhKKAo42FKlMVTDPIHdaFTbTCx6MK3vg=; b=pJCnGK1acyv4uBEATLYuQZu9CO3/OYUZApFNvRV0w3tfBZLMZYgqPJynx+S3xu8tNSHWsR jI48E/9LjYALfVQGaKn5xDLqRRxxDS/+opHfmEXYov9wxtTufVn5gINCQ9aZQpUR4/onsR oRtoDb8eThYgx8ycfX/ZZ7JPb5Ajhhu+4k7uhWQEq3YJJTf34NT31Lo48DdvhFK11vbBN4 HMs3jO8VzFacxPzFdHpvzRlUU6nO5bGR6O8UXNyUkIJX8MkMxIdUJEAjOI5jH3GHuKIQRx Qc92mfwWjZGw3LQ0quKQcYPQQ50r3/vabFghUns0ENDfsMmClqLJUIuyAbhyaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736273263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvZQMLQ8LBRnhKKAo42FKlMVTDPIHdaFTbTCx6MK3vg=; b=RUBew5BZiEGPWkPQlg5hwmQLOIGR4yrleNB8yVXJf9ZlctPnIu9FT4DUeBgXnBfpWzehz9 0Ux7eWvtE1CWsTVWtEAu0Lko6/VILeOFLNO9yo/varoyBEDsuTndAgAKoVRFSyK2Gx77hU JxyC2lvo4iJ2usB1S2w05TOOoGT9+1Mj8OPilNolJDm45bzZ9dvUBDiM4/4N2UXxvBeRLh xUm2TtnYE71UIQ/R0Fo9OHdnsDuLLAVlH4/Ga126kWfNgTAzVreWXkollKd86yBCR9roIO g+rGObEDmzTQvsC4XFmSMdiDy1dZ2RuoV0keTjgLuo0cSdLxzvbGOSPvjucFYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736273263; a=rsa-sha256; cv=none; b=yZuUO0dTWICEq5W+w3RNdljRi7eIQ+lOtuE64C3Sd7bPsRkiK5FlKgmxOv1xDadlYNY41S QtNRPX0et2Mr7MAFPZEFydhdhfIfABrAOMQuslojxq5XUk79+GP8V1147lA0Rq+4wSTAYC mjmCQXjHXEOTgGbDtLCj1mCIVKlfNKi82BmDZ8Da0Fq8dEnduAajTTMx7vtRagD/jSPmum 68Pjloh9JV92nhY5R4gEgC+sstxLMr7LOpwVeOYFMZuLPBtWa1U+qvf7+zS8Z90f/IOgMZ XVLs8ReAkxqgkuogrs65XsLjYVSmPKU3euaNT13tY9T7vJbK6AE7bCh0DqIhSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YSJtR34Pxz55W; Tue, 07 Jan 2025 18:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 507I7h5j011737; Tue, 7 Jan 2025 18:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 507I7hlv011734; Tue, 7 Jan 2025 18:07:43 GMT (envelope-from git) Date: Tue, 7 Jan 2025 18:07:43 GMT Message-Id: <202501071807.507I7hlv011734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 07f6575585bf - main - LinuxKPI: 802.11: turn on debugfs for iwlwifi and rtw88 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07f6575585bf69ae48dffe87c4578057ae4782d8 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=07f6575585bf69ae48dffe87c4578057ae4782d8 commit 07f6575585bf69ae48dffe87c4578057ae4782d8 Author: Bjoern A. Zeeb AuthorDate: 2024-12-28 09:52:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-01-07 18:07:09 +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 MFC after: 10 days --- 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 3aa383554e93..fe36f1adf28a 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 a8176383a13c..c41a1a1757c1 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -3,7 +3,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 19e77b271c37..486197d8c952 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -3,6 +3,7 @@ DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} WITH_CONFIG_PM= 0 +WITH_DEBUGFS= 1 KMOD= if_rtw88 @@ -39,6 +40,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