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