xref: /wlan-driver/fw-api/hw/peach/v2/tx_fes_status_ack_or_ba.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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 _TX_FES_STATUS_ACK_OR_BA_H_
19 #define _TX_FES_STATUS_ACK_OR_BA_H_
20 
21 #define NUM_OF_DWORDS_TX_FES_STATUS_ACK_OR_BA 10
22 
23 struct tx_fes_status_ack_or_ba {
24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25              uint32_t ack_ba_status_type                                      :  1,
26                       ba_type                                                 :  1,
27                       ba_tid                                                  :  4,
28                       unexpected_ack_or_ba                                    :  1,
29                       response_timeout                                        :  1,
30                       ack_frame_rssi                                          :  8,
31                       ssn                                                     : 12,
32                       reserved_0b                                             :  4;
33              uint32_t sw_peer_id                                              : 16,
34                       reserved_1a                                             : 16;
35              uint32_t ba_bitmap_31_0                                          : 32;
36              uint32_t ba_bitmap_63_32                                         : 32;
37              uint32_t ba_bitmap_95_64                                         : 32;
38              uint32_t ba_bitmap_127_96                                        : 32;
39              uint32_t ba_bitmap_159_128                                       : 32;
40              uint32_t ba_bitmap_191_160                                       : 32;
41              uint32_t ba_bitmap_223_192                                       : 32;
42              uint32_t ba_bitmap_255_224                                       : 32;
43 #else
44              uint32_t reserved_0b                                             :  4,
45                       ssn                                                     : 12,
46                       ack_frame_rssi                                          :  8,
47                       response_timeout                                        :  1,
48                       unexpected_ack_or_ba                                    :  1,
49                       ba_tid                                                  :  4,
50                       ba_type                                                 :  1,
51                       ack_ba_status_type                                      :  1;
52              uint32_t reserved_1a                                             : 16,
53                       sw_peer_id                                              : 16;
54              uint32_t ba_bitmap_31_0                                          : 32;
55              uint32_t ba_bitmap_63_32                                         : 32;
56              uint32_t ba_bitmap_95_64                                         : 32;
57              uint32_t ba_bitmap_127_96                                        : 32;
58              uint32_t ba_bitmap_159_128                                       : 32;
59              uint32_t ba_bitmap_191_160                                       : 32;
60              uint32_t ba_bitmap_223_192                                       : 32;
61              uint32_t ba_bitmap_255_224                                       : 32;
62 #endif
63 };
64 
65 #define TX_FES_STATUS_ACK_OR_BA_ACK_BA_STATUS_TYPE_OFFSET                           0x00000000
66 #define TX_FES_STATUS_ACK_OR_BA_ACK_BA_STATUS_TYPE_LSB                              0
67 #define TX_FES_STATUS_ACK_OR_BA_ACK_BA_STATUS_TYPE_MSB                              0
68 #define TX_FES_STATUS_ACK_OR_BA_ACK_BA_STATUS_TYPE_MASK                             0x00000001
69 
70 #define TX_FES_STATUS_ACK_OR_BA_BA_TYPE_OFFSET                                      0x00000000
71 #define TX_FES_STATUS_ACK_OR_BA_BA_TYPE_LSB                                         1
72 #define TX_FES_STATUS_ACK_OR_BA_BA_TYPE_MSB                                         1
73 #define TX_FES_STATUS_ACK_OR_BA_BA_TYPE_MASK                                        0x00000002
74 
75 #define TX_FES_STATUS_ACK_OR_BA_BA_TID_OFFSET                                       0x00000000
76 #define TX_FES_STATUS_ACK_OR_BA_BA_TID_LSB                                          2
77 #define TX_FES_STATUS_ACK_OR_BA_BA_TID_MSB                                          5
78 #define TX_FES_STATUS_ACK_OR_BA_BA_TID_MASK                                         0x0000003c
79 
80 #define TX_FES_STATUS_ACK_OR_BA_UNEXPECTED_ACK_OR_BA_OFFSET                         0x00000000
81 #define TX_FES_STATUS_ACK_OR_BA_UNEXPECTED_ACK_OR_BA_LSB                            6
82 #define TX_FES_STATUS_ACK_OR_BA_UNEXPECTED_ACK_OR_BA_MSB                            6
83 #define TX_FES_STATUS_ACK_OR_BA_UNEXPECTED_ACK_OR_BA_MASK                           0x00000040
84 
85 #define TX_FES_STATUS_ACK_OR_BA_RESPONSE_TIMEOUT_OFFSET                             0x00000000
86 #define TX_FES_STATUS_ACK_OR_BA_RESPONSE_TIMEOUT_LSB                                7
87 #define TX_FES_STATUS_ACK_OR_BA_RESPONSE_TIMEOUT_MSB                                7
88 #define TX_FES_STATUS_ACK_OR_BA_RESPONSE_TIMEOUT_MASK                               0x00000080
89 
90 #define TX_FES_STATUS_ACK_OR_BA_ACK_FRAME_RSSI_OFFSET                               0x00000000
91 #define TX_FES_STATUS_ACK_OR_BA_ACK_FRAME_RSSI_LSB                                  8
92 #define TX_FES_STATUS_ACK_OR_BA_ACK_FRAME_RSSI_MSB                                  15
93 #define TX_FES_STATUS_ACK_OR_BA_ACK_FRAME_RSSI_MASK                                 0x0000ff00
94 
95 #define TX_FES_STATUS_ACK_OR_BA_SSN_OFFSET                                          0x00000000
96 #define TX_FES_STATUS_ACK_OR_BA_SSN_LSB                                             16
97 #define TX_FES_STATUS_ACK_OR_BA_SSN_MSB                                             27
98 #define TX_FES_STATUS_ACK_OR_BA_SSN_MASK                                            0x0fff0000
99 
100 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_0B_OFFSET                                  0x00000000
101 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_0B_LSB                                     28
102 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_0B_MSB                                     31
103 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_0B_MASK                                    0xf0000000
104 
105 #define TX_FES_STATUS_ACK_OR_BA_SW_PEER_ID_OFFSET                                   0x00000004
106 #define TX_FES_STATUS_ACK_OR_BA_SW_PEER_ID_LSB                                      0
107 #define TX_FES_STATUS_ACK_OR_BA_SW_PEER_ID_MSB                                      15
108 #define TX_FES_STATUS_ACK_OR_BA_SW_PEER_ID_MASK                                     0x0000ffff
109 
110 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_1A_OFFSET                                  0x00000004
111 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_1A_LSB                                     16
112 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_1A_MSB                                     31
113 #define TX_FES_STATUS_ACK_OR_BA_RESERVED_1A_MASK                                    0xffff0000
114 
115 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_31_0_OFFSET                               0x00000008
116 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_31_0_LSB                                  0
117 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_31_0_MSB                                  31
118 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_31_0_MASK                                 0xffffffff
119 
120 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_63_32_OFFSET                              0x0000000c
121 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_63_32_LSB                                 0
122 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_63_32_MSB                                 31
123 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_63_32_MASK                                0xffffffff
124 
125 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_95_64_OFFSET                              0x00000010
126 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_95_64_LSB                                 0
127 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_95_64_MSB                                 31
128 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_95_64_MASK                                0xffffffff
129 
130 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_127_96_OFFSET                             0x00000014
131 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_127_96_LSB                                0
132 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_127_96_MSB                                31
133 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_127_96_MASK                               0xffffffff
134 
135 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_159_128_OFFSET                            0x00000018
136 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_159_128_LSB                               0
137 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_159_128_MSB                               31
138 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_159_128_MASK                              0xffffffff
139 
140 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_191_160_OFFSET                            0x0000001c
141 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_191_160_LSB                               0
142 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_191_160_MSB                               31
143 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_191_160_MASK                              0xffffffff
144 
145 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_223_192_OFFSET                            0x00000020
146 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_223_192_LSB                               0
147 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_223_192_MSB                               31
148 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_223_192_MASK                              0xffffffff
149 
150 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_255_224_OFFSET                            0x00000024
151 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_255_224_LSB                               0
152 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_255_224_MSB                               31
153 #define TX_FES_STATUS_ACK_OR_BA_BA_BITMAP_255_224_MASK                              0xffffffff
154 
155 #endif
156