From nobody Fri Jul 1 14:57:45 2022 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 2A8A58A39DA; Fri, 1 Jul 2022 14:57:46 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LZJGK6dRNz4dv3; Fri, 1 Jul 2022 14:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687466; 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=/v04qR8qw0NazEJd2yqmA/KfWXZ0La+fDUS4DXm5l4U=; b=F9Vf46BABJsoGqfN9VOoyc/1/oGmyOyzr+yFZs5hq7DKgbLz22VNQXTRZ8EzfC/aPL/9rj 6MkrcgcXdCtvlzNvIrLyOObdvLgT+MsnFoOy+68SR6lDS6jcstTEgqP5v/ScZh63X5t2SO 5r3/yNa1952jY74RxB35zJojZUxyP5mTzhNru7bYLYozaNxsqDcWBU1SnL3vf27uiJ6D09 AsEL6AHc+TNbHcHmNYNSWaYJgnWrz/c6jwKe6dSBM7VEMVvWpjKPa4Cc5gxA8wPe8lTozG MxOrzrE0yRgH84mwaEPmfi7YG5J/aQCeozMBMpx5wRAF94jJHEhGKD4JphKAow== 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 82D341D7B2; Fri, 1 Jul 2022 14:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 261EvjTE057919; Fri, 1 Jul 2022 14:57:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 261Evjxq057918; Fri, 1 Jul 2022 14:57:45 GMT (envelope-from git) Date: Fri, 1 Jul 2022 14:57:45 GMT Message-Id: <202207011457.261Evjxq057918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 07bec0d40e07 - stable/13 - net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 07bec0d40e072070f8a9d82746ff60d53a08f1f9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656687466; 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=/v04qR8qw0NazEJd2yqmA/KfWXZ0La+fDUS4DXm5l4U=; b=yGG1RrTexKKAlRWt7xQcRw7fFlEamsaRC5EhKTlk4uuBITJBZY4TxbAQgrzeTZYiIQzj2i d0bCpCXw3jm15HIPCm6DZH+zNH8vc8bZiBYsNma53eHrCpWtW62HPknRuBLIpXVRyeIi+d Brdr7UTV7e6SJARLQOiW7fRH/8IM8aDuqSsiQRXnON537Id49T5VIYqjn7+JZTRXpD2Tv5 WSpVBzVRz4FS4Fo9Oiuk68nK+uanrsyIZpaSujh0GoVSb7MaMaB0ttVwaWfV0ATtolVbBJ 3mG34SoQOibZURbmWh6KQdVSYr8aVDvhkxOFaKc8Wa45qeqVnnL3EwPg/uC2IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656687466; a=rsa-sha256; cv=none; b=nHqlaShwfiMB7G8f2zoRBRsP5d+Z5BjDO1wXcrkeUfCsQj8KDdoVENI6oA9cc7lZUtVnCT afWy9SFh5C7bzErn6Nn9BphUa/g2Vv2mpVtk61M7HyIbb1IraqxBVnFkzb8mYAeacmoDJr 4heZuFfE7mUBe+gkScemQw8WLt/DnMJ3Mf7OU5QxY2Du/V+391sXmY3NWRJU19jxur768+ +VTevwnGdKq+45Iak4D5bAiZoF08tGNLnAsTV7cCKM+PV4soyy7OfJKlMriskXOAXQwH9r SFxyuyl5igHTEWgnxB5/kuhdSs4EQKpKuprv+YakN+tL9EJ3dgUANuXStTICSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=07bec0d40e072070f8a9d82746ff60d53a08f1f9 commit 07bec0d40e072070f8a9d82746ff60d53a08f1f9 Author: Bjoern A. Zeeb AuthorDate: 2022-06-17 22:55:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-01 13:49:19 +0000 net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information Add definitions related to 802.11ax Control Trigger frame format needed for rtw89. (cherry picked from commit 4c3684ef5cf239efeae8675787ac30247e70be8a) --- .../linuxkpi/common/include/linux/ieee80211.h | 38 ++++++++++++++++++++++ sys/net80211/ieee80211.h | 1 + 2 files changed, 39 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index c131a6c69495..dee8c385464c 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -475,6 +475,33 @@ enum ieee80211_status_code { WLAN_STATUS_AUTH_TIMEOUT = 16, /* REJECTED_SEQUENCE_TIMEOUT */ }; +/* 9.3.1.22 Trigger frame format; 80211ax-2021 */ +struct ieee80211_trigger { + __le16 frame_control; + __le16 duration_id; + uint8_t ra[ETH_ALEN]; + uint8_t ta[ETH_ALEN]; + __le64 common_info; /* 8+ really */ + uint8_t variable[]; +}; + +/* Table 9-29c-Trigger Type subfield encoding */ +enum { + IEEE80211_TRIGGER_TYPE_BASIC = 0x0, +#if 0 + /* Not seen yet. */ + BFRP = 0x1, + MU-BAR = 0x2, + MU-RTS = 0x3, + BSRP = 0x4, + GCR MU-BAR = 0x5, + BQRP = 0x6, + NFRP = 0x7, + /* 0x8..0xf reserved */ +#endif + IEEE80211_TRIGGER_TYPE_MASK = 0xf +}; + /* net80211: IEEE80211_IS_CTL() */ static __inline bool ieee80211_is_ctl(__le16 fc) @@ -565,4 +592,15 @@ ieee80211_hdrlen(__le16 fc) return (size); } +static inline bool +ieee80211_is_trigger(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_TRIGGER | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); +} + #endif /* _LINUXKPI_LINUX_IEEE80211_H */ diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 86ab1459cca9..0e53bc259a5d 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -139,6 +139,7 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_FC0_SUBTYPE_ACTION 0xd0 #define IEEE80211_FC0_SUBTYPE_ACTION_NOACK 0xe0 /* for TYPE_CTL */ +#define IEEE80211_FC0_SUBTYPE_TRIGGER 0x20 #define IEEE80211_FC0_SUBTYPE_CONTROL_WRAP 0x70 #define IEEE80211_FC0_SUBTYPE_BAR 0x80 #define IEEE80211_FC0_SUBTYPE_BA 0x90