Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 2025 14:38:55 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 85eccabc41c9 - main - LinuxKPI: 802.11: improve reg_query_regdb_wmm()
Message-ID:  <202508241438.57OEctwt040586@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

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

commit 85eccabc41c92d9147cac5c6f5434e2015d7eca8
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-06-21 14:07:48 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-08-24 10:26:38 +0000

    LinuxKPI: 802.11: improve reg_query_regdb_wmm()
    
    Adjust the IMPROVE macro to also take a format string and use that
    in reg_query_regdb_wmm() instead of TODO() to avoid spamming the console
    with something that needs larger reworks.  Return -ENODATA instead of
    -ENXIO as that seems a better fit though the only consumer uses it
    without checking the return value these days.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/include/net/cfg80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index 044f348ef08b..b79dd003a677 100644
--- a/sys/compat/linuxkpi/common/include/net/cfg80211.h
+++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h
@@ -57,8 +57,8 @@ extern int linuxkpi_debug_80211;
 #endif
 #define	TODO(fmt, ...)		if (linuxkpi_debug_80211 & D80211_TODO)	\
     printf("%s:%d: XXX LKPI80211 TODO " fmt "\n",  __func__, __LINE__, ##__VA_ARGS__)
-#define	IMPROVE(...)	if (linuxkpi_debug_80211 & D80211_IMPROVE)	\
-    printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
+#define	IMPROVE(fmt, ...)	if (linuxkpi_debug_80211 & D80211_IMPROVE)	\
+    printf("%s:%d: XXX LKPI80211 IMPROVE " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
 
 enum rfkill_hard_block_reasons {
 	RFKILL_HARD_BLOCK_NOT_OWNER		= BIT(0),
@@ -1299,10 +1299,9 @@ reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
     struct ieee80211_reg_rule *rule)
 {
 
-	/* ETSI has special rules. FreeBSD regdb needs to learn about them. */
-	TODO();
+	IMPROVE("regdomain.xml needs to grow wmm information for at least ETSI");
 
-	return (-ENXIO);
+	return (-ENODATA);
 }
 
 static __inline const u8 *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202508241438.57OEctwt040586>