git: af034dcbb242 - stable/14 - LinuxKPI: 802.11 compile in debugging based on IEEE80211 debugging

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 28 Sep 2024 10:38:12 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=af034dcbb24248f940595d56fab332d008376a99

commit af034dcbb24248f940595d56fab332d008376a99
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-04-06 21:17:58 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-09-28 10:35:12 +0000

    LinuxKPI: 802.11 compile in debugging based on IEEE80211 debugging
    
    If IEEE80211 debugging is turned on in kernel configs also turn on
    LinuxKPI 802.11 and SKB debugging (sysctls) to have them available.
    
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45820
    
    (cherry picked from commit 59d262fe969af5a8a83f0ccd7586c9bd2c8fb1f3)
---
 sys/compat/linuxkpi/common/include/linux/skbuff.h | 8 ++++++++
 sys/compat/linuxkpi/common/src/linux_80211.h      | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h
index ee3f427aa6e9..d3839820d3d5 100644
--- a/sys/compat/linuxkpi/common/include/linux/skbuff.h
+++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h
@@ -46,7 +46,15 @@
 #include <linux/spinlock.h>
 #include <linux/ktime.h>
 
+#include "opt_wlan.h"
+
+/* Currently this is only used for wlan so we can depend on that. */
+#if defined(IEEE80211_DEBUG) && !defined(SKB_DEBUG)
+#define	SKB_DEBUG
+#endif
+
 /* #define	SKB_DEBUG */
+
 #ifdef SKB_DEBUG
 #define	DSKB_TODO	0x01
 #define	DSKB_IMPROVE	0x02
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h
index a48cf719c693..80be87ebe231 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.h
+++ b/sys/compat/linuxkpi/common/src/linux_80211.h
@@ -42,6 +42,12 @@
 #ifndef _LKPI_SRC_LINUX_80211_H
 #define _LKPI_SRC_LINUX_80211_H
 
+#include "opt_wlan.h"
+
+#if defined(IEEE80211_DEBUG) && !defined(LINUXKPI_DEBUG_80211)
+#define	LINUXKPI_DEBUG_80211
+#endif
+
 /* #define	LINUXKPI_DEBUG_80211 */
 
 #ifndef	D80211_TODO