From nobody Wed Jun 11 09:14:35 2025 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 4bHKjl70tVz5yyvW; Wed, 11 Jun 2025 09:14:35 +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 4bHKjl2zC1z3m7b; Wed, 11 Jun 2025 09:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633275; 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=iwDUyd/I/sTpfvmIzYwgYD3wP5KGVnmHiJngqKKa8jo=; b=DggvUmqWrO6G1BdzawLoPMkGMCujNx853sAKap8D2EeF8bCNMpN2Lr3x9g/DSHB0x2WUNZ cnvJwHODGHaVxrTQIjo5cAhk+MiOYEZT1UsafBWwl4lEXGEdnihwzTAs/0dC7X31A0ws3D brRTFP+O4P4FLrUTEcLJRnw+8Zguj8hEsgFLOdaSdeSaRKVXut6Q2UIpyapbiO+GvWNhNQ 5IMvPaZzX18abIauB5+ByzyO5/OPVSiGKpgwF7M6N+oWQz90ZeqE3+TM1YiKKfo5j265+K jpN8ZhT7Xbx1QFjrv8vuOuRO7RLQtq36nnqo5PLFr1+U4w8QIldlbd4uhBbrSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633275; 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=iwDUyd/I/sTpfvmIzYwgYD3wP5KGVnmHiJngqKKa8jo=; b=hTxBFbZI1nZZexfzmHnhLNNt+DNcrhqRisdLlAnfuJzGZ93+4KvKFGZWjMWahi3bwnfLLs 4+p1BNZcg5H+2mH6EfSiaTO0ID7qFEK9aXXTcXbVw4Mefw2g6iPMSbAKqo56EtRasI8yC1 oPUOURK8n3JJvVeHleqcjDdL96DNrPE8h6nrKTwmL0tavFBjUtSXwDpte+i1JWcwC6OQcD QefRc1bjmt8867MIxbpAaIopcSoFSu801r1kWp4kL0++Kg85AUWbjumhD3mOi273yOQTsf iSbQSPEr5usTnMk5B9an+3+k5ek9cttQ6Pybd1PvDisWJJ4fhKJ+ILJ8X5uTdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749633275; a=rsa-sha256; cv=none; b=H+ezqseNQgnWwy82M4y5wIK4JBEYFYaUcCDUKyesDsXwxgAkIoQzcrIDAUT4JDHGaz7bZl jRcyqyqV0nemLQxkNzjHBWKluqKMBIvcqnNFyB+NWG0I1MM83IqR+KCq3EDLvC5yLeJclY 0ZN+VAJaBx3NcpBUXVu/lx/M+jFVCPoN7xHOzW+bszWjOIT2Zs04YwM1lT+6lfOgpnj9No iJGO7dqEai86Q4AdDl89tTJOsV6xF1w9uztozJ+4f0vVW8nYfYdE0pmXD/bJF3KFAS7QJ8 ObPIIMuLIqkwZ76fxWX6Q4R6cl5h7BiAUTSRDCjIY6q+F7cq5g4ydsHKhLlqGA== 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 4bHKjl2WZlz5nB; Wed, 11 Jun 2025 09:14:35 +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 55B9EZo5062620; Wed, 11 Jun 2025 09:14:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55B9EZaE062617; Wed, 11 Jun 2025 09:14:35 GMT (envelope-from git) Date: Wed, 11 Jun 2025 09:14:35 GMT Message-Id: <202506110914.55B9EZaE062617@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: 63c4cdb166a7 - stable/14 - net80211: LinuxKPI: migrate HE IE structs from LinuxKPI to net80211 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 63c4cdb166a7b58fef9f0b027d7c45c853368a77 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=63c4cdb166a7b58fef9f0b027d7c45c853368a77 commit 63c4cdb166a7b58fef9f0b027d7c45c853368a77 Author: Bjoern A. Zeeb AuthorDate: 2025-06-02 15:58:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-10 23:41:19 +0000 net80211: LinuxKPI: migrate HE IE structs from LinuxKPI to net80211 Take the HE IE structures as they are used by drivers and put them into net80211 rather than LinuxKPI. There is little need to re-invent the wheel on those. They settled for long enough. Do not export them by default to user space as some also overlap with wpa and we still do not have a clear distinction for what is available only in kernel and what to user space. In our case ifconfig(8) is a consumer of these structs which it can setting WANT_NET80211 like we have done for some VHT bits before. Add struct net80211_he_cap which holds the IE fields but also a bool and is meant to be put into ic/vap/ni. The bool will give us the same naming for all layers rather than having individual flags in each part which was highly confusing. In theory this struct should be in ieee80211_var.h but that would pull things apart. Extend struct ieee80211_mu_edca_param_set by a union as it will help ifconfig(8) parsing the bk/be/vi/vo parts. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50676 (cherry picked from commit 8be200cf968f0c7f72f75c8a73d7b2bee43f935d) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 24 +------- sys/compat/linuxkpi/common/include/net/mac80211.h | 5 -- sys/net80211/ieee80211.h | 70 +++++++++++++++++++++++ 3 files changed, 71 insertions(+), 28 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index e9af70f751d4..c806afb971e6 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -895,29 +895,7 @@ struct linuxkpi_ieee80211_regdomain { #define VENDOR_CMD_RAW_DATA (void *)(uintptr_t)(-ENOENT) -/* - * 802.11ax-2021, - * 9.4.2.248.2 HE MAC Capabilities Information field. - * 9.4.2.248.3 HE PHY Capabilities Information field. - */ -struct ieee80211_he_cap_elem { - u8 mac_cap_info[6]; - u8 phy_cap_info[11]; -} __packed; - -/* 802.11ax-2021, 9.4.2.248.4 Supported HE-MCS And NSS Set field. */ -struct ieee80211_he_mcs_nss_supp { - uint16_t rx_mcs_80; - uint16_t tx_mcs_80; - uint16_t rx_mcs_160; - uint16_t tx_mcs_160; - uint16_t rx_mcs_80p80; - uint16_t tx_mcs_80p80; -}; - -#define IEEE80211_HE_CAP_PPE_THRES_MAX 25 - -/* net80211::ic_ieee80211_he_cap */ +/* net80211::net80211_he_cap */ struct ieee80211_sta_he_cap { bool has_he; struct ieee80211_he_cap_elem he_cap_elem; diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 6ce6a6384c12..af3199c38939 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -413,11 +413,6 @@ struct ieee80211_ftm_responder_params { int civicloc_len; }; -struct ieee80211_he_mu_edca_param_ac_rec { - /* TODO FIXME */ - int aifsn, ecw_min_max, mu_edca_timer; -}; - struct ieee80211_conf { int dynamic_ps_timeout; int power_level; diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 95bbed19a31a..439a9a25dc8d 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -28,6 +28,12 @@ #ifndef _NET80211_IEEE80211_H_ #define _NET80211_IEEE80211_H_ +#include + +#ifndef _KERNEL +#include +#endif + /* * 802.11 protocol definitions. */ @@ -1023,6 +1029,70 @@ struct ieee80211_ie_vht_txpwrenv { #define WLAN_ACTION_VHT_GROUPID_MGMT 1 #define WLAN_ACTION_VHT_OPMODE_NOTIF 2 +#if defined(_KERNEL) || defined(WANT_NET80211) +/* + * HE + */ + +/* + * 802.11ax-2021, + * 9.4.2.248.2 HE MAC Capabilities Information field. + * 9.4.2.248.3 HE PHY Capabilities Information field. + */ +struct ieee80211_he_cap_elem { + uint8_t mac_cap_info[6]; + uint8_t phy_cap_info[11]; +} __packed; + +/* 802.11ax-2021, 9.4.2.248.4 Supported HE-MCS And NSS Set field. */ +struct ieee80211_he_mcs_nss_supp { + uint16_t rx_mcs_80; + uint16_t tx_mcs_80; + uint16_t rx_mcs_160; + uint16_t tx_mcs_160; + uint16_t rx_mcs_80p80; + uint16_t tx_mcs_80p80; +} __packed; + +#define IEEE80211_HE_CAP_PPE_THRES_MAX 25 + +/* XXX this should only be internal. */ +struct net80211_he_cap { + bool has_he; + struct ieee80211_he_cap_elem he_cap_elem; + struct ieee80211_he_mcs_nss_supp he_mcs_nss_supp; + uint8_t ppe_thres[IEEE80211_HE_CAP_PPE_THRES_MAX]; +}; + +/* 802.11ax-2021, 9.4.2.249 HE Operation element. */ +struct ieee80211_he_operation { + uint32_t he_oper_params; + uint16_t he_mcs_nss_set; + uint8_t optional[0]; +} __packed; + +/* 802.11ax-2021, 9.4.2.251 MU EDCA Parameter Set element. */ +struct ieee80211_he_mu_edca_param_ac_rec { + uint8_t aifsn; + uint8_t ecw_min_max; + uint8_t mu_edca_timer; +} __packed; + +struct ieee80211_mu_edca_param_set { + uint8_t mu_qos_info; + union { + struct { + struct ieee80211_he_mu_edca_param_ac_rec ac_be; + struct ieee80211_he_mu_edca_param_ac_rec ac_bk; + struct ieee80211_he_mu_edca_param_ac_rec ac_vi; + struct ieee80211_he_mu_edca_param_ac_rec ac_vo; + }; + struct ieee80211_he_mu_edca_param_ac_rec param_ac_recs[4]; + }; +} __packed; +#endif /* _KERNEL || WANT_NET80211 */ + + /* * Management information element payloads. *