git: b1e67b1a74d3 - main - LinuxKPI: 802.11: improve ieee80211_request_smps()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sun, 24 Aug 2025 14:38:58 UTC
The branch main has been updated by bz:

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

commit b1e67b1a74d33e7a26e53886750a48f070a47226
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-08-24 08:28:30 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-08-24 10:26:44 +0000

    LinuxKPI: 802.11: improve ieee80211_request_smps()
    
    Adjust logging from TODO() to IMPROVE() now that we can use fmt strings
    there too.  Make sure we are not getting unsuported values to print.
    
    Also for non-station mode simply return.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/include/net/mac80211.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index c667ddea1085..19f7bcff29dc 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1741,12 +1741,15 @@ ieee80211_request_smps(struct ieee80211_vif *vif, u_int link_id,
 		"SMPS_STATIC",
 		"SMPS_DYNAMIC",
 		"SMPS_AUTOMATIC",
-		"SMPS_NUM_MODES"
 	};
 
-	if (linuxkpi_debug_80211 & D80211_TODO)
-		printf("%s:%d: XXX LKPI80211 TODO smps %d %s\n",
-		    __func__, __LINE__, smps, smps_mode_name[smps]);
+	if (vif->type != NL80211_IFTYPE_STATION)
+		return;
+
+	if (smps >= nitems(smps_mode_name))
+		panic("%s: unsupported smps value: %d\n", __func__, smps);
+
+	IMPROVE("XXX LKPI80211 TODO smps %d %s\n", smps, smps_mode_name[smps]);
 }
 
 static __inline void