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 _EHT_SIG_USR_SU_INFO_H_
19 #define _EHT_SIG_USR_SU_INFO_H_
20 
21 #define NUM_OF_DWORDS_EHT_SIG_USR_SU_INFO 1
22 
23 struct eht_sig_usr_su_info {
24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25              uint32_t sta_id                                                  : 11,
26                       sta_mcs                                                 :  4,
27                       validate_0a                                             :  1,
28                       nss                                                     :  4,
29                       txbf                                                    :  1,
30                       sta_coding                                              :  1,
31                       reserved_0b                                             :  9,
32                       rx_integrity_check_passed                               :  1;
33 #else
34              uint32_t rx_integrity_check_passed                               :  1,
35                       reserved_0b                                             :  9,
36                       sta_coding                                              :  1,
37                       txbf                                                    :  1,
38                       nss                                                     :  4,
39                       validate_0a                                             :  1,
40                       sta_mcs                                                 :  4,
41                       sta_id                                                  : 11;
42 #endif
43 };
44 
45 #define EHT_SIG_USR_SU_INFO_STA_ID_OFFSET                                           0x00000000
46 #define EHT_SIG_USR_SU_INFO_STA_ID_LSB                                              0
47 #define EHT_SIG_USR_SU_INFO_STA_ID_MSB                                              10
48 #define EHT_SIG_USR_SU_INFO_STA_ID_MASK                                             0x000007ff
49 
50 #define EHT_SIG_USR_SU_INFO_STA_MCS_OFFSET                                          0x00000000
51 #define EHT_SIG_USR_SU_INFO_STA_MCS_LSB                                             11
52 #define EHT_SIG_USR_SU_INFO_STA_MCS_MSB                                             14
53 #define EHT_SIG_USR_SU_INFO_STA_MCS_MASK                                            0x00007800
54 
55 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_OFFSET                                      0x00000000
56 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_LSB                                         15
57 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_MSB                                         15
58 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_MASK                                        0x00008000
59 
60 #define EHT_SIG_USR_SU_INFO_NSS_OFFSET                                              0x00000000
61 #define EHT_SIG_USR_SU_INFO_NSS_LSB                                                 16
62 #define EHT_SIG_USR_SU_INFO_NSS_MSB                                                 19
63 #define EHT_SIG_USR_SU_INFO_NSS_MASK                                                0x000f0000
64 
65 #define EHT_SIG_USR_SU_INFO_TXBF_OFFSET                                             0x00000000
66 #define EHT_SIG_USR_SU_INFO_TXBF_LSB                                                20
67 #define EHT_SIG_USR_SU_INFO_TXBF_MSB                                                20
68 #define EHT_SIG_USR_SU_INFO_TXBF_MASK                                               0x00100000
69 
70 #define EHT_SIG_USR_SU_INFO_STA_CODING_OFFSET                                       0x00000000
71 #define EHT_SIG_USR_SU_INFO_STA_CODING_LSB                                          21
72 #define EHT_SIG_USR_SU_INFO_STA_CODING_MSB                                          21
73 #define EHT_SIG_USR_SU_INFO_STA_CODING_MASK                                         0x00200000
74 
75 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_OFFSET                                      0x00000000
76 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_LSB                                         22
77 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_MSB                                         30
78 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_MASK                                        0x7fc00000
79 
80 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                        0x00000000
81 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                           31
82 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                           31
83 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                          0x80000000
84 
85 #endif
86