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 _MON_DESTINATION_RING_WITH_DROP_H_
27 #define _MON_DESTINATION_RING_WITH_DROP_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_MON_DESTINATION_RING_WITH_DROP 4
32 
33 
34 struct mon_destination_ring_with_drop {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t ppdu_drop_cnt                                           : 10,
37                       mpdu_drop_cnt                                           : 10,
38                       tlv_drop_cnt                                            : 10,
39                       end_of_ppdu_seen                                        :  1,
40                       reserved_0a                                             :  1;
41              uint32_t reserved_1a                                             : 32;
42              uint32_t ppdu_id                                                 : 32;
43              uint32_t reserved_3a                                             : 18,
44                       initiator                                               :  1,
45                       empty_descriptor                                        :  1,
46                       ring_id                                                 :  8,
47                       looping_count                                           :  4;
48 #else
49              uint32_t reserved_0a                                             :  1,
50                       end_of_ppdu_seen                                        :  1,
51                       tlv_drop_cnt                                            : 10,
52                       mpdu_drop_cnt                                           : 10,
53                       ppdu_drop_cnt                                           : 10;
54              uint32_t reserved_1a                                             : 32;
55              uint32_t ppdu_id                                                 : 32;
56              uint32_t looping_count                                           :  4,
57                       ring_id                                                 :  8,
58                       empty_descriptor                                        :  1,
59                       initiator                                               :  1,
60                       reserved_3a                                             : 18;
61 #endif
62 };
63 
64 
65 
66 
67 #define MON_DESTINATION_RING_WITH_DROP_PPDU_DROP_CNT_OFFSET                         0x00000000
68 #define MON_DESTINATION_RING_WITH_DROP_PPDU_DROP_CNT_LSB                            0
69 #define MON_DESTINATION_RING_WITH_DROP_PPDU_DROP_CNT_MSB                            9
70 #define MON_DESTINATION_RING_WITH_DROP_PPDU_DROP_CNT_MASK                           0x000003ff
71 
72 
73 
74 
75 #define MON_DESTINATION_RING_WITH_DROP_MPDU_DROP_CNT_OFFSET                         0x00000000
76 #define MON_DESTINATION_RING_WITH_DROP_MPDU_DROP_CNT_LSB                            10
77 #define MON_DESTINATION_RING_WITH_DROP_MPDU_DROP_CNT_MSB                            19
78 #define MON_DESTINATION_RING_WITH_DROP_MPDU_DROP_CNT_MASK                           0x000ffc00
79 
80 
81 
82 
83 #define MON_DESTINATION_RING_WITH_DROP_TLV_DROP_CNT_OFFSET                          0x00000000
84 #define MON_DESTINATION_RING_WITH_DROP_TLV_DROP_CNT_LSB                             20
85 #define MON_DESTINATION_RING_WITH_DROP_TLV_DROP_CNT_MSB                             29
86 #define MON_DESTINATION_RING_WITH_DROP_TLV_DROP_CNT_MASK                            0x3ff00000
87 
88 
89 
90 
91 #define MON_DESTINATION_RING_WITH_DROP_END_OF_PPDU_SEEN_OFFSET                      0x00000000
92 #define MON_DESTINATION_RING_WITH_DROP_END_OF_PPDU_SEEN_LSB                         30
93 #define MON_DESTINATION_RING_WITH_DROP_END_OF_PPDU_SEEN_MSB                         30
94 #define MON_DESTINATION_RING_WITH_DROP_END_OF_PPDU_SEEN_MASK                        0x40000000
95 
96 
97 
98 
99 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_0A_OFFSET                           0x00000000
100 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_0A_LSB                              31
101 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_0A_MSB                              31
102 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_0A_MASK                             0x80000000
103 
104 
105 
106 
107 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_1A_OFFSET                           0x00000004
108 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_1A_LSB                              0
109 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_1A_MSB                              31
110 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_1A_MASK                             0xffffffff
111 
112 
113 
114 
115 #define MON_DESTINATION_RING_WITH_DROP_PPDU_ID_OFFSET                               0x00000008
116 #define MON_DESTINATION_RING_WITH_DROP_PPDU_ID_LSB                                  0
117 #define MON_DESTINATION_RING_WITH_DROP_PPDU_ID_MSB                                  31
118 #define MON_DESTINATION_RING_WITH_DROP_PPDU_ID_MASK                                 0xffffffff
119 
120 
121 
122 
123 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_3A_OFFSET                           0x0000000c
124 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_3A_LSB                              0
125 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_3A_MSB                              17
126 #define MON_DESTINATION_RING_WITH_DROP_RESERVED_3A_MASK                             0x0003ffff
127 
128 
129 
130 
131 #define MON_DESTINATION_RING_WITH_DROP_INITIATOR_OFFSET                             0x0000000c
132 #define MON_DESTINATION_RING_WITH_DROP_INITIATOR_LSB                                18
133 #define MON_DESTINATION_RING_WITH_DROP_INITIATOR_MSB                                18
134 #define MON_DESTINATION_RING_WITH_DROP_INITIATOR_MASK                               0x00040000
135 
136 
137 
138 
139 #define MON_DESTINATION_RING_WITH_DROP_EMPTY_DESCRIPTOR_OFFSET                      0x0000000c
140 #define MON_DESTINATION_RING_WITH_DROP_EMPTY_DESCRIPTOR_LSB                         19
141 #define MON_DESTINATION_RING_WITH_DROP_EMPTY_DESCRIPTOR_MSB                         19
142 #define MON_DESTINATION_RING_WITH_DROP_EMPTY_DESCRIPTOR_MASK                        0x00080000
143 
144 
145 
146 
147 #define MON_DESTINATION_RING_WITH_DROP_RING_ID_OFFSET                               0x0000000c
148 #define MON_DESTINATION_RING_WITH_DROP_RING_ID_LSB                                  20
149 #define MON_DESTINATION_RING_WITH_DROP_RING_ID_MSB                                  27
150 #define MON_DESTINATION_RING_WITH_DROP_RING_ID_MASK                                 0x0ff00000
151 
152 
153 
154 
155 #define MON_DESTINATION_RING_WITH_DROP_LOOPING_COUNT_OFFSET                         0x0000000c
156 #define MON_DESTINATION_RING_WITH_DROP_LOOPING_COUNT_LSB                            28
157 #define MON_DESTINATION_RING_WITH_DROP_LOOPING_COUNT_MSB                            31
158 #define MON_DESTINATION_RING_WITH_DROP_LOOPING_COUNT_MASK                           0xf0000000
159 
160 
161 
162 #endif
163