1 2 /* Copyright (c) 2022, 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 19 20 21 22 23 24 25 26 #ifndef _TXPCU_USER_BUFFER_STATUS_H_ 27 #define _TXPCU_USER_BUFFER_STATUS_H_ 28 #if !defined(__ASSEMBLER__) 29 #endif 30 31 #include "txpcu_buffer_basics.h" 32 #define NUM_OF_DWORDS_TXPCU_USER_BUFFER_STATUS 2 33 34 #define NUM_OF_QWORDS_TXPCU_USER_BUFFER_STATUS 1 35 36 37 struct txpcu_user_buffer_status { 38 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 39 struct txpcu_buffer_basics txpcu_basic_buffer_info; 40 uint32_t stored_word_count_user : 14, 41 reserved_1a : 1, 42 msdu_end : 1, 43 tx_data_sync_value : 16; 44 #else 45 struct txpcu_buffer_basics txpcu_basic_buffer_info; 46 uint32_t tx_data_sync_value : 16, 47 msdu_end : 1, 48 reserved_1a : 1, 49 stored_word_count_user : 14; 50 #endif 51 }; 52 53 54 55 56 57 58 59 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_OFFSET 0x0000000000000000 60 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_LSB 0 61 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_MSB 7 62 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_MASK 0x00000000000000ff 63 64 65 66 67 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_OFFSET 0x0000000000000000 68 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_LSB 8 69 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_MSB 15 70 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_MASK 0x000000000000ff00 71 72 73 74 75 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_OFFSET 0x0000000000000000 76 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_LSB 16 77 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_MSB 31 78 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_MASK 0x00000000ffff0000 79 80 81 82 83 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_OFFSET 0x0000000000000000 84 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_LSB 32 85 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_MSB 45 86 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_MASK 0x00003fff00000000 87 88 89 90 91 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_OFFSET 0x0000000000000000 92 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_LSB 46 93 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_MSB 46 94 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_MASK 0x0000400000000000 95 96 97 98 99 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_OFFSET 0x0000000000000000 100 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_LSB 47 101 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_MSB 47 102 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_MASK 0x0000800000000000 103 104 105 106 107 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_OFFSET 0x0000000000000000 108 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_LSB 48 109 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_MSB 63 110 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_MASK 0xffff000000000000 111 112 113 114 #endif 115