1  /*
2   * Copyright (c) 2023 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  #ifndef _MACTX_SERVICE_H_
18  #define _MACTX_SERVICE_H_
19  #if !defined(__ASSEMBLER__)
20  #endif
21  
22  #include "service_info.h"
23  #define NUM_OF_DWORDS_MACTX_SERVICE 2
24  
25  #define NUM_OF_QWORDS_MACTX_SERVICE 1
26  
27  
28  struct mactx_service {
29  #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
30               struct   service_info                                              mactx_service_info_details;
31               uint32_t tlv64_padding                                           : 32; // [31:0]
32  #else
33               struct   service_info                                              mactx_service_info_details;
34               uint32_t tlv64_padding                                           : 32; // [31:0]
35  #endif
36  };
37  
38  
39  /* Description		MACTX_SERVICE_INFO_DETAILS
40  
41  			See detailed description of the STRUCT.
42  
43  			In case of EHT, instead of 'SERVICE_INFO' the STRUCT 'EHT_SERVICE_INFO'
44  			is used. See detailed description of the STRUCT.
45  */
46  
47  
48  /* Description		SCRAMBLER_SEED
49  
50  			This field provides the 7-bit seed for the data scrambler.
51  			 <legal all>
52  */
53  
54  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SCRAMBLER_SEED_OFFSET              0x0000000000000000
55  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SCRAMBLER_SEED_LSB                 0
56  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SCRAMBLER_SEED_MSB                 6
57  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SCRAMBLER_SEED_MASK                0x000000000000007f
58  
59  
60  /* Description		RESERVED
61  
62  			Reserved. Set to 0 by sender and ignored by receiver.  <legal
63  			 0>
64  */
65  
66  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_OFFSET                    0x0000000000000000
67  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_LSB                       7
68  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_MSB                       7
69  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_MASK                      0x0000000000000080
70  
71  
72  /* Description		SIG_B_CRC_USER
73  
74  			In case of vht transmission: vht_sig_b_crc_user
75  			<legal all>
76  */
77  
78  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SIG_B_CRC_USER_OFFSET              0x0000000000000000
79  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SIG_B_CRC_USER_LSB                 8
80  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SIG_B_CRC_USER_MSB                 15
81  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_SIG_B_CRC_USER_MASK                0x000000000000ff00
82  
83  
84  /* Description		RESERVED_1
85  
86  			<legal 0>
87  */
88  
89  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_1_OFFSET                  0x0000000000000000
90  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_1_LSB                     16
91  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_1_MSB                     31
92  #define MACTX_SERVICE_MACTX_SERVICE_INFO_DETAILS_RESERVED_1_MASK                    0x00000000ffff0000
93  
94  
95  /* Description		TLV64_PADDING
96  
97  			Automatic DWORD padding inserted while converting TLV32
98  			to TLV64 for 64 bit ARCH
99  			<legal 0>
100  */
101  
102  #define MACTX_SERVICE_TLV64_PADDING_OFFSET                                          0x0000000000000000
103  #define MACTX_SERVICE_TLV64_PADDING_LSB                                             32
104  #define MACTX_SERVICE_TLV64_PADDING_MSB                                             63
105  #define MACTX_SERVICE_TLV64_PADDING_MASK                                            0xffffffff00000000
106  
107  
108  
109  #endif   // MACTX_SERVICE
110