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 #ifndef _MON_DROP_H_
24 #define _MON_DROP_H_
25 #if !defined(__ASSEMBLER__)
26 #endif
27 
28 #define NUM_OF_DWORDS_MON_DROP 2
29 
30 #define NUM_OF_QWORDS_MON_DROP 1
31 
32 
33 struct mon_drop {
34 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
35              uint32_t ppdu_id                                                 : 32;
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_1a                                             :  1;
41 #else
42              uint32_t ppdu_id                                                 : 32;
43              uint32_t reserved_1a                                             :  1,
44                       end_of_ppdu_seen                                        :  1,
45                       tlv_drop_cnt                                            : 10,
46                       mpdu_drop_cnt                                           : 10,
47                       ppdu_drop_cnt                                           : 10;
48 #endif
49 };
50 
51 
52 
53 
54 #define MON_DROP_PPDU_ID_OFFSET                                                     0x0000000000000000
55 #define MON_DROP_PPDU_ID_LSB                                                        0
56 #define MON_DROP_PPDU_ID_MSB                                                        31
57 #define MON_DROP_PPDU_ID_MASK                                                       0x00000000ffffffff
58 
59 
60 
61 
62 #define MON_DROP_PPDU_DROP_CNT_OFFSET                                               0x0000000000000000
63 #define MON_DROP_PPDU_DROP_CNT_LSB                                                  32
64 #define MON_DROP_PPDU_DROP_CNT_MSB                                                  41
65 #define MON_DROP_PPDU_DROP_CNT_MASK                                                 0x000003ff00000000
66 
67 
68 
69 
70 #define MON_DROP_MPDU_DROP_CNT_OFFSET                                               0x0000000000000000
71 #define MON_DROP_MPDU_DROP_CNT_LSB                                                  42
72 #define MON_DROP_MPDU_DROP_CNT_MSB                                                  51
73 #define MON_DROP_MPDU_DROP_CNT_MASK                                                 0x000ffc0000000000
74 
75 
76 
77 
78 #define MON_DROP_TLV_DROP_CNT_OFFSET                                                0x0000000000000000
79 #define MON_DROP_TLV_DROP_CNT_LSB                                                   52
80 #define MON_DROP_TLV_DROP_CNT_MSB                                                   61
81 #define MON_DROP_TLV_DROP_CNT_MASK                                                  0x3ff0000000000000
82 
83 
84 
85 
86 #define MON_DROP_END_OF_PPDU_SEEN_OFFSET                                            0x0000000000000000
87 #define MON_DROP_END_OF_PPDU_SEEN_LSB                                               62
88 #define MON_DROP_END_OF_PPDU_SEEN_MSB                                               62
89 #define MON_DROP_END_OF_PPDU_SEEN_MASK                                              0x4000000000000000
90 
91 
92 
93 
94 #define MON_DROP_RESERVED_1A_OFFSET                                                 0x0000000000000000
95 #define MON_DROP_RESERVED_1A_LSB                                                    63
96 #define MON_DROP_RESERVED_1A_MSB                                                    63
97 #define MON_DROP_RESERVED_1A_MASK                                                   0x8000000000000000
98 
99 
100 
101 #endif
102