Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2024 15:04:59 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: db8b3578627b - main - LinuxKPI: 802.11: implement ieee80211_sn_*()
Message-ID:  <202407251504.46PF4xHg084084@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=db8b3578627b5be93eba019ab2bbe3c03f7366f4

commit db8b3578627b5be93eba019ab2bbe3c03f7366f4
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-05 22:12:56 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-07-25 15:03:42 +0000

    LinuxKPI: 802.11: implement ieee80211_sn_*()
    
    Implement ieee80211_sn_*() using the equivalent net80211 macros.
    We need those implemented for at least 11n.
    While here also sort all the BA functions together next to the
    "sn" functions.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D45819
---
 sys/compat/linuxkpi/common/include/net/mac80211.h | 77 +++++++++++------------
 1 file changed, 38 insertions(+), 39 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 6a477ae5c32a..c102ada6def2 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -2077,6 +2077,32 @@ ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
 	TODO();
 }
 
+/* -------------------------------------------------------------------------- */
+
+static inline bool
+ieee80211_sn_less(uint16_t sn1, uint16_t sn2)
+{
+	return (IEEE80211_SEQ_BA_BEFORE(sn1, sn2));
+}
+
+static inline uint16_t
+ieee80211_sn_inc(uint16_t sn)
+{
+	return (IEEE80211_SEQ_INC(sn));
+}
+
+static inline uint16_t
+ieee80211_sn_add(uint16_t sn, uint16_t a)
+{
+	return (IEEE80211_SEQ_ADD(sn, a));
+}
+
+static inline uint16_t
+ieee80211_sn_sub(uint16_t sa, uint16_t sb)
+{
+	return (IEEE80211_SEQ_SUB(sa, sb));
+}
+
 static __inline void
 ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *sta, uint8_t tid,
     uint32_t ssn, uint64_t bitmap, uint16_t received_mpdu)
@@ -2084,33 +2110,35 @@ ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *sta, uint8_t tid,
 	TODO();
 }
 
-static __inline bool
-ieee80211_sn_less(uint16_t sn1, uint16_t sn2)
+static __inline void
+ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, uint32_t x, uint8_t *addr)
 {
 	TODO();
-	return (false);
 }
 
-static __inline uint16_t
-ieee80211_sn_inc(uint16_t sn)
+static __inline void
+ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, uint8_t *addr,
+    uint8_t tid)
 {
 	TODO();
-	return (sn + 1);
 }
 
-static __inline uint16_t
-ieee80211_sn_add(uint16_t sn, uint16_t a)
+static __inline void
+ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr,
+    uint8_t tid)
 {
 	TODO();
-	return (sn + a);
 }
 
 static __inline void
-ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, uint32_t x, uint8_t *addr)
+ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr,
+    uint8_t tid)
 {
 	TODO();
 }
 
+/* -------------------------------------------------------------------------- */
+
 static __inline void
 ieee80211_rate_set_vht(struct ieee80211_tx_rate *r, uint32_t f1, uint32_t f2)
 {
@@ -2143,27 +2171,12 @@ ieee80211_unreserve_tid(struct ieee80211_sta *sta, uint8_t tid)
 	TODO();
 }
 
-static __inline void
-ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, uint8_t *addr,
-    uint8_t tid)
-{
-	TODO();
-}
-
 static __inline void
 ieee80211_send_eosp_nullfunc(struct ieee80211_sta *sta, uint8_t tid)
 {
 	TODO();
 }
 
-static __inline uint16_t
-ieee80211_sn_sub(uint16_t sa, uint16_t sb)
-{
-
-	return ((sa - sb) &
-	    (IEEE80211_SEQ_SEQ_MASK >> IEEE80211_SEQ_SEQ_SHIFT));
-}
-
 static __inline void
 ieee80211_sta_block_awake(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
     bool disable)
@@ -2459,20 +2472,6 @@ ieee80211_report_low_ack(struct ieee80211_sta *sta, int x)
 	TODO();
 }
 
-static __inline void
-ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr,
-    uint8_t tid)
-{
-	TODO();
-}
-
-static __inline void
-ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr,
-    uint8_t tid)
-{
-	TODO();
-}
-
 static __inline void
 ieee80211_tx_rate_update(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
     struct ieee80211_tx_info *info)



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