xref: /wlan-driver/fw-api/hw/kiwi/v2/txpcu_user_buffer_status.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /*
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 
19 
20 #ifndef _TXPCU_USER_BUFFER_STATUS_H_
21 #define _TXPCU_USER_BUFFER_STATUS_H_
22 #if !defined(__ASSEMBLER__)
23 #endif
24 
25 #include "txpcu_buffer_basics.h"
26 #define NUM_OF_DWORDS_TXPCU_USER_BUFFER_STATUS 2
27 
28 #define NUM_OF_QWORDS_TXPCU_USER_BUFFER_STATUS 1
29 
30 struct txpcu_user_buffer_status {
31 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
32              struct   txpcu_buffer_basics                                       txpcu_basic_buffer_info;
33              uint32_t stored_word_count_user                                  : 14,
34                       reserved_1a                                             :  1,
35                       msdu_end                                                :  1,
36                       tx_data_sync_value                                      : 16;
37 #else
38              struct   txpcu_buffer_basics                                       txpcu_basic_buffer_info;
39              uint32_t tx_data_sync_value                                      : 16,
40                       msdu_end                                                :  1,
41                       reserved_1a                                             :  1,
42                       stored_word_count_user                                  : 14;
43 #endif
44 };
45 
46 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_OFFSET    0x0000000000000000
47 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_LSB       0
48 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_MSB       7
49 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_AVAILABLE_MEMORY_MASK      0x00000000000000ff
50 
51 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_OFFSET 0x0000000000000000
52 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_LSB 8
53 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_MSB 15
54 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_PARTIAL_TX_DATA_TLV_COUNT_MASK 0x000000000000ff00
55 
56 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_OFFSET   0x0000000000000000
57 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_LSB      16
58 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_MSB      31
59 #define TXPCU_USER_BUFFER_STATUS_TXPCU_BASIC_BUFFER_INFO_TX_DATA_TLV_COUNT_MASK     0x00000000ffff0000
60 
61 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_OFFSET                      0x0000000000000000
62 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_LSB                         32
63 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_MSB                         45
64 #define TXPCU_USER_BUFFER_STATUS_STORED_WORD_COUNT_USER_MASK                        0x00003fff00000000
65 
66 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_OFFSET                                 0x0000000000000000
67 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_LSB                                    46
68 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_MSB                                    46
69 #define TXPCU_USER_BUFFER_STATUS_RESERVED_1A_MASK                                   0x0000400000000000
70 
71 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_OFFSET                                    0x0000000000000000
72 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_LSB                                       47
73 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_MSB                                       47
74 #define TXPCU_USER_BUFFER_STATUS_MSDU_END_MASK                                      0x0000800000000000
75 
76 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_OFFSET                          0x0000000000000000
77 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_LSB                             48
78 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_MSB                             63
79 #define TXPCU_USER_BUFFER_STATUS_TX_DATA_SYNC_VALUE_MASK                            0xffff000000000000
80 
81 #endif
82