From nobody Sat Sep 28 10:38:17 2024
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XG3hT6ggpz5X8KS;
	Sat, 28 Sep 2024 10:38:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4XG3hT4jVrz474y;
	Sat, 28 Sep 2024 10:38:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1727519897;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=TEJo1l21HoRGRVFcVjpBieqwKdP5af9JEg2eqkjOyEY=;
	b=en7Sh1/kmtQQtpagp/hOfJuw9LKpvl9xkA0+tmmfaKtMWW4etqw/z+l7X0rCbWTDATItwJ
	nS/dbn2tt9YCR8hxIWa5Vn5eu0BjVf2UUpks0fNeYAPeHVHE0YhK2Yh5ymSSdUwrBrUYtS
	rZW7VnJu02V+GjmIQantUVXHPxGREth5g+pk3dUK4jcIvr5+cq8OBFr4V5Kk7mEbV8TuY+
	QzALQvN50KRU4y+hswe2zb4XNbuL8U0Wzama8n4BC+WtknMVtgt6QD+G/6OPqW/LgOB4ZC
	KTwOv0Qjk0yKwGzj1rewbZR+VLI4OiyxIQymDfVuXrW/ajEp1ot3F2JWfJpn8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1727519897;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=TEJo1l21HoRGRVFcVjpBieqwKdP5af9JEg2eqkjOyEY=;
	b=ZQhhNrHemBjo0oV7bChG9bJW6hiooWiqw8iNYZxpdguDP6xEUcaen07xXgA2Qp+kemNQ78
	01GhzsUbmgRLe/To4YOjRo5wmUyWOqpCxKv5XXtLYd66mtJ2lSEKXBz63Kzch+oM2q7F/F
	dZnlfMwePBrSzyzl4spuQg02uz2Brrs1LDVpQR0VldFXth7hgERW4MktQRD4/ftE2cAMQr
	U4qaa65G9BtRZ1yiSmENzoGE6URCfLZhpAE27yvdMB9jlfKW5WPuP4xHcgP23A0QpmyS1I
	3uioCpKDFnVVa/VFmNu9rBeaMl1wzNqH/4TBnty3/T/UDAgs5R4bLQSrskECjg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519897; a=rsa-sha256; cv=none;
	b=Du29IWLfy8RD5bUivqfSAdmmzaxio8h6A90eb63gKwZJoAytuTYmsetOd0+ae4WgBPH8B/
	wAz7l3+CUHRsrT9SrAi2O+ZxNgVVbgCuQMuwpgXe/xQQTAr3YWOGRjygIiY/1fe8+K6CGa
	dMi4j/4iM3MnVcN01e4PA0lszLcShIqtm7Ra+mY7gDNXCueMwdIt8Y8NODtcweVgVq/Awj
	Jvi+t0v1gjYmDnI4x8UNXtvsAZ8A+c1JfmssJwI59pcr0boWl8Yt1F0GNCJGupBiA+gRUJ
	iiN7JW+eO+T2G9kz5ENdMpNc0B/yVp5VJayrs2LH/nL8fhchxHEdHWP5xvaieQ==
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XG3hT2NC2zL00;
	Sat, 28 Sep 2024 10:38:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48SAcHqJ097928;
	Sat, 28 Sep 2024 10:38:17 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcHuI097925;
	Sat, 28 Sep 2024 10:38:17 GMT
	(envelope-from git)
Date: Sat, 28 Sep 2024 10:38:17 GMT
Message-Id: <202409281038.48SAcHuI097925@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Subject: git: 52fdc7dacef9 - stable/14 - LinuxKPI: 802.11: implement
  ieee80211_sn_*()
List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: <mailto:dev-commits-src-branches+help@freebsd.org>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-branches+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-branches+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: bz
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 52fdc7dacef94d34b53993163bba844735347ede
Auto-Submitted: auto-generated

The branch stable/14 has been updated by bz:

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

commit 52fdc7dacef94d34b53993163bba844735347ede
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-05 22:12:56 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-09-28 10:35:13 +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
    Differential Revision: https://reviews.freebsd.org/D45819
    
    (cherry picked from commit db8b3578627b5be93eba019ab2bbe3c03f7366f4)
---
 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)