From nobody Thu Jul 25 15:04:59 2024 X-Original-To: dev-commits-src-all@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 4WVDhD0WnLz5SBrP; Thu, 25 Jul 2024 15:05:00 +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 4WVDhD02PWz4bP5; Thu, 25 Jul 2024 15:05:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721919900; 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=gN7197vcDcC7D2nejhYezsUELNPurLf6HxMask5uJLE=; b=SVIVDsXQjTL6mX5dMf+ls8AeMpbxu2Oz3xjm53F5TqonEAyH7AimSWL1O2GaiDUwv4tf6J PKS5Tu+Gs4AUMfBPBVAg2WgiqqGUKU9k1Vpqqi1b/BWn5VwCVNQNnHoBxjSgsmFsEVhv5/ TX/RRR89CvLKP5YdhUvJuiHs+f9ipimkv0CdAEStOKZdXFMrv2pcJ39XKfr/viDhMM+nlu AZOYlhOemgaie6jwe6G95dLt/Mu4jZJeCeowap7F8+yw6FcXzTsJNd6fxNtmIAxvy559MQ lg/98xIcMK5FnMAh4rvCVGu1/T/tJVhASsypM4qPJoItJsIaxn82A0pvteXajA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721919900; a=rsa-sha256; cv=none; b=r7Nixjryn4NC/7J4t9TNYr5tlso3stKftYChmZbLjjzBSVLIiTSt06WLxG/U3uFqTk9Xl8 C1uEFyiL7ESSRiqZ06iXt3Ux3ELqqpLT3cxA+DIwb8HO85DkCNEbxZBuJHvewVbrDhxZOO uSvnIXTNnOyeBWW3HYltgUEw2rxkh0f99ww2IoVSd+vSKolCeC7ylrwqLAMu9PcsWVdVmO g323jJcV57AJeWO+34TAoHtbq8nJZcW5rJb4gnHpRgyy1eJ/3XxXzFLG4TyV8YAAxfoWF2 xjCgNEB6maNiGljzvbhbUELxxuILUhgg6rpJfcPUhUivejI2ccnVaJqpdrLYFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721919900; 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=gN7197vcDcC7D2nejhYezsUELNPurLf6HxMask5uJLE=; b=Rqs2qlAANxPh/5UbtaqRaW+8zugVSLT7UsT/2gioNgIMiqBzthXiyU1JNs06LN7c3VuUV/ Qvp7CFOqCuCJ8juH5E78cEGlZ0mlq0DgI07FAS6yG8CsQyFy9fDhDz3GOmBx5UFzHz2wZK rt4dJYRY8gQM8uweLqfU4VTsQ80k/jOh+69ReKULEQE3n5nx61m692gUIUFaIJstuO5UDz olvzNBb6ek/HOlBVKqXmk79x9ESzp183ZlPmZmt22Fs+AN4UC5mvfQpjU3qB9FrBmvaIG1 QIHWy/56+ViwdYemtsh6NqLjsv/WxQvxOujfDpL36rq+dOK2reoIKnAz0frYDw== 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 4WVDhC6kfrz107q; Thu, 25 Jul 2024 15:04:59 +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 46PF4xMs084087; Thu, 25 Jul 2024 15:04:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46PF4xHg084084; Thu, 25 Jul 2024 15:04:59 GMT (envelope-from git) Date: Thu, 25 Jul 2024 15:04:59 GMT Message-Id: <202407251504.46PF4xHg084084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: db8b3578627b - main - LinuxKPI: 802.11: implement ieee80211_sn_*() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: db8b3578627b5be93eba019ab2bbe3c03f7366f4 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db8b3578627b5be93eba019ab2bbe3c03f7366f4 commit db8b3578627b5be93eba019ab2bbe3c03f7366f4 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:12:56 +0000 Commit: Bjoern A. Zeeb 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)