1 /* 2 * Copyright (c) 2011-2015, 2017-2019, 2021 The Linux Foundation. 3 * All rights reserved. 4 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 /* 22 * 23 * This file sir_mac_prop_exts.h contains the MAC protocol 24 * extensions to support ANI feature set. 25 * Author: Chandra Modumudi 26 * Date: 11/27/02 27 */ 28 #ifndef __MAC_PROP_EXTS_H 29 #define __MAC_PROP_EXTS_H 30 31 #include "sir_types.h" 32 #include "sir_api.h" 33 #include "ani_system_defs.h" 34 35 /* / EID (Element ID) definitions */ 36 37 #define PROP_CAPABILITY_GET(bitname, value) \ 38 (((value) >> SIR_MAC_PROP_CAPABILITY_ ## bitname) & 1) 39 40 #define IS_DOT11_MODE_HT(dot11Mode) \ 41 (((dot11Mode == MLME_DOT11_MODE_11N) || \ 42 (dot11Mode == MLME_DOT11_MODE_11N_ONLY) || \ 43 (dot11Mode == MLME_DOT11_MODE_11AC) || \ 44 (dot11Mode == MLME_DOT11_MODE_11AC_ONLY) || \ 45 (dot11Mode == MLME_DOT11_MODE_11AX) || \ 46 (dot11Mode == MLME_DOT11_MODE_11AX_ONLY) || \ 47 (dot11Mode == MLME_DOT11_MODE_11BE) || \ 48 (dot11Mode == MLME_DOT11_MODE_11BE_ONLY) || \ 49 (dot11Mode == MLME_DOT11_MODE_ALL)) ? true:false) 50 51 #define IS_DOT11_MODE_VHT(dot11Mode) \ 52 (((dot11Mode == MLME_DOT11_MODE_11AC) || \ 53 (dot11Mode == MLME_DOT11_MODE_11AC_ONLY) || \ 54 (dot11Mode == MLME_DOT11_MODE_11AX) || \ 55 (dot11Mode == MLME_DOT11_MODE_11AX_ONLY) || \ 56 (dot11Mode == MLME_DOT11_MODE_11BE) || \ 57 (dot11Mode == MLME_DOT11_MODE_11BE_ONLY) || \ 58 (dot11Mode == MLME_DOT11_MODE_ALL)) ? true:false) 59 60 #define IS_DOT11_MODE_HE(dot11Mode) \ 61 (((dot11Mode == MLME_DOT11_MODE_11AX) || \ 62 (dot11Mode == MLME_DOT11_MODE_11AX_ONLY) || \ 63 (dot11Mode == MLME_DOT11_MODE_11BE) || \ 64 (dot11Mode == MLME_DOT11_MODE_11BE_ONLY) || \ 65 (dot11Mode == MLME_DOT11_MODE_ALL)) ? true:false) 66 67 #define IS_DOT11_MODE_EHT(dot11Mode) \ 68 (((dot11Mode == MLME_DOT11_MODE_11BE) || \ 69 (dot11Mode == MLME_DOT11_MODE_11BE_ONLY) || \ 70 (dot11Mode == MLME_DOT11_MODE_ALL)) ? true:false) 71 72 #define IS_DOT11_MODE_11B(dot11Mode) \ 73 ((dot11Mode == MLME_DOT11_MODE_11B) ? true:false) 74 75 #define IS_BSS_VHT_CAPABLE(vhtCaps) \ 76 ((vhtCaps).present && \ 77 ((vhtCaps).rxMCSMap != 0xFFFF) && \ 78 ((vhtCaps).txMCSMap != 0xFFFF)) 79 80 #define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ 0 81 #define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ 1 82 #define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ 2 83 #define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ 3 84 85 #ifdef WLAN_FEATURE_11BE 86 #define WNI_CFG_EHT_CHANNEL_WIDTH_320MHZ 4 87 #endif 88 89 #endif /* __MAC_PROP_EXTS_H */ 90