xref: /wlan-driver/fw-api/hw/qcn6432/tlv_hdr.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name #ifndef _TLV_HDR_H_
18*5113495bSYour Name #define _TLV_HDR_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name #define _TLV_USERID_WIDTH_      6
23*5113495bSYour Name #define _TLV_DATA_WIDTH_        32
24*5113495bSYour Name #define _TLV_TAG_WIDTH_         9
25*5113495bSYour Name 
26*5113495bSYour Name #define _TLV_MRV_EN_LEN_WIDTH_  9
27*5113495bSYour Name #define _TLV_MRV_DIS_LEN_WIDTH_ 12
28*5113495bSYour Name 
29*5113495bSYour Name #define _TLV_16_DATA_WIDTH_     16
30*5113495bSYour Name #define _TLV_16_TAG_WIDTH_      5
31*5113495bSYour Name #define _TLV_16_LEN_WIDTH_      4
32*5113495bSYour Name #define _TLV_CTAG_WIDTH_        5
33*5113495bSYour Name #define _TLV_44_DATA_WIDTH_     44
34*5113495bSYour Name #define _TLV_64_DATA_WIDTH_     64
35*5113495bSYour Name #define _TLV_76_DATA_WIDTH_     64
36*5113495bSYour Name #define _TLV_CDATA_WIDTH_       32
37*5113495bSYour Name #define _TLV_CDATA_76_WIDTH_    64
38*5113495bSYour Name 
39*5113495bSYour Name struct tlv_usr_16_tlword_t {
40*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
41*5113495bSYour Name            uint16_t             tlv_cflg_reserved   :   1,
42*5113495bSYour Name                                 tlv_tag             :   _TLV_16_TAG_WIDTH_,
43*5113495bSYour Name                                 tlv_len             :   _TLV_16_LEN_WIDTH_,
44*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_;
45*5113495bSYour Name #else
46*5113495bSYour Name            uint16_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
47*5113495bSYour Name                                 tlv_len             :   _TLV_16_LEN_WIDTH_,
48*5113495bSYour Name                                 tlv_tag             :   _TLV_16_TAG_WIDTH_,
49*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
50*5113495bSYour Name #endif
51*5113495bSYour Name };
52*5113495bSYour Name 
53*5113495bSYour Name struct tlv_16_tlword_t {
54*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
55*5113495bSYour Name            uint16_t             tlv_cflg_reserved   :   1,
56*5113495bSYour Name                                 tlv_len             :   _TLV_16_LEN_WIDTH_,
57*5113495bSYour Name                                 tlv_tag             :   _TLV_16_TAG_WIDTH_,
58*5113495bSYour Name                                 tlv_reserved        :   6;
59*5113495bSYour Name #else
60*5113495bSYour Name            uint16_t             tlv_reserved        :   6,
61*5113495bSYour Name                                 tlv_tag             :   _TLV_16_TAG_WIDTH_,
62*5113495bSYour Name                                 tlv_len             :   _TLV_16_LEN_WIDTH_,
63*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
64*5113495bSYour Name #endif
65*5113495bSYour Name };
66*5113495bSYour Name 
67*5113495bSYour Name // -----------------------------------------------------------------
68*5113495bSYour Name // TLV 32 onwards support two formats,
69*5113495bSYour Name // link id based where some bits of length have been re-purposed
70*5113495bSYour Name // non link id based where legacy length width is available
71*5113495bSYour Name // -----------------------------------------------------------------
72*5113495bSYour Name 
73*5113495bSYour Name struct tlv_mlo_usr_32_tlword_t {
74*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
75*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
76*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
77*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
78*5113495bSYour Name                                 tlv_dst_linkid      :   3,
79*5113495bSYour Name                                 tlv_src_linkid      :   3,
80*5113495bSYour Name                                 tlv_mrv             :   1,
81*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_;
82*5113495bSYour Name #else
83*5113495bSYour Name            uint32_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
84*5113495bSYour Name                                 tlv_mrv             :   1,
85*5113495bSYour Name                                 tlv_src_linkid      :   3,
86*5113495bSYour Name                                 tlv_dst_linkid      :   3,
87*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
88*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
89*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
90*5113495bSYour Name #endif
91*5113495bSYour Name };
92*5113495bSYour Name 
93*5113495bSYour Name struct tlv_mlo_32_tlword_t {
94*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
95*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
96*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
97*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
98*5113495bSYour Name                                 tlv_dst_linkid      :   3,
99*5113495bSYour Name                                 tlv_src_linkid      :   3,
100*5113495bSYour Name                                 tlv_mrv             :   1,
101*5113495bSYour Name                                 tlv_reserved        :   6;
102*5113495bSYour Name #else
103*5113495bSYour Name            uint32_t             tlv_reserved        :   6,
104*5113495bSYour Name                                 tlv_mrv             :   1,
105*5113495bSYour Name                                 tlv_src_linkid      :   3,
106*5113495bSYour Name                                 tlv_dst_linkid      :   3,
107*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
108*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
109*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
110*5113495bSYour Name #endif
111*5113495bSYour Name };
112*5113495bSYour Name 
113*5113495bSYour Name struct tlv_mlo_usr_64_tlword_t {
114*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
115*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
116*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
117*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
118*5113495bSYour Name                                 tlv_dst_linkid      :   3,
119*5113495bSYour Name                                 tlv_src_linkid      :   3,
120*5113495bSYour Name                                 tlv_mrv             :   1,
121*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
122*5113495bSYour Name #else
123*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
124*5113495bSYour Name                                 tlv_mrv             :   1,
125*5113495bSYour Name                                 tlv_src_linkid      :   3,
126*5113495bSYour Name                                 tlv_dst_linkid      :   3,
127*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
128*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
129*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
130*5113495bSYour Name #endif
131*5113495bSYour Name                                 tlv_reserved        :   32;
132*5113495bSYour Name };
133*5113495bSYour Name 
134*5113495bSYour Name struct tlv_mlo_64_tlword_t {
135*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
136*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
137*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
138*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
139*5113495bSYour Name                                 tlv_dst_linkid      :   3,
140*5113495bSYour Name                                 tlv_src_linkid      :   3,
141*5113495bSYour Name                                 tlv_mrv             :   1,
142*5113495bSYour Name                                 tlv_reserved        :   38;
143*5113495bSYour Name #else
144*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
145*5113495bSYour Name                                 tlv_mrv             :   1,
146*5113495bSYour Name                                 tlv_src_linkid      :   3,
147*5113495bSYour Name                                 tlv_dst_linkid      :   3,
148*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
149*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
150*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
151*5113495bSYour Name                                 tlv_reserved        :   32;
152*5113495bSYour Name #endif
153*5113495bSYour Name };
154*5113495bSYour Name 
155*5113495bSYour Name struct tlv_mlo_usr_44_tlword_t {
156*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
157*5113495bSYour Name            uint64_t             tlv_compression     :   1,
158*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
159*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
160*5113495bSYour Name                                 tlv_dst_linkid      :   3,
161*5113495bSYour Name                                 tlv_src_linkid      :   3,
162*5113495bSYour Name                                 tlv_mrv             :   1,
163*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
164*5113495bSYour Name                                 tlv_reserved        :   10,
165*5113495bSYour Name                                 pad_44to64_bit      :   22;
166*5113495bSYour Name #else
167*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
168*5113495bSYour Name                                 tlv_mrv             :   1,
169*5113495bSYour Name                                 tlv_src_linkid      :   3,
170*5113495bSYour Name                                 tlv_dst_linkid      :   3,
171*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
172*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
173*5113495bSYour Name                                 tlv_compression     :   1,
174*5113495bSYour Name                                 pad_44to64_bit      :   22,
175*5113495bSYour Name                                 tlv_reserved        :   10;
176*5113495bSYour Name #endif
177*5113495bSYour Name };
178*5113495bSYour Name 
179*5113495bSYour Name struct tlv_mlo_44_tlword_t {
180*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
181*5113495bSYour Name            uint64_t             tlv_compression     :   1,
182*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
183*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
184*5113495bSYour Name                                 tlv_dst_linkid      :   3,
185*5113495bSYour Name                                 tlv_src_linkid      :   3,
186*5113495bSYour Name                                 tlv_mrv             :   1,
187*5113495bSYour Name                                 tlv_reserved        :   16,
188*5113495bSYour Name                                 pad_44to64_bit      :   22;
189*5113495bSYour Name #else
190*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
191*5113495bSYour Name                                 tlv_mrv             :   1,
192*5113495bSYour Name                                 tlv_src_linkid      :   3,
193*5113495bSYour Name                                 tlv_dst_linkid      :   3,
194*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
195*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
196*5113495bSYour Name                                 tlv_compression     :   1,
197*5113495bSYour Name                                 pad_44to64_bit      :   22,
198*5113495bSYour Name                                 tlv_reserved        :   10;
199*5113495bSYour Name #endif
200*5113495bSYour Name };
201*5113495bSYour Name 
202*5113495bSYour Name struct tlv_mlo_usr_76_tlword_t {
203*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
204*5113495bSYour Name            uint64_t             tlv_compression     :   1,
205*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
206*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
207*5113495bSYour Name                                 tlv_dst_linkid      :   3,
208*5113495bSYour Name                                 tlv_src_linkid      :   3,
209*5113495bSYour Name                                 tlv_mrv             :   1,
210*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
211*5113495bSYour Name #else
212*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
213*5113495bSYour Name                                 tlv_mrv             :   1,
214*5113495bSYour Name                                 tlv_src_linkid      :   3,
215*5113495bSYour Name                                 tlv_dst_linkid      :   3,
216*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
217*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
218*5113495bSYour Name                                 tlv_compression     :   1,
219*5113495bSYour Name #endif
220*5113495bSYour Name                                 tlv_reserved        :   32;
221*5113495bSYour Name            uint64_t             pad_64to128_bit     :   64;
222*5113495bSYour Name };
223*5113495bSYour Name 
224*5113495bSYour Name struct tlv_mlo_76_tlword_t {
225*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
226*5113495bSYour Name            uint64_t             tlv_compression     :   1,
227*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
228*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
229*5113495bSYour Name                                 tlv_dst_linkid      :   3,
230*5113495bSYour Name                                 tlv_src_linkid      :   3,
231*5113495bSYour Name                                 tlv_mrv             :   1,
232*5113495bSYour Name                                 tlv_reserved        :   38;
233*5113495bSYour Name #else
234*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
235*5113495bSYour Name                                 tlv_mrv             :   1,
236*5113495bSYour Name                                 tlv_src_linkid      :   3,
237*5113495bSYour Name                                 tlv_dst_linkid      :   3,
238*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
239*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
240*5113495bSYour Name                                 tlv_compression     :   1,
241*5113495bSYour Name                                 tlv_reserved        :   32;
242*5113495bSYour Name #endif
243*5113495bSYour Name            uint64_t             pad_64to128_bit     :   64;
244*5113495bSYour Name };
245*5113495bSYour Name 
246*5113495bSYour Name 
247*5113495bSYour Name 
248*5113495bSYour Name 
249*5113495bSYour Name 
250*5113495bSYour Name 
251*5113495bSYour Name struct tlv_mac_usr_32_tlword_t {
252*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
253*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
254*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
255*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
256*5113495bSYour Name                                 tlv_src_linkid      :   3,
257*5113495bSYour Name                                 tlv_mrv             :   1,
258*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_;
259*5113495bSYour Name #else
260*5113495bSYour Name            uint32_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
261*5113495bSYour Name                                 tlv_mrv             :   1,
262*5113495bSYour Name                                 tlv_src_linkid      :   3,
263*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
264*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
265*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
266*5113495bSYour Name #endif
267*5113495bSYour Name };
268*5113495bSYour Name 
269*5113495bSYour Name struct tlv_mac_32_tlword_t {
270*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
271*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
272*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
273*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
274*5113495bSYour Name                                 tlv_src_linkid      :   3,
275*5113495bSYour Name                                 tlv_mrv             :   1,
276*5113495bSYour Name                                 tlv_reserved        :   6;
277*5113495bSYour Name #else
278*5113495bSYour Name            uint32_t             tlv_reserved        :   6,
279*5113495bSYour Name                                 tlv_mrv             :   1,
280*5113495bSYour Name                                 tlv_src_linkid      :   3,
281*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
282*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
283*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
284*5113495bSYour Name #endif
285*5113495bSYour Name };
286*5113495bSYour Name 
287*5113495bSYour Name struct tlv_mac_usr_64_tlword_t {
288*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
289*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
290*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
291*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
292*5113495bSYour Name                                 tlv_src_linkid      :   3,
293*5113495bSYour Name                                 tlv_mrv             :   1,
294*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
295*5113495bSYour Name #else
296*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
297*5113495bSYour Name                                 tlv_mrv             :   1,
298*5113495bSYour Name                                 tlv_src_linkid      :   3,
299*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
300*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
301*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
302*5113495bSYour Name #endif
303*5113495bSYour Name                                 tlv_reserved        :   32;
304*5113495bSYour Name };
305*5113495bSYour Name 
306*5113495bSYour Name struct tlv_mac_64_tlword_t {
307*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
308*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
309*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
310*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
311*5113495bSYour Name                                 tlv_src_linkid      :   3,
312*5113495bSYour Name                                 tlv_mrv             :   1,
313*5113495bSYour Name                                 tlv_reserved        :   38;
314*5113495bSYour Name #else
315*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
316*5113495bSYour Name                                 tlv_mrv             :   1,
317*5113495bSYour Name                                 tlv_src_linkid      :   3,
318*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
319*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
320*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
321*5113495bSYour Name                                 tlv_reserved        :   32;
322*5113495bSYour Name #endif
323*5113495bSYour Name };
324*5113495bSYour Name 
325*5113495bSYour Name struct tlv_mac_usr_44_tlword_t {
326*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
327*5113495bSYour Name            uint64_t             tlv_compression     :   1,
328*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
329*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
330*5113495bSYour Name                                 tlv_src_linkid      :   3,
331*5113495bSYour Name                                 tlv_mrv             :   1,
332*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
333*5113495bSYour Name                                 tlv_reserved        :   10,
334*5113495bSYour Name                                 pad_44to64_bit      :   22;
335*5113495bSYour Name #else
336*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
337*5113495bSYour Name                                 tlv_mrv             :   1,
338*5113495bSYour Name                                 tlv_src_linkid      :   3,
339*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
340*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
341*5113495bSYour Name                                 tlv_compression     :   1,
342*5113495bSYour Name                                 pad_44to64_bit      :   22,
343*5113495bSYour Name                                 tlv_reserved        :   10;
344*5113495bSYour Name #endif
345*5113495bSYour Name };
346*5113495bSYour Name 
347*5113495bSYour Name struct tlv_mac_44_tlword_t {
348*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
349*5113495bSYour Name            uint64_t             tlv_compression     :   1,
350*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
351*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
352*5113495bSYour Name                                 tlv_src_linkid      :   3,
353*5113495bSYour Name                                 tlv_mrv             :   1,
354*5113495bSYour Name                                 tlv_reserved        :   16,
355*5113495bSYour Name                                 pad_44to64_bit      :   22;
356*5113495bSYour Name #else
357*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
358*5113495bSYour Name                                 tlv_mrv             :   1,
359*5113495bSYour Name                                 tlv_src_linkid      :   3,
360*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
361*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
362*5113495bSYour Name                                 tlv_compression     :   1,
363*5113495bSYour Name                                 pad_44to64_bit      :   22,
364*5113495bSYour Name                                 tlv_reserved        :   10;
365*5113495bSYour Name #endif
366*5113495bSYour Name };
367*5113495bSYour Name 
368*5113495bSYour Name struct tlv_mac_usr_76_tlword_t {
369*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
370*5113495bSYour Name            uint64_t             tlv_compression     :   1,
371*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
372*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
373*5113495bSYour Name                                 tlv_src_linkid      :   3,
374*5113495bSYour Name                                 tlv_mrv             :   1,
375*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
376*5113495bSYour Name #else
377*5113495bSYour Name            uint64_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
378*5113495bSYour Name                                 tlv_mrv             :   1,
379*5113495bSYour Name                                 tlv_src_linkid      :   3,
380*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
381*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
382*5113495bSYour Name                                 tlv_compression     :   1,
383*5113495bSYour Name #endif
384*5113495bSYour Name                                 tlv_reserved        :   32;
385*5113495bSYour Name            uint64_t             pad_64to128_bit     :   64;
386*5113495bSYour Name };
387*5113495bSYour Name 
388*5113495bSYour Name struct tlv_mac_76_tlword_t {
389*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
390*5113495bSYour Name            uint64_t             tlv_compression     :   1,
391*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
392*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
393*5113495bSYour Name                                 tlv_src_linkid      :   3,
394*5113495bSYour Name                                 tlv_mrv             :   1,
395*5113495bSYour Name                                 tlv_reserved        :   38;
396*5113495bSYour Name #else
397*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
398*5113495bSYour Name                                 tlv_mrv             :   1,
399*5113495bSYour Name                                 tlv_src_linkid      :   3,
400*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
401*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
402*5113495bSYour Name                                 tlv_compression     :   1,
403*5113495bSYour Name                                 tlv_reserved        :   32;
404*5113495bSYour Name #endif
405*5113495bSYour Name            uint64_t             pad_64to128_bit     :   64;
406*5113495bSYour Name };
407*5113495bSYour Name 
408*5113495bSYour Name // -----------------------------------------------------------------
409*5113495bSYour Name // Compressed TLVs do not support the MLO variant
410*5113495bSYour Name // -----------------------------------------------------------------
411*5113495bSYour Name 
412*5113495bSYour Name struct tlv_usr_c_44_tlword_t {
413*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
414*5113495bSYour Name            uint64_t             tlv_compression     :   1,
415*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
416*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
417*5113495bSYour Name                                 tlv_cdata           :   _TLV_CDATA_WIDTH_,
418*5113495bSYour Name                                 pad_44to64_bit      :   20;
419*5113495bSYour Name #else
420*5113495bSYour Name            uint64_t             tlv_cdata_lower_20  :   20,
421*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
422*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
423*5113495bSYour Name                                 tlv_compression     :   1,
424*5113495bSYour Name                                 pad_44to64_bit      :   20,
425*5113495bSYour Name                                 tlv_cdata_upper_12  :   12;
426*5113495bSYour Name #endif
427*5113495bSYour Name };
428*5113495bSYour Name 
429*5113495bSYour Name struct tlv_usr_c_76_tlword_t {
430*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
431*5113495bSYour Name            uint64_t             tlv_compression     :   1,
432*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
433*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
434*5113495bSYour Name                                 tlv_cdata_lower_52  :   52;
435*5113495bSYour Name            uint64_t             tlv_cdata_upper_12  :   12,
436*5113495bSYour Name                                 pad_76to128_bit     :   52;
437*5113495bSYour Name #else
438*5113495bSYour Name            uint64_t             tlv_cdata_lower_20  :   20,
439*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
440*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
441*5113495bSYour Name                                 tlv_compression     :   1,
442*5113495bSYour Name                                 tlv_cdata_middle_32 :   32;
443*5113495bSYour Name            uint64_t             pad_76to96_bit      :   20,
444*5113495bSYour Name                                 tlv_cdata_upper_12  :   12,
445*5113495bSYour Name                                 pad_96to128_bit     :   32;
446*5113495bSYour Name #endif
447*5113495bSYour Name };
448*5113495bSYour Name 
449*5113495bSYour Name 
450*5113495bSYour Name // -----------------------------------------------------------------
451*5113495bSYour Name // !!!   For backward compatibility ONLY.                        !!!
452*5113495bSYour Name // !!!   As per SW request, legacy tlv_32_hdr and tlv_usr_32_hdr !!!
453*5113495bSYour Name // !!!   types are mapped to new 64 bit headers.                 !!!
454*5113495bSYour Name // -----------------------------------------------------------------
455*5113495bSYour Name struct tlv_usr_32_hdr {
456*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
457*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
458*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
459*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
460*5113495bSYour Name                                 tlv_src_linkid      :   3,
461*5113495bSYour Name                                 tlv_mrv             :   1,
462*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
463*5113495bSYour Name #else
464*5113495bSYour Name            uint32_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
465*5113495bSYour Name                                 tlv_mrv             :   1,
466*5113495bSYour Name                                 tlv_src_linkid      :   3,
467*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
468*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
469*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
470*5113495bSYour Name #endif
471*5113495bSYour Name                                 tlv_reserved        :   32;
472*5113495bSYour Name };
473*5113495bSYour Name 
474*5113495bSYour Name struct tlv_32_hdr {
475*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
476*5113495bSYour Name            uint64_t             tlv_cflg_reserved   :   1,
477*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
478*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
479*5113495bSYour Name                                 tlv_src_linkid      :   3,
480*5113495bSYour Name                                 tlv_mrv             :   1,
481*5113495bSYour Name                                 tlv_reserved        :   38;
482*5113495bSYour Name #else
483*5113495bSYour Name            uint64_t             tlv_usrid_reserved  :   _TLV_USERID_WIDTH_,
484*5113495bSYour Name                                 tlv_mrv             :   1,
485*5113495bSYour Name                                 tlv_src_linkid      :   3,
486*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
487*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
488*5113495bSYour Name                                 tlv_cflg_reserved   :   1,
489*5113495bSYour Name                                 tlv_reserved        :   32;
490*5113495bSYour Name #endif
491*5113495bSYour Name };
492*5113495bSYour Name // -----------------------------------------------------------------
493*5113495bSYour Name 
494*5113495bSYour Name // -----------------------------------------------------------------
495*5113495bSYour Name // !!!   Tag-length word structures using uint32_t               !!!
496*5113495bSYour Name // !!!   For endianness considerations                           !!!
497*5113495bSYour Name // !!!   'tlword' is replaced with 'tlw32'                       !!!
498*5113495bSYour Name // -----------------------------------------------------------------
499*5113495bSYour Name 
500*5113495bSYour Name struct tlv_mlo_usr_64_tlw32_t {
501*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
502*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
503*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
504*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
505*5113495bSYour Name                                 tlv_dst_linkid      :   3,
506*5113495bSYour Name                                 tlv_src_linkid      :   3,
507*5113495bSYour Name                                 tlv_mrv             :   1,
508*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_;
509*5113495bSYour Name #else
510*5113495bSYour Name            uint32_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
511*5113495bSYour Name                                 tlv_mrv             :   1,
512*5113495bSYour Name                                 tlv_src_linkid      :   3,
513*5113495bSYour Name                                 tlv_dst_linkid      :   3,
514*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
515*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
516*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
517*5113495bSYour Name #endif
518*5113495bSYour Name            uint32_t             pad_32to64_bit      :   32;
519*5113495bSYour Name };
520*5113495bSYour Name 
521*5113495bSYour Name struct tlv_mlo_64_tlw32_t {
522*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
523*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
524*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
525*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
526*5113495bSYour Name                                 tlv_dst_linkid      :   3,
527*5113495bSYour Name                                 tlv_src_linkid      :   3,
528*5113495bSYour Name                                 tlv_mrv             :   1,
529*5113495bSYour Name                                 tlv_reserved        :   _TLV_USERID_WIDTH_;
530*5113495bSYour Name #else
531*5113495bSYour Name            uint32_t             tlv_reserved        :   _TLV_USERID_WIDTH_,
532*5113495bSYour Name                                 tlv_mrv             :   1,
533*5113495bSYour Name                                 tlv_src_linkid      :   3,
534*5113495bSYour Name                                 tlv_dst_linkid      :   3,
535*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
536*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
537*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
538*5113495bSYour Name #endif
539*5113495bSYour Name            uint32_t             pad_32to64_bit      :   32;
540*5113495bSYour Name };
541*5113495bSYour Name 
542*5113495bSYour Name struct tlv_mac_usr_64_tlw32_t {
543*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
544*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
545*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
546*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
547*5113495bSYour Name                                 tlv_src_linkid      :   3,
548*5113495bSYour Name                                 tlv_mrv             :   1,
549*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_;
550*5113495bSYour Name #else
551*5113495bSYour Name            uint32_t             tlv_usrid           :   _TLV_USERID_WIDTH_,
552*5113495bSYour Name                                 tlv_mrv             :   1,
553*5113495bSYour Name                                 tlv_src_linkid      :   3,
554*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
555*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
556*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
557*5113495bSYour Name #endif
558*5113495bSYour Name            uint32_t             pad_32to64_bit      :   32;
559*5113495bSYour Name };
560*5113495bSYour Name 
561*5113495bSYour Name struct tlv_mac_64_tlw32_t {
562*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
563*5113495bSYour Name            uint32_t             tlv_cflg_reserved   :   1,
564*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
565*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
566*5113495bSYour Name                                 tlv_src_linkid      :   3,
567*5113495bSYour Name                                 tlv_mrv             :   1,
568*5113495bSYour Name                                 tlv_reserved        :   _TLV_USERID_WIDTH_;
569*5113495bSYour Name #else
570*5113495bSYour Name            uint32_t             tlv_reserved        :   _TLV_USERID_WIDTH_,
571*5113495bSYour Name                                 tlv_mrv             :   1,
572*5113495bSYour Name                                 tlv_src_linkid      :   3,
573*5113495bSYour Name                                 tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
574*5113495bSYour Name                                 tlv_tag             :   _TLV_TAG_WIDTH_,
575*5113495bSYour Name                                 tlv_cflg_reserved   :   1;
576*5113495bSYour Name #endif
577*5113495bSYour Name            uint32_t             pad_32to64_bit      :   32;
578*5113495bSYour Name };
579*5113495bSYour Name 
580*5113495bSYour Name // -----------------------------------------------------------------
581*5113495bSYour Name // Compressed TLVs do not support the MLO variant
582*5113495bSYour Name // -----------------------------------------------------------------
583*5113495bSYour Name 
584*5113495bSYour Name struct tlv_usr_c_44_tlw32_t {
585*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
586*5113495bSYour Name            uint32_t             tlv_compression     :   1,
587*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
588*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
589*5113495bSYour Name                                 tlv_cdata_lower_20  :   20;
590*5113495bSYour Name            uint32_t             tlv_cdata_upper_12  :   12,
591*5113495bSYour Name                                 pad_44to64_bit      :   20;
592*5113495bSYour Name #else
593*5113495bSYour Name            uint32_t             tlv_cdata_lower_20  :   20,
594*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
595*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
596*5113495bSYour Name                                 tlv_compression     :   1;
597*5113495bSYour Name            uint32_t             pad_44to64_bit      :   20,
598*5113495bSYour Name                                 tlv_cdata_upper_12  :   12;
599*5113495bSYour Name #endif
600*5113495bSYour Name };
601*5113495bSYour Name 
602*5113495bSYour Name struct tlv_usr_c_76_tlw32_t {
603*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
604*5113495bSYour Name            uint32_t             tlv_compression     :   1,
605*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
606*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
607*5113495bSYour Name                                 tlv_cdata_lower_20  :   20;
608*5113495bSYour Name            uint32_t             tlv_cdata_middle_32 :   32;
609*5113495bSYour Name            uint32_t             tlv_cdata_upper_12  :   12,
610*5113495bSYour Name                                 pad_76to96_bit      :   20;
611*5113495bSYour Name            uint32_t             pad_96to128_bit     :   32;
612*5113495bSYour Name #else
613*5113495bSYour Name            uint32_t             tlv_cdata_lower_20  :   20,
614*5113495bSYour Name                                 tlv_usrid           :   _TLV_USERID_WIDTH_,
615*5113495bSYour Name                                 tlv_ctag            :   _TLV_CTAG_WIDTH_,
616*5113495bSYour Name                                 tlv_compression     :   1;
617*5113495bSYour Name            uint32_t             tlv_cdata_middle_32 :   32;
618*5113495bSYour Name            uint32_t             pad_76to96_bit      :   20,
619*5113495bSYour Name                                 tlv_cdata_upper_12  :   12;
620*5113495bSYour Name            uint32_t             pad_96to128_bit     :   32;
621*5113495bSYour Name #endif
622*5113495bSYour Name };
623*5113495bSYour Name // -----------------------------------------------------------------
624*5113495bSYour Name 
625*5113495bSYour Name 
626*5113495bSYour Name #endif // _TLV_HDR_H_
627