1 /* 2 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 18 #ifndef _PHYRX_COMMON_USER_INFO_H_ 19 #define _PHYRX_COMMON_USER_INFO_H_ 20 21 #define NUM_OF_DWORDS_PHYRX_COMMON_USER_INFO 4 22 23 struct phyrx_common_user_info { 24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 25 uint32_t receive_duration : 16, 26 reserved_0a : 16; 27 uint32_t u_sig_puncture_pattern_encoding : 6, 28 reserved_1a : 9, 29 obss_nav_update_enable : 1, 30 obss_nav_value : 16; 31 uint32_t eht_ppdu_type : 2, 32 bss_color_id : 6, 33 dl_ul_flag : 1, 34 txop_duration : 7, 35 cp_setting : 2, 36 ltf_size : 2, 37 spatial_reuse : 4, 38 rx_ndp : 1, 39 dot11be_su_extended : 1, 40 reserved_2a : 6; 41 uint32_t eht_duplicate : 2, 42 eht_sig_cmn_field_type : 2, 43 doppler_indication : 1, 44 sta_id : 11, 45 puncture_bitmap : 16; 46 #else 47 uint32_t reserved_0a : 16, 48 receive_duration : 16; 49 uint32_t obss_nav_value : 16, 50 obss_nav_update_enable : 1, 51 reserved_1a : 9, 52 u_sig_puncture_pattern_encoding : 6; 53 uint32_t reserved_2a : 6, 54 dot11be_su_extended : 1, 55 rx_ndp : 1, 56 spatial_reuse : 4, 57 ltf_size : 2, 58 cp_setting : 2, 59 txop_duration : 7, 60 dl_ul_flag : 1, 61 bss_color_id : 6, 62 eht_ppdu_type : 2; 63 uint32_t puncture_bitmap : 16, 64 sta_id : 11, 65 doppler_indication : 1, 66 eht_sig_cmn_field_type : 2, 67 eht_duplicate : 2; 68 #endif 69 }; 70 71 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_OFFSET 0x00000000 72 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_LSB 0 73 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_MSB 15 74 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_MASK 0x0000ffff 75 76 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_OFFSET 0x00000000 77 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_LSB 16 78 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_MSB 31 79 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_MASK 0xffff0000 80 81 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_OFFSET 0x00000004 82 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_LSB 0 83 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_MSB 5 84 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_MASK 0x0000003f 85 86 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_OFFSET 0x00000004 87 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_LSB 6 88 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_MSB 14 89 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_MASK 0x00007fc0 90 91 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_UPDATE_ENABLE_OFFSET 0x00000004 92 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_UPDATE_ENABLE_LSB 15 93 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_UPDATE_ENABLE_MSB 15 94 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_UPDATE_ENABLE_MASK 0x00008000 95 96 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_VALUE_OFFSET 0x00000004 97 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_VALUE_LSB 16 98 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_VALUE_MSB 31 99 #define PHYRX_COMMON_USER_INFO_OBSS_NAV_VALUE_MASK 0xffff0000 100 101 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_OFFSET 0x00000008 102 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_LSB 0 103 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_MSB 1 104 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_MASK 0x00000003 105 106 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_OFFSET 0x00000008 107 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_LSB 2 108 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_MSB 7 109 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_MASK 0x000000fc 110 111 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_OFFSET 0x00000008 112 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_LSB 8 113 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_MSB 8 114 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_MASK 0x00000100 115 116 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_OFFSET 0x00000008 117 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_LSB 9 118 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_MSB 15 119 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_MASK 0x0000fe00 120 121 #define PHYRX_COMMON_USER_INFO_CP_SETTING_OFFSET 0x00000008 122 #define PHYRX_COMMON_USER_INFO_CP_SETTING_LSB 16 123 #define PHYRX_COMMON_USER_INFO_CP_SETTING_MSB 17 124 #define PHYRX_COMMON_USER_INFO_CP_SETTING_MASK 0x00030000 125 126 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_OFFSET 0x00000008 127 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_LSB 18 128 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_MSB 19 129 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_MASK 0x000c0000 130 131 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_OFFSET 0x00000008 132 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_LSB 20 133 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_MSB 23 134 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_MASK 0x00f00000 135 136 #define PHYRX_COMMON_USER_INFO_RX_NDP_OFFSET 0x00000008 137 #define PHYRX_COMMON_USER_INFO_RX_NDP_LSB 24 138 #define PHYRX_COMMON_USER_INFO_RX_NDP_MSB 24 139 #define PHYRX_COMMON_USER_INFO_RX_NDP_MASK 0x01000000 140 141 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_OFFSET 0x00000008 142 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_LSB 25 143 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_MSB 25 144 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_MASK 0x02000000 145 146 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_OFFSET 0x00000008 147 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_LSB 26 148 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_MSB 31 149 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_MASK 0xfc000000 150 151 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_OFFSET 0x0000000c 152 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_LSB 0 153 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_MSB 1 154 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_MASK 0x00000003 155 156 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_OFFSET 0x0000000c 157 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_LSB 2 158 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_MSB 3 159 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_MASK 0x0000000c 160 161 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_OFFSET 0x0000000c 162 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_LSB 4 163 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_MSB 4 164 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_MASK 0x00000010 165 166 #define PHYRX_COMMON_USER_INFO_STA_ID_OFFSET 0x0000000c 167 #define PHYRX_COMMON_USER_INFO_STA_ID_LSB 5 168 #define PHYRX_COMMON_USER_INFO_STA_ID_MSB 15 169 #define PHYRX_COMMON_USER_INFO_STA_ID_MASK 0x0000ffe0 170 171 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_OFFSET 0x0000000c 172 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_LSB 16 173 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_MSB 31 174 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_MASK 0xffff0000 175 176 #endif 177