1 /* 2 * Copyright (c) 2023 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 #ifndef _RX_START_PARAM_H_ 18 #define _RX_START_PARAM_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_RX_START_PARAM 2 23 24 #define NUM_OF_QWORDS_RX_START_PARAM 1 25 26 27 struct rx_start_param { 28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 29 uint32_t pkt_type : 4, // [3:0] 30 reserved_0a : 12, // [15:4] 31 remaining_rx_time : 16; // [31:16] 32 uint32_t tlv64_padding : 32; // [31:0] 33 #else 34 uint32_t remaining_rx_time : 16, // [31:16] 35 reserved_0a : 12, // [15:4] 36 pkt_type : 4; // [3:0] 37 uint32_t tlv64_padding : 32; // [31:0] 38 #endif 39 }; 40 41 42 /* Description PKT_TYPE 43 44 Packet type: 45 <enum 0 dot11a>802.11a PPDU type 46 <enum 1 dot11b>802.11b PPDU type 47 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 48 <enum 3 dot11ac>802.11ac PPDU type 49 <enum 4 dot11ax>802.11ax PPDU type 50 <enum 5 dot11ba>802.11ba (WUR) PPDU type 51 <enum 6 dot11be>802.11be PPDU type 52 <enum 7 dot11az>802.11az (ranging) PPDU type 53 <enum 8 dot11n_gf>802.11n Green Field PPDU type (unsupported 54 & aborted) 55 */ 56 57 #define RX_START_PARAM_PKT_TYPE_OFFSET 0x0000000000000000 58 #define RX_START_PARAM_PKT_TYPE_LSB 0 59 #define RX_START_PARAM_PKT_TYPE_MSB 3 60 #define RX_START_PARAM_PKT_TYPE_MASK 0x000000000000000f 61 62 63 /* Description RESERVED_0A 64 65 <legal 0> 66 */ 67 68 #define RX_START_PARAM_RESERVED_0A_OFFSET 0x0000000000000000 69 #define RX_START_PARAM_RESERVED_0A_LSB 4 70 #define RX_START_PARAM_RESERVED_0A_MSB 15 71 #define RX_START_PARAM_RESERVED_0A_MASK 0x000000000000fff0 72 73 74 /* Description REMAINING_RX_TIME 75 76 Remaining time (in us) for the current frame in the medium. 77 78 (received from PHY in TLV: PHYRX_COMMON_USER_INFO.Receive_duration) 79 80 <legal all> 81 */ 82 83 #define RX_START_PARAM_REMAINING_RX_TIME_OFFSET 0x0000000000000000 84 #define RX_START_PARAM_REMAINING_RX_TIME_LSB 16 85 #define RX_START_PARAM_REMAINING_RX_TIME_MSB 31 86 #define RX_START_PARAM_REMAINING_RX_TIME_MASK 0x00000000ffff0000 87 88 89 /* Description TLV64_PADDING 90 91 Automatic DWORD padding inserted while converting TLV32 92 to TLV64 for 64 bit ARCH 93 <legal 0> 94 */ 95 96 #define RX_START_PARAM_TLV64_PADDING_OFFSET 0x0000000000000000 97 #define RX_START_PARAM_TLV64_PADDING_LSB 32 98 #define RX_START_PARAM_TLV64_PADDING_MSB 63 99 #define RX_START_PARAM_TLV64_PADDING_MASK 0xffffffff00000000 100 101 102 103 #endif // RX_START_PARAM 104