From nobody Wed Sep 21 14:01:35 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 4MXg7h0Vh8z4cY5j; Wed, 21 Sep 2022 14:01:36 +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 4MXg7g6Cr0z4BHM; Wed, 21 Sep 2022 14:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768895; 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=klkTK7jSZhgcq0bAMxIjvUnTm8WgLehfjUQ+dDQqUwc=; b=YchEDTSR6+GJv0KXKcjZq0p3hxQSKsPb3CVkON6WMACkDdNFkfrq8J+kwG5ecv3y+obXSY EBDatW98zm9l7CQ0HIWVUWi+cv9ewOlHCUPelI50GiCx2O3Zu29culBUact+rWVHwO5W2c fTWsHwiyOyeYBokCrM4lcdVrLJ0lfiU6KHdq+rjVBkckHBBRUea26AUKPO9SbjIaG1CU6t wQGkeDV3pYOACbf6qMHxOP/kQh6oHXKIZjyubwooh3xmCYdS51zIcJQ/UGc35zOSgoOpIU FVTNZOk03DDMELwAA4DpICiUz5qvCPPNJFq5ca5ktT+IJIU7jDAWuhb526YF7Q== 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 4MXg7g57sJz14h0; Wed, 21 Sep 2022 14:01:35 +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 28LE1Zcu000370; Wed, 21 Sep 2022 14:01:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE1Zcr000369; Wed, 21 Sep 2022 14:01:35 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:01:35 GMT Message-Id: <202209211401.28LE1Zcr000369@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: 4dbf04a81da3 - stable/13 - net80211: update (parts of) frame types and subtypes and annotate 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: 4dbf04a81da33eb5463ca0e603e6ace291358659 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768895; 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=klkTK7jSZhgcq0bAMxIjvUnTm8WgLehfjUQ+dDQqUwc=; b=yg75pCoxVeCQ2eH4TS0JOkSFXyDJ6RnWsc4K56KqawHbK8sg25cDRHyoCftHECTe69k+fl guob4+J6XuW4BJmDbpUteFtMc1FR5RQ0GRkTOiBHIEWe9Z/lDNZAEferjbfEqMlKjmriTh jhVsU4gMD/LywIdWvZfKroUZU30Lc9qssP0jqoNsXYA/OKlERe+IfdJMtAXFest2a2lBUr QdfZlF34AFTkmhcU46/1A1ZvB40mBLuVCFhlFRaM2S+BQ3BU/mX7wydq5CjBtCuPHaIzxm U88MTRO55SQr5LqCmZWLX0GpRyG+wP055X+S+hdir5klBQaxxcaGNyCHc9Twcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768895; a=rsa-sha256; cv=none; b=J5Gj/oY0YP+58aMZYjTZe+Gfgi0BSyLqZ5Rl7CrAIF/QKt1jU5kGyH+Rt/6vfsLZFIy+ec nyUQyKRmyaEmPWABeu0zqEFIdRt7b8DLNqOS05BH6xXcMIaAPXajHsi3L3Tfz30v3I2Kkx 5cVXzPu9eqrdu8j0aTuVl7hkIfaS4Zq0zXHSjRMKg2Pj/CIc0O5VNlOQzWdtNqRktE1hq1 7gZ71n2EEUTZ1OWufXtbUEyuxoiGgLoXm60BU71jrg7jwqf9sZc3iIjgggumtPbj/gxez5 HxgUK8MQSNoJL65E0u5ETPu+KWybbx6CZZCa8ZxXWXt95DyDCKCfgjSTbbX6wA== 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=4dbf04a81da33eb5463ca0e603e6ace291358659 commit 4dbf04a81da33eb5463ca0e603e6ace291358659 Author: Bjoern A. Zeeb AuthorDate: 2022-08-31 22:26:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:46:47 +0000 net80211: update (parts of) frame types and subtypes and annotate Update to the full list of frame type and subtype values based on 802.11-2020 with 11ax and 11ay extensions. This includes the 4th type "Extension" (IEEE80211_FC0_TYPE_EXT). While here annotate them with descriptions which should help matching names (as at times things get confusing with LinuxKPI). Also remove some 802.11-1997 values Reserved nowadays. No functional changes. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D36410 (cherry picked from commit fb47649ebc5a667739e8bd834b993af3c8d1b89f) --- sys/net80211/ieee80211.h | 117 ++++++++++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 43 deletions(-) diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 38f15a810d4f..84a147ccdde3 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -117,52 +117,80 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_FC0_VERSION_0 0x00 #define IEEE80211_FC0_TYPE_MASK 0x0c #define IEEE80211_FC0_TYPE_SHIFT 2 -#define IEEE80211_FC0_TYPE_MGT 0x00 -#define IEEE80211_FC0_TYPE_CTL 0x04 -#define IEEE80211_FC0_TYPE_DATA 0x08 +#define IEEE80211_FC0_TYPE_MGT 0x00 /* Management */ +#define IEEE80211_FC0_TYPE_CTL 0x04 /* Control */ +#define IEEE80211_FC0_TYPE_DATA 0x08 /* Data */ +#define IEEE80211_FC0_TYPE_EXT 0x0c /* Extension */ #define IEEE80211_FC0_SUBTYPE_MASK 0xf0 #define IEEE80211_FC0_SUBTYPE_SHIFT 4 -/* for TYPE_MGT */ -#define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00 -#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10 -#define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20 -#define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30 -#define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40 -#define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50 -#define IEEE80211_FC0_SUBTYPE_TIMING_ADV 0x60 -#define IEEE80211_FC0_SUBTYPE_BEACON 0x80 -#define IEEE80211_FC0_SUBTYPE_ATIM 0x90 -#define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0 -#define IEEE80211_FC0_SUBTYPE_AUTH 0xb0 -#define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0 -#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 -#define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0 -#define IEEE80211_FC0_SUBTYPE_RTS 0xb0 -#define IEEE80211_FC0_SUBTYPE_CTS 0xc0 -#define IEEE80211_FC0_SUBTYPE_ACK 0xd0 -#define IEEE80211_FC0_SUBTYPE_CF_END 0xe0 -#define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0 -/* for TYPE_DATA (bit combination) */ -#define IEEE80211_FC0_SUBTYPE_DATA 0x00 -#define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10 -#define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20 -#define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30 -#define IEEE80211_FC0_SUBTYPE_NODATA 0x40 -#define IEEE80211_FC0_SUBTYPE_CFACK 0x50 -#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60 -#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70 -#define IEEE80211_FC0_SUBTYPE_QOS_DATA 0x80 -#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACK 0x90 -#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFPOLL 0xa0 -#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACKPOLL 0xb0 -#define IEEE80211_FC0_SUBTYPE_QOS_NULL 0xc0 +/* 802.11-2020 Table 9-1-Valid type and subtype combinations */ +/* For type 00 Management (IEEE80211_FC0_TYPE_MGT) */ +#define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00 /* Association Request */ +#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10 /* Association Response */ +#define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20 /* Reassociation Request */ +#define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30 /* Reassociation Response */ +#define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40 /* Probe Request */ +#define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50 /* Probe Response */ +#define IEEE80211_FC0_SUBTYPE_TIMING_ADV 0x60 /* Timing Advertisement */ +/* 0111 Reserved 0x70 */ +#define IEEE80211_FC0_SUBTYPE_BEACON 0x80 /* Beacon */ +#define IEEE80211_FC0_SUBTYPE_ATIM 0x90 /* ATIM */ +#define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0 /* Disassociation */ +#define IEEE80211_FC0_SUBTYPE_AUTH 0xb0 /* Authentication */ +#define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0 /* Deauthentication */ +#define IEEE80211_FC0_SUBTYPE_ACTION 0xd0 /* Action */ +#define IEEE80211_FC0_SUBTYPE_ACTION_NOACK 0xe0 /* Action No Ack */ +/* 1111 Reserved 0xf0 */ +/* For type 01 Control (IEEE80211_FC0_TYPE_CTL) */ +/* 0000-0001 Reserved 0x00-0x10 */ +#define IEEE80211_FC0_SUBTYPE_TRIGGER 0x20 /* Trigger, 80211ax-2021 */ +#define IEEE80211_FC0_SUBTYPE_TACK 0x30 /* TACK */ +#define IEEE80211_FC0_SUBTYPE_BF_REPORT_POLL 0x40 /* Beamforming Report Poll */ +#define IEEE80211_FC0_SUBTYPE_VHT_HE_NDP 0x50 /* VHT/HE NDP Announcement, 80211ac/ax-2013/2021 */ +#define IEEE80211_FC0_SUBTYPE_CTL_EXT 0x60 /* Control Frame Extension */ +#define IEEE80211_FC0_SUBTYPE_CONTROL_WRAP 0x70 /* Control Wrapper */ +#define IEEE80211_FC0_SUBTYPE_BAR 0x80 /* Block Ack Request (BlockAckReq) */ +#define IEEE80211_FC0_SUBTYPE_BA 0x90 /* Block Ack (BlockAck) */ +#define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0 /* PS-Poll */ +#define IEEE80211_FC0_SUBTYPE_RTS 0xb0 /* RTS */ +#define IEEE80211_FC0_SUBTYPE_CTS 0xc0 /* CTS */ +#define IEEE80211_FC0_SUBTYPE_ACK 0xd0 /* Ack */ +#define IEEE80211_FC0_SUBTYPE_CF_END 0xe0 /* CF-End */ +#define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0 /* 1111 Reserved - what was CF_END_ACK? */ +/* For type 10 Data (IEEE80211_FC0_TYPE_DATA) */ +#define IEEE80211_FC0_SUBTYPE_DATA 0x00 /* Data */ +/* 0001-0011 Reserved 0x10-0x30 */ /* Were: CF_ACK, CF_POLL, CF_ACPL */ +#define IEEE80211_FC0_SUBTYPE_NODATA 0x40 /* Null */ +/* 0101-0111 Reserved 0x50-0x70 */ /* Were: CFACK, CFPOLL, CF_ACK_CF_ACK */ +#define IEEE80211_FC0_SUBTYPE_QOS_DATA 0x80 /* QoS Data */ +#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACK 0x90 /* QoS Data +CF-Ack */ +#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFPOLL 0xa0 /* QoS Data +CF-Poll */ +#define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACKPOLL 0xb0 /* QoS Data +CF-Ack +CF-Poll */ +#define IEEE80211_FC0_SUBTYPE_QOS_NULL 0xc0 /* QoS Null */ +/* 1101 Reserved 0xd0 */ +#define IEEE80211_FC0_SUBTYPE_QOS_CFPOLL 0xe0 /* QoS CF-Poll */ +#define IEEE80211_FC0_SUBTYPE_QOS_CFACKPOLL 0xf0 /* QoS CF-Ack +CF-Poll */ +/* For type 11 Extension (IEEE80211_FC0_TYPE_EXT) */ +#define IEEE80211_FC0_SUBTYPE_DMG_BEACON 0x00 /* DMG Beacon */ +#define IEEE80211_FC0_SUBTYPE_S1G_BEACON 0x10 /* S1G Beacon */ +/* 0010-1111 Reserved 0x20-0xff */ + +/* 802.11-2020 Table 9-2-Control Frame Extension */ +/* Reusing B11..B8, part of FC1 */ +#define IEEE80211_CTL_EXT_SECTOR_ACK 0x00 /* Sector Ack, 80211ay-2021 */ +#define IEEE80211_CTL_EXT_BA_SCHED 0x01 /* Block Ack Schedule, 80211ay-2021 */ +#define IEEE80211_CTL_EXT_POLL 0x02 /* Poll */ +#define IEEE80211_CTL_EXT_SPR 0x03 /* SPR */ +#define IEEE80211_CTL_EXT_GRANT 0x04 /* Grant */ +#define IEEE80211_CTL_EXT_DMG_CTS 0x05 /* DMG CTS */ +#define IEEE80211_CTL_EXT_DMG_DTS 0x06 /* DMG DTS */ +#define IEEE80211_CTL_EXT_GRANT_ACK 0x07 /* Grant Ack */ +#define IEEE80211_CTL_EXT_SSW 0x08 /* SSW */ +#define IEEE80211_CTL_EXT_SSW_FBACK 0x09 /* SSW-Feedback */ +#define IEEE80211_CTL_EXT_SSW_ACK 0x0a /* SSW-Ack */ +#define IEEE80211_CTL_EXT_TDD_BF 0x0b /* TDD Beamforming, 80211ay-2021 */ +/* 1100-1111 Reserved 0xc-0xf */ #define IEEE80211_IS_MGMT(wh) \ (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ @@ -173,6 +201,9 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_IS_DATA(wh) \ (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ == IEEE80211_FC0_TYPE_DATA)) +#define IEEE80211_IS_EXT(wh) \ + (!! (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) \ + == IEEE80211_FC0_TYPE_EXT)) #define IEEE80211_FC0_QOSDATA \ (IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS_DATA|IEEE80211_FC0_VERSION_0)