xref: /wlan-driver/fw-api/hw/kiwi/v1/tlv_hdr.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /*
3*5113495bSYour Name  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name 
26*5113495bSYour Name 
27*5113495bSYour Name #ifndef _TLV_HDR_H_
28*5113495bSYour Name #define _TLV_HDR_H_
29*5113495bSYour Name #if !defined(__ASSEMBLER__)
30*5113495bSYour Name #endif
31*5113495bSYour Name 
32*5113495bSYour Name #define _TLV_USERID_WIDTH_      6
33*5113495bSYour Name #define _TLV_DATA_WIDTH_        32
34*5113495bSYour Name #define _TLV_TAG_WIDTH_         9
35*5113495bSYour Name 
36*5113495bSYour Name #define _TLV_MRV_EN_LEN_WIDTH_  9
37*5113495bSYour Name #define _TLV_MRV_DIS_LEN_WIDTH_ 12
38*5113495bSYour Name 
39*5113495bSYour Name #define _TLV_16_DATA_WIDTH_     16
40*5113495bSYour Name #define _TLV_16_TAG_WIDTH_      5
41*5113495bSYour Name #define _TLV_16_LEN_WIDTH_      4
42*5113495bSYour Name #define _TLV_CTAG_WIDTH_        5
43*5113495bSYour Name #define _TLV_44_DATA_WIDTH_     44
44*5113495bSYour Name #define _TLV_64_DATA_WIDTH_     64
45*5113495bSYour Name #define _TLV_76_DATA_WIDTH_     64
46*5113495bSYour Name #define _TLV_CDATA_WIDTH_       32
47*5113495bSYour Name #define _TLV_CDATA_76_WIDTH_    64
48*5113495bSYour Name 
49*5113495bSYour Name struct tlv_usr_16_tlword_t {
50*5113495bSYour Name 	   uint16_t             tlv_cflg_reserved   :   1,
51*5113495bSYour Name 				tlv_tag             :   _TLV_16_TAG_WIDTH_,
52*5113495bSYour Name 				tlv_len             :   _TLV_16_LEN_WIDTH_,
53*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_;
54*5113495bSYour Name };
55*5113495bSYour Name 
56*5113495bSYour Name struct tlv_16_tlword_t {
57*5113495bSYour Name 	   uint16_t             tlv_cflg_reserved   :   1,
58*5113495bSYour Name 				tlv_len             :   _TLV_16_LEN_WIDTH_,
59*5113495bSYour Name 				tlv_tag             :   _TLV_16_TAG_WIDTH_,
60*5113495bSYour Name 				tlv_reserved        :   6;
61*5113495bSYour Name };
62*5113495bSYour Name 
63*5113495bSYour Name 
64*5113495bSYour Name 
65*5113495bSYour Name 
66*5113495bSYour Name 
67*5113495bSYour Name 
68*5113495bSYour Name 
69*5113495bSYour Name struct tlv_mlo_usr_32_tlword_t {
70*5113495bSYour Name 	   uint32_t             tlv_cflg_reserved   :   1,
71*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
72*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
73*5113495bSYour Name 				tlv_dst_linkid      :   3,
74*5113495bSYour Name 				tlv_src_linkid      :   3,
75*5113495bSYour Name 				tlv_mrv             :   1,
76*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_;
77*5113495bSYour Name };
78*5113495bSYour Name 
79*5113495bSYour Name struct tlv_mlo_32_tlword_t {
80*5113495bSYour Name 	   uint32_t             tlv_cflg_reserved   :   1,
81*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
82*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
83*5113495bSYour Name 				tlv_dst_linkid      :   3,
84*5113495bSYour Name 				tlv_src_linkid      :   3,
85*5113495bSYour Name 				tlv_mrv             :   1,
86*5113495bSYour Name 				tlv_reserved        :   6;
87*5113495bSYour Name };
88*5113495bSYour Name 
89*5113495bSYour Name struct tlv_mlo_usr_64_tlword_t {
90*5113495bSYour Name 	   uint64_t             tlv_cflg_reserved   :   1,
91*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
92*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
93*5113495bSYour Name 				tlv_dst_linkid      :   3,
94*5113495bSYour Name 				tlv_src_linkid      :   3,
95*5113495bSYour Name 				tlv_mrv             :   1,
96*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
97*5113495bSYour Name 				tlv_reserved        :   32;
98*5113495bSYour Name };
99*5113495bSYour Name 
100*5113495bSYour Name struct tlv_mlo_64_tlword_t {
101*5113495bSYour Name 	   uint64_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        :   38;
108*5113495bSYour Name };
109*5113495bSYour Name 
110*5113495bSYour Name struct tlv_mlo_usr_44_tlword_t {
111*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
112*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
113*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
114*5113495bSYour Name 				tlv_dst_linkid      :   3,
115*5113495bSYour Name 				tlv_src_linkid      :   3,
116*5113495bSYour Name 				tlv_mrv             :   1,
117*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
118*5113495bSYour Name 				tlv_reserved        :   10,
119*5113495bSYour Name 				pad_44to64_bit      :   22;
120*5113495bSYour Name };
121*5113495bSYour Name 
122*5113495bSYour Name struct tlv_mlo_44_tlword_t {
123*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
124*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
125*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
126*5113495bSYour Name 				tlv_dst_linkid      :   3,
127*5113495bSYour Name 				tlv_src_linkid      :   3,
128*5113495bSYour Name 				tlv_mrv             :   1,
129*5113495bSYour Name 				tlv_reserved        :   16,
130*5113495bSYour Name 				pad_44to64_bit      :   22;
131*5113495bSYour Name };
132*5113495bSYour Name 
133*5113495bSYour Name struct tlv_mlo_usr_76_tlword_t {
134*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
135*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
136*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
137*5113495bSYour Name 				tlv_dst_linkid      :   3,
138*5113495bSYour Name 				tlv_src_linkid      :   3,
139*5113495bSYour Name 				tlv_mrv             :   1,
140*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
141*5113495bSYour Name 				tlv_reserved        :   32;
142*5113495bSYour Name 	   uint64_t             pad_64to128_bit     :   64;
143*5113495bSYour Name };
144*5113495bSYour Name 
145*5113495bSYour Name struct tlv_mlo_76_tlword_t {
146*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
147*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
148*5113495bSYour Name 				tlv_len             :   _TLV_MRV_EN_LEN_WIDTH_,
149*5113495bSYour Name 				tlv_dst_linkid      :   3,
150*5113495bSYour Name 				tlv_src_linkid      :   3,
151*5113495bSYour Name 				tlv_mrv             :   1,
152*5113495bSYour Name 				tlv_reserved        :   38;
153*5113495bSYour Name 	   uint64_t             pad_64to128_bit     :   64;
154*5113495bSYour Name };
155*5113495bSYour Name 
156*5113495bSYour Name 
157*5113495bSYour Name 
158*5113495bSYour Name 
159*5113495bSYour Name 
160*5113495bSYour Name 
161*5113495bSYour Name struct tlv_mac_usr_32_tlword_t {
162*5113495bSYour Name 	   uint32_t             tlv_cflg_reserved   :   1,
163*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
164*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
165*5113495bSYour Name 				tlv_src_linkid      :   3,
166*5113495bSYour Name 				tlv_mrv             :   1,
167*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_;
168*5113495bSYour Name };
169*5113495bSYour Name 
170*5113495bSYour Name struct tlv_mac_32_tlword_t {
171*5113495bSYour Name 	   uint32_t             tlv_cflg_reserved   :   1,
172*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
173*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
174*5113495bSYour Name 				tlv_src_linkid      :   3,
175*5113495bSYour Name 				tlv_mrv             :   1,
176*5113495bSYour Name 				tlv_reserved        :   6;
177*5113495bSYour Name };
178*5113495bSYour Name 
179*5113495bSYour Name struct tlv_mac_usr_64_tlword_t {
180*5113495bSYour Name 	   uint64_t             tlv_cflg_reserved   :   1,
181*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
182*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
183*5113495bSYour Name 				tlv_src_linkid      :   3,
184*5113495bSYour Name 				tlv_mrv             :   1,
185*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
186*5113495bSYour Name 				tlv_reserved        :   32;
187*5113495bSYour Name };
188*5113495bSYour Name 
189*5113495bSYour Name struct tlv_mac_64_tlword_t {
190*5113495bSYour Name 	   uint64_t             tlv_cflg_reserved   :   1,
191*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
192*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
193*5113495bSYour Name 				tlv_src_linkid      :   3,
194*5113495bSYour Name 				tlv_mrv             :   1,
195*5113495bSYour Name 				tlv_reserved        :   38;
196*5113495bSYour Name };
197*5113495bSYour Name 
198*5113495bSYour Name struct tlv_mac_usr_44_tlword_t {
199*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
200*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
201*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
202*5113495bSYour Name 				tlv_src_linkid      :   3,
203*5113495bSYour Name 				tlv_mrv             :   1,
204*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
205*5113495bSYour Name 				tlv_reserved        :   10,
206*5113495bSYour Name 				pad_44to64_bit      :   22;
207*5113495bSYour Name };
208*5113495bSYour Name 
209*5113495bSYour Name struct tlv_mac_44_tlword_t {
210*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
211*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
212*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
213*5113495bSYour Name 				tlv_src_linkid      :   3,
214*5113495bSYour Name 				tlv_mrv             :   1,
215*5113495bSYour Name 				tlv_reserved        :   16,
216*5113495bSYour Name 				pad_44to64_bit      :   22;
217*5113495bSYour Name };
218*5113495bSYour Name 
219*5113495bSYour Name struct tlv_mac_usr_76_tlword_t {
220*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
221*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
222*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
223*5113495bSYour Name 				tlv_src_linkid      :   3,
224*5113495bSYour Name 				tlv_mrv             :   1,
225*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
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_mac_76_tlword_t {
231*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
232*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
233*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
234*5113495bSYour Name 				tlv_src_linkid      :   3,
235*5113495bSYour Name 				tlv_mrv             :   1,
236*5113495bSYour Name 				tlv_reserved        :   38;
237*5113495bSYour Name 	   uint64_t             pad_64to128_bit     :   64;
238*5113495bSYour Name };
239*5113495bSYour Name 
240*5113495bSYour Name 
241*5113495bSYour Name 
242*5113495bSYour Name 
243*5113495bSYour Name 
244*5113495bSYour Name struct tlv_usr_c_44_tlword_t {
245*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
246*5113495bSYour Name 				tlv_ctag            :   _TLV_CTAG_WIDTH_,
247*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
248*5113495bSYour Name 				tlv_cdata           :   _TLV_CDATA_WIDTH_,
249*5113495bSYour Name 				pad_44to64_bit      :   20;
250*5113495bSYour Name };
251*5113495bSYour Name 
252*5113495bSYour Name struct tlv_usr_c_76_tlword_t {
253*5113495bSYour Name 	   uint64_t             tlv_compression     :   1,
254*5113495bSYour Name 				tlv_ctag            :   _TLV_CTAG_WIDTH_,
255*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
256*5113495bSYour Name 				tlv_cdata_lower_52  :   52;
257*5113495bSYour Name 	   uint64_t             tlv_cdata_upper_12  :   12,
258*5113495bSYour Name 				pad_76to128_bit     :   52;
259*5113495bSYour Name };
260*5113495bSYour Name 
261*5113495bSYour Name 
262*5113495bSYour Name 
263*5113495bSYour Name 
264*5113495bSYour Name 
265*5113495bSYour Name 
266*5113495bSYour Name 
267*5113495bSYour Name struct tlv_usr_32_hdr {
268*5113495bSYour Name 	   uint64_t             tlv_cflg_reserved   :   1,
269*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
270*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
271*5113495bSYour Name 				tlv_src_linkid      :   3,
272*5113495bSYour Name 				tlv_mrv             :   1,
273*5113495bSYour Name 				tlv_usrid           :   _TLV_USERID_WIDTH_,
274*5113495bSYour Name 				tlv_reserved        :   32;
275*5113495bSYour Name };
276*5113495bSYour Name 
277*5113495bSYour Name struct tlv_32_hdr {
278*5113495bSYour Name 	   uint64_t             tlv_cflg_reserved   :   1,
279*5113495bSYour Name 				tlv_tag             :   _TLV_TAG_WIDTH_,
280*5113495bSYour Name 				tlv_len             :   _TLV_MRV_DIS_LEN_WIDTH_,
281*5113495bSYour Name 				tlv_src_linkid      :   3,
282*5113495bSYour Name 				tlv_mrv             :   1,
283*5113495bSYour Name 				tlv_reserved        :   38;
284*5113495bSYour Name };
285*5113495bSYour Name 
286*5113495bSYour Name 
287*5113495bSYour Name 
288*5113495bSYour Name #endif
289