From nobody Thu Aug 18 20:36:51 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 4M7xWR5JwDz4ZG6j; Thu, 18 Aug 2022 20:36:51 +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 4M7xWR4g8Vz3gkr; Thu, 18 Aug 2022 20:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660855011; 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=o2PvGv+fPXQuDGv5Rakr7rq7VAKLxzydrzWGUo7+iu4=; b=wt5768xf3RIkbJg+t9VEfCOjhtK8ix+UKRKtpCwF8sSsXbLpbJId2Lj17lry17Nsk2LC59 1BCAb8pp4QRUf1BusiJnEXruhDNNKJ0UXiLp1hq3pZY92z7Kq/0x5CKtF1B/F7irjXrtN4 nfQofxzxXfxR3WNJopC3kNfcsLb+nKekkpij5WeTT37b/LSpFALd69VjfOlagUszLyQkc8 hCQNIr8yXNzb9t64lgMF42BdQpw/BMPDmWfKEEv2POoR9UopfVfygfmz1CxB9oZwQzSHBq jvgDfuJky+D500X7EI4qPh09rMgZ++Ts5geExbGaFKpYoKaVYkrAZJnl1ua8EA== 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 4M7xWR3k95zS5x; Thu, 18 Aug 2022 20:36:51 +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 27IKap7g088621; Thu, 18 Aug 2022 20:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27IKap8P088620; Thu, 18 Aug 2022 20:36:51 GMT (envelope-from git) Date: Thu, 18 Aug 2022 20:36:51 GMT Message-Id: <202208182036.27IKap8P088620@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: 8d3711648981 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 8d371164898141673ad3bfe6ee771931569e07d2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660855011; 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=o2PvGv+fPXQuDGv5Rakr7rq7VAKLxzydrzWGUo7+iu4=; b=htrnG6Gc0UuBL5+NCvF5LhXBK518X4ifsIdf++VGFrTHGJf7BsPnmrEpuKGTzIHEmeoY2l acGWu/b/VGZcJ7xZQzdZEgk4JVI/jSH2gA2yo142ET7U6kGtvEWrhK6Aolgq1HyG3Odz1X 0doLXMa3MDP+dNihxXKdn2uwAuiXqNBUk5XK55OgCMN0K5zexPd2xitkH5jfQeZNToXN8D xN33KCSGQKomRzfTDxoXhhQKDpGGwUTR/Gp4l0MiekrRc0uKOWyk87zXlkAe/UR6lGjRLn a5qCKm4pfjQSNMSFArHxdFQI0Ai/s3LrSe/AjewdyLCy9q85RaVDn/+OYvkQ9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660855011; a=rsa-sha256; cv=none; b=UMv1oEsO8xVbhDYKxhz4Vkxnw6KUpCrxxt9UUtwHIbAQWkRNmfei+tfUe1TGInjU5pP2fc f70vFJFoLgW0dr9aAx5AT+IIfONu7wVPkaRX3+a06zFZtpx5s1W7sa0fb1IlQw03FYL+T4 pVQ5btc3lZBC3xdf/ZUN75FHgpEYQeeNFXZG9wUZAHFp1AVGnYSSN/PUXuaXreslvSs67X koikw259VZQeMQwRiE+u6n2ANGZGRtpUs4Vp5TGSc+zhhVAxr4mmLF1D/qFy4yHAwA9sIp 0Rd8dg/pK4aoMOcZ6RelIZgekCmRYQMlSeeFDtYygigCCpa68VdLlOGjtqC/lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d371164898141673ad3bfe6ee771931569e07d2 commit 8d371164898141673ad3bfe6ee771931569e07d2 Author: Bjoern A. Zeeb AuthorDate: 2022-08-17 21:59:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-08-18 20:34:30 +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 MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D36250 --- 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 1125810ee6ac..d2a3d9b6ddbc 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -769,10 +769,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;