Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2026 21:09:03 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1cd58406e47b - stable/15 - LinuxKPI: 802.11: add struct/fields and functions for v7.0
Message-ID:  <69e938ef.30a8a.3e2322ba@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by bz:

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

commit 1cd58406e47b7cb7f70a225833efbb091f3d0a15
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-04-14 15:23:31 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-22 20:57:10 +0000

    LinuxKPI: 802.11: add struct/fields and functions for v7.0
    
    Add 802.11 struct fields and functions support for Linux v7.0 based
    wireless drivers (at least iwlwifi, rtw88, rtw89).
    
    While here cleanup some other bits.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 25e776a5438005db59c6d474b5d47c42d2a341b9)
---
 sys/compat/linuxkpi/common/include/net/cfg80211.h | 13 +++++++++----
 sys/compat/linuxkpi/common/include/net/mac80211.h | 12 +++++++++++-
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index 24b57ea1f001..dedf687d6530 100644
--- a/sys/compat/linuxkpi/common/include/net/cfg80211.h
+++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2020-2025 The FreeBSD Foundation
+ * Copyright (c) 2020-2026 The FreeBSD Foundation
  * Copyright (c) 2021-2022 Bjoern A. Zeeb
  *
  * This software was developed by Björn Zeeb under sponsorship from
@@ -165,7 +165,9 @@ struct cfg80211_bitrate_mask {
 		uint16_t			eht_mcs[NL80211_EHT_NSS_MAX];
 		enum nl80211_txrate_gi		gi;
 		enum nl80211_he_gi		he_gi;
-		uint8_t				he_ltf;		/* XXX enum? */
+		enum nl80211_he_ltf		he_ltf;
+		enum nl80211_eht_gi		eht_gi;
+		uint8_t				eht_ltf;	/* XXX enum? */
 	} control[NUM_NL80211_BANDS];
 };
 
@@ -1359,8 +1361,11 @@ wiphy_dev(struct wiphy *wiphy)
 	return (wiphy->dev);
 }
 
-#define	wiphy_dereference(_w, p)					\
-    rcu_dereference_check(p, lockdep_is_held(&(_w)->mtx))
+#define	wiphy_dereference(_w, _p)					\
+    rcu_dereference_protected(_p, lockdep_is_held(&(_w)->mtx))
+
+#define	rcu_dereference_wiphy(_w, _p)					\
+    rcu_dereference_check(_p, lockdep_is_held(&(_w)->mtx))
 
 #define	wiphy_lock(_w)		mutex_lock(&(_w)->mtx)
 #define	wiphy_unlock(_w)	mutex_unlock(&(_w)->mtx)
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 4943570d6c40..3c783d1f3c8a 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -603,7 +603,7 @@ enum ieee80211_rx_status_flags {
 	RX_FLAG_AMPDU_IS_LAST		= BIT(21),
 	RX_FLAG_AMPDU_LAST_KNOWN	= BIT(22),
 	RX_FLAG_AMSDU_MORE		= BIT(23),
-				/*	= BIT(24), */
+	RX_FLAG_RADIOTAP_VHT		= BIT(24),
 	RX_FLAG_ONLY_MONITOR		= BIT(25),
 	RX_FLAG_SKIP_MONITOR		= BIT(26),
 	RX_FLAG_8023			= BIT(27),
@@ -1581,6 +1581,16 @@ ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw,
 	linuxkpi_ieee80211_iterate_stations_atomic(hw, iterfunc, arg);
 }
 
+static inline void
+ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw,
+   void (*iterfunc)(void *, struct ieee80211_sta *), void *arg)
+{
+
+	lockdep_assert_wiphy(hw->wiphy);
+	IMPROVE("we could simplify this if we had a sta list on the lhw");
+	linuxkpi_ieee80211_iterate_stations_atomic(hw, iterfunc, arg);
+}
+
 static __inline struct wireless_dev *
 ieee80211_vif_to_wdev(struct ieee80211_vif *vif)
 {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938ef.30a8a.3e2322ba>