From nobody Wed Sep 21 14:01:20 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 4MXg7P0vSsz4cY2l; Wed, 21 Sep 2022 14:01:21 +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 4MXg7N6tbfz49Yj; Wed, 21 Sep 2022 14:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768881; 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=bZ4tZspovfVqqFyIZwwLtUGmKTp8dOZ5KllsR2OT28g=; b=qHiQgKUsEWZHxlFkXkd5WQ6pt8ISA+cWgQu/iLjlhqxVm0F1/8Uor1ou+ie6KqIoLW+CPw MPZ7EJlqLkxaE7K2iKiIW/gtP0MZrVxzhATzC+cdZX3183yCV3fkWJpNaW6juKutuH0fux ECVMyLGzyIclR5xJmm/GaALFBn76zLcm9mremgkAQlkwwv83XNcSJraG7X5K5xMsZJQRET ItFF/XEsfO3glH+1Ex4B5FaLizGQdLq53TRbHtiy+LJ7jvFHZj8vlW9xfMEYbAAT6ScSzD NsKh1J1pd13hOQVgKBMogyHEVBczGTh3Bhf2qkWNWWZ/QPWoRDonCzNH63SkDw== 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 4MXg7N60QBz14mc; Wed, 21 Sep 2022 14:01:20 +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 28LE1KLW099921; Wed, 21 Sep 2022 14:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE1KGF099920; Wed, 21 Sep 2022 14:01:20 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:01:20 GMT Message-Id: <202209211401.28LE1KGF099920@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: 6613ad85b294 - stable/13 - net80211: LinuxKPI 802.11: harmonize IEEE80211_VHT_MCS_* 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: 6613ad85b2940abdb003695d2a1723d39335752f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768881; 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=bZ4tZspovfVqqFyIZwwLtUGmKTp8dOZ5KllsR2OT28g=; b=P5kRGb0cBrD5X4aW6wo1jA6cEwpGjWLX+WwMgWfLE1O1bqmgnKBMW9M+rj6XqQABXLbrYm 6jmHM3vE/HgY2blhwvw04Ff8pCz1IhJrV7zTTkJf6ADPf1HAPdRv5ONCiOKONj5WyCyFEO 2iE6t8zAj6cmmaPQjPH58QPCmyujoxteZGQd62CpTBLtG1P2Kyl4OFWBZOYoYvKrltzS/2 D2XUn+xuTotAMsZuxtRELYNaMTCohY6fqPo/huTIjQW7W2di4YmFmu3Yurbl1Zdq+y1U+8 +dx03ULsjW44tSThfqvYD+As04F5FOWaPzdKG/hgaWPImupwJtm9WhuKTmVtSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768881; a=rsa-sha256; cv=none; b=aR5v3G9Tg4a3u1oGprHi7zpznLE84z3GpZx/byUzWULCGak5YVYfqZyRqIHhkKlnL/g44B GCFecyQ6dVdlCimYcsvpLMeLxqqqPSgEOf6NvCZxReonERHzHhON0NuLIgU0g6KmRMs2s3 86TUBs6+ohuOJ+AGDX6B2DAp086fxc7Bjviumaa6HugHDDpl1AuR43/6mCv8N/GsKb4FEh TRUbRv/sgcs6Iss6rzXxIPRxy8U3ylZi+8+XHDR+A7T+ke4Z0ffLujQdmc3t1w0TAQnbPD oXbF/bABjLOsv/A3eehFT7I0SLOIh9HOW/DSDTAtQbc2XI3AUOQd/BPuwOcDYQ== 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=6613ad85b2940abdb003695d2a1723d39335752f commit 6613ad85b2940abdb003695d2a1723d39335752f Author: Bjoern A. Zeeb AuthorDate: 2022-08-17 21:59:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:46:45 +0000 net80211: LinuxKPI 802.11: harmonize IEEE80211_VHT_MCS_* Rather than defining the same values in two places and having to do conflict resulution on the name in LKPI, change the defines to an enum in net80211. In addition to de-duplication this also gives us value checks in certain cases. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D36250 (cherry picked from commit 8d371164898141673ad3bfe6ee771931569e07d2) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 19 ------------------- sys/net80211/ieee80211.h | 12 ++++++++---- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 15040ead3707..e7301e7b85cb 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -129,12 +129,6 @@ struct linuxkpi_ieee80211_channel { int orig_mpwr; }; -enum ieee80211_vht_mcs_support { - LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7, - LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8, - LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9, -}; - struct cfg80211_bitrate_mask { /* TODO FIXME */ /* This is so weird but nothing else works out...*/ @@ -1700,19 +1694,6 @@ cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) #ifndef LINUXKPI_NET80211 #define ieee80211_channel linuxkpi_ieee80211_channel #define ieee80211_regdomain linuxkpi_ieee80211_regdomain -/* net80211::IEEE80211_VHT_MCS_SUPPORT_0_n() conflicts */ -#if defined(IEEE80211_VHT_MCS_SUPPORT_0_7) -#undef IEEE80211_VHT_MCS_SUPPORT_0_7 -#endif -#if defined(IEEE80211_VHT_MCS_SUPPORT_0_8) -#undef IEEE80211_VHT_MCS_SUPPORT_0_8 -#endif -#if defined(IEEE80211_VHT_MCS_SUPPORT_0_9) -#undef IEEE80211_VHT_MCS_SUPPORT_0_9 -#endif -#define IEEE80211_VHT_MCS_SUPPORT_0_7 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7 -#define IEEE80211_VHT_MCS_SUPPORT_0_8 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8 -#define IEEE80211_VHT_MCS_SUPPORT_0_9 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9 #endif #endif /* _LINUXKPI_NET_CFG80211_H */ diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 715bb3da898e..31d55a540e6b 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -766,10 +766,14 @@ struct ieee80211_ie_htinfo { * + rx_mcs_map/tx_mcs_map: bitmap of per-stream supported MCS; * 2 bits each. */ -#define IEEE80211_VHT_MCS_SUPPORT_0_7 0 /* MCS0-7 */ -#define IEEE80211_VHT_MCS_SUPPORT_0_8 1 /* MCS0-8 */ -#define IEEE80211_VHT_MCS_SUPPORT_0_9 2 /* MCS0-9 */ -#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3 /* not supported */ + +/* 802.11ac-2013, 8.4.2.160.3 Supported VHT-MCS and NSS Set field */ +enum ieee80211_vht_mcs_support { + IEEE80211_VHT_MCS_SUPPORT_0_7 = 0, /* MCS0-7 */ + IEEE80211_VHT_MCS_SUPPORT_0_8 = 1, /* MCS0-8 */ + IEEE80211_VHT_MCS_SUPPORT_0_9 = 2, /* MCS0-9 */ + IEEE80211_VHT_MCS_NOT_SUPPORTED = 3 /* not supported */ +}; struct ieee80211_vht_mcs_info { uint16_t rx_mcs_map;