git: 978f25e840fe - main - LinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 08 Apr 2022 21:05:56 UTC
The branch main has been updated by bz:

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

commit 978f25e840fe4975f243e6077a764842f0e9d3eb
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-04-08 18:33:23 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-04-08 21:05:06 +0000

    LinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()
    
    Add a dummy implementation for ieee80211_beacon_get_tim().
    Add the implementation for ieee80211_sn_sub().
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/include/net/mac80211.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 70f71da09a59..b5eb3131a7de 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1315,6 +1315,19 @@ ieee80211_get_tid(struct ieee80211_hdr *hdr)
 	return (linuxkpi_ieee80211_get_tid(hdr));
 }
 
+static __inline struct sk_buff *
+ieee80211_beacon_get_tim(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+    uint16_t *tim_offset, uint16_t *tim_len)
+{
+
+	if (tim_offset != NULL)
+		*tim_offset = 0;
+	if (tim_len != NULL)
+		*tim_len = 0;
+	TODO();
+	return (NULL);
+}
+
 static __inline void
 ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
     enum ieee80211_iface_iter flags,
@@ -1672,11 +1685,10 @@ ieee80211_send_eosp_nullfunc(struct ieee80211_sta *sta, uint8_t tid)
 }
 
 static __inline uint16_t
-ieee80211_sn_sub(uint16_t sn, uint16_t n)
+ieee80211_sn_sub(uint16_t sa, uint16_t sb)
 {
-	TODO();
 
-	return (0);
+	return ((sa - sb) & IEEE80211_SEQ_SEQ_MASK);
 }
 
 static __inline void