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