1 
2 /*
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 
21 
22 #ifndef _RX_MSDU_EXT_DESC_INFO_H_
23 #define _RX_MSDU_EXT_DESC_INFO_H_
24 #if !defined(__ASSEMBLER__)
25 #endif
26 
27 #define NUM_OF_DWORDS_RX_MSDU_EXT_DESC_INFO 1
28 
29 struct rx_msdu_ext_desc_info {
30 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
31              uint32_t reo_destination_indication                              :  5,
32                       service_code                                            :  9,
33                       priority_valid                                          :  1,
34                       data_offset                                             : 12,
35                       src_link_id                                             :  3,
36                       reserved_0a                                             :  2;
37 #else
38              uint32_t reserved_0a                                             :  2,
39                       src_link_id                                             :  3,
40                       data_offset                                             : 12,
41                       priority_valid                                          :  1,
42                       service_code                                            :  9,
43                       reo_destination_indication                              :  5;
44 #endif
45 };
46 
47 #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_OFFSET                     0x00000000
48 #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_LSB                        0
49 #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_MSB                        4
50 #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_MASK                       0x0000001f
51 
52 #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_OFFSET                                   0x00000000
53 #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_LSB                                      5
54 #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_MSB                                      13
55 #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_MASK                                     0x00003fe0
56 
57 #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_OFFSET                                 0x00000000
58 #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_LSB                                    14
59 #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_MSB                                    14
60 #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_MASK                                   0x00004000
61 
62 #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_OFFSET                                    0x00000000
63 #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_LSB                                       15
64 #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_MSB                                       26
65 #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_MASK                                      0x07ff8000
66 
67 #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_OFFSET                                    0x00000000
68 #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_LSB                                       27
69 #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_MSB                                       29
70 #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_MASK                                      0x38000000
71 
72 #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_OFFSET                                    0x00000000
73 #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_LSB                                       30
74 #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_MSB                                       31
75 #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_MASK                                      0xc0000000
76 
77 #endif
78