18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2017 Intel Deutschland GmbH 38c2ecf20Sopenharmony_ci * Copyright (c) 2018-2019 Intel Corporation 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 68c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 78c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 108c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 118c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 128c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 138c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 148c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 158c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 168c2ecf20Sopenharmony_ci */ 178c2ecf20Sopenharmony_ci#ifndef __RADIOTAP_H 188c2ecf20Sopenharmony_ci#define __RADIOTAP_H 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#include <linux/kernel.h> 218c2ecf20Sopenharmony_ci#include <asm/unaligned.h> 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/** 248c2ecf20Sopenharmony_ci * struct ieee82011_radiotap_header - base radiotap header 258c2ecf20Sopenharmony_ci */ 268c2ecf20Sopenharmony_cistruct ieee80211_radiotap_header { 278c2ecf20Sopenharmony_ci /** 288c2ecf20Sopenharmony_ci * @it_version: radiotap version, always 0 298c2ecf20Sopenharmony_ci */ 308c2ecf20Sopenharmony_ci uint8_t it_version; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci /** 338c2ecf20Sopenharmony_ci * @it_pad: padding (or alignment) 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci uint8_t it_pad; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci /** 388c2ecf20Sopenharmony_ci * @it_len: overall radiotap header length 398c2ecf20Sopenharmony_ci */ 408c2ecf20Sopenharmony_ci __le16 it_len; 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci /** 438c2ecf20Sopenharmony_ci * @it_present: (first) present word 448c2ecf20Sopenharmony_ci */ 458c2ecf20Sopenharmony_ci __le32 it_present; 468c2ecf20Sopenharmony_ci} __packed; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* version is always 0 */ 498c2ecf20Sopenharmony_ci#define PKTHDR_RADIOTAP_VERSION 0 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci/* see the radiotap website for the descriptions */ 528c2ecf20Sopenharmony_cienum ieee80211_radiotap_presence { 538c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TSFT = 0, 548c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_FLAGS = 1, 558c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_RATE = 2, 568c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_CHANNEL = 3, 578c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_FHSS = 4, 588c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DBM_ANTSIGNAL = 5, 598c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DBM_ANTNOISE = 6, 608c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LOCK_QUALITY = 7, 618c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TX_ATTENUATION = 8, 628c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DB_TX_ATTENUATION = 9, 638c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DBM_TX_POWER = 10, 648c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_ANTENNA = 11, 658c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12, 668c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DB_ANTNOISE = 13, 678c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_RX_FLAGS = 14, 688c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TX_FLAGS = 15, 698c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_RTS_RETRIES = 16, 708c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_DATA_RETRIES = 17, 718c2ecf20Sopenharmony_ci /* 18 is XChannel, but it's not defined yet */ 728c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS = 19, 738c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_STATUS = 20, 748c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT = 21, 758c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP = 22, 768c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE = 23, 778c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU = 24, 788c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_ZERO_LEN_PSDU = 26, 798c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LSIG = 27, 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci /* valid in every it_present bitmap, even vendor namespaces */ 828c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, 838c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30, 848c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_EXT = 31 858c2ecf20Sopenharmony_ci}; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_FLAGS */ 888c2ecf20Sopenharmony_cienum ieee80211_radiotap_flags { 898c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_CFP = 0x01, 908c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_SHORTPRE = 0x02, 918c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_WEP = 0x04, 928c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_FRAG = 0x08, 938c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_FCS = 0x10, 948c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_DATAPAD = 0x20, 958c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_BADFCS = 0x40, 968c2ecf20Sopenharmony_ci}; 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_CHANNEL */ 998c2ecf20Sopenharmony_cienum ieee80211_radiotap_channel_flags { 1008c2ecf20Sopenharmony_ci IEEE80211_CHAN_CCK = 0x0020, 1018c2ecf20Sopenharmony_ci IEEE80211_CHAN_OFDM = 0x0040, 1028c2ecf20Sopenharmony_ci IEEE80211_CHAN_2GHZ = 0x0080, 1038c2ecf20Sopenharmony_ci IEEE80211_CHAN_5GHZ = 0x0100, 1048c2ecf20Sopenharmony_ci IEEE80211_CHAN_DYN = 0x0400, 1058c2ecf20Sopenharmony_ci IEEE80211_CHAN_HALF = 0x4000, 1068c2ecf20Sopenharmony_ci IEEE80211_CHAN_QUARTER = 0x8000, 1078c2ecf20Sopenharmony_ci}; 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_RX_FLAGS */ 1108c2ecf20Sopenharmony_cienum ieee80211_radiotap_rx_flags { 1118c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_RX_BADPLCP = 0x0002, 1128c2ecf20Sopenharmony_ci}; 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_TX_FLAGS */ 1158c2ecf20Sopenharmony_cienum ieee80211_radiotap_tx_flags { 1168c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_TX_FAIL = 0x0001, 1178c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_TX_CTS = 0x0002, 1188c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_TX_RTS = 0x0004, 1198c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_TX_NOACK = 0x0008, 1208c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_F_TX_NOSEQNO = 0x0010, 1218c2ecf20Sopenharmony_ci}; 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_MCS "have" flags */ 1248c2ecf20Sopenharmony_cienum ieee80211_radiotap_mcs_have { 1258c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_BW = 0x01, 1268c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_MCS = 0x02, 1278c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_GI = 0x04, 1288c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_FMT = 0x08, 1298c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_FEC = 0x10, 1308c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_HAVE_STBC = 0x20, 1318c2ecf20Sopenharmony_ci}; 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_cienum ieee80211_radiotap_mcs_flags { 1348c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_BW_MASK = 0x03, 1358c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_BW_20 = 0, 1368c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_BW_40 = 1, 1378c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_BW_20L = 2, 1388c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_BW_20U = 3, 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_SGI = 0x04, 1418c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_FMT_GF = 0x08, 1428c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_FEC_LDPC = 0x10, 1438c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_STBC_MASK = 0x60, 1448c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_STBC_1 = 1, 1458c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_STBC_2 = 2, 1468c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_STBC_3 = 3, 1478c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_MCS_STBC_SHIFT = 5, 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_AMPDU_STATUS */ 1518c2ecf20Sopenharmony_cienum ieee80211_radiotap_ampdu_flags { 1528c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN = 0x0001, 1538c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN = 0x0002, 1548c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN = 0x0004, 1558c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_IS_LAST = 0x0008, 1568c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR = 0x0010, 1578c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN = 0x0020, 1588c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_EOF = 0x0040, 1598c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_AMPDU_EOF_KNOWN = 0x0080, 1608c2ecf20Sopenharmony_ci}; 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_VHT */ 1638c2ecf20Sopenharmony_cienum ieee80211_radiotap_vht_known { 1648c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_STBC = 0x0001, 1658c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_TXOP_PS_NA = 0x0002, 1668c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_GI = 0x0004, 1678c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_SGI_NSYM_DIS = 0x0008, 1688c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_LDPC_EXTRA_OFDM_SYM = 0x0010, 1698c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_BEAMFORMED = 0x0020, 1708c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH = 0x0040, 1718c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_GROUP_ID = 0x0080, 1728c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_KNOWN_PARTIAL_AID = 0x0100, 1738c2ecf20Sopenharmony_ci}; 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_cienum ieee80211_radiotap_vht_flags { 1768c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_STBC = 0x01, 1778c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_TXOP_PS_NA = 0x02, 1788c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_SGI = 0x04, 1798c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_SGI_NSYM_M10_9 = 0x08, 1808c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_LDPC_EXTRA_OFDM_SYM = 0x10, 1818c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED = 0x20, 1828c2ecf20Sopenharmony_ci}; 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_cienum ieee80211_radiotap_vht_coding { 1858c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_CODING_LDPC_USER0 = 0x01, 1868c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_CODING_LDPC_USER1 = 0x02, 1878c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_CODING_LDPC_USER2 = 0x04, 1888c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_CODING_LDPC_USER3 = 0x08, 1898c2ecf20Sopenharmony_ci}; 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci/* for IEEE80211_RADIOTAP_TIMESTAMP */ 1928c2ecf20Sopenharmony_cienum ieee80211_radiotap_timestamp_unit_spos { 1938c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_UNIT_MASK = 0x000F, 1948c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_UNIT_MS = 0x0000, 1958c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US = 0x0001, 1968c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_UNIT_NS = 0x0003, 1978c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_MASK = 0x00F0, 1988c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_BEGIN_MDPU = 0x0000, 1998c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_PLCP_SIG_ACQ = 0x0010, 2008c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_EO_PPDU = 0x0020, 2018c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_EO_MPDU = 0x0030, 2028c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_SPOS_UNKNOWN = 0x00F0, 2038c2ecf20Sopenharmony_ci}; 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_cienum ieee80211_radiotap_timestamp_flags { 2068c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_FLAG_64BIT = 0x00, 2078c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_FLAG_32BIT = 0x01, 2088c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_TIMESTAMP_FLAG_ACCURACY = 0x02, 2098c2ecf20Sopenharmony_ci}; 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_cistruct ieee80211_radiotap_he { 2128c2ecf20Sopenharmony_ci __le16 data1, data2, data3, data4, data5, data6; 2138c2ecf20Sopenharmony_ci}; 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_cienum ieee80211_radiotap_he_bits { 2168c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_FORMAT_MASK = 3, 2178c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_FORMAT_SU = 0, 2188c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_FORMAT_EXT_SU = 1, 2198c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_FORMAT_MU = 2, 2208c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_FORMAT_TRIG = 3, 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN = 0x0004, 2238c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_BEAM_CHANGE_KNOWN = 0x0008, 2248c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN = 0x0010, 2258c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN = 0x0020, 2268c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_DATA_DCM_KNOWN = 0x0040, 2278c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_CODING_KNOWN = 0x0080, 2288c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN = 0x0100, 2298c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_STBC_KNOWN = 0x0200, 2308c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE_KNOWN = 0x0400, 2318c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE2_KNOWN = 0x0800, 2328c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE3_KNOWN = 0x1000, 2338c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_SPTL_REUSE4_KNOWN = 0x2000, 2348c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN = 0x4000, 2358c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN = 0x8000, 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_KNOWN = 0x0001, 2388c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN = 0x0002, 2398c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN = 0x0004, 2408c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN = 0x0008, 2418c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_TXBF_KNOWN = 0x0010, 2428c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN = 0x0020, 2438c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN = 0x0040, 2448c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_MIDAMBLE_KNOWN = 0x0080, 2458c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET = 0x3f00, 2468c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET_KNOWN = 0x4000, 2478c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC = 0x8000, 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR = 0x003f, 2508c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_BEAM_CHANGE = 0x0040, 2518c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_UL_DL = 0x0080, 2528c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_DATA_MCS = 0x0f00, 2538c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_DATA_DCM = 0x1000, 2548c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_CODING = 0x2000, 2558c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG = 0x4000, 2568c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA3_STBC = 0x8000, 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE = 0x000f, 2598c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_MU_STA_ID = 0x7ff0, 2608c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE1 = 0x000f, 2618c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE2 = 0x00f0, 2628c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE3 = 0x0f00, 2638c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE4 = 0xf000, 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC = 0x000f, 2668c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_20MHZ = 0, 2678c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_40MHZ = 1, 2688c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_80MHZ = 2, 2698c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_160MHZ = 3, 2708c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_26T = 4, 2718c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_52T = 5, 2728c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_106T = 6, 2738c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_242T = 7, 2748c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_484T = 8, 2758c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_996T = 9, 2768c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC_2x996T = 10, 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_GI = 0x0030, 2798c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_GI_0_8 = 0, 2808c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_GI_1_6 = 1, 2818c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_GI_3_2 = 2, 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE = 0x00c0, 2848c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_UNKNOWN = 0, 2858c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_1X = 1, 2868c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X = 2, 2878c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X = 3, 2888c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS = 0x0700, 2898c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD = 0x3000, 2908c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_TXBF = 0x4000, 2918c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG = 0x8000, 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_NSTS = 0x000f, 2948c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_DOPPLER = 0x0010, 2958c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN = 0x0020, 2968c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW = 0x00c0, 2978c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_20MHZ = 0, 2988c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_40MHZ = 1, 2998c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_80MHZ = 2, 3008c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_160MHZ = 3, 3018c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_TXOP = 0x7f00, 3028c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_DATA6_MIDAMBLE_PDCTY = 0x8000, 3038c2ecf20Sopenharmony_ci}; 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_cistruct ieee80211_radiotap_he_mu { 3068c2ecf20Sopenharmony_ci __le16 flags1, flags2; 3078c2ecf20Sopenharmony_ci u8 ru_ch1[4]; 3088c2ecf20Sopenharmony_ci u8 ru_ch2[4]; 3098c2ecf20Sopenharmony_ci}; 3108c2ecf20Sopenharmony_ci 3118c2ecf20Sopenharmony_cienum ieee80211_radiotap_he_mu_bits { 3128c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS = 0x000f, 3138c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS_KNOWN = 0x0010, 3148c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM = 0x0020, 3158c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM_KNOWN = 0x0040, 3168c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH2_CTR_26T_RU_KNOWN = 0x0080, 3178c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_RU_KNOWN = 0x0100, 3188c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH2_RU_KNOWN = 0x0200, 3198c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_CTR_26T_RU_KNOWN = 0x1000, 3208c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_CTR_26T_RU = 0x2000, 3218c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_COMP_KNOWN = 0x4000, 3228c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_SYMS_USERS_KNOWN = 0x8000, 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW = 0x0003, 3258c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_20MHZ = 0x0000, 3268c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_40MHZ = 0x0001, 3278c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_80MHZ = 0x0002, 3288c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_160MHZ = 0x0003, 3298c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_KNOWN = 0x0004, 3308c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP = 0x0008, 3318c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS = 0x00f0, 3328c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW = 0x0300, 3338c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW_KNOWN= 0x0400, 3348c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_HE_MU_FLAGS2_CH2_CTR_26T_RU = 0x0800, 3358c2ecf20Sopenharmony_ci}; 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_cienum ieee80211_radiotap_lsig_data1 { 3388c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LSIG_DATA1_RATE_KNOWN = 0x0001, 3398c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LSIG_DATA1_LENGTH_KNOWN = 0x0002, 3408c2ecf20Sopenharmony_ci}; 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_cienum ieee80211_radiotap_lsig_data2 { 3438c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LSIG_DATA2_RATE = 0x000f, 3448c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_LSIG_DATA2_LENGTH = 0xfff0, 3458c2ecf20Sopenharmony_ci}; 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_cistruct ieee80211_radiotap_lsig { 3488c2ecf20Sopenharmony_ci __le16 data1, data2; 3498c2ecf20Sopenharmony_ci}; 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_cienum ieee80211_radiotap_zero_len_psdu_type { 3528c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_ZERO_LEN_PSDU_SOUNDING = 0, 3538c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_ZERO_LEN_PSDU_NOT_CAPTURED = 1, 3548c2ecf20Sopenharmony_ci IEEE80211_RADIOTAP_ZERO_LEN_PSDU_VENDOR = 0xff, 3558c2ecf20Sopenharmony_ci}; 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci/** 3588c2ecf20Sopenharmony_ci * ieee80211_get_radiotap_len - get radiotap header length 3598c2ecf20Sopenharmony_ci */ 3608c2ecf20Sopenharmony_cistatic inline u16 ieee80211_get_radiotap_len(const char *data) 3618c2ecf20Sopenharmony_ci{ 3628c2ecf20Sopenharmony_ci struct ieee80211_radiotap_header *hdr = (void *)data; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci return get_unaligned_le16(&hdr->it_len); 3658c2ecf20Sopenharmony_ci} 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci#endif /* __RADIOTAP_H */ 368