summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlan/mlan_fw.h
blob: cddbce4154def1988887d4b9176bc64dd6cc96fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
/** @file mlan_fw.h
 *
 *  @brief This file contains firmware specific defines.
 *  structures and declares global function prototypes used
 *  in MLAN module.
 *
 *
 *  Copyright 2014-2020 NXP
 *
 *  This software file (the File) is distributed by NXP
 *  under the terms of the GNU General Public License Version 2, June 1991
 *  (the License).  You may use, redistribute and/or modify the File in
 *  accordance with the terms and conditions of the License, a copy of which
 *  is available by writing to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
 *  worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
 *
 *  THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
 *  IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
 *  ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
 *  this warranty disclaimer.
 *
 */

/******************************************************
Change log:
    10/27/2008: initial version
******************************************************/

#ifndef _MLAN_FW_H_
#define _MLAN_FW_H_

/** Interface header length */
#ifdef USB
#define USB_INTF_HEADER_LEN 0
#endif /* USB */
#ifdef SDIO
#define SDIO_INTF_HEADER_LEN 4
#endif /* SDIO */
#ifdef PCIE
#define PCIE_INTF_HEADER_LEN 4
#endif /* PCIE */

#ifdef PRAGMA_PACK
#pragma pack(push, 1)
#endif

#define WPA_GCMP_KEY_LEN 32

#define WPA_CCMP_256_KEY_LEN 32

/** Ethernet header */
typedef MLAN_PACK_START struct {
	/** Ethernet header destination address */
	t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
	/** Ethernet header source address */
	t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
	/** Ethernet header length */
	t_u16 h803_len;

} MLAN_PACK_END Eth803Hdr_t;

/** RFC 1042 header */
typedef MLAN_PACK_START struct {
	/** LLC DSAP */
	t_u8 llc_dsap;
	/** LLC SSAP */
	t_u8 llc_ssap;
	/** LLC CTRL */
	t_u8 llc_ctrl;
	/** SNAP OUI */
	t_u8 snap_oui[3];
	/** SNAP type */
	t_u16 snap_type;

} MLAN_PACK_END Rfc1042Hdr_t;

/** Rx packet header */
typedef MLAN_PACK_START struct {
	/** Etherner header */
	Eth803Hdr_t eth803_hdr;
	/** RFC 1042 header */
	Rfc1042Hdr_t rfc1042_hdr;

} MLAN_PACK_END RxPacketHdr_t;

/** Rates supported in band B */
#define B_SUPPORTED_RATES 5
/** Rates supported in band G */
#define G_SUPPORTED_RATES 9
/** Rates supported in band BG */
#define BG_SUPPORTED_RATES 13

/** Setup the number of rates passed in the driver/firmware API */
#define A_SUPPORTED_RATES 9

/** CapInfo Short Slot Time Disabled */
/* #define SHORT_SLOT_TIME_DISABLED(CapInfo)
 * ((IEEEtypes_CapInfo_t)(CapInfo).short_slot_time = 0) */
#define SHORT_SLOT_TIME_DISABLED(CapInfo) (CapInfo &= ~MBIT(10))
/** CapInfo Short Slot Time Enabled */
#define SHORT_SLOT_TIME_ENABLED(CapInfo) (CapInfo |= MBIT(10))
/** CapInfo Spectrum Mgmt Disabled */
#define SPECTRUM_MGMT_DISABLED(CapInfo) (CapInfo &= ~MBIT(8))
/** CapInfo Spectrum Mgmt Enabled */
#define SPECTRUM_MGMT_ENABLED(CapInfo) (CapInfo |= MBIT(8))
/** CapInfo Radio Measurement Disabled */
#define RADIO_MEASUREMENT_DISABLED(CapInfo) (CapInfo &= ~MBIT(12))
/** CapInfo Radio Measurement Enabled */
#define RADIO_MEASUREMENT_ENABLED(CapInfo) (CapInfo |= MBIT(12))

/** Setup the number of rates passed in the driver/firmware API */
#define HOSTCMD_SUPPORTED_RATES 14

/** Rates supported in band N */
#define N_SUPPORTED_RATES 3
#ifdef STA_SUPPORT
/** All bands (B, G, N, AAC, GAC) */
#define ALL_802_11_BANDS                                                       \
	(BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AAC | BAND_GAC)
#else
/** All bands (B, G, A) */
#define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_A)
#endif /* STA_SUPPORT */

#ifdef STA_SUPPORT
/** Firmware multiple bands support */
#define FW_MULTI_BANDS_SUPPORT                                                 \
	(MBIT(8) | MBIT(9) | MBIT(10) | MBIT(11) | MBIT(12) | MBIT(13))
#else
/** Firmware multiple bands support */
#define FW_MULTI_BANDS_SUPPORT (MBIT(8) | MBIT(9) | MBIT(10))
#endif /* STA_SUPPORT */
/** Check if multiple bands support is enabled in firmware */
#define IS_SUPPORT_MULTI_BANDS(_adapter)                                       \
	(_adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
/** Get default bands of the firmware */
/* need to shift bit 12 and bit 13 in fw_cap_info from the firmware
 * to bit 13 and 14 for 11ac so that bit 11 is for GN, bit 12 for AN,
 * bit 13 for GAC, and bit 14 for AAC, in order to be compatible with
 * the band capability defined in the driver after right shift of 8 bits */
#define GET_FW_DEFAULT_BANDS(_adapter)                                         \
	(((((_adapter->fw_cap_info & 0x3000) << 1) |                           \
	   (_adapter->fw_cap_info & ~0xF000)) >>                               \
	  8) &                                                                 \
	 ALL_802_11_BANDS)

extern t_u8 SupportedRates_B[B_SUPPORTED_RATES];
extern t_u8 SupportedRates_G[G_SUPPORTED_RATES];
extern t_u8 SupportedRates_BG[BG_SUPPORTED_RATES];
extern t_u8 SupportedRates_A[A_SUPPORTED_RATES];
extern t_u8 SupportedRates_N[N_SUPPORTED_RATES];
extern t_u8 AdhocRates_G[G_SUPPORTED_RATES];
extern t_u8 AdhocRates_B[B_SUPPORTED_RATES];
extern t_u8 AdhocRates_BG[BG_SUPPORTED_RATES];
extern t_u8 AdhocRates_A[A_SUPPORTED_RATES];

/** Default auto deep sleep mode */
#define DEFAULT_AUTO_DS_MODE MTRUE
/** Default power save mode */
#define DEFAULT_PS_MODE Wlan802_11PowerModePSP

/** WEP Key index mask */
#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
/** Length of WEP 40 bit key */
#define WEP_40_BIT_LEN 5
/** Length of WEP 104 bit key */
#define WEP_104_BIT_LEN 13

/** Key information enabled */
#define KEY_INFO_ENABLED 0x01
/** KEY_TYPE_ID */
typedef enum _KEY_TYPE_ID {
	/** Key type : WEP */
	KEY_TYPE_ID_WEP = 0,
	/** Key type : TKIP */
	KEY_TYPE_ID_TKIP = 1,
	/** Key type : AES */
	KEY_TYPE_ID_AES = 2,
	KEY_TYPE_ID_WAPI = 3,
	KEY_TYPE_ID_AES_CMAC = 4,
	/** Key type : GCMP */
	KEY_TYPE_ID_GCMP = 5,
	/** Key type : GCMP_256 */
	KEY_TYPE_ID_GCMP_256 = 6,
	/** Key type : CCMP_256 */
	KEY_TYPE_ID_CCMP_256 = 7,
} KEY_TYPE_ID;

/** Key Info flag for multicast key */
#define KEY_INFO_MCAST_KEY 0x01
/** Key Info flag for unicast key */
#define KEY_INFO_UCAST_KEY 0x02

/** KEY_INFO_WEP*/
typedef enum _KEY_INFO_WEP {
	KEY_INFO_WEP_MCAST = 0x01,
	KEY_INFO_WEP_UNICAST = 0x02,
	KEY_INFO_WEP_ENABLED = 0x04
} KEY_INFO_WEP;

/** KEY_INFO_TKIP */
typedef enum _KEY_INFO_TKIP {
	KEY_INFO_TKIP_MCAST = 0x01,
	KEY_INFO_TKIP_UNICAST = 0x02,
	KEY_INFO_TKIP_ENABLED = 0x04
} KEY_INFO_TKIP;

/** KEY_INFO_AES*/
typedef enum _KEY_INFO_AES {
	KEY_INFO_AES_MCAST = 0x01,
	KEY_INFO_AES_UNICAST = 0x02,
	KEY_INFO_AES_ENABLED = 0x04,
	KEY_INFO_AES_MCAST_IGTK = 0x400,
} KEY_INFO_AES;

/** WPA AES key length */
#define WPA_AES_KEY_LEN 16
/** WPA TKIP key length */
#define WPA_TKIP_KEY_LEN 32
/** WPA AES IGTK key length */
#define CMAC_AES_KEY_LEN 16
/** IGTK key length */
#define WPA_IGTK_KEY_LEN 16

/** WAPI key length */
#define WAPI_KEY_LEN 50
/** KEY_INFO_WAPI*/
typedef enum _KEY_INFO_WAPI {
	KEY_INFO_WAPI_MCAST = 0x01,
	KEY_INFO_WAPI_UNICAST = 0x02,
	KEY_INFO_WAPI_ENABLED = 0x04
} KEY_INFO_WAPI;

/** Maximum ethernet frame length sans FCS */
#define MV_ETH_FRAME_LEN 1514

#if defined(SDIO) || defined(PCIE)
/** Length of SNAP header */
#define MRVDRV_SNAP_HEADER_LEN 8

/** The number of times to try when polling for status bits */
#define MAX_POLL_TRIES 100

/** The number of times to try when waiting for downloaded firmware to
     become active when multiple interface is present */
#define MAX_MULTI_INTERFACE_POLL_TRIES 150
/** The number of times to try when waiting for downloaded firmware to
     become active. (polling the scratch register). */
#define MAX_FIRMWARE_POLL_TRIES 100

/** FW fill in rx_len with extra 204 bytes */
#define EXTRA_LEN 256

/** Buffer size for ethernet Tx packets */
#define MRVDRV_ETH_TX_PACKET_BUFFER_SIZE                                       \
	(MV_ETH_FRAME_LEN + sizeof(TxPD) + EXTRA_LEN)

/** Buffer size for ethernet Rx packets */
#define MRVDRV_ETH_RX_PACKET_BUFFER_SIZE                                       \
	(MV_ETH_FRAME_LEN + sizeof(RxPD) + MRVDRV_SNAP_HEADER_LEN + EXTRA_LEN)
#endif /* SDIO || PCIE */

#ifdef SDIO
/* Macros in interface module */
/** Firmware ready */
#define SDIO_FIRMWARE_READY 0xfedc
#endif /* SDIO */

#ifdef PCIE
/* Macros in interface module */
/** Firmware ready */
#define PCIE_FIRMWARE_READY 0xfedcba00
#endif

/** Enumeration definition*/
/** WLAN_802_11_PRIVACY_FILTER */
typedef enum _WLAN_802_11_PRIVACY_FILTER {
	Wlan802_11PrivFilterAcceptAll,
	Wlan802_11PrivFilter8021xWEP
} WLAN_802_11_PRIVACY_FILTER;

/** WLAN_802_11_WEP_STATUS */
typedef enum _WLAN_802_11_WEP_STATUS {
	Wlan802_11WEPEnabled,
	Wlan802_11WEPDisabled,
	Wlan802_11WEPKeyAbsent,
	Wlan802_11WEPNotSupported
} WLAN_802_11_WEP_STATUS;

/** SNR calculation */
#define CAL_SNR(RSSI, NF) ((t_s16)((t_s16)(RSSI) - (t_s16)(NF)))

/** 2K buf size */
#define MLAN_TX_DATA_BUF_SIZE_2K 2048

/** Terminating TLV Type */
#define MRVL_TERMINATE_TLV_ID 0xffff

/** TLV type : SSID */
#define TLV_TYPE_SSID 0x0000
/** TLV type : Rates */
#define TLV_TYPE_RATES 0x0001
/** TLV type : PHY FH */
#define TLV_TYPE_PHY_FH 0x0002
/** TLV type : PHY DS */
#define TLV_TYPE_PHY_DS 0x0003
/** TLV type : CF */
#define TLV_TYPE_CF 0x0004
/** TLV type : IBSS */
#define TLV_TYPE_IBSS 0x0006

/** TLV type : Domain */
#define TLV_TYPE_DOMAIN 0x0007

/** TLV type : Power constraint */
#define TLV_TYPE_POWER_CONSTRAINT 0x0020

/** TLV type : Power capability */
#define TLV_TYPE_POWER_CAPABILITY 0x0021

#define TLV_TYPE_HT_CAPABILITY 0x002d

#define TLV_TYPE_EXTENSION_ID 0x00ff

/**TLV type : Host MLME Flag*/
#define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)

/** TLV type : Vendor Specific IE */
#define TLV_TYPE_VENDOR_SPECIFIC_IE 0x00dd

/** TLV type : Key material */
#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0x00) /* 0x0100 */
/** TLV type : Channel list */
#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 0x01) /* 0x0101 */
/** TLV type : Number of probes */
#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 0x02) /* 0x0102 */
/** TLV type : Beacon RSSI low */
#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 0x04) /* 0x0104 */
/** TLV type : Beacon SNR low */
#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 0x05) /* 0x0105 */
/** TLV type : Fail count */
#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 0x06) /* 0x0106 */
/** TLV type : BCN miss */
#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x07) /* 0x0107 */
/** TLV type : LED behavior */
#define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 0x09) /* 0x0109 */
/** TLV type : Passthrough */
#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 0x0a) /* 0x010a */
/** TLV type : Power TBL 2.4 Ghz */
#define TLV_TYPE_POWER_TBL_2_4GHZ                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x0c) /* 0x010c                             \
					  */
/** TLV type : Power TBL 5 GHz */
#define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 0x0d) /* 0x010d */
/** TLV type : WMM queue status */
#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 0x10) /* 0x0110 */
/** TLV type : Wildcard SSID */
#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 0x12) /* 0x0112 */
/** TLV type : TSF timestamp */
#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 0x13) /* 0x0113 */
/** TLV type : Beacon RSSI high */
#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16) /* 0x0116 */
/** TLV type : Beacon SNR high */
#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 0x17) /* 0x0117 */
/** TLV type : Start BG scan later */
#define TLV_TYPE_STARTBGSCANLATER                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x1e) /* 0x011e                             \
					  */
/** TLV type: BG scan repeat count */
#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 0xb0) /* 0x01b0 */
/** TLV type : Authentication type */
#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 0x1f) /* 0x011f */
/** TLV type : BSSID */
#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 0x23) /* 0x0123 */

/** TLV type : Link Quality */
#define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 0x24) /* 0x0124 */

/** TLV type : Data RSSI low */
#define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x26) /* 0x0126 */
/** TLV type : Data SNR low */
#define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x27) /* 0x0127 */
/** TLV type : Data RSSI high */
#define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x28) /* 0x0128 */
/** TLV type : Data SNR high */
#define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x29) /* 0x0129 */

/** TLV type : Channel band list */
#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a */

/** TLV type : Security Cfg */
#define TLV_TYPE_SECURITY_CFG (PROPRIETARY_TLV_BASE_ID + 0x3a) /* 0x013a */

/** TLV type : Passphrase */
#define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */
/** TLV type : SAE Password */
#define TLV_TYPE_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 0x141) /* 0x0241 */
/** TLV type : Encryption Protocol TLV */
#define TLV_TYPE_ENCRYPTION_PROTO                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140                             \
					  */
/** TLV type : Cipher TLV */
#define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x42) /* 0x0142 */
/** TLV type : PMK */
#define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 0x44) /* 0x0144 */

/** TLV type : BCN miss */
#define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x49) /* 0x0149 */

/** TLV type: WAPI IE */
#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 0x5e) /* 0x015e */

/** TLV type: MGMT IE */
#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0x69) /* 0x0169 */
/** TLV type: MAX_MGMT_IE */
#define TLV_TYPE_MAX_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0xaa) /* 0x01aa */

/** TLV type: key param v2 */
#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 0x9C) /* 0x019C */

/** TLV type: ps params in hs */
#define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 0xB5) /* 0x01b5 */
/** TLV type: hs wake hold off */
#define TLV_TYPE_HS_WAKE_HOLDOFF (PROPRIETARY_TLV_BASE_ID + 0xB6) /* 0x01b6 */
/** TLV type: wake up source */
#define TLV_TYPE_HS_WAKEUP_SOURCE_GPIO                                         \
	(PROPRIETARY_TLV_BASE_ID + 0x105) /* 0x0205 */
/** TLV type: management filter  */
#define TLV_TYPE_MGMT_FRAME_WAKEUP                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x116) /* 0x0216 */
/** TLV type: extend wakeup source */
#define TLV_TYPE_WAKEUP_EXTEND (PROPRIETARY_TLV_BASE_ID + 0x118) /* 0x0218 */
/** TLV type: HS antenna mode */
#define TLV_TYPE_HS_ANTMODE (PROPRIETARY_TLV_BASE_ID + 0x119) /* 0x0219 */

/** TLV type: robustcoex mode */
#define TLV_TYPE_ROBUSTCOEX (PROPRIETARY_TLV_BASE_ID + 0x11B) /* 0x021B */

#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x13A) /* 0x023A */

/** TLV type : HT Capabilities */
#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a */
/** TLV type : HT Information */
#define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) /* 0x014b */
/** TLV type : Secondary Channel Offset */
#define TLV_SECONDARY_CHANNEL_OFFSET                                           \
	(PROPRIETARY_TLV_BASE_ID + 0x4c) /* 0x014c */
/** TLV type : 20/40 BSS Coexistence */
#define TLV_TYPE_2040BSS_COEXISTENCE                                           \
	(PROPRIETARY_TLV_BASE_ID + 0x4d) /* 0x014d */
/** TLV type : Overlapping BSS Scan Parameters */
#define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM                                        \
	(PROPRIETARY_TLV_BASE_ID + 0x4e) /* 0x014e */
/** TLV type : Extended capabilities */
#define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) /* 0x014f */
/** TLV type : Set of MCS values that STA desires to use within the BSS */
#define TLV_TYPE_HT_OPERATIONAL_MCS_SET                                        \
	(PROPRIETARY_TLV_BASE_ID + 0x50) /* 0x0150 */
/** TLV ID : Management Frame */
#define TLV_TYPE_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 0x68) /* 0x0168 */
/** TLV type : RXBA_SYNC */
#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) /* 0x0199 */

#ifdef WIFI_DIRECT_SUPPORT
/** TLV type : AP PSK */
#define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) /* 0x01a8 */
/** TLV type : p2p NOA */
#define TLV_TYPE_WIFI_DIRECT_NOA (PROPRIETARY_TLV_BASE_ID + 0x83)
/** TLV type : p2p opp ps */
#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84)
#endif /* WIFI_DIRECT_SUPPORT */

/** TLV : 20/40 coex config */
#define TLV_TYPE_2040_BSS_COEX_CONTROL                                         \
	(PROPRIETARY_TLV_BASE_ID + 0x98) /* 0x0198 */

/** TLV type :  aggr win size */
#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 0xca)
/** TLV type :  scan time */
#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 0Xcb)
/** TLV type : Ewpa_eapol_pkt */
#define TLV_TYPE_EAPOL_PKT (PROPRIETARY_TLV_BASE_ID + 0xcf)

#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 0x9a)

/** TLV type :  EES Configuration */
#define TLV_TYPE_EES_CFG (PROPRIETARY_TLV_BASE_ID + 0xda)
/** TLV type :  EES Network Configuration */
#define TLV_TYPE_EES_NET_CFG (PROPRIETARY_TLV_BASE_ID + 0xdb)

#define TLV_TYPE_LL_STAT_IFACE (PROPRIETARY_TLV_BASE_ID + 300)
#define TLV_TYPE_LL_STAT_RADIO (PROPRIETARY_TLV_BASE_ID + 301)

/** TLV type: fw cap info */
#define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318)

/** ADDBA TID mask */
#define ADDBA_TID_MASK (MBIT(2) | MBIT(3) | MBIT(4) | MBIT(5))
/** DELBA TID mask */
#define DELBA_TID_MASK (MBIT(12) | MBIT(13) | MBIT(14) | MBIT(15))
/** ADDBA Starting Sequence Number Mask */
#define SSN_MASK 0xfff0

/** Block Ack result status */
/** Block Ack Result : Success */
#define BA_RESULT_SUCCESS 0x0
/** Block Ack Result : Execution failure */
#define BA_RESULT_FAILURE 0x1
/** Block Ack Result : Timeout */
#define BA_RESULT_TIMEOUT 0x2
/** Block Ack Result : Data invalid */
#define BA_RESULT_DATA_INVALID 0x3

/** Get the baStatus (NOT_SETUP, COMPLETE, IN_PROGRESS)
 *  in Tx BA stream table */
#define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)

/** An AMPDU/AMSDU could be disallowed for certain TID. 0xff means
 *  no aggregation is enabled for the assigned TID */
#define BA_STREAM_NOT_ALLOWED 0xff

#ifdef STA_SUPPORT
#endif

/** Test if 11n is enabled by checking the HTCap IE */
#define IS_11N_ENABLED(priv)                                                   \
	((priv->config_bands & BAND_GN || priv->config_bands & BAND_AN) &&     \
	 priv->curr_bss_params.bss_descriptor.pht_cap &&                       \
	 !priv->curr_bss_params.bss_descriptor.disable_11n)
/** Find out if we are the initiator or not */
#define INITIATOR_BIT(DelBAParamSet)                                           \
	(((DelBAParamSet)&MBIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)

/** 4K buf size */
#define MLAN_TX_DATA_BUF_SIZE_4K 4096
/** 8K buf size */
#define MLAN_TX_DATA_BUF_SIZE_8K 8192
/** 12K buf size */
#define MLAN_TX_DATA_BUF_SIZE_12K 12288
/** Max Rx AMPDU Size */
#define MAX_RX_AMPDU_SIZE_64K 0x03
/** Non green field station */
#define NON_GREENFIELD_STAS 0x04

/** Greenfield support */
#define HWSPEC_GREENFIELD_SUPP MBIT(29)
/** RX STBC support */
#define HWSPEC_RXSTBC_SUPP MBIT(26)
/** ShortGI @ 40Mhz support */
#define HWSPEC_SHORTGI40_SUPP MBIT(24)
/** ShortGI @ 20Mhz support */
#define HWSPEC_SHORTGI20_SUPP MBIT(23)
/** RX LDPC support */
#define HWSPEC_LDPC_SUPP MBIT(22)
/** Channel width 40Mhz support */
#define HWSPEC_CHANBW40_SUPP MBIT(17)
/** 40Mhz intolarent enable */
#define CAPINFO_40MHZ_INTOLARENT MBIT(8)

/** Default 11n capability mask for 2.4GHz */
#define DEFAULT_11N_CAP_MASK_BG                                                \
	(HWSPEC_SHORTGI20_SUPP | HWSPEC_RXSTBC_SUPP | HWSPEC_LDPC_SUPP)
/** Default 11n capability mask for 5GHz */
#define DEFAULT_11N_CAP_MASK_A                                                 \
	(HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP |                        \
	 HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP | HWSPEC_LDPC_SUPP)

/** Default 11n TX BF capability 2X2 chip **/
#define DEFAULT_11N_TX_BF_CAP_2X2 0x19E74618
/** Default 11n TX BF capability 1X1 chip **/
#define DEFAULT_11N_TX_BF_CAP_1X1 0x19E74608

/** Bits to ignore in hw_dev_cap as these bits are set in get_hw_spec */
#define IGN_HW_DEV_CAP (CAPINFO_40MHZ_INTOLARENT)

/** HW_SPEC FwCapInfo */
#define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & MBIT(11))

/** HW_SPEC Dot11nDevCap : MAX AMSDU supported */
#define ISSUPP_MAXAMSDU(Dot11nDevCap) (Dot11nDevCap & MBIT(31))
/** HW_SPEC Dot11nDevCap : Beamforming support */
#define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & MBIT(30))
/** HW_SPEC Dot11nDevCap : Green field support */
#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & MBIT(29))
/** HW_SPEC Dot11nDevCap : AMPDU support */
#define ISSUPP_AMPDU(Dot11nDevCap) (Dot11nDevCap & MBIT(28))
/** HW_SPEC Dot11nDevCap : MIMO PS support  */
#define ISSUPP_MIMOPS(Dot11nDevCap) (Dot11nDevCap & MBIT(27))
/** HW_SPEC Dot11nDevCap : Rx STBC support */
#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & MBIT(26))
/** HW_SPEC Dot11nDevCap : Tx STBC support */
#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & MBIT(25))
/** HW_SPEC Dot11nDevCap : Short GI @ 40Mhz support */
#define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & MBIT(24))
/** HW_SPEC Dot11nDevCap : Reset Short GI @ 40Mhz support */
#define RESETSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(24))
/** HW_SPEC Dot11nDevCap : Short GI @ 20Mhz support */
#define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & MBIT(23))
/** HW_SPEC Dot11nDevCap : Rx LDPC support */
#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & MBIT(22))
/** HW_SPEC Dot11nDevCap : Number of TX BA streams supported */
#define ISSUPP_GETTXBASTREAM(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
/** HW_SPEC Dot11nDevCap : Channel BW support @ 40Mhz  support */
#define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & MBIT(17))
/** HW_SPEC Dot11nDevCap : Channel BW support @ 20Mhz  support */
#define ISSUPP_CHANWIDTH20(Dot11nDevCap) (Dot11nDevCap & MBIT(16))
/** HW_SPEC Dot11nDevCap : Channel BW support @ 10Mhz  support */
#define ISSUPP_CHANWIDTH10(Dot11nDevCap) (Dot11nDevCap & MBIT(15))
/** Dot11nUsrCap : 40Mhz intolarance enabled */
#define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap & MBIT(8))
/** Dot11nUsrCap : Reset 40Mhz intolarance enabled */
#define RESET_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(8))
/** HW_SPEC Dot11nDevCap : Rx AntennaD support */
#define ISSUPP_RXANTENNAD(Dot11nDevCap) (Dot11nDevCap & MBIT(7))
/** HW_SPEC Dot11nDevCap : Rx AntennaC support */
#define ISSUPP_RXANTENNAC(Dot11nDevCap) (Dot11nDevCap & MBIT(6))
/** HW_SPEC Dot11nDevCap : Rx AntennaB support */
#define ISSUPP_RXANTENNAB(Dot11nDevCap) (Dot11nDevCap & MBIT(5))
/** HW_SPEC Dot11nDevCap : Rx AntennaA support */
#define ISSUPP_RXANTENNAA(Dot11nDevCap) (Dot11nDevCap & MBIT(4))
/** HW_SPEC Dot11nDevCap : Tx AntennaD support */
#define ISSUPP_TXANTENNAD(Dot11nDevCap) (Dot11nDevCap & MBIT(3))
/** HW_SPEC Dot11nDevCap : Tx AntennaC support */
#define ISSUPP_TXANTENNAC(Dot11nDevCap) (Dot11nDevCap & MBIT(2))
/** HW_SPEC Dot11nDevCap : Tx AntennaB support */
#define ISSUPP_TXANTENNAB(Dot11nDevCap) (Dot11nDevCap & MBIT(1))
/** HW_SPEC Dot11nDevCap : Tx AntennaA support */
#define ISSUPP_TXANTENNAA(Dot11nDevCap) (Dot11nDevCap & MBIT(0))

/** HW_SPEC Dot11nDevCap : Set support of channel bw @ 40Mhz */
#define SETSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap |= MBIT(17))
/** HW_SPEC Dot11nDevCap : Reset support of channel bw @ 40Mhz */
#define RESETSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap &= ~MBIT(17))

/** DevMCSSupported : Tx MCS supported */
#define GET_TXMCSSUPP(DevMCSSupported) (DevMCSSupported >> 4)
/** DevMCSSupported : Rx MCS supported */
#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)

/** GET HTCapInfo : Supported Channel BW */
#define GETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo & MBIT(1))
/** GET HTCapInfo : Support for Greenfield */
#define GETHT_GREENFIELD(HTCapInfo) (HTCapInfo & MBIT(4))
/** GET HTCapInfo : Support for Short GI @ 20Mhz */
#define GETHT_SHORTGI20(HTCapInfo) (HTCapInfo & MBIT(5))
/** GET HTCapInfo : Support for Short GI @ 40Mhz */
#define GETHT_SHORTGI40(HTCapInfo) (HTCapInfo & MBIT(6))
/** GET HTCapInfo : Support for Tx STBC */
#define GETHT_TXSTBC(HTCapInfo) (HTCapInfo & MBIT(7))

/** GET HTCapInfo : Support for Rx STBC */
#define GETHT_RXSTBC(HTCapInfo) ((HTCapInfo >> 8) & 0x03)
/** GET HTCapInfo : Support for Delayed ACK */
#define GETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo & MBIT(10))
/** GET HTCapInfo : Support for Max AMSDU */
#define GETHT_MAXAMSDU(HTCapInfo) (HTCapInfo & MBIT(11))

/** GET HTCapInfo : Support 40Mhz Intolarence */
#define GETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo & MBIT(14))

/** SET HTCapInfo : Set support for LDPC coding capability */
#define SETHT_LDPCCODINGCAP(HTCapInfo) (HTCapInfo |= MBIT(0))
/** SET HTCapInfo : Set support for Channel BW */
#define SETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo |= MBIT(1))
/** SET HTCapInfo : Set support for Greenfield */
#define SETHT_GREENFIELD(HTCapInfo) (HTCapInfo |= MBIT(4))
/** SET HTCapInfo : Set support for Short GI @ 20Mhz */
#define SETHT_SHORTGI20(HTCapInfo) (HTCapInfo |= MBIT(5))
/** SET HTCapInfo : Set support for Short GI @ 40Mhz */
#define SETHT_SHORTGI40(HTCapInfo) (HTCapInfo |= MBIT(6))
/** SET HTCapInfo : Set support for Tx STBC */
#define SETHT_TXSTBC(HTCapInfo) (HTCapInfo |= MBIT(7))
/** SET HTCapInfo : Set support for Rx STBC */
#define SETHT_RXSTBC(HTCapInfo, value) (HTCapInfo |= (value << 8))
/** SET HTCapInfo : Set support for delayed block ack */
#define SETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo |= MBIT(10))
/** SET HTCapInfo : Set support for Max size AMSDU */
#define SETHT_MAXAMSDU(HTCapInfo) (HTCapInfo |= MBIT(11))
/** SET HTCapInfo : Set support for DSSS/CCK Rates @ 40Mhz */
#define SETHT_DSSSCCK40(HTCapInfo) (HTCapInfo |= MBIT(12))
/** SET HTCapInfo : Enable 40Mhz Intolarence */
#define SETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo |= MBIT(14))
/** SET HTCapInfo : Disable Static SM power save */
#define SETHT_STATIC_SMPS(HTCapInfo) ((HTCapInfo) |= (MBIT(2) | MBIT(3)))

/** RESET HTCapInfo : Set support for LDPC coding capability */
#define RESETHT_LDPCCODINGCAP(HTCapInfo) (HTCapInfo &= ~MBIT(0))
/** RESET HTCapInfo : Set support for Channel BW */
#define RESETHT_SUPPCHANWIDTH(HTCapInfo) (HTCapInfo &= ~MBIT(1))
/** RESET HTCapInfo : Set support for Greenfield */
#define RESETHT_GREENFIELD(HTCapInfo) (HTCapInfo &= ~MBIT(4))
/** RESET HTCapInfo : Set support for Short GI @ 20Mhz */
#define RESETHT_SHORTGI20(HTCapInfo) (HTCapInfo &= ~MBIT(5))
/** RESET HTCapInfo : Set support for Short GI @ 40Mhz */
#define RESETHT_SHORTGI40(HTCapInfo) (HTCapInfo &= ~MBIT(6))
/** RESET HTCapInfo : Set support for Tx STBC */
#define RESETHT_TXSTBC(HTCapInfo) (HTCapInfo &= ~MBIT(7))
/** RESET HTCapInfo : Set support for Rx STBC */
#define RESETHT_RXSTBC(HTCapInfo) (HTCapInfo &= ~(0x03 << 8))
/** RESET HTCapInfo : Set support for delayed block ack */
#define RESETHT_DELAYEDBACK(HTCapInfo) (HTCapInfo &= ~MBIT(10))
/** RESET HTCapInfo : Set support for Max size AMSDU */
#define RESETHT_MAXAMSDU(HTCapInfo) (HTCapInfo &= ~MBIT(11))
/** RESET HTCapInfo : Disable 40Mhz Intolarence */
#define RESETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo &= ~MBIT(14))
/** RESET HTCapInfo: Enable SM power save */
#define RESETHT_SM_POWERSAVE(HTCapInfo) ((HTCapInfo) &= ~(MBIT(2) | MBIT(3)))
/** RESET HTExtCap : Clear RD Responder bit */
#define RESETHT_EXTCAP_RDG(HTExtCap) (HTExtCap &= ~MBIT(11))
/** SET MCS32 */
#define SETHT_MCS32(x) (x[4] |= 1)
/** Set mcs set defined bit */
#define SETHT_MCS_SET_DEFINED(x) (x[12] |= 1)
/** Set the highest Rx data rate */
#define SETHT_RX_HIGHEST_DT_SUPP(x, y) ((*(t_u16 *)(x + 10)) = y)
/** AMPDU factor size */
#define AMPDU_FACTOR_64K 0x03
/** Set AMPDU size in A-MPDU paramter field */
#define SETAMPDU_SIZE(x, y)                                                    \
	do {                                                                   \
		x = x & ~0x03;                                                 \
		x |= y & 0x03;                                                 \
	} while (0) /** Set AMPDU spacing in A-MPDU paramter field */
#define SETAMPDU_SPACING(x, y)                                                 \
	do {                                                                   \
		x = x & ~0x1c;                                                 \
		x |= (y & 0x07) << 2;                                          \
	} while (0)

/** RadioType : Support for Band A */
#define ISSUPP_BANDA(FwCapInfo) (FwCapInfo & MBIT(10))
/** RadioType : Support for 40Mhz channel BW */
#define ISALLOWED_CHANWIDTH40(Field2) (Field2 & MBIT(2))
/** RadioType : Set support 40Mhz channel */
#define SET_CHANWIDTH40(Field2) (Field2 |= MBIT(2))
/** RadioType : Reset support 40Mhz channel */
#define RESET_CHANWIDTH40(Field2) (Field2 &= ~(MBIT(0) | MBIT(1) | MBIT(2)))
/** RadioType : Get secondary channel */
#define GET_SECONDARYCHAN(Field2) (Field2 & (MBIT(0) | MBIT(1)))

/** ExtCap : Support for FILS */
#define ISSUPP_EXTCAP_FILS(ext_cap) (ext_cap.FILS)
/** ExtCap : Set support FILS */
#define SET_EXTCAP_FILS(ext_cap) (ext_cap.FILS = 1)
/** ExtCap : Reset support FILS */
#define RESET_EXTCAP_FILS(ext_cap) (ext_cap.FILS = 0)

/** ExtCap : Support for TDLS */
#define ISSUPP_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport)
/** ExtCap : Set support TDLS */
#define SET_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport = 1)
/** ExtCap : Reset support TDLS */
#define RESET_EXTCAP_TDLS(ext_cap) (ext_cap.TDLSSupport = 0)
/** ExtCap : Support for TDLS UAPSD */
#define ISSUPP_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport)
/** ExtCap : Set support TDLS UAPSD */
#define SET_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport = 1)
/** ExtCap : Reset support TDLS UAPSD */
#define RESET_EXTCAP_TDLS_UAPSD(ext_cap) (ext_cap.TDLSPeerUAPSDSupport = 0)
/** ExtCap : Support for TDLS CHANNEL SWITCH */
#define ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(ext_cap) (ext_cap.TDLSChannelSwitching)
/** ExtCap : Set support TDLS CHANNEL SWITCH */
#define SET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap) (ext_cap.TDLSChannelSwitching = 1)
/** ExtCap : Reset support TDLS CHANNEL SWITCH */
#define RESET_EXTCAP_TDLS_CHAN_SWITCH(ext_cap)                                 \
	(ext_cap.TDLSChannelSwitching = 0)
/** ExtCap : Set support Multi BSSID */
#define SET_EXTCAP_MULTI_BSSID(ext_cap) (ext_cap.MultipleBSSID = 1)
/** ExtCap : Support for Interworking */
#define ISSUPP_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking)
/** ExtCap : Set support Interworking */
#define SET_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking = 1)
/** ExtCap : Reset support Interworking */
#define RESET_EXTCAP_INTERWORKING(ext_cap) (ext_cap.Interworking = 0)
/** ExtCap : Support for Operation Mode Notification */
#define ISSUPP_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf)
/** ExtCap : Set support Operation Mode Notification */
#define SET_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf = 1)
/** ExtCap : Reset support Operation Mode Notification */
#define RESET_EXTCAP_OPERMODENTF(ext_cap) (ext_cap.OperModeNtf = 0)
/** ExtCap : Support for QosMap */
#define ISSUPP_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map)
/** ExtCap : Set Support QosMap */
#define SET_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map = 1)
/** ExtCap : Reset support QosMap */
#define RESET_EXTCAP_QOS_MAP(ext_cap) (ext_cap.Qos_Map = 0)
/** ExtCap : Support for BSS_Transition */
#define ISSUPP_EXTCAP_BSS_TRANSITION(ext_cap) (ext_cap.BSS_Transition)
/** ExtCap : Set Support BSS_Transition */
#define SET_EXTCAP_BSS_TRANSITION(ext_cap) (ext_cap.BSS_Transition = 1)
/** ExtCap : Reset support BSS_Transition */
#define RESET_EXTCAP_BSS_TRANSITION(ext_cap) (ext_cap.BSS_Transition = 0)

/** ExtCap : Support for TDLS wider bandwidth */
#define ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap) (ext_cap.TDLSWildBandwidth)
/** ExtCap : Set support TDLS wider bandwidth */
#define SET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap) (ext_cap.TDLSWildBandwidth = 1)
/** ExtCap : Reset support TDLS wider bandwidth */
#define RESET_EXTCAP_TDLS_WIDER_BANDWIDTH(ext_cap)                             \
	(ext_cap.TDLSWildBandwidth = 0)

/** ExtCap : Support for extend channel switch */
#define ISSUPP_EXTCAP_EXT_CHANNEL_SWITCH(ext_cap) (ext_cap.ExtChanSwitching)
/** ExtCap : Set support Ext Channel Switch */
#define SET_EXTCAP_EXT_CHANNEL_SWITCH(ext_cap) (ext_cap.ExtChanSwitching = 1)
/** ExtCap: Set Timing Measurement */
#define SET_EXTCAP_EXT_TIMING_MEASUREMENT(ext_cap)                             \
	(ext_cap.TimingMeasurement = 1)
/** ExtCap : Reset support Ext Channel Switch */
#define RESET_EXTCAP_EXT_CHANNEL_SWITCH(ext_cap) (ext_cap.ExtChanSwitching = 0)

/** ExtCap : Support for TWT RESP */
#define ISSUPP_EXTCAP_EXT_TWT_RESP(ext_cap) (ext_cap.TWTResp)
/** ExtCap : Set support Ext TWT_REQ */
#define SET_EXTCAP_TWT_REQ(ext_cap) (ext_cap.TWTReq = 1)
/** ExtCap : ReSet support Ext TWT REQ */
#define RESET_EXTCAP_TWT_REQ(ext_cap) (ext_cap.TWTReq = 0)

/** LLC/SNAP header len   */
#define LLC_SNAP_LEN 8

/** bandwidth following HTCAP */
#define BW_FOLLOW_HTCAP 0
/** bandwidth following VHTCAP */
#define BW_FOLLOW_VHTCAP 1

/** HW_SPEC FwCapInfo */
#define HWSPEC_11ACSGI80_SUPP MBIT(5)
#define HWSPEC_11ACRXSTBC_SUPP MBIT(8)

#define ISSUPP_11ACENABLED(FwCapInfo) (FwCapInfo & (MBIT(12) | MBIT(13)))

#define ISSUPP_11AC2GENABLED(FwCapInfo) (FwCapInfo & MBIT(12))
#define ISSUPP_11AC5GENABLED(FwCapInfo) (FwCapInfo & MBIT(13))

/** HW_SPEC Dot11acDevCap : HTC-VHT supported */
#define ISSUPP_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap & MBIT(22))
/** HW_SPEC Dot11acDevCap : VHT TXOP PS support */
#define ISSUPP_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap & MBIT(21))
/** HW_SPEC Dot11acDevCap : MU RX beamformee support */
#define ISSUPP_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(20))
/** HW_SPEC Dot11acDevCap : MU TX beamformee support */
#define ISSUPP_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(19))
/** HW_SPEC Dot11acDevCap : SU Beamformee support */
#define ISSUPP_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(12))
/** HW_SPEC Dot11acDevCap : SU Beamformer support */
#define ISSUPP_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap & MBIT(11))
/** HW_SPEC Dot11acDevCap : Rx STBC support */
#define ISSUPP_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(8))
/** HW_SPEC Dot11acDevCap : Tx STBC support */
#define ISSUPP_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(7))
/** HW_SPEC Dot11acDevCap : Short GI support for 160MHz BW */
#define ISSUPP_11ACSGI160(Dot11acDevCap) (Dot11acDevCap & MBIT(6))
/** HW_SPEC Dot11acDevCap : Short GI support for 80MHz BW */
#define ISSUPP_11ACSGI80(Dot11acDevCap) (Dot11acDevCap & MBIT(5))
/** HW_SPEC Dot11acDevCap : LDPC coding support */
#define ISSUPP_11ACLDPC(Dot11acDevCap) (Dot11acDevCap & MBIT(4))
/** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160/80+80 MHz support */
#define ISSUPP_11ACBW8080(Dot11acDevCap) (Dot11acDevCap & MBIT(3))
/** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160 MHz support */
#define ISSUPP_11ACBW160(Dot11acDevCap) (Dot11acDevCap & MBIT(2))

/** Set VHT Cap Info: Max MPDU length */
#define SET_VHTCAP_MAXMPDULEN(VHTCapInfo, value) (VHTCapInfo |= (value & 0x03))
/** SET VHT CapInfo:  Supported Channel Width SET (2 bits)*/
#define SET_VHTCAP_CHWDSET(VHTCapInfo, value)                                  \
	(VHTCapInfo |= ((value & 0x3) << 2))
/** SET VHT CapInfo:  Rx STBC (3 bits) */
#define SET_VHTCAP_RXSTBC(VHTCapInfo, value)                                   \
	(VHTCapInfo |= ((value & 0x7) << 8))
/** SET VHT CapInfo:  Commpressed Steering Num of BFer Ant Supported (3 bits) */
#define SET_VHTCAP_SNBFERANT(VHTCapInfo, value)                                \
	(VHTCapInfo |= ((value & 0x7) << 13))
/** SET VHT CapInfo:  Num of Sounding Dimensions (3 bits) */
#define SET_VHTCAP_NUMSNDDM(VHTCapInfo, value)                                 \
	(VHTCapInfo |= ((value & 0x7) << 16))
/** SET VHT CapInfo:  Max AMPDU Length Exponent (3 bits) */
#define SET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo, value)                           \
	(VHTCapInfo |= ((value & 0x7) << 23))
/** SET VHT CapInfo:  VHT Link Adaptation Capable (2 bits) */
#define SET_VHTCAP_LINKADPCAP(VHTCapInfo, value)                               \
	(VHTCapInfo |= ((value & 0x3) << 26))

/** HW_SPEC Dot11acDevCap : ReSet VHT Link Adapation Capable */
#define RESET_11ACVHTLINKCAPA(Dot11acDevCap, value) (Dot11acDevCap &= ~(0x03))
/** HW_SPEC Dot11acDevCap : ReSet Maximum AMPDU Length Exponent */
#define RESET_11ACAMPDULENEXP(Dot11acDevCap, value) (Dot11acDevCap &= ~(0x07))
/** HW_SPEC Dot11acDevCap : ReSet support of HTC-VHT */
#define RESET_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(22))
/** HW_SPEC Dot11acDevCap : ReSet support of VHT TXOP PS */
#define RESET_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(21))
/** HW_SPEC Dot11acDevCap : ReSet support of MU RX beamformee */
#define RESET_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(20))
/** HW_SPEC Dot11acDevCap : ReSet support of MU TX beamformee */
#define RESET_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(19))
/** HW_SPEC Dot11acDevCap : ReSet Number of Sounding Dimensions */
#define RESET_11ACSOUNDINGNUM(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 16))
/** HW_SPEC Dot11acDevCap : ReSet Compressed Steering Number
 * of Beamformer Antenna */
#define RESET_11ACBFANTNUM(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 13))
/** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformee */
#define RESET_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(12))
/** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformer */
#define RESET_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(11))
/** HW_SPEC Dot11acDevCap : ReSet support of Rx STBC */
#define RESET_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap &= ~((0x07) << 8))
/** HW_SPEC Dot11acDevCap : ReSet support of Tx STBC */
#define RESET_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(7))
/** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 160MHz BW */
#define RESET_11ACSGI160(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(6))
/** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 80MHz BW */
#define RESET_11ACSGI80(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(5))
/** HW_SPEC Dot11acDevCap : ReSet support of LDPC coding */
#define RESET_11ACLDPC(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(4))
/** HW_SPEC Dot11acDevCap : ReSet support of
 * Channel BW 20/40/80/160/80+80 MHz */
#define RESET_11ACBW8080(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(3))
/** HW_SPEC Dot11acDevCap : ReSet support of
 * Channel BW 20/40/80/160 MHz */
#define RESET_11ACBW160(Dot11acDevCap) (Dot11acDevCap &= ~MBIT(2))
/** HW_SPEC Dot11acDevCap : ReSet Max MPDU length */
#define RESET_11ACMAXMPDULEN(Dot11acDevCap) (Dot11acDevCap &= ~(0x03))

/** Default 11ac capability mask for 2.4GHz */
#define DEFAULT_11AC_CAP_MASK_BG                                               \
	(HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP)
/** Default 11ac capability mask for 5GHz */
#define DEFAULT_11AC_CAP_MASK_A (HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP)
/** GET VHT CapInfo : MAX MPDU Length */
#define GET_VHTCAP_MAXMPDULEN(VHTCapInfo) (VHTCapInfo & 0x3)
/** GET VHT CapInfo:  Supported Channel Width SET (2 bits)*/
#define GET_VHTCAP_CHWDSET(VHTCapInfo) ((VHTCapInfo >> 2) & 0x3)
/** GET VHT CapInfo:  Rx STBC (3 bits) */
#define GET_VHTCAP_RXSTBC(VHTCapInfo) ((VHTCapInfo >> 8) & 0x7)
/** GET VHT CapInfo:  Compressed Steering Num of BFer Ant Supported (3 bits) */
#define GET_VHTCAP_SNBFERANT(VHTCapInfo) ((VHTCapInfo >> 13) & 0x7)
/** GET VHT CapInfo:  Num of Sounding Dimensions (3 bits) */
#define GET_VHTCAP_NUMSNDDM(VHTCapInfo) ((VHTCapInfo >> 16) & 0x7)
/** GET VHT CapInfo:  Max AMPDU Length Exponent (3 bits) */
#define GET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo) ((VHTCapInfo >> 23) & 0x7)
/** GET VHT CapInfo:  VHT Link Adaptation Capable (2 bits) */
#define GET_VHTCAP_LINKADPCAP(VHTCapInfo) ((VHTCapInfo >> 26) & 0x3)
/**SET OPERATING MODE:Channel Width:80M*/
#define SET_OPER_MODE_80M(oper_mode)                                           \
	(oper_mode = (oper_mode & ~MBIT(0)) | MBIT(1))
/**SET OPERATING MODE:Channel Width:40M*/
#define SET_OPER_MODE_40M(oper_mode)                                           \
	(oper_mode = (oper_mode & ~MBIT(1)) | MBIT(0))
/**SET OPERATING MODE:Channel Width:20M*/
#define SET_OPER_MODE_20M(oper_mode) (oper_mode &= ~(0x03))
#define IS_OPER_MODE_20M(oper_mode) (((oper_mode) & (MBIT(0) | MBIT(1))) == 0)
/**SET OPERATING MODE:Rx NSS:2*/
#define SET_OPER_MODE_2NSS(oper_mode)                                          \
	(oper_mode = (oper_mode & ~(MBIT(5) | MBIT(6))) | MBIT(4))
/**SET OPERATING MODE:Rx NSS:1*/
#define SET_OPER_MODE_1NSS(oper_mode)                                          \
	(oper_mode &= ~(MBIT(4) | MBIT(5) | MBIT(6)))

#define GET_VHTMCS(MCSMapSet) (MCSMapSet & 0xFFFF)
#define GET_VHTNSSMCS(MCSMapSet, nss) ((MCSMapSet >> (2 * (nss - 1))) & 0x3)
#define RET_VHTNSSMCS(MCSMapSet, nss) ((MCSMapSet >> (2 * (nss - 1))) & 0x3)
#define SET_VHTNSSMCS(MCSMapSet, nss, value)                                   \
	(MCSMapSet |= (value & 0x3) << (2 * (nss - 1)))

/** DevMCSSupported : Tx MCS supported */
#define GET_DEVTXMCSMAP(DevMCSMap) (DevMCSMap >> 16)
#define GET_DEVNSSTXMCS(DevMCSMap, nss)                                        \
	((DevMCSMap >> (2 * (nss - 1) + 16)) & 0x3)
#define SET_DEVNSSTXMCS(DevMCSMap, nss, value)                                 \
	(DevMCSMap |= (value & 0x3) << (2 * (nss - 1) + 16))
#define RESET_DEVTXMCSMAP(DevMCSMap) (DevMCSMap &= 0xFFFF)
/** DevMCSSupported : Rx MCS supported */
#define GET_DEVRXMCSMAP(DevMCSMap) (DevMCSMap & 0xFFFF)
#define GET_DEVNSSRXMCS(DevMCSMap, nss) ((DevMCSMap >> (2 * (nss - 1))) & 0x3)
#define SET_DEVNSSRXMCS(DevMCSMap, nss, value)                                 \
	(DevMCSMap |= (value & 0x3) << (2 * (nss - 1)))
#define RESET_DEVRXMCSMAP(DevMCSMap) (DevMCSMap &= 0xFFFF0000)

/** TLV type : Rate scope */
#define TLV_TYPE_RATE_DROP_PATTERN                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x51) /* 0x0151                             \
					  */
/** TLV type : Rate drop pattern */
#define TLV_TYPE_RATE_DROP_CONTROL                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x52) /* 0x0152                             \
					  */
/** TLV type : Rate scope */
#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 0x53) /* 0x0153 */

/** TLV type : Power group */
#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 0x54) /* 0x0154 */

/** Modulation class for DSSS Rates */
#define MOD_CLASS_HR_DSSS 0x03
/** Modulation class for OFDM Rates */
#define MOD_CLASS_OFDM 0x07
/** Modulation class for HT Rates */
#define MOD_CLASS_HT 0x08
/** Modulation class for VHT Rates */
#define MOD_CLASS_VHT 0x09
/** HT bandwidth 20 MHz */
#define HT_BW_20 0
/** HT bandwidth 40 MHz */
#define HT_BW_40 1
/** HT bandwidth 80 MHz */
#define HT_BW_80 2

/** TLV type : TX RATE CFG, rename from TLV_TYPE_GI_LTF_SIZE to include CMD and
 * HE ER SU settings to this tlv */
#define TLV_TYPE_TX_RATE_CFG (PROPRIETARY_TLV_BASE_ID + 319) /* 0x023f */

/** TLV type : Scan Response */
#define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 0x56) /* 0x0156 */
/** TLV type : Scan Response Stats */
#define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 0x57) /* 0x0157 */

/** TLV type : 11h Basic Rpt */
#define TLV_TYPE_CHANRPT_11H_BASIC                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x5b) /* 0x015b                             \
					  */

/** TLV type : DFS W53 Configuration */
#define TLV_TYPE_DFS_W53_CFG (PROPRIETARY_TLV_BASE_ID + 0x145) // + 325
#ifdef OPCHAN
/** TLV type : OpChannel control */
#define TLV_TYPE_OPCHAN_CONTROL_DESC                                           \
	(PROPRIETARY_TLV_BASE_ID + 0x79) /* 0x0179 */
/** TLV type : OpChannel channel group control */
#define TLV_TYPE_OPCHAN_CHANGRP_CTRL                                           \
	(PROPRIETARY_TLV_BASE_ID + 0x7a) /* 0x017a */
#endif

/** TLV type : Action frame */
#define TLV_TYPE_IEEE_ACTION_FRAME                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x8c) /* 0x018c                             \
					  */

/** TLV type : SCAN channel gap */
#define TLV_TYPE_SCAN_CHANNEL_GAP                                              \
	(PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5                             \
					  */
/** TLV type : Channel statistics */
#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 0xc6) /* 0x01c6 */
/** TLV type : BSS_MODE */
#define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 0xce) /* 0x01ce */

/** Firmware Host Command ID Constants */
/** Host Command ID : Get hardware specifications */
#define HostCmd_CMD_GET_HW_SPEC 0x0003
/** Host Command ID : 802.11 scan */
#define HostCmd_CMD_802_11_SCAN 0x0006
/** Host Command ID : 802.11 get log */
#define HostCmd_CMD_802_11_GET_LOG 0x000b

/** Host Command id: GET_TX_RX_PKT_STATS */
#define HOST_CMD_TX_RX_PKT_STATS 0x008d

/** Host Command ID : 802.11 get/set link layer statistic */
#define HostCmd_CMD_802_11_LINK_STATS 0x0256

/** Host Command ID : MAC multicast address */
#define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
/** Host Command ID : 802.11 EEPROM access */
#define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
/** Host Command ID : 802.11 associate */
#define HostCmd_CMD_802_11_ASSOCIATE 0x0012

/** Host Command ID : 802.11 SNMP MIB */
#define HostCmd_CMD_802_11_SNMP_MIB 0x0016
/** Host Command ID : MAC register access */
#define HostCmd_CMD_MAC_REG_ACCESS 0x0019
/** Host Command ID : BBP register access */
#define HostCmd_CMD_BBP_REG_ACCESS 0x001a
/** Host Command ID : RF register access */
#define HostCmd_CMD_RF_REG_ACCESS 0x001b

/** Host Command ID : 802.11 radio control */
#define HostCmd_CMD_802_11_RADIO_CONTROL 0x001c
/** Host Command ID : 802.11 RF channel */
#define HostCmd_CMD_802_11_RF_CHANNEL 0x001d
/** Host Command ID : 802.11 RF Tx power */
#define HostCmd_CMD_802_11_RF_TX_POWER 0x001e

/** Host Command ID : 802.11 RF antenna */
#define HostCmd_CMD_802_11_RF_ANTENNA 0x0020

/** Host Command ID : 802.11 deauthenticate */
#define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
/** Host Command ID: 802.11 disassoicate */
#define HostCmd_CMD_802_11_DISASSOCIATE 0x0026
/** Host Command ID : MAC control */
#define HostCmd_CMD_MAC_CONTROL 0x0028
/** Host Command ID : 802.11 Ad-Hoc start */
#define HostCmd_CMD_802_11_AD_HOC_START 0x002b
/** Host Command ID : 802.11 Ad-Hoc join */
#define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c

/** Host Command ID: CW Mode */
#define HostCmd_CMD_CW_MODE_CTRL 0x0239
/** Host Command ID : 802.11 key material */
#define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e

/** Host Command ID : 802.11 Ad-Hoc stop */
#define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040

/** Host Command ID : 802.22 MAC address */
#define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D

/** Host Command ID : WMM Traffic Stream Status */
#define HostCmd_CMD_WMM_TS_STATUS 0x005d

/** Host Command ID : 802.11 D domain information */
#define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b

/*This command gets/sets the Transmit Rate-based Power Control (TRPC) channel
 * configuration.*/
#define HostCmd_CHANNEL_TRPC_CONFIG 0x00fb

/** Host Command ID : 802.11 TPC information */
#define HostCmd_CMD_802_11_TPC_INFO 0x005f
/** Host Command ID : 802.11 TPC adapt req */
#define HostCmd_CMD_802_11_TPC_ADAPT_REQ 0x0060
/** Host Command ID : 802.11 channel SW ann */
#define HostCmd_CMD_802_11_CHAN_SW_ANN 0x0061

/** Host Command ID : Measurement request */
#define HostCmd_CMD_MEASUREMENT_REQUEST 0x0062
/** Host Command ID : Measurement report */
#define HostCmd_CMD_MEASUREMENT_REPORT 0x0063

/** Host Command ID : 802.11 sleep parameters */
#define HostCmd_CMD_802_11_SLEEP_PARAMS 0x0066

/** Host Command ID : 802.11 ps inactivity timeout */
#define HostCmd_CMD_802_11_PS_INACTIVITY_TIMEOUT 0x0067

/** Host Command ID : 802.11 sleep period */
#define HostCmd_CMD_802_11_SLEEP_PERIOD 0x0068

/** Host Command ID: 802.11 BG scan config */
#define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b
/** Host Command ID : 802.11 BG scan query */
#define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c

/** Host Command ID : WMM ADDTS req */
#define HostCmd_CMD_WMM_ADDTS_REQ 0x006E
/** Host Command ID : WMM DELTS req */
#define HostCmd_CMD_WMM_DELTS_REQ 0x006F
/** Host Command ID : WMM queue configuration */
#define HostCmd_CMD_WMM_QUEUE_CONFIG 0x0070
/** Host Command ID : 802.11 get status */
#define HostCmd_CMD_WMM_GET_STATUS 0x0071

/** Host Command ID : 802.11 subscribe event */
#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075

/** Host Command ID : 802.11 Tx rate query */
#define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
/** Host Command ID :Get timestamp value */
#define HostCmd_CMD_GET_TSF 0x0080

/** Host Command ID : WMM queue stats */
#define HostCmd_CMD_WMM_QUEUE_STATS 0x0081

/** Host Command ID : KEEP ALIVE command */
#define HostCmd_CMD_AUTO_TX 0x0082

/** Host Command ID : 802.11 IBSS coalescing status */
#define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083

/** Host Command ID : Memory access */
#define HostCmd_CMD_MEM_ACCESS 0x0086

#if defined(SDIO)
/** Host Command ID : SDIO GPIO interrupt configuration */
#define HostCmd_CMD_SDIO_GPIO_INT_CONFIG 0x0088
#endif

/** Host Command ID : Mfg command */
#define HostCmd_CMD_MFG_COMMAND 0x0089
/** Host Command ID : Inactivity timeout ext */
#define HostCmd_CMD_INACTIVITY_TIMEOUT_EXT 0x008a

/** Host Command ID : DBGS configuration */
#define HostCmd_CMD_DBGS_CFG 0x008b
/** Host Command ID : Get memory */
#define HostCmd_CMD_GET_MEM 0x008c

/** Host Command ID : Cal data dnld */
#define HostCmd_CMD_CFG_DATA 0x008f

/** Host Command ID : SDIO pull control */
#define HostCmd_CMD_SDIO_PULL_CTRL 0x0093

/** Host Command ID : ECL system clock configuration */
#define HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG 0x0094

/** Host Command ID : Extended version */
#define HostCmd_CMD_VERSION_EXT 0x0097

/** Host Command ID : MEF configuration */
#define HostCmd_CMD_MEF_CFG 0x009a
/** Host Command ID : 802.11 RSSI INFO*/
#define HostCmd_CMD_RSSI_INFO 0x00a4
/** Host Command ID : Function initialization */
#define HostCmd_CMD_FUNC_INIT 0x00a9
/** Host Command ID : Function shutdown */
#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa

/** Host Command ID : Robustcoex */
#define HostCmd_CMD_802_11_ROBUSTCOEX 0x00e0

/** Host Command ID :EAPOL PKT */
#define HostCmd_CMD_802_11_EAPOL_PKT 0x012e

/** Host Command ID :MIMO SWITCH **/
#define HostCmd_CMD_802_11_MIMO_SWITCH 0x0235

/** Host Command ID : 802.11 RSSI INFO EXT*/
#define HostCmd_CMD_RSSI_INFO_EXT 0x0237

#ifdef RX_PACKET_COALESCE
/** TLV ID for RX pkt coalesce config */
#define TLV_TYPE_RX_PKT_COAL_CONFIG (PROPRIETARY_TLV_BASE_ID + 0xC9)
#endif

/** Host Command ID : Channel report request */
#define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd

/** Host Command ID: SUPPLICANT_PMK */
#define HostCmd_CMD_SUPPLICANT_PMK 0x00c4
/** Host Command ID: SUPPLICANT_PROFILE */
#define HostCmd_CMD_SUPPLICANT_PROFILE 0x00c5

/** Host Command ID : Add Block Ack Request */
#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
/** Host Command ID : Delete a Block Ack Request */
#define HostCmd_CMD_11N_CFG 0x00cd
/** Host Command ID : Add Block Ack Response */
#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
/** Host Command ID : Delete a Block Ack Request */
#define HostCmd_CMD_11N_DELBA 0x00d0
/** Host Command ID: Configure Tx Buf size */
#define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
/** Host Command ID: AMSDU Aggr Ctrl */
#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
/** Host Command ID: 11AC config */
#define HostCmd_CMD_11AC_CFG 0x0112
/** Host Command ID: Configure TX Beamforming capability */
#define HostCmd_CMD_TX_BF_CFG 0x0104

/** Host Command ID : 802.11 TX power configuration */
#define HostCmd_CMD_TXPWR_CFG 0x00d1

/** Host Command ID : Soft Reset */
#define HostCmd_CMD_SOFT_RESET 0x00d5

/** Host Command ID : 802.11 b/g/n rate configration */
#define HostCmd_CMD_TX_RATE_CFG 0x00d6

/** Host Command ID : Enhanced PS mode */
#define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4

/** Host command action : Host sleep configuration */
#define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5

/** Host Command ID : CAU register access */
#define HostCmd_CMD_CAU_REG_ACCESS 0x00ed

/** Host Command ID : mgmt IE list */
#define HostCmd_CMD_MGMT_IE_LIST 0x00f2

#define HostCmd_CMD_802_11_BAND_STEERING 0x026f

#ifdef SDIO
/** Host Command ID : SDIO single port RX aggr */
#define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223

/** fw_cap_info bit16 for sdio sp rx aggr flag*/
#define SDIO_SP_RX_AGGR_ENABLE MBIT(16)

#endif

/* fw_cap_info bit18 for ecsa support*/
#define FW_CAPINFO_ECSA MBIT(18)

/* fw_cap_info bit20 for get log*/
#define FW_CAPINFO_GET_LOG MBIT(20)

/** fw_cap_info bit22 for embedded supplicant support*/
#define FW_CAPINFO_SUPPLICANT_SUPPORT MBIT(21)

/** fw_cap_info bit23 for embedded authenticator support*/
#define FW_CAPINFO_AUTH_SUPPORT MBIT(22)

/** fw_cap_info bit25 for adhoc support*/
#define FW_CAPINFO_ADHOC_SUPPORT MBIT(25)
/** Check if adhoc is supported by firmware */
#define IS_FW_SUPPORT_ADHOC(_adapter)                                          \
	(_adapter->fw_cap_info & FW_CAPINFO_ADHOC_SUPPORT)

/** Check if supplicant is supported by firmware */
#define IS_FW_SUPPORT_SUPPLICANT(_adapter)                                     \
	(_adapter->fw_cap_info & FW_CAPINFO_SUPPLICANT_SUPPORT)

/** Check if authenticator is supported by firmware */
#define IS_FW_SUPPORT_AUTHENTICATOR(_adapter)                                  \
	(_adapter->fw_cap_info & FW_CAPINFO_AUTH_SUPPORT)

/** Ext fw cap info bit0 only 1x1 5G is available */
#define FW_CAPINFO_EXT_5G_1X1_ONLY MBIT(0)
/** Ext fw cap info bit1 1x1 5G is not available */
#define FW_CAPINFO_EXT_NO_5G_1X1 MBIT(1)
/** Ext fw cap info bit 2 only 1x1 2G is available */
#define FW_CAPINFO_EXT_2G_1X1_ONLY MBIT(2)
/**Ext fw cap info bit3 1x1 2G is not available */
#define FW_CAPINFO_EXT_NO_2G_1X1 MBIT(3)
/** Ext fw cap info bit4 1x1 + 1x1 5G mode is unavailable */
#define FW_CAPINFO_EXT_NO_5G_1X1_PLUS_1X1 MBIT(4)
/** Ext fw cap info bit5 80 + 80 MHz capability disabled */
#define FW_CAPINFO_EXT_NO_80MHz_PLUS_80MHz MBIT(5)
/** Ext fw cap info bit6 1024 QAM is disabled */
#define FW_CAPINFO_EXT_NO_1024_QAM MBIT(6)
/** FW cap info bit 7 11AX */
#define FW_CAPINFO_EXT_802_11AX MBIT(7)
/** FW cap info bit 8: 80MHZ disabled */
#define FW_CAPINFO_EXT_NO_80MHZ MBIT(8)

/** Check if 5G 1x1 only is supported by firmware */
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter)                                    \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_5G_1X1_ONLY)
/** Check if 5G 1x1 is unavailable in firmware */
#define IS_FW_SUPPORT_NO_5G_1X1(_adapter)                                      \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_5G_1X1)
/** Check if 2G 1x1 only is supported by firmware */
#define IS_FW_SUPPORT_2G_1X1_ONLY(_adapter)                                    \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_2G_1X1_ONLY)
/** Check if 2G 1x1 is unavailable in firmware */
#define IS_FW_SUPPORT_NO_2G_1X1(_adapter)                                      \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_2G_1X1)
/** Check if 5G 1x1 + 1x1 mode is disabled in firmware */
#define IS_FW_SUPPORT_NO_5G_1X1_PLUS_1X1(_adapter)                             \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_5G_1X1_PLUS_1X1)
/** Check if 80 + 80MHz is disabled in firmware */
#define IS_FW_SUPPORT_NO_80MHz_PLUS_80MHz(_adapter)                            \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_80MHz_PLUS_80MHz)
/** Check if 1024 QAM disabled in firmware */
#define IS_FW_SUPPORT_NO_1024_QAM(_adapter)                                    \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_1024_QAM)
/** Check if 80MHZ disabled in firmware */
#define IS_FW_SUPPORT_NO_80MHZ(_adapter)                                       \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_80MHZ)

/** FW cap info TLV */
typedef MLAN_PACK_START struct _MrvlIEtypes_fw_cap_info_t {
	/** Header type */
	t_u16 type;
	/** Header length */
	t_u16 len;
	/** Fw cap info bitmap */
	t_u32 fw_cap_info;
	/** Extended fw cap info bitmap */
	t_u32 fw_cap_ext;
} MLAN_PACK_END MrvlIEtypes_fw_cap_info_t, *pMrvlIEtypes_fw_cap_info_t;

/** Check if 11AX is supported by firmware */
#define IS_FW_SUPPORT_11AX(_adapter)                                           \
	(_adapter->fw_cap_ext & FW_CAPINFO_EXT_802_11AX)

typedef MLAN_PACK_START struct _MrvlIEtypes_Extension_t {
	/** Header type */
	t_u16 type;
	/** Header length */
	t_u16 len;
	/** Element id extension */
	t_u8 ext_id;
	/** payload */
	t_u8 data[];
} MLAN_PACK_END MrvlIEtypes_Extension_t, *pMrvlIEtypes_Extension_t;

/* HE MAC Capabilities Information field BIT 1 for TWT Req */
#define HE_MAC_CAP_TWT_REQ_SUPPORT MBIT(1)
/* HE MAC Capabilities Information field BIT 2 for TWT Resp*/
#define HE_MAC_CAP_TWT_RESP_SUPPORT MBIT(2)
typedef MLAN_PACK_START struct _MrvlIEtypes_He_cap_t {
	/** Header type */
	t_u16 type;
	/** Header length */
	t_u16 len;
	/** Element id extension */
	t_u8 ext_id;
	/** he mac capability info */
	t_u8 he_mac_cap[6];
	/** he phy capability info */
	t_u8 he_phy_cap[11];
	/** he txrx mcs support , size would be 4 or 8 or 12 */
	t_u8 he_txrx_mcs_support[4];
	/** 160Mhz tx rx mcs support*/
	t_u8 he160_txrx_mcs_support[4];
	/** 80+80 Mhz tx rx mcs suport */
	t_u8 he8080_txrx_mcs_support[4];
	/** PPE Thresholds (optional) */
	t_u8 val[20];
} MLAN_PACK_END MrvlIEtypes_He_cap_t, *pMrvlIEtypes_he_cap_t;

#ifdef RX_PACKET_COALESCE
/** Host Command ID : Rx packet coalescing configuration */
#define HostCmd_CMD_RX_PKT_COALESCE_CFG 0x012c
#endif

/** Host Command ID : Extended scan support */
#define HostCmd_CMD_802_11_SCAN_EXT 0x0107

/** Host Command ID : Forward mgmt frame */
#define HostCmd_CMD_RX_MGMT_IND 0x010c

#ifdef PCIE
/** Host Command ID: Host buffer description */
#define HostCmd_CMD_PCIE_HOST_BUF_DETAILS 0x00fa
#endif

/** Host Command ID : Set BSS_MODE */
#define HostCmd_CMD_SET_BSS_MODE 0x00f7

#ifdef UAP_SUPPORT
/**  Host Command id: SYS_INFO */
#define HOST_CMD_APCMD_SYS_INFO 0x00ae
/** Host Command id: sys_reset */
#define HOST_CMD_APCMD_SYS_RESET 0x00af
/** Host Command id: SYS_CONFIGURE  */
#define HOST_CMD_APCMD_SYS_CONFIGURE 0x00b0
/** Host Command id: BSS_START */
#define HOST_CMD_APCMD_BSS_START 0x00b1
/** Host Command id: BSS_STOP  */
#define HOST_CMD_APCMD_BSS_STOP 0x00b2
/** Host Command id: sta_list */
#define HOST_CMD_APCMD_STA_LIST 0x00b3
/** Host Command id: STA_DEAUTH */
#define HOST_CMD_APCMD_STA_DEAUTH 0x00b5

/** Host Command id: REPORT_MIC */
#define HOST_CMD_APCMD_REPORT_MIC 0x00ee
/** Host Command id: UAP_OPER_CTRL */
#define HOST_CMD_APCMD_OPER_CTRL 0x0233
#endif /* UAP_SUPPORT */

/** Host Command id: PMIC CONFIGURE*/
#define HOST_CMD_PMIC_CONFIGURE 0x23E

/** Host Command ID: Tx data pause */
#define HostCmd_CMD_CFG_TX_DATA_PAUSE 0x0103

#ifdef WIFI_DIRECT_SUPPORT
/** Host Command ID: P2P PARAMS CONFIG */
#define HOST_CMD_P2P_PARAMS_CONFIG 0x00ea
/** Host Command ID: WIFI_DIRECT_MODE_CONFIG */
#define HOST_CMD_WIFI_DIRECT_MODE_CONFIG 0x00eb
#endif

/** Host Command ID: Remain On Channel */
#define HostCmd_CMD_802_11_REMAIN_ON_CHANNEL 0x010d

#define HostCmd_CMD_COALESCE_CFG 0x010a

/** Host Command ID: GTK REKEY OFFLOAD CFG */
#define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG 0x010f

/** Host Command ID : OTP user data */
#define HostCmd_CMD_OTP_READ_USER_DATA 0x0114

/** Host Command ID: HS wakeup reason */
#define HostCmd_CMD_HS_WAKEUP_REASON 0x0116

/** Host Command ID: reject addba request */
#define HostCmd_CMD_REJECT_ADDBA_REQ 0x0119

#define HostCmd_CMD_FW_DUMP_EVENT 0x0125

#define HostCMD_CONFIG_LOW_POWER_MODE 0x0128

/** Host Command ID : Target device access */
#define HostCmd_CMD_TARGET_ACCESS 0x012a

/** Host Command ID: BCA device access */
#define HostCmd_CMD_BCA_REG_ACCESS 0x0272

/** Host Command ID: DFS repeater mode */
#define HostCmd_DFS_REPEATER_MODE 0x012b

/** Host Command ID: ACS scan */
#define HostCMD_APCMD_ACS_SCAN 0x0224

/** Host Command ID: Get sensor temp*/
#define HostCmd_DS_GET_SENSOR_TEMP 0x0227

/** Host Command ID : Configure ADHOC_OVER_IP parameters */
#define HostCmd_CMD_WMM_PARAM_CONFIG 0x023a

#ifdef STA_SUPPORT
/** Host Command ID :  set/get sta configure */
#define HostCmd_CMD_STA_CONFIGURE 0x023f
#endif

/** Host Command ID : GPIO independent reset configure */
#define HostCmd_CMD_INDEPENDENT_RESET_CFG 0x0243

#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) ||                \
	defined(PCIE9097) || defined(USB9097) || defined(SD9097)
/* TLV type: reg type */
#define TLV_TYPE_REG_ACCESS_CTRL (PROPRIETARY_TLV_BASE_ID + 0x13C) /* 0x023c*/
/** MrvlIEtypes_Reg_type_t*/
typedef MLAN_PACK_START struct _MrvlIEtypes_Reg_type_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** type: 0x81/0x82/0x83 */
	t_u8 type;
} MLAN_PACK_END MrvlIEtypes_Reg_type_t;

#endif
#define HostCmd_CMD_CHAN_REGION_CFG 0x0242
/* mod_grp */
typedef enum _mod_grp {
	MOD_CCK, // 0
	MOD_OFDM_PSK, // 1
	MOD_OFDM_QAM16, // 2
	MOD_OFDM_QAM64, // 3
	MOD_HT_20_PSK, // 4
	MOD_HT_20_QAM16, // 5
	MOD_HT_20_QAM64, // 6
	MOD_HT_40_PSK, // 7
	MOD_HT_40_QAM16, // 8
	MOD_HT_40_QAM64, // 9
#ifdef STREAM_2x2
	MOD_HT2_20_PSK, // 10
	MOD_HT2_20_QAM16, // 11
	MOD_HT2_20_QAM64, // 12
	MOD_HT2_40_PSK, // 13
	MOD_HT2_40_QAM16, // 14
	MOD_HT2_40_QAM64, // 15
#endif

	MOD_VHT_20_QAM256, // 16
	MOD_VHT_40_QAM256, // 17
	MOD_VHT_80_PSK, // 18
	MOD_VHT_80_QAM16, // 19
	MOD_VHT_80_QAM64, // 20
	MOD_VHT_80_QAM256, // 21
#ifdef STREAM_2x2
	MOD_VHT2_20_QAM256, // 22
	MOD_VHT2_40_QAM256, // 23
	MOD_VHT2_80_PSK, // 24
	MOD_VHT2_80_QAM16, // 25
	MOD_VHT2_80_QAM64, // 26
	MOD_VHT2_80_QAM256, // 27
#endif
} mod_grp;

typedef MLAN_PACK_START struct _power_table_attr {
	t_u8 rows_2g;
	t_u8 cols_2g;
	t_u8 rows_5g;
	t_u8 cols_5g;
} MLAN_PACK_END power_table_attr_t;

#define FW_CFP_TABLE_MAX_ROWS_BG 14
#define FW_CFP_TABLE_MAX_COLS_BG 17

#define FW_CFP_TABLE_MAX_ROWS_A 39
#define FW_CFP_TABLE_MAX_COLS_A 29

#define HostCmd_CMD_DYN_BW 0x0252

#define HostCmd_CMD_BOOT_SLEEP 0x0258

#define HostCmd_CMD_RX_ABORT_CFG 0x0261
#define HostCmd_CMD_RX_ABORT_CFG_EXT 0x0262
#define HostCmd_CMD_TX_AMPDU_PROT_MODE 0x0263
#define HostCmd_CMD_RATE_ADAPT_CFG 0x0264
#define HostCmd_CMD_CCK_DESENSE_CFG 0x0265

#define HostCmd_CMD_VDLL 0x0240
#if defined(PCIE)
#define HostCmd_CMD_SSU 0x0259
#endif

#define HostCmd_CMD_DMCS_CONFIG 0x0260

/** Host Command ID: 11AX config */
#define HostCmd_CMD_11AX_CFG 0x0266
/** Host Command ID: 11AX command */
#define HostCmd_CMD_11AX_CMD 0x026d
/** Host Command ID: Range ext command */
#define HostCmd_CMD_RANGE_EXT 0x0274
/** Host Command ID: TWT cfg command */
#define HostCmd_CMD_TWT_CFG 0x0270

#define HostCmd_CMD_LOW_POWER_MODE_CFG 0x026e
#define HostCmd_CMD_UAP_BEACON_STUCK_CFG 0x0271
#define HostCmd_CMD_ARB_CONFIG 0x0273
#define HostCmd_CMD_DOT11MC_UNASSOC_FTM_CFG 0x0275

/** Enhanced PS modes */
typedef enum _ENH_PS_MODES {
	GET_PS = 0,
	SLEEP_CONFIRM = 5,
	DIS_AUTO_PS = 0xfe,
	EN_AUTO_PS = 0xff,
} ENH_PS_MODES;

/** Command RET code, MSB is set to 1 */
#define HostCmd_RET_BIT 0x8000

/** General purpose action : Get */
#define HostCmd_ACT_GEN_GET 0x0000
/** General purpose action : Set */
#define HostCmd_ACT_GEN_SET 0x0001
/** General purpose action : Set Default */
#define HostCmd_ACT_GEN_SET_DEFAULT 0x0002
/** General purpose action : Get_Current */
#define HostCmd_ACT_GEN_GET_CURRENT 0x0003
/** General purpose action : Remove */
#define HostCmd_ACT_GEN_REMOVE 0x0004
/** General purpose action : Reset */
#define HostCmd_ACT_GEN_RESET 0x0005

/** Host command action : Set Rx */
#define HostCmd_ACT_SET_RX 0x0001
/** Host command action : Set Tx */
#define HostCmd_ACT_SET_TX 0x0002
/** Host command action : Set both Rx and Tx */
#define HostCmd_ACT_SET_BOTH 0x0003
/** Host command action : Get Rx */
#define HostCmd_ACT_GET_RX 0x0004
/** Host command action : Get Tx */
#define HostCmd_ACT_GET_TX 0x0008
/** Host command action : Get both Rx and Tx */
#define HostCmd_ACT_GET_BOTH 0x000c

/** General Result Code*/
/** General result code OK */
#define HostCmd_RESULT_OK 0x0000
/** Genenral error */
#define HostCmd_RESULT_ERROR 0x0001
/** Command is not valid */
#define HostCmd_RESULT_NOT_SUPPORT 0x0002
/** Command is pending */
#define HostCmd_RESULT_PENDING 0x0003
/** System is busy (command ignored) */
#define HostCmd_RESULT_BUSY 0x0004
/** Data buffer is not big enough */
#define HostCmd_RESULT_PARTIAL_DATA 0x0005

/* Define action or option for HostCmd_CMD_MAC_CONTROL */
/** MAC action : Rx on */
#define HostCmd_ACT_MAC_RX_ON 0x0001
/** MAC action : Tx on */
#define HostCmd_ACT_MAC_TX_ON 0x0002
/** MAC action : WEP enable */
#define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
/** MAC action : EthernetII enable */
#define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
/** MAC action : Promiscous mode enable */
#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
/** MAC action : All multicast enable */
#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
/** MAC action : RTS/CTS enable */
#define HostCmd_ACT_MAC_RTS_CTS_ENABLE 0x0200
/** MAC action : Strict protection enable */
#define HostCmd_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400
/** MAC action : Force 11n protection disable */
#define HostCmd_ACT_MAC_FORCE_11N_PROTECTION_OFF 0x0800
/** MAC action : Ad-Hoc G protection on */
#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
/** MAC action : Static-Dynamic BW enable */
#define HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE MBIT(16)
/** MAC action : Dynamic BW */
#define HostCmd_ACT_MAC_DYNAMIC_BW MBIT(17)

/* Define action or option for HostCmd_CMD_802_11_SCAN */
/** Scan type : BSS */
#define HostCmd_BSS_MODE_BSS 0x0001
/** Scan type : IBSS */
#define HostCmd_BSS_MODE_IBSS 0x0002
/** Scan type : Any */
#define HostCmd_BSS_MODE_ANY 0x0003

/** Define bitmap conditions for HOST_SLEEP_CFG : GPIO FF */
#define HOST_SLEEP_CFG_GPIO_FF 0xff
/** Define bitmap conditions for HOST_SLEEP_CFG : GAP FF */
#define HOST_SLEEP_CFG_GAP_FF 0xff

/** Buffer Constants */
/** Number of command buffers */
#define MRVDRV_NUM_OF_CMD_BUFFER 40
/** Maximum number of BSS Descriptors */
#define MRVDRV_MAX_BSSID_LIST 200

/** Host command flag in command */
#define CMD_F_HOSTCMD (1 << 0)
/** command cancel flag in command */
#define CMD_F_CANCELED (1 << 1)
/** scan command flag */
#define CMD_F_SCAN (1 << 2)

/** Host Command ID bit mask (bit 11:0) */
#define HostCmd_CMD_ID_MASK 0x0fff

/** Host Command Sequence number mask (bit 7:0) */
#define HostCmd_SEQ_NUM_MASK 0x00ff

/** Host Command BSS number mask (bit 11:8) */
#define HostCmd_BSS_NUM_MASK 0x0f00

/** Host Command BSS type mask (bit 15:12) */
#define HostCmd_BSS_TYPE_MASK 0xf000

/** Set BSS information to Host Command */
#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type)                            \
	((((seq)&0x00ff) | (((num)&0x000f) << 8)) | (((type)&0x000f) << 12))

/** Get Sequence Number from Host Command (bit 7:0) */
#define HostCmd_GET_SEQ_NO(seq) ((seq)&HostCmd_SEQ_NUM_MASK)

/** Get BSS number from Host Command (bit 11:8) */
#define HostCmd_GET_BSS_NO(seq) (((seq)&HostCmd_BSS_NUM_MASK) >> 8)

/** Get BSS type from Host Command (bit 15:12) */
#define HostCmd_GET_BSS_TYPE(seq) (((seq)&HostCmd_BSS_TYPE_MASK) >> 12)

/** Card Event definition : Dummy host wakeup signal */
#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
/** Card Event definition : Link lost */
#define EVENT_LINK_LOST 0x00000003
/** Card Event definition : Link sensed */
#define EVENT_LINK_SENSED 0x00000004
/** Card Event definition : MIB changed */
#define EVENT_MIB_CHANGED 0x00000006
/** Card Event definition : Init done */
#define EVENT_INIT_DONE 0x00000007
/** Card Event definition : Deauthenticated */
#define EVENT_DEAUTHENTICATED 0x00000008
/** Card Event definition : Disassociated */
#define EVENT_DISASSOCIATED 0x00000009
/** Card Event definition : Power save awake */
#define EVENT_PS_AWAKE 0x0000000a
/** Card Event definition : Power save sleep */
#define EVENT_PS_SLEEP 0x0000000b
/** Card Event definition : MIC error multicast */
#define EVENT_MIC_ERR_MULTICAST 0x0000000d
/** Card Event definition : MIC error unicast */
#define EVENT_MIC_ERR_UNICAST 0x0000000e

/** Card Event definition : Ad-Hoc BCN lost */
#define EVENT_ADHOC_BCN_LOST 0x00000011

/** Card Event definition : Stop Tx */
#define EVENT_STOP_TX 0x00000013
/** Card Event definition : Start Tx */
#define EVENT_START_TX 0x00000014
/** Card Event definition : Channel switch */
#define EVENT_CHANNEL_SWITCH 0x00000015

/** Card Event definition : MEAS report ready */
#define EVENT_MEAS_REPORT_RDY 0x00000016

/** Card Event definition : WMM status change */
#define EVENT_WMM_STATUS_CHANGE 0x00000017

/** Card Event definition : BG scan report */
#define EVENT_BG_SCAN_REPORT 0x00000018
/** Card Event definition : BG scan stopped */
#define EVENT_BG_SCAN_STOPPED 0x00000065

/** Card Event definition : Beacon RSSI low */
#define EVENT_RSSI_LOW 0x00000019
/** Card Event definition : Beacon SNR low */
#define EVENT_SNR_LOW 0x0000001a
/** Card Event definition : Maximum fail */
#define EVENT_MAX_FAIL 0x0000001b
/** Card Event definition : Beacon RSSI high */
#define EVENT_RSSI_HIGH 0x0000001c
/** Card Event definition : Beacon SNR high */
#define EVENT_SNR_HIGH 0x0000001d

/** Card Event definition : IBSS coalsced */
#define EVENT_IBSS_COALESCED 0x0000001e

/** Event definition : IBSS station connected */
#define EVENT_IBSS_STATION_CONNECT 0x00000020
/** Event definition : IBSS station dis-connected */
#define EVENT_IBSS_STATION_DISCONNECT 0x00000021

/** Card Event definition : Data RSSI low */
#define EVENT_DATA_RSSI_LOW 0x00000024
/** Card Event definition : Data SNR low */
#define EVENT_DATA_SNR_LOW 0x00000025
/** Card Event definition : Data RSSI high */
#define EVENT_DATA_RSSI_HIGH 0x00000026
/** Card Event definition : Data SNR high */
#define EVENT_DATA_SNR_HIGH 0x00000027

/** Card Event definition : Link Quality */
#define EVENT_LINK_QUALITY 0x00000028

/** Card Event definition : Port release event */
#define EVENT_PORT_RELEASE 0x0000002b

/** Card Event definition : Pre-Beacon Lost */
#define EVENT_PRE_BEACON_LOST 0x00000031

#define EVENT_WATCHDOG_TMOUT 0x00000032

/** Card Event definition : Add BA event */
#define EVENT_ADDBA 0x00000033
/** Card Event definition : Del BA event */
#define EVENT_DELBA 0x00000034
/** Card Event definition: BA stream timeout*/
#define EVENT_BA_STREAM_TIMEOUT 0x00000037

/** Card Event definition : AMSDU aggr control */
#define EVENT_AMSDU_AGGR_CTRL 0x00000042

/** Card Event definition: WEP ICV error */
#define EVENT_WEP_ICV_ERR 0x00000046

/** Card Event definition : Host sleep enable */
#define EVENT_HS_ACT_REQ 0x00000047

/** Card Event definition : BW changed */
#define EVENT_BW_CHANGE 0x00000048

#ifdef WIFI_DIRECT_SUPPORT
/** WIFIDIRECT generic event */
#define EVENT_WIFIDIRECT_GENERIC_EVENT 0x00000049
/** WIFIDIRECT service discovery event */
#define EVENT_WIFIDIRECT_SERVICE_DISCOVERY 0x0000004a
#endif
/** Remain on Channel expired event */
#define EVENT_REMAIN_ON_CHANNEL_EXPIRED 0x0000005f

#define EVENT_MEF_HOST_WAKEUP 0x0000004f

/** Card Event definition: Channel switch pending announcment */
#define EVENT_CHANNEL_SWITCH_ANN 0x00000050

/** Event definition:  Radar Detected by card */
#define EVENT_RADAR_DETECTED 0x00000053

/** Event definition:  Radar Detected by card */
#define EVENT_CHANNEL_REPORT_RDY 0x00000054

/** Event definition:  Scan results through event */
#define EVENT_EXT_SCAN_REPORT 0x00000058
/** Enhance ext scan done event */
#define EVENT_EXT_SCAN_STATUS_REPORT 0x0000007f

/** Event definition : FW debug information */
#define EVENT_FW_DEBUG_INFO 0x00000063

/** Event definition: RXBA_SYNC */
#define EVENT_RXBA_SYNC 0x00000059

#ifdef UAP_SUPPORT
/** Event ID: STA deauth */
#define EVENT_MICRO_AP_STA_DEAUTH 0x0000002c
/** Event ID: STA assoicated */
#define EVENT_MICRO_AP_STA_ASSOC 0x0000002d
/** Event ID: BSS started */
#define EVENT_MICRO_AP_BSS_START 0x0000002e
/** Event ID: BSS idle event */
#define EVENT_MICRO_AP_BSS_IDLE 0x00000043
/** Event ID: BSS active event */
#define EVENT_MICRO_AP_BSS_ACTIVE 0x00000044

/** Event ID: MIC countermeasures event */
#define EVENT_MICRO_AP_MIC_COUNTERMEASURES 0x0000004c
#endif /* UAP_SUPPORT */

/** Event ID: TX data pause event */
#define EVENT_TX_DATA_PAUSE 0x00000055

/** Event ID: SAD Report */
#define EVENT_SAD_REPORT 0x00000066

/** Event ID: Tx status */
#define EVENT_TX_STATUS_REPORT 0x00000074

#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076

#if defined(PCIE)
#define EVENT_SSU_DUMP_DMA 0x0000008C
#endif

#define EVENT_VDLL_IND 0x00000081
#define EVENT_EXCEED_MAX_P2P_CONN 0x00000089

#define EVENT_FW_HANG_REPORT 0x0000008F

#define EVENT_FW_DUMP_INFO 0x00000073
/** Event ID mask */
#define EVENT_ID_MASK 0xffff

/** BSS number mask */
#define BSS_NUM_MASK 0xf

/** Get BSS number from event cause (bit 23:16) */
#define EVENT_GET_BSS_NUM(event_cause) (((event_cause) >> 16) & BSS_NUM_MASK)

/** Get BSS type from event cause (bit 31:24) */
#define EVENT_GET_BSS_TYPE(event_cause) (((event_cause) >> 24) & 0x00ff)

/** Event_WEP_ICV_ERR structure */
typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR {
	/** Reason code */
	t_u16 reason_code;
	/** Source MAC address */
	t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** WEP decryption used key */
	t_u8 wep_key_index;
	/** WEP key length */
	t_u8 wep_key_length;
	/** WEP key */
	t_u8 key[MAX_WEP_KEY_SIZE];
} MLAN_PACK_END Event_WEP_ICV_ERR;

/** WLAN_802_11_FIXED_IEs */
typedef MLAN_PACK_START struct _WLAN_802_11_FIXED_IEs {
	/** Timestamp */
	t_u8 time_stamp[8];
	/** Beacon interval */
	t_u16 beacon_interval;
	/** Capabilities*/
	t_u16 capabilities;
} MLAN_PACK_END WLAN_802_11_FIXED_IEs;

/** WLAN_802_11_VARIABLE_IEs */
typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs {
	/** Element ID */
	t_u8 element_id;
	/** Length */
	t_u8 length;
	/** IE data */
	t_u8 data[1];
} MLAN_PACK_END WLAN_802_11_VARIABLE_IEs;

/** TLV related data structures*/
#if defined(STA_SUPPORT)
/** Pairwise Cipher Suite length */
#define PAIRWISE_CIPHER_SUITE_LEN 4
/** AKM Suite length */
#define AKM_SUITE_LEN 4
/** MFPC bit in RSN capability */
#define MFPC_BIT 7
/** MFPR bit in RSN capability */
#define MFPR_BIT 6
#endif
/** Bit mask for TxPD status field for null packet */
#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
/** Bit mask for TxPD status field for last packet */
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08

/** Bit mask for TxPD flags field for Tx status report */
#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)

/** Packet type: 802.11 */
#define PKT_TYPE_802DOT11 0x05
#define PKT_TYPE_MGMT_FRAME 0xE5
/** Packet type: AMSDU */
#define PKT_TYPE_AMSDU 0xE6
/** Packet type: BAR */
#define PKT_TYPE_BAR 0xE7

/** Packet type: debugging */
#define PKT_TYPE_DEBUG 0xEF

/** channel number at bit 5-13 */
#define RXPD_CHAN_MASK 0x3FE0
/** Rate control mask  15-23 */
#define TXPD_RATE_MASK 0xff8000
/** enable bw ctrl in TxPD */
#define TXPD_BW_ENABLE MBIT(20)
/** enable tx power ctrl in TxPD */
#define TXPD_TXPW_ENABLE MBIT(7)
/** sign of power */
#define TXPD_TXPW_NEGATIVE MBIT(6)
/** Enable Rate ctrl in TxPD */
#define TXPD_TXRATE_ENABLE MBIT(15)
/** enable retry limit in TxPD */
#define TXPD_RETRY_ENABLE MBIT(12)

/** TxPD descriptor */
typedef MLAN_PACK_START struct _TxPD {
	/** BSS type */
	t_u8 bss_type;
	/** BSS number */
	t_u8 bss_num;
	/** Tx packet length */
	t_u16 tx_pkt_length;
	/** Tx packet offset */
	t_u16 tx_pkt_offset;
	/** Tx packet type */
	t_u16 tx_pkt_type;
	/** Tx Control */
	t_u32 tx_control;
	/** Pkt Priority */
	t_u8 priority;
	/** Transmit Pkt Flags*/
	t_u8 flags;
	/** Amount of time the packet has been queued
	 * in the driver (units = 2ms)*/
	t_u8 pkt_delay_2ms;
	/** reserved */
	t_u8 reserved;
	/** Tx Control */
	t_u32 tx_control_1;
} MLAN_PACK_END TxPD, *PTxPD;

/** RxPD Descriptor */
typedef MLAN_PACK_START struct _RxPD {
	/** BSS type */
	t_u8 bss_type;
	/** BSS number */
	t_u8 bss_num;
	/** Rx Packet Length */
	t_u16 rx_pkt_length;
	/** Rx Pkt offset */
	t_u16 rx_pkt_offset;
	/** Rx packet type */
	t_u16 rx_pkt_type;
	/** Sequence number */
	t_u16 seq_num;
	/** Packet Priority */
	t_u8 priority;
	/** Rx Packet Rate */
	t_u8 rx_rate;
	/** SNR */
	t_s8 snr;
	/** Noise Floor */
	t_s8 nf;
	/** [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
	 *  [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 BW80 = 10 BW160
	 * = 11 [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 [Bit 5] STBC
	 * support Enabled = 1 [Bit 6] LDPC support Enabled = 1 [Bit 7] [Bit4,
	 * Bit7] AX Guard interval, 00, 01, 10 */
	t_u8 rate_info;
	/** Reserved */
	t_u8 reserved[3];
	/** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */
	t_u8 flags;
	/**For SD8887 antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 =
	 * 5G antenna; 0xff = invalid value */
	t_u8 antenna;
	/* [31:0] ToA of the rx packet, [63:32] ToD of the ack for the rx packet
	 * Both ToA and ToD are in nanoseconds */
	t_u64 toa_tod_tstamps;
	/** rx info */
	t_u32 rx_info;
} MLAN_PACK_END RxPD, *PRxPD;

/** IEEEtypes_FrameCtl_t*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t {
	/** Order */
	t_u8 order : 1;
	/** Wep */
	t_u8 wep : 1;
	/** More Data */
	t_u8 more_data : 1;
	/** Power Mgmt */
	t_u8 pwr_mgmt : 1;
	/** Retry */
	t_u8 retry : 1;
	/** More Frag */
	t_u8 more_frag : 1;
	/** From DS */
	t_u8 from_ds : 1;
	/** To DS */
	t_u8 to_ds : 1;
	/** Sub Type */
	t_u8 sub_type : 4;
	/** Type */
	t_u8 type : 2;
	/** Protocol Version */
	t_u8 protocol_version : 2;
} MLAN_PACK_END IEEEtypes_FrameCtl_t;
#else
typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t {
	/** Protocol Version */
	t_u8 protocol_version : 2;
	/** Type */
	t_u8 type : 2;
	/** Sub Type */
	t_u8 sub_type : 4;
	/** To DS */
	t_u8 to_ds : 1;
	/** From DS */
	t_u8 from_ds : 1;
	/** More Frag */
	t_u8 more_frag : 1;
	/** Retry */
	t_u8 retry : 1;
	/** Power Mgmt */
	t_u8 pwr_mgmt : 1;
	/** More Data */
	t_u8 more_data : 1;
	/** Wep */
	t_u8 wep : 1;
	/** Order */
	t_u8 order : 1;
} MLAN_PACK_END IEEEtypes_FrameCtl_t;
#endif

/** MrvlIETypes_MgmtFrameSet_t */
typedef MLAN_PACK_START struct _MrvlIETypes_MgmtFrameSet_t {
	/** Type */
	t_u16 type;
	/** Length */
	t_u16 len;
	/** Frame Control */
	IEEEtypes_FrameCtl_t frame_control;
	/* t_u8 frame_contents[]; */
} MLAN_PACK_END MrvlIETypes_MgmtFrameSet_t;

/** Beacon */
typedef MLAN_PACK_START struct _IEEEtypes_Beacon_t {
	/** time stamp */
	t_u8 time_stamp[8];
	/** beacon interval */
	t_u16 beacon_interval;
	/** cap info */
	t_u16 cap_info;
} MLAN_PACK_END IEEEtypes_Beacon_t;

/** Fixed size of station association event */
#define ASSOC_EVENT_FIX_SIZE 12

/** MrvlIEtypes_channel_band_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_channel_band_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Band Configuration */
	Band_Config_t bandcfg;
	/** channel */
	t_u8 channel;
} MLAN_PACK_END MrvlIEtypes_channel_band_t;

#ifdef UAP_SUPPORT
/** IEEEtypes_AssocRqst_t */
typedef MLAN_PACK_START struct _IEEEtypes_AssocRqst_t {
	/** Capability Info */
	t_u16 cap_info;
	/** Listen Interval */
	t_u16 listen_interval;
	/* t_u8 ie_buffer[]; */
} MLAN_PACK_END IEEEtypes_AssocRqst_t;

/** IEEEtypes_ReAssocRqst_t */
typedef MLAN_PACK_START struct _IEEEtypes_ReAssocRqst_t {
	/** Capability Info */
	t_u16 cap_info;
	/** Listen Interval */
	t_u16 listen_interval;
	/** Current AP Address */
	t_u8 current_ap_addr[MLAN_MAC_ADDR_LENGTH];
	/* t_u8 ie_buffer[]; */
} MLAN_PACK_END IEEEtypes_ReAssocRqst_t;
#endif /* UAP_SUPPORT */

/** wlan_802_11_header */
typedef MLAN_PACK_START struct _wlan_802_11_header {
	/** Frame Control */
	t_u16 frm_ctl;
	/** Duration ID */
	t_u16 duration_id;
	/** Address1 */
	mlan_802_11_mac_addr addr1;
	/** Address2 */
	mlan_802_11_mac_addr addr2;
	/** Address3 */
	mlan_802_11_mac_addr addr3;
	/** Sequence Control */
	t_u16 seq_ctl;
	/** Address4 */
	mlan_802_11_mac_addr addr4;
} MLAN_PACK_END wlan_802_11_header;

/** wlan_802_11_header packet from FW with length */
typedef MLAN_PACK_START struct _wlan_mgmt_pkt {
	/** Packet Length */
	t_u16 frm_len;
	/** wlan_802_11_header */
	wlan_802_11_header wlan_header;
} MLAN_PACK_END wlan_mgmt_pkt;

#ifdef STA_SUPPORT
/** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr) */
#define MAX_NO_OF_CHAN 40

/** Channel-power table entries */
typedef MLAN_PACK_START struct _chan_power_11d {
	/** 11D channel */
	t_u8 chan;
	/** Band for channel */
	t_u8 band;
	/** 11D channel power */
	t_u8 pwr;
	/** AP seen on channel */
	t_u8 ap_seen;
} MLAN_PACK_END chan_power_11d_t;

/** Region channel info */
typedef MLAN_PACK_START struct _parsed_region_chan_11d {
	/** 11D channel power per channel */
	chan_power_11d_t chan_pwr[MAX_NO_OF_CHAN];
	/** 11D number of channels */
	t_u8 no_of_chan;
} MLAN_PACK_END parsed_region_chan_11d_t;
#endif /* STA_SUPPORT */

/** ChanScanMode_t */
typedef MLAN_PACK_START struct _ChanScanMode_t {
#ifdef BIG_ENDIAN_SUPPORT
	/** Reserved */
	t_u8 reserved_7 : 1;
	/** First passive scan then active scan */
	t_u8 passive_to_active_scan : 1;
	/** First channel in scan */
	t_u8 first_chan : 1;
	/** Enable hidden ssid report */
	t_u8 hidden_ssid_report : 1;
	/** Enable probe response timeout */
	t_u8 rsp_timeout_en : 1;
	/** Multidomain scan mode */
	t_u8 multidomain_scan : 1;
	/** Disble channel filtering flag */
	t_u8 disable_chan_filt : 1;
	/** Channel scan mode passive flag */
	t_u8 passive_scan : 1;
#else
	/** Channel scan mode passive flag */
	t_u8 passive_scan : 1;
	/** Disble channel filtering flag */
	t_u8 disable_chan_filt : 1;
	/** Multidomain scan mode */
	t_u8 multidomain_scan : 1;
	/** Enable probe response timeout */
	t_u8 rsp_timeout_en : 1;
	/** Enable hidden ssid report */
	t_u8 hidden_ssid_report : 1;
	/** First channel in scan */
	t_u8 first_chan : 1;
	/** First passive scan then active scan */
	t_u8 passive_to_active_scan : 1;
	/** Reserved */
	t_u8 reserved_7 : 1;
#endif
} MLAN_PACK_END ChanScanMode_t;

/** ChanScanParamSet_t */
typedef MLAN_PACK_START struct _ChanScanParamSet_t {
	/** Channel scan parameter : band config */
	Band_Config_t bandcfg;
	/** Channel scan parameter : Channel number */
	t_u8 chan_number;
	/** Channel scan parameter : Channel scan mode */
	ChanScanMode_t chan_scan_mode;
	/** Channel scan parameter : Minimum scan time */
	t_u16 min_scan_time;
	/** Channel scan parameter : Maximum scan time */
	t_u16 max_scan_time;
} MLAN_PACK_END ChanScanParamSet_t;

/** MrvlIEtypes_ChanListParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_ChanListParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Channel scan parameters */
	ChanScanParamSet_t chan_scan_param[1];
} MLAN_PACK_END MrvlIEtypes_ChanListParamSet_t;

/** MrvlIEtypes_EESParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_EESParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** EES scan mode */
	t_u16 ees_mode;
	/** EES report condition */
	t_u16 report_cond;
	/** EES High Period scan interval */
	t_u16 high_period;
	/** EES High Period scan count */
	t_u16 high_period_count;
	/** EES Medium Period scan interval */
	t_u16 mid_period;
	/** EES Medium Period scan count */
	t_u16 mid_period_count;
	/** EES Low Period scan interval */
	t_u16 low_period;
	/** EES Low Period scan count */
	t_u16 low_period_count;
} MLAN_PACK_END MrvlIEtypes_EESParamSet_t;

/** MrvlIEtype_EESNetworkCfg_t */
typedef MLAN_PACK_START struct _MrvlIEtype_EESNetworkCfg_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Number of networks in the list */
	t_u8 network_count;
	/** Maximum number of connection */
	t_u8 max_conn_count;
	/** Black List Exp */
	t_u8 black_list_exp;
} MLAN_PACK_END MrvlIEtype_EESNetworkCfg_t;

/** ChanBandParamSet_t */
typedef struct _ChanBandParamSet_t {
	/** Channel scan parameter : band config */
	Band_Config_t bandcfg;
	/** Channel number */
	t_u8 chan_number;
} ChanBandParamSet_t;

/** MrvlIEtypes_ChanBandListParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_ChanBandListParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Channel Band parameters */
	ChanBandParamSet_t chan_band_param[1];
} MLAN_PACK_END MrvlIEtypes_ChanBandListParamSet_t;

/** MrvlIEtypes_RatesParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RatesParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Rates */
	t_u8 rates[1];
} MLAN_PACK_END MrvlIEtypes_RatesParamSet_t;

/** _MrvlIEtypes_Bssid_List_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_List_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** BSSID */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END MrvlIEtypes_Bssid_List_t;

/** MrvlIEtypes_SsIdParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_SsIdParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** SSID */
	t_u8 ssid[1];
} MLAN_PACK_END MrvlIEtypes_SsIdParamSet_t;

/**MrvlIEtypes_AssocType_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_HostMlme_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Authentication type */
	t_u8 host_mlme;
} MLAN_PACK_END MrvlIEtypes_HostMlme_t;

/** MrvlIEtypes_NumProbes_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Number of probes */
	t_u16 num_probes;
} MLAN_PACK_END MrvlIEtypes_NumProbes_t;

/** MrvlIEtypes_WildCardSsIdParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_WildCardSsIdParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Maximum SSID length */
	t_u8 max_ssid_length;
	/** SSID */
	t_u8 ssid[1];
} MLAN_PACK_END MrvlIEtypes_WildCardSsIdParamSet_t;

/**TSF data size */
#define TSF_DATA_SIZE 8
/** Table of TSF values returned in the scan result */
typedef MLAN_PACK_START struct _MrvlIEtypes_TsfTimestamp_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** the length of each TSF data is 8 bytes, could be multiple TSF here
	 */
	t_u8 tsf_data[1];
} MLAN_PACK_END MrvlIEtypes_TsfTimestamp_t;

/** CfParamSet_t */
typedef MLAN_PACK_START struct _CfParamSet_t {
	/** CF parameter : Count */
	t_u8 cfp_cnt;
	/** CF parameter : Period */
	t_u8 cfp_period;
	/** CF parameter : Duration */
	t_u16 cfp_max_duration;
	/** CF parameter : Duration remaining */
	t_u16 cfp_duration_remaining;
} MLAN_PACK_END CfParamSet_t;

/** IbssParamSet_t */
typedef MLAN_PACK_START struct _IbssParamSet_t {
	/** ATIM window value */
	t_u16 atim_window;
} MLAN_PACK_END IbssParamSet_t;

/** MrvlIEtypes_SsParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_SsParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** CF/IBSS parameters sets */
	union {
		/** CF parameter set */
		CfParamSet_t cf_param_set[1];
		/** IBSS parameter set */
		IbssParamSet_t ibss_param_set[1];
	} cf_ibss;
} MLAN_PACK_END MrvlIEtypes_SsParamSet_t;

/** FhParamSet_t */
typedef MLAN_PACK_START struct _FhParamSet_t {
	/** FH parameter : Dwell time */
	t_u16 dwell_time;
	/** FH parameter : Hop set */
	t_u8 hop_set;
	/** FH parameter : Hop pattern */
	t_u8 hop_pattern;
	/** FH parameter : Hop index */
	t_u8 hop_index;
} MLAN_PACK_END FhParamSet_t;

/** DsParamSet_t */
typedef MLAN_PACK_START struct _DsParamSet_t {
	/** Current channel number */
	t_u8 current_chan;
} MLAN_PACK_END DsParamSet_t;

/** MrvlIEtypes_PhyParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_PhyParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** FH/DS parameters */
	union {
		/** FH parameter set */
		FhParamSet_t fh_param_set[1];
		/** DS parameter set */
		DsParamSet_t ds_param_set[1];
	} fh_ds;
} MLAN_PACK_END MrvlIEtypes_PhyParamSet_t;

/* Auth type to be used in the Authentication portion of an Assoc seq */
/** MrvlIEtypes_AuthType_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_AuthType_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Authentication type */
	t_u16 auth_type;
} MLAN_PACK_END MrvlIEtypes_AuthType_t;

/** MrvlIEtypes_ScanChanGap_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_ScanChanGap_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Time gap in units to TUs to be used between
	 * two consecutive channels scan */
	t_u16 gap;
} MLAN_PACK_END MrvlIEtypes_ScanChanGap_t;

/** channel statictics */
typedef MLAN_PACK_START struct _chan_statistics_t {
	/** channle number */
	t_u8 chan_num;
	/** band info */
	Band_Config_t bandcfg;
	/** flags */
	t_u8 flags;
	/** noise */
	t_s8 noise;
	/** total network */
	t_u16 total_networks;
	/** scan duration */
	t_u16 cca_scan_duration;
	/** busy duration */
	t_u16 cca_busy_duration;
} MLAN_PACK_END chan_statistics_t;

/** channel statictics tlv */
typedef MLAN_PACK_START struct _MrvlIEtypes_ChannelStats_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** channel statictics */
	chan_statistics_t chanStat[];
} MLAN_PACK_END MrvlIEtypes_ChannelStats_t;

/** MrvlIETypes_ActionFrame_t */
typedef MLAN_PACK_START struct {
	MrvlIEtypesHeader_t header; /**< Header */

	t_u8 srcAddr[MLAN_MAC_ADDR_LENGTH];
	t_u8 dstAddr[MLAN_MAC_ADDR_LENGTH];

	IEEEtypes_ActionFrame_t actionFrame;

} MLAN_PACK_END MrvlIETypes_ActionFrame_t;

/** MrvlIEtypes_RxBaSync_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RxBaSync_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** mac address */
	t_u8 mac[MLAN_MAC_ADDR_LENGTH];
	/** tid */
	t_u8 tid;
	/** reserved field */
	t_u8 reserved;
	/** start seq num */
	t_u16 seq_num;
	/** bitmap len */
	t_u16 bitmap_len;
	/** bitmap */
	t_u8 bitmap[1];
} MLAN_PACK_END MrvlIEtypes_RxBaSync_t;

/** MrvlIEtypes_RsnParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RsnParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** RSN IE */
	t_u8 rsn_ie[];
} MLAN_PACK_END MrvlIEtypes_RsnParamSet_t;

/** MrvlIEtypes_SecurityCfg_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_SecurityCfg_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** enable 11w */
	t_u8 use_mfp;
} MLAN_PACK_END MrvlIEtypes_SecurityCfg_t;

/** Host Command ID : _HostCmd_DS_BEACON_STUCK_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_BEACON_STUCK_CFG {
	/** ACT_GET/ACT_SET */
	t_u8 action;
	/** No of beacon interval after which firmware will check if beacon Tx
	 * is going fine */
	t_u8 beacon_stuck_detect_count;
	/** Upon performing MAC reset, no of beacon interval after which
	 * firmware will check if recovery was successful */
	t_u8 recovery_confirm_count;
} MLAN_PACK_END HostCmd_DS_BEACON_STUCK_CFG;

/** Key Info flag for multicast key */
#define KEY_INFO_MCAST_KEY 0x01
/** Key Info flag for unicast key */
#define KEY_INFO_UCAST_KEY 0x02
/** Key Info flag for enable key */
#define KEY_INFO_ENABLE_KEY 0x04
/** Key Info flag for default key */
#define KEY_INFO_DEFAULT_KEY 0x08
/** Key Info flag for TX key */
#define KEY_INFO_TX_KEY 0x10
/** Key Info flag for RX key */
#define KEY_INFO_RX_KEY 0x20
#define KEY_INFO_CMAC_AES_KEY 0x400
/** PN size for WPA/WPA2 */
#define WPA_PN_SIZE 8
/** PN size for PMF IGTK */
#define IGTK_PN_SIZE 8
/** WAPI KEY size */
#define WAPI_KEY_SIZE 32
/** key params fix size */
#define KEY_PARAMS_FIXED_LEN 10
/** key index mask */
#define KEY_INDEX_MASK 0xf

/** wep_param */
typedef MLAN_PACK_START struct _wep_param_t {
	/** key_len */
	t_u16 key_len;
	/** wep key */
	t_u8 key[MAX_WEP_KEY_SIZE];
} MLAN_PACK_END wep_param_t;

/** tkip_param */
typedef MLAN_PACK_START struct _tkip_param {
	/** Rx packet num */
	t_u8 pn[WPA_PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** tkip key */
	t_u8 key[WPA_TKIP_KEY_LEN];
} MLAN_PACK_END tkip_param;

/** aes_param */
typedef MLAN_PACK_START struct _aes_param {
	/** Rx packet num */
	t_u8 pn[WPA_PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** aes key */
	t_u8 key[WPA_AES_KEY_LEN];
} MLAN_PACK_END aes_param;

/** wapi_param */
typedef MLAN_PACK_START struct _wapi_param {
	/** Rx packet num */
	t_u8 pn[PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** wapi key */
	t_u8 key[WAPI_KEY_SIZE];
} MLAN_PACK_END wapi_param;

/** cmac_aes_param */
typedef MLAN_PACK_START struct _cmac_aes_param {
	/** IGTK pn */
	t_u8 ipn[IGTK_PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** aes key */
	t_u8 key[CMAC_AES_KEY_LEN];
} MLAN_PACK_END cmac_aes_param;

/** gmac_param */
typedef MLAN_PACK_START struct _gcmp_param {
	/** GCMP pn */
	t_u8 pn[WPA_PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** aes key */
	t_u8 key[WPA_GCMP_KEY_LEN];
} MLAN_PACK_END gcmp_param;

/** ccmp256_param */
typedef MLAN_PACK_START struct _ccmp256_param {
	/** CCMP pn */
	t_u8 pn[WPA_PN_SIZE];
	/** key_len */
	t_u16 key_len;
	/** ccmp256 key */
	t_u8 key[WPA_CCMP_256_KEY_LEN];
} MLAN_PACK_END ccmp_256_param;

/** MrvlIEtype_KeyParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSetV2_t {
	/** Type ID */
	t_u16 type;
	/** Length of Payload */
	t_u16 length;
	/** mac address */
	t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** key index */
	t_u8 key_idx;
	/** Type of Key: WEP=0, TKIP=1, AES=2, WAPI=3 AES_CMAC=4 */
	t_u8 key_type;
	/** Key Control Info specific to a key_type_id */
	t_u16 key_info;
	union {
		/** wep key param */
		wep_param_t wep;
		/** tkip key param */
		tkip_param tkip;
		/** aes key param */
		aes_param aes;
		/** wapi key param */
		wapi_param wapi;
		/** IGTK key param */
		cmac_aes_param cmac_aes;
		/** gcmp key param */
		gcmp_param gcmp;
		/** ccmp 256 key parameters */
		ccmp_256_param ccmp256;
	} key_params;
} MLAN_PACK_END MrvlIEtype_KeyParamSetV2_t;

/** HostCmd_DS_802_11_KEY_MATERIAL */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_KEY_MATERIAL {
	/** Action */
	t_u16 action;
	/** Key parameter set */
	MrvlIEtype_KeyParamSetV2_t key_param_set;
} MLAN_PACK_END HostCmd_DS_802_11_KEY_MATERIAL;

/** HostCmd_DS_GTK_REKEY_PARAMS */
typedef MLAN_PACK_START struct _HostCmd_DS_GTK_REKEY_PARAMS {
	/** Action */
	t_u16 action;
	/** Key confirmation key */
	t_u8 kck[MLAN_KCK_LEN];
	/** Key encryption key */
	t_u8 kek[MLAN_KEK_LEN];
	/** Replay counter low 32 bit */
	t_u32 replay_ctr_low;
	/** Replay counter high 32 bit */
	t_u32 replay_ctr_high;
} MLAN_PACK_END HostCmd_DS_GTK_REKEY_PARAMS;

/** Data structure of WMM QoS information */
typedef MLAN_PACK_START struct _WmmQosInfo_t {
#ifdef BIG_ENDIAN_SUPPORT
	/** QoS UAPSD */
	t_u8 qos_uapsd : 1;
	/** Reserved */
	t_u8 reserved : 3;
	/** Parameter set count */
	t_u8 para_set_count : 4;
#else
	/** Parameter set count */
	t_u8 para_set_count : 4;
	/** Reserved */
	t_u8 reserved : 3;
	/** QoS UAPSD */
	t_u8 qos_uapsd : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmQosInfo_t, *pWmmQosInfo_t;

/** Data structure of WMM ECW */
typedef MLAN_PACK_START struct _WmmEcw_t {
#ifdef BIG_ENDIAN_SUPPORT
	/** Maximum Ecw */
	t_u8 ecw_max : 4;
	/** Minimum Ecw */
	t_u8 ecw_min : 4;
#else
	/** Minimum Ecw */
	t_u8 ecw_min : 4;
	/** Maximum Ecw */
	t_u8 ecw_max : 4;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmEcw_t, *pWmmEcw_t;

/** Data structure of WMM Aci/Aifsn */
typedef MLAN_PACK_START struct _WmmAciAifsn_t {
#ifdef BIG_ENDIAN_SUPPORT
	/** Reserved */
	t_u8 reserved : 1;
	/** Aci */
	t_u8 aci : 2;
	/** Acm */
	t_u8 acm : 1;
	/** Aifsn */
	t_u8 aifsn : 4;
#else
	/** Aifsn */
	t_u8 aifsn : 4;
	/** Acm */
	t_u8 acm : 1;
	/** Aci */
	t_u8 aci : 2;
	/** Reserved */
	t_u8 reserved : 1;
#endif /* BIG_ENDIAN_SUPPORT */
} MLAN_PACK_END WmmAciAifsn_t, *pWmmAciAifsn_t;

/** Data structure of WMM AC parameters  */
typedef MLAN_PACK_START struct _WmmAcParameters_t {
	WmmAciAifsn_t aci_aifsn; /**< AciAifSn */
	WmmEcw_t ecw; /**< Ecw */
	t_u16 tx_op_limit; /**< Tx op limit */
} MLAN_PACK_END WmmAcParameters_t, *pWmmAcParameters_t;

/** Data structure of WMM parameter  */
typedef MLAN_PACK_START struct _WmmParameter_t {
	/** OuiType:  00:50:f2:02 */
	t_u8 ouitype[4];
	/** Oui subtype: 01 */
	t_u8 ouisubtype;
	/** version: 01 */
	t_u8 version;
	/** QoS information */
	t_u8 qos_info;
	/** Reserved */
	t_u8 reserved;
	/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
	WmmAcParameters_t ac_params[MAX_AC_QUEUES];
} MLAN_PACK_END WmmParameter_t, *pWmmParameter_t;

/** Data structure of Host command WMM_PARAM_CFG  */
typedef MLAN_PACK_START struct _HostCmd_DS_WMM_PARAM_CONFIG {
	/** action */
	t_u16 action;
	/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
	WmmAcParameters_t ac_params[MAX_AC_QUEUES];
} MLAN_PACK_END HostCmd_DS_WMM_PARAM_CONFIG;

/* Definition of firmware host command */
/** HostCmd_DS_GEN */
typedef MLAN_PACK_START struct _HostCmd_DS_GEN {
	/** Command */
	t_u16 command;
	/** Size */
	t_u16 size;
	/** Sequence number */
	t_u16 seq_num;
	/** Result */
	t_u16 result;
} MLAN_PACK_END HostCmd_DS_GEN

	;

/** Size of HostCmd_DS_GEN */
#define S_DS_GEN sizeof(HostCmd_DS_GEN)

/** mod_group_setting */
typedef MLAN_PACK_START struct _mod_group_setting {
	/** modulation group */
	t_u8 mod_group;
	/** power */
	t_u8 power;
} MLAN_PACK_END mod_group_setting;

/** MrvlIETypes_ChanTRPCConfig_t */
typedef MLAN_PACK_START struct _MrvlIETypes_ChanTRPCConfig_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** start freq */
	t_u16 start_freq;
	/* channel width */
	t_u8 width;
	/** channel number */
	t_u8 chan_num;
	/** mode groups */
	mod_group_setting mod_group[];
} MLAN_PACK_END MrvlIETypes_ChanTRPCConfig_t;

/* HostCmd_DS_CHANNEL_TRPC_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_CHANNEL_TRPC_CONFIG {
	/** action */
	t_u16 action;
	/** 0/1/2/3 */
	t_u16 sub_band;
	/** chan TRPC config */
	MrvlIETypes_ChanTRPCConfig_t tlv[];
} MLAN_PACK_END HostCmd_DS_CHANNEL_TRPC_CONFIG;

typedef MLAN_PACK_START struct _HostCmd_DS_MEF_CFG {
	/** Criteria */
	t_u32 criteria;
	/** Number of entries */
	t_u16 nentries;
} MLAN_PACK_END HostCmd_DS_MEF_CFG;

#define MAX_NUM_STACK_BYTES 100
/** mef stack struct*/
typedef MLAN_PACK_START struct _mef_stack {
	/** length of byte*/
	t_u16 sp;
	/** data of filter items*/
	t_u8 byte[MAX_NUM_STACK_BYTES];
} MLAN_PACK_END mef_stack;

/** mef entry struct */
typedef MLAN_PACK_START struct _mef_entry_header {
	/**mode:1->hostsleep;2->non hostsleep mode*/
	t_u8 mode;
	/**action=0->discard and not wake host
	 * action=1->discard and wake host
	 * action=3->allow and wake host*/
	t_u8 action;
} MLAN_PACK_END mef_entry_header;

/** mef op struct is to help to generate mef data*/
typedef MLAN_PACK_START struct _mef_op {
	/** operand_type*/
	t_u8 operand_type;
	/** reserved*/
	t_u8 rsvd[3];
	/** data */
	t_u8 val[MAX_NUM_BYTE_SEQ + 1];
} MLAN_PACK_END mef_op;

/* HostCmd_DS_802_11_SLEEP_PERIOD */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PERIOD {
	/** ACT_GET/ACT_SET */
	t_u16 action;

	/** Sleep Period in msec */
	t_u16 sleep_pd;
} MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PERIOD;

/* HostCmd_DS_802_11_SLEEP_PARAMS */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PARAMS {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/** Sleep clock error in ppm */
	t_u16 error;
	/** Wakeup offset in usec */
	t_u16 offset;
	/** Clock stabilization time in usec */
	t_u16 stable_time;
	/** Control periodic calibration */
	t_u8 cal_control;
	/** Control the use of external sleep clock */
	t_u8 external_sleep_clk;
	/** Reserved field, should be set to zero */
	t_u16 reserved;
} MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PARAMS;

/** Sleep response control */
typedef enum _sleep_resp_ctrl {
	RESP_NOT_NEEDED = 0,
	RESP_NEEDED,
} sleep_resp_ctrl;

/** Structure definition for the new ieee power save parameters*/
typedef MLAN_PACK_START struct __ps_param {
	/** Null packet interval */
	t_u16 null_pkt_interval;
	/** Num dtims */
	t_u16 multiple_dtims;
	/** becaon miss interval */
	t_u16 bcn_miss_timeout;
	/** local listen interval */
	t_u16 local_listen_interval;
	/** Adhoc awake period */
	t_u16 adhoc_wake_period;
	/** mode - (0x01 - firmware to automatically choose PS_POLL or NULL
	 * mode, 0x02 - PS_POLL, 0x03 - NULL mode )
	 */
	t_u16 mode;
	/** Delay to PS in milliseconds */
	t_u16 delay_to_ps;
} MLAN_PACK_END ps_param;

/** Structure definition for the new auto deep sleep command */
typedef MLAN_PACK_START struct __auto_ds_param {
	/** Deep sleep inactivity timeout */
	t_u16 deep_sleep_timeout;
} MLAN_PACK_END auto_ds_param;

/** Structure definition for sleep confirmation in the new ps command */
typedef MLAN_PACK_START struct __sleep_confirm_param {
	/** response control 0x00 - response not needed, 0x01 - response needed
	 */
	t_u16 resp_ctrl;
} MLAN_PACK_END sleep_confirm_param;

/** bitmap for get auto deepsleep */
#define BITMAP_AUTO_DS 0x01
/** bitmap for sta power save */
#define BITMAP_STA_PS 0x10
/** bitmap for beacon timeout */
#define BITMAP_BCN_TMO 0x20
/** bitmap for uap inactivity based PS */
#define BITMAP_UAP_INACT_PS 0x100
/** bitmap for uap DTIM PS */
#define BITMAP_UAP_DTIM_PS 0x200
/** Structure definition for the new ieee power save parameters*/
typedef MLAN_PACK_START struct _auto_ps_param {
	/** bitmap for enable power save mode */
	t_u16 ps_bitmap;
	/* auto deep sleep parameter,
	 * sta power save parameter
	 * uap inactivity parameter
	 * uap DTIM parameter */
} MLAN_PACK_END auto_ps_param;

/** fix size for auto ps */
#define AUTO_PS_FIX_SIZE 4

/** TLV type : auto ds param */
#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x71) /* 0x0171 */
/** TLV type : ps param */
#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x72) /* 0x0172 */
/** TLV type : beacon timeout */
#define TLV_TYPE_BCN_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0x11F) /* 0x011F */

/** MrvlIEtypes_auto_ds_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_auto_ds_param_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** auto ds param */
	auto_ds_param param;
} MLAN_PACK_END MrvlIEtypes_auto_ds_param_t;

/** MrvlIEtypes_ps_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_ps_param_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** ps param */
	ps_param param;
} MLAN_PACK_END MrvlIEtypes_ps_param_t;

/** MrvlIEtypes_bcn_timeout_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_bcn_timeout_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Beacon miss timeout period window */
	t_u16 bcn_miss_tmo_window;
	/** Beacon miss timeout period */
	t_u16 bcn_miss_tmo_period;
	/** Beacon reacquire timeout period window */
	t_u16 bcn_rq_tmo_window;
	/** Beacon reacquire timeout period */
	t_u16 bcn_rq_tmo_period;
} MLAN_PACK_END MrvlIEtypes_bcn_timeout_t;

/** Structure definition for low power mode cfg command */
typedef MLAN_PACK_START struct _HostCmd_DS_LOW_POWER_MODE_CFG {
	/** Action */
	t_u16 action;
	/** Low power mode */
	t_u16 lpm;
} MLAN_PACK_END HostCmd_DS_LOW_POWER_MODE_CFG;

/** Structure definition for new power save command */
typedef MLAN_PACK_START struct _HostCmd_DS_PS_MODE_ENH {
	/** Action */
	t_u16 action;
	/** Data speciifc to action */
	/* For IEEE power save data will be as
	 * UINT16 mode (0x01 - firmware to automatically choose PS_POLL or NULL
	 * mode, 0x02 - PS_POLL, 0x03 - NULL mode ) UINT16 NullpacketInterval
	 * UINT16 NumDtims
	 * UINT16 BeaconMissInterval
	 * UINT16 locallisteninterval
	 * UINT16 adhocawakeperiod */

	/* For auto deep sleep */
	/* UINT16 Deep sleep inactivity timeout*/

	/* For PS sleep confirm
	 * UINT16 responeCtrl - 0x00 - reponse from fw not needed, 0x01 -
	 * response from fw is needed */

	union {
		/** PS param definition */
		ps_param opt_ps;
		/** Auto ds param definition */
		auto_ds_param auto_ds;
		/** Sleep comfirm param definition */
		sleep_confirm_param sleep_cfm;
		/** bitmap for get PS info and Disable PS mode */
		t_u16 ps_bitmap;
		/** auto ps param */
		auto_ps_param auto_ps;
	} params;
} MLAN_PACK_END HostCmd_DS_802_11_PS_MODE_ENH;

/** FW VERSION tlv */
#define TLV_TYPE_FW_VER_INFO (PROPRIETARY_TLV_BASE_ID + 0xC7) /* 0x1C7 */

/** MrvlIEtypes_fw_ver_info_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_fw_ver_info_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** API id */
	t_u16 api_id;
	/** major version */
	t_u8 major_ver;
	/** minor version */
	t_u8 minor_ver;
} MLAN_PACK_END MrvlIEtypes_fw_ver_info_t;

/** API ID */
enum API_VER_ID {
	KEY_API_VER_ID = 1,
	FW_API_VER_ID = 2,
	UAP_FW_API_VER_ID = 3,
	CHANRPT_API_VER_ID = 4,
};

/** FW AP V15 */
#define HOST_API_VERSION_V15 15
/** FW minor version 1 */
#define FW_MINOR_VERSION_1 1

/** UAP FW version 2 */
#define UAP_FW_VERSION_2 0x2

/** HostCMD_DS_APCMD_ACS_SCAN */
typedef MLAN_PACK_START struct _HostCMD_DS_APCMD_ACS_SCAN {
	/** band */
	Band_Config_t bandcfg;
	/** channel */
	t_u8 chan;
} MLAN_PACK_END HostCMD_DS_APCMD_ACS_SCAN;

/** HostCmd_DS_GET_HW_SPEC */
typedef MLAN_PACK_START struct _HostCmd_DS_GET_HW_SPEC {
	/** HW Interface version number */
	t_u16 hw_if_version;
	/** HW version number */
	t_u16 version;
	/** Reserved field */
	t_u16 reserved;
	/** Max no of Multicast address  */
	t_u16 num_of_mcast_adr;
	/** MAC address */
	t_u8 permanent_addr[MLAN_MAC_ADDR_LENGTH];
	/** Region Code */
	t_u16 region_code;
	/** Number of antenna used */
	t_u16 number_of_antenna;
	/** FW release number, example 0x1234=1.2.3.4 */
	t_u32 fw_release_number;
	/** Reserved field */
	t_u32 reserved_1;
	/** Reserved field */
	t_u32 reserved_2;
	/** Reserved field */
	t_u32 reserved_3;
	/** FW/HW Capability */
	t_u32 fw_cap_info;
	/** 802.11n Device Capabilities */
	t_u32 dot_11n_dev_cap;
	/** MIMO abstraction of MCSs supported by device */
	t_u8 dev_mcs_support;
	/** Valid end port at init */
	t_u16 mp_end_port;
	/** mgmt IE buffer count */
	t_u16 mgmt_buf_count;
	/** Reserved */
	t_u32 reserved_8;
	/** Reserved */
	t_u32 reserved_9;
	/** 802.11ac Device Capabilities */
	t_u32 Dot11acDevCap;
	/** MCSs supported by 802.11ac device */
	t_u32 Dot11acMcsSupport;
} MLAN_PACK_END HostCmd_DS_GET_HW_SPEC;

#ifdef SDIO
/* HostCmd_DS_SDIO_SP_RX_AGGR_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_SP_RX_AGGR_CFG {
	t_u8 action;
	t_u8 enable;
	t_u16 sdio_block_size;
} MLAN_PACK_END HostCmd_DS_SDIO_SP_RX_AGGR_CFG;
#endif

/**  HostCmd_DS_802_11_CFG_DATA */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_CFG_DATA {
	/** Action */
	t_u16 action;
	/** Type */
	t_u16 type;
	/** Data length */
	t_u16 data_len;
	/** Data */
} MLAN_PACK_END HostCmd_DS_802_11_CFG_DATA;

/**  HostCmd_DS_CMD_802_11_RSSI_INFO_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_EXT {
	/** Action */
	t_u16 action;
	/** Parameter used for exponential averaging for Data */
	t_u16 ndata;
	/** Parameter used for exponential averaging for Beacon */
	t_u16 nbcn;
	/** Last RSSI beacon TSF(only for Get action) */
	t_u64 tsfbcn;
	/** TLV info**/
	t_u8 *tlv_buf[];
} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_EXT;

/** TLV rssi info */
#define TLV_TYPE_RSSI_INFO (PROPRIETARY_TLV_BASE_ID + 0xe5) /* 0x01E5 */

/** MrvlIEtypes_eapol_pkt_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RSSI_EXT_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Path ID
	     [Bit1:Bit0] = [0:1]: path A
	     [Bit1:Bit0] = [1:0]: path B
	     [Bit1:Bit0] = [1:1]: combined signal of path A and path B
	     [Bit7:Bit2] : Reserved
	**/
	t_u16 path_id;
	/** Last Data RSSI in dBm */
	t_s16 data_rssi_last;
	/** Last Data NF in dBm */
	t_s16 data_nf_last;
	/** AVG DATA RSSI in dBm */
	t_s16 data_rssi_avg;
	/** AVG DATA NF in dBm */
	t_s16 data_nf_avg;
	/** Last BEACON RSSI in dBm */
	t_s16 bcn_rssi_last;
	/** Last BEACON NF in dBm */
	t_s16 bcn_nf_last;
	/** AVG BEACON RSSI in dBm */
	t_s16 bcn_rssi_avg;
	/** AVG BEACON NF in dBm */
	t_s16 bcn_nf_avg;
} MLAN_PACK_END MrvlIEtypes_RSSI_EXT_t;

/**  HostCmd_DS_CMD_802_11_RSSI_INFO */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO {
	/** Action */
	t_u16 action;
	/** Parameter used for exponential averaging for Data */
	t_u16 ndata;
	/** Parameter used for exponential averaging for Beacon */
	t_u16 nbcn;
	/** Reserved field 0 */
	t_u16 reserved[9];
	/** Reserved field 1 */
	t_u64 reserved_1;
} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO;

/** HostCmd_DS_802_11_RSSI_INFO_RSP */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_RSP {
	/** Action */
	t_u16 action;
	/** Parameter used for exponential averaging for Data */
	t_u16 ndata;
	/** Parameter used for exponential averaging for beacon */
	t_u16 nbcn;
	/** Last Data RSSI in dBm */
	t_s16 data_rssi_last;
	/** Last Data NF in dBm */
	t_s16 data_nf_last;
	/** AVG DATA RSSI in dBm */
	t_s16 data_rssi_avg;
	/** AVG DATA NF in dBm */
	t_s16 data_nf_avg;
	/** Last BEACON RSSI in dBm */
	t_s16 bcn_rssi_last;
	/** Last BEACON NF in dBm */
	t_s16 bcn_nf_last;
	/** AVG BEACON RSSI in dBm */
	t_s16 bcn_rssi_avg;
	/** AVG BEACON NF in dBm */
	t_s16 bcn_nf_avg;
	/** Last RSSI Beacon TSF */
	t_u64 tsf_bcn;
} MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_RSP;

/** HostCmd_DS_802_11_MAC_ADDRESS */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_MAC_ADDRESS {
	/** Action */
	t_u16 action;
	/** MAC address */
	t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END HostCmd_DS_802_11_MAC_ADDRESS;

/** HostCmd_DS_MAC_CONTROL */
typedef MLAN_PACK_START struct _HostCmd_DS_MAC_CONTROL {
	/** Action */
	t_u32 action;
} MLAN_PACK_END HostCmd_DS_MAC_CONTROL;

/** HostCmd_DS_CMD_TX_DATA_PAUSE */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_DATA_PAUSE {
	/** Action */
	t_u16 action;
	/** Enable/disable Tx data pause */
	t_u8 enable_tx_pause;
	/** Max number of TX buffers allowed for all PS clients*/
	t_u8 pause_tx_count;
} MLAN_PACK_END HostCmd_DS_CMD_TX_DATA_PAUSE;

/** TLV type : TX pause TLV */
#define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 0x94) /* 0x0194 */
/** MrvlIEtypes_SsIdParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_tx_pause_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** peer mac address */
	t_u8 peermac[MLAN_MAC_ADDR_LENGTH];
	/** Tx pause state, 1--pause, 0--free flowing */
	t_u8 tx_pause;
	/** total packets queued for the client */
	t_u8 pkt_cnt;
} MLAN_PACK_END MrvlIEtypes_tx_pause_t;

/**  HostCmd_CMD_MAC_MULTICAST_ADR */
typedef MLAN_PACK_START struct _HostCmd_DS_MAC_MULTICAST_ADR {
	/** Action */
	t_u16 action;
	/** Number of addresses */
	t_u16 num_of_adrs;
	/** List of MAC */
	t_u8 mac_list[MLAN_MAC_ADDR_LENGTH * MLAN_MAX_MULTICAST_LIST_SIZE];
} MLAN_PACK_END HostCmd_DS_MAC_MULTICAST_ADR;

/**  HostCmd_CMD_802_11_DEAUTHENTICATE */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_DEAUTHENTICATE {
	/** MAC address */
	t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** Deauthentication resaon code */
	t_u16 reason_code;
} MLAN_PACK_END HostCmd_DS_802_11_DEAUTHENTICATE;

/** HostCmd_DS_802_11_ASSOCIATE */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE {
	/** Peer STA address */
	t_u8 peer_sta_addr[MLAN_MAC_ADDR_LENGTH];
	/** Capability information */
	IEEEtypes_CapInfo_t cap_info;
	/** Listen interval */
	t_u16 listen_interval;
	/** Beacon period */
	t_u16 beacon_period;
	/** DTIM period */
	t_u8 dtim_period;

	/**
	 *  MrvlIEtypes_SsIdParamSet_t  SsIdParamSet;
	 *  MrvlIEtypes_PhyParamSet_t   PhyParamSet;
	 *  MrvlIEtypes_SsParamSet_t    SsParamSet;
	 *  MrvlIEtypes_RatesParamSet_t RatesParamSet;
	 */
} MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE;

/** HostCmd_CMD_802_11_ASSOCIATE response */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE_RSP {
	/** Association response structure */
	IEEEtypes_AssocRsp_t assoc_rsp;
} MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE_RSP;

/** HostCmd_DS_802_11_AD_HOC_START*/
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START {
	/** AdHoc SSID */
	t_u8 ssid[MLAN_MAX_SSID_LENGTH];
	/** BSS mode */
	t_u8 bss_mode;
	/** Beacon period */
	t_u16 beacon_period;
	/** DTIM period */
	t_u8 dtim_period;
	/** SS parameter set */
	IEEEtypes_SsParamSet_t ss_param_set;
	/** PHY parameter set */
	IEEEtypes_PhyParamSet_t phy_param_set;
	/** Reserved field */
	t_u16 reserved1;
	/** Capability information */
	IEEEtypes_CapInfo_t cap;
	/** Supported data rates */
	t_u8 DataRate[HOSTCMD_SUPPORTED_RATES];
} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START;

/**  HostCmd_CMD_802_11_AD_HOC_START response */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START_RESULT {
	/** Padding */
	t_u8 pad[3];
	/** AdHoc BSSID */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
	/** Padding to sync with FW structure*/
	t_u8 pad2[2];
	/** Result */
	t_u8 result;
} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START_RESULT;

/**  HostCmd_CMD_802_11_AD_HOC_START response */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN_RESULT {
	/** Result */
	t_u8 result;
} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN_RESULT;

/** AdHoc_BssDesc_t */
typedef MLAN_PACK_START struct _AdHoc_BssDesc_t {
	/** BSSID */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
	/** SSID */
	t_u8 ssid[MLAN_MAX_SSID_LENGTH];
	/** BSS mode */
	t_u8 bss_mode;
	/** Beacon period */
	t_u16 beacon_period;
	/** DTIM period */
	t_u8 dtim_period;
	/** Timestamp */
	t_u8 time_stamp[8];
	/** Local time */
	t_u8 local_time[8];
	/** PHY parameter set */
	IEEEtypes_PhyParamSet_t phy_param_set;
	/** SS parameter set */
	IEEEtypes_SsParamSet_t ss_param_set;
	/** Capability information */
	IEEEtypes_CapInfo_t cap;
	/** Supported data rates */
	t_u8 data_rates[HOSTCMD_SUPPORTED_RATES];

	/*
	 *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
	 *  It is used in the Adhoc join command and will cause a
	 *  binary layout mismatch with the firmware
	 */
} MLAN_PACK_END AdHoc_BssDesc_t;

/** HostCmd_DS_802_11_AD_HOC_JOIN */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN {
	/** AdHoc BSS descriptor */
	AdHoc_BssDesc_t bss_descriptor;
	/** Reserved field */
	t_u16 reserved1;
	/** Reserved field */
	t_u16 reserved2;
} MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN;

#if defined(SDIO)
/** Interrupt Raising Edge */
#define INT_RASING_EDGE 0
/** Interrupt Falling Edge */
#define INT_FALLING_EDGE 1

/** Delay 1 usec */
#define DELAY_1_US 1

typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_GPIO_INT_CONFIG {
	/** Action */
	t_u16 action;
	/** GPIO interrupt pin */
	t_u16 gpio_pin;
	/** GPIO interrupt edge, 1: failing edge; 0: raising edge */
	t_u16 gpio_int_edge;
	/** GPIO interrupt pulse widthin usec units */
	t_u16 gpio_pulse_width;
} MLAN_PACK_END HostCmd_DS_SDIO_GPIO_INT_CONFIG;
#endif /* GPIO_SDIO_INT_CTRL */

typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_PULL_CTRL {
	/** Action */
	t_u16 action;
	/** The delay of pulling up in us */
	t_u16 pull_up;
	/** The delay of pulling down in us */
	t_u16 pull_down;
} MLAN_PACK_END HostCmd_DS_SDIO_PULL_CTRL;

/** HostCmd_DS_802_11_GET_LOG */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG {
	/** Number of multicast transmitted frames */
	t_u32 mcast_tx_frame;
	/** Number of failures */
	t_u32 failed;
	/** Number of retries */
	t_u32 retry;
	/** Number of multiretries */
	t_u32 multiretry;
	/** Number of duplicate frames */
	t_u32 frame_dup;
	/** Number of RTS success */
	t_u32 rts_success;
	/** Number of RTS failure */
	t_u32 rts_failure;
	/** Number of acknowledgement failure */
	t_u32 ack_failure;
	/** Number of fragmented packets received */
	t_u32 rx_frag;
	/** Number of multicast frames received */
	t_u32 mcast_rx_frame;
	/** FCS error */
	t_u32 fcs_error;
	/** Number of transmitted frames */
	t_u32 tx_frame;
	/** Reserved field */
	t_u32 reserved;
	/** Number of WEP icv error for each key */
	t_u32 wep_icv_err_cnt[4];
	/** Beacon received count */
	t_u32 bcn_rcv_cnt;
	/** Beacon missed count */
	t_u32 bcn_miss_cnt;
	/** Tx frag count */
	t_u32 tx_frag_cnt;
	/** Qos Tx frag count */
	t_u32 qos_tx_frag_cnt[8];
	/** Qos failed count */
	t_u32 qos_failed_cnt[8];
	/** Qos retry count */
	t_u32 qos_retry_cnt[8];
	/** Qos multi retry count */
	t_u32 qos_multi_retry_cnt[8];
	/** Qos frame dup count */
	t_u32 qos_frm_dup_cnt[8];
	/** Qos rts success count */
	t_u32 qos_rts_suc_cnt[8];
	/** Qos rts failure count */
	t_u32 qos_rts_failure_cnt[8];
	/** Qos ack failure count */
	t_u32 qos_ack_failure_cnt[8];
	/** Qos Rx frag count */
	t_u32 qos_rx_frag_cnt[8];
	/** Qos Tx frame count */
	t_u32 qos_tx_frm_cnt[8];
	/** Qos discarded frame count */
	t_u32 qos_discarded_frm_cnt[8];
	/** Qos mpdus Rx count */
	t_u32 qos_mpdus_rx_cnt[8];
	/** Qos retry rx count */
	t_u32 qos_retries_rx_cnt[8];
	/** CMAC ICV errors count */
	t_u32 cmacicv_errors;
	/** CMAC replays count */
	t_u32 cmac_replays;
	/** mgmt CCMP replays count */
	t_u32 mgmt_ccmp_replays;
	/** TKIP ICV errors count */
	t_u32 tkipicv_errors;
	/** TKIP replays count */
	t_u32 tkip_replays;
	/** CCMP decrypt errors count */
	t_u32 ccmp_decrypt_errors;
	/** CCMP replays count */
	t_u32 ccmp_replays;
	/** Tx amsdu count */
	t_u32 tx_amsdu_cnt;
	/** failed amsdu count */
	t_u32 failed_amsdu_cnt;
	/** retry amsdu count */
	t_u32 retry_amsdu_cnt;
	/** multi-retry amsdu count */
	t_u32 multi_retry_amsdu_cnt;
	/** Tx octets in amsdu count */
	t_u64 tx_octets_in_amsdu_cnt;
	/** amsdu ack failure count */
	t_u32 amsdu_ack_failure_cnt;
	/** Rx amsdu count */
	t_u32 rx_amsdu_cnt;
	/** Rx octets in amsdu count */
	t_u64 rx_octets_in_amsdu_cnt;
	/** Tx ampdu count */
	t_u32 tx_ampdu_cnt;
	/** tx mpdus in ampdu count */
	t_u32 tx_mpdus_in_ampdu_cnt;
	/** tx octets in ampdu count */
	t_u64 tx_octets_in_ampdu_cnt;
	/** ampdu Rx count */
	t_u32 ampdu_rx_cnt;
	/** mpdu in Rx ampdu count */
	t_u32 mpdu_in_rx_ampdu_cnt;
	/** Rx octets ampdu count */
	t_u64 rx_octets_in_ampdu_cnt;
	/** ampdu delimiter CRC error count */
	t_u32 ampdu_delimiter_crc_error_cnt;
} MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;

/* maln wifi rate */
typedef MLAN_PACK_START struct _mlan_wifi_rate {
	/** 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */
	t_u8 preamble;
	/** 0:1x1, 1:2x2, 3:3x3, 4:4x4 */
	t_u8 nss;
	/** 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */
	t_u8 bw;
	/** OFDM/CCK rate code would be as per ieee std in the units of 0.5mbps
	 */
	/** HT/VHT it would be mcs index */
	t_u8 rateMcsIdx;
	/** units of 100 Kbps */
	t_u32 bitrate;
} MLAN_PACK_START mlan_wifi_rate;

/** channel information */
typedef MLAN_PACK_START struct {
	/** channel width (20, 40, 80, 80+80, 160) */
	t_u32 width;
	/** primary 20 MHz channel */
	t_u32 center_freq;
	/** center frequency (MHz) first segment */
	t_u32 center_freq0;
	/** center frequency (MHz) second segment */
	t_u32 center_freq1;
} MLAN_PACK_END mlan_wifi_channel_info;

/** channel statistics */
typedef MLAN_PACK_START struct {
	/** channel */
	mlan_wifi_channel_info channel;
	/** msecs the radio is awake (32 bits number accruing over time) */
	t_u32 on_time;
	/** msecs the CCA register is busy (32 bits number accruing over time)
	 */
	t_u32 cca_busy_time;
} MLAN_PACK_END mlan_wifi_channel_stat;

/** radio statistics */
typedef MLAN_PACK_START struct {
	/** supported wifi in case of multi radio */
	t_u32 radio;
	/** msecs the radio is awake */
	t_u32 on_time;
	/** msecs the radio is transmitting */
	t_u32 tx_time;
	/**  TBD: num_tx_levels: number of radio transmit power levels */
	t_u32 reserved0;
	/** TBD: tx_time_per_levels: pointer to an array of radio transmit per
	 * power levels in msecs accured over time */
	t_u32 reserved1;
	/** msecs the radio is in active receive */
	t_u32 rx_time;
	/** msecs the radio is awake due to all scan */
	t_u32 on_time_scan;
	/** msecs the radio is awake due to NAN */
	t_u32 on_time_nbd;
	/** msecs the radio is awake due to G?scan */
	t_u32 on_time_gscan;
	/** msecs the radio is awake due to roam?scan */
	t_u32 on_time_roam_scan;
	/** msecs the radio is awake due to PNO scan */
	t_u32 on_time_pno_scan;
	/** msecs the radio is awake due to HS2.0 scans and GAS exchange */
	t_u32 on_time_hs20;
	/** number of channels */
	t_u32 num_channels;
	/** channel statistics */
	mlan_wifi_channel_stat channels[MAX_NUM_CHAN]; // support only 1
						       // channel, so keep it.
} MLAN_PACK_END mlan_wifi_radio_stat;

/** per rate statistics */
typedef MLAN_PACK_START struct {
	/** rate information */
	mlan_wifi_rate rate;
	/** number of successfully transmitted data pkts (ACK rcvd) */
	t_u32 tx_mpdu;
	/** number of received data pkts */
	t_u32 rx_mpdu;
	/** number of data packet losses (no ACK) */
	t_u32 mpdu_lost;
	/** total number of data pkt retries */
	t_u32 retries;
	/** number of short data pkt retries */
	t_u32 retries_short;
	/** number of long data pkt retries */
	t_u32 retries_long;
} MLAN_PACK_END mlan_wifi_rate_stat;

/** per peer statistics */
typedef MLAN_PACK_START struct {
	/** peer type (AP, TDLS, GO etc.) */
	t_u8 type;
	/** mac address */
	t_u8 peer_mac_address[6];
	/** peer WIFI_CAPABILITY_XXX */
	t_u32 capabilities;
	/** number of rates */
	t_u32 num_rate;
	/** per rate statistics, number of entries  = num_rate */
	mlan_wifi_rate_stat rate_stats[];
} MLAN_PACK_END mlan_wifi_peer_info;

/* per access category statistics */
typedef MLAN_PACK_START struct {
	/** access category (VI, VO, BE, BK) */
	t_u32 ac;
	/** number of successfully transmitted unicast data pkts (ACK rcvd) */
	t_u32 tx_mpdu;
	/** number of received unicast mpdus */
	t_u32 rx_mpdu;
	/** number of succesfully transmitted multicast data packets */
	/** STA case: implies ACK received from AP for the unicast packet in
	 * which mcast pkt was sent */
	t_u32 tx_mcast;
	/** number of received multicast data packets */
	t_u32 rx_mcast;
	/** number of received unicast a-mpdus */
	t_u32 rx_ampdu;
	/** number of transmitted unicast a-mpdus */
	t_u32 tx_ampdu;
	/** number of data pkt losses (no ACK) */
	t_u32 mpdu_lost;
	/** total number of data pkt retries */
	t_u32 retries;
	/** number of short data pkt retries */
	t_u32 retries_short;
	/** number of long data pkt retries */
	t_u32 retries_long;
	/** data pkt min contention time (usecs) */
	t_u32 contention_time_min;
	/** data pkt max contention time (usecs) */
	t_u32 contention_time_max;
	/** data pkt avg contention time (usecs) */
	t_u32 contention_time_avg;
	/** num of data pkts used for contention statistics */
	t_u32 contention_num_samples;
} MLAN_PACK_END mlan_wifi_wmm_ac_stat;

/** interface statistics */
typedef MLAN_PACK_START struct {
	/** access point beacon received count from connected AP */
	t_u32 beacon_rx;
	/** Average beacon offset encountered (beacon_TSF - TBTT)
	 *    the average_tsf_offset field is used so as to calculate the
	 *    typical beacon contention time on the channel as well may be
	 *    used to debug beacon synchronization and related power consumption
	 * issue
	 */
	t_u64 average_tsf_offset;
	/** indicate that this AP typically leaks packets beyond the driver
	 * guard time */
	t_u32 leaky_ap_detected;
	/** average number of frame leaked by AP after frame with PM bit set was
	 * ACK'ed by AP */
	t_u32 leaky_ap_avg_num_frames_leaked;
	/** Guard time currently in force (when implementing IEEE power
	 * management based on frame control PM bit), How long driver waits
	 * before shutting down the radio and after receiving an ACK for a data
	 * frame with PM bit set)
	 */
	t_u32 leaky_ap_guard_time;
	/** access point mgmt frames received count from connected AP (including
	 * Beacon) */
	t_u32 mgmt_rx;
	/** action frames received count */
	t_u32 mgmt_action_rx;
	/** action frames transmit count */
	t_u32 mgmt_action_tx;
	/** access Point Beacon and Management frames RSSI (averaged) */
	t_u32 rssi_mgmt;
	/** access Point Data Frames RSSI (averaged) from connected AP */
	t_u32 rssi_data;
	/** access Point ACK RSSI (averaged) from connected AP */
	t_u32 rssi_ack;
	/** per ac data packet statistics */
	mlan_wifi_wmm_ac_stat ac[MAX_AC_QUEUES];
	/** number of peers */
	t_u32 num_peers;
	/** per peer statistics */
	mlan_wifi_peer_info peer_info[];
} MLAN_PACK_END mlan_wifi_iface_stat;

/** MrvlIETypes_llStatIface_t */
typedef MLAN_PACK_START struct _MrvlIETypes_llStatIface_t {
	/** Type */
	t_u16 type;
	/** Length */
	t_u16 len;
	/** Frame Control */
	mlan_wifi_iface_stat ifaceStat;
	/* t_u8 frame_contents[]; */
} MLAN_PACK_END MrvlIETypes_llStatIface_t;

/** MrvlIETypes_llStatRadio_t */
typedef MLAN_PACK_START struct _MrvlIETypes_llStatRadio_t {
	/** Type */
	t_u16 type;
	/** Length */
	t_u16 len;
	/** Frame Control */
	mlan_wifi_radio_stat radioStat[MAX_RADIO];
	/* t_u8 frame_contents[]; */
} MLAN_PACK_END MrvlIETypes_llStatRadio_t;

#define TYPE_IFACE_STAT MBIT(0)
#define TYPE_RADIO_STAT MBIT(1)
#define TYPE_PEER_INFO MBIT(2)
/** HostCmd_DS_802_11_LINK_STATISTIC */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_LINK_STATISTIC {
	/** Action : HostCmd_ACT_GEN_GET/SET/REMOVE */
	t_u16 action;
	/** statistic which would be get in action HostCmd_ACT_GEN_GET :
	 * TYPE_IFACE_STAT/RADIO_STAT/PEER_INFO */
	t_u16 stat_type;
	/* threshold to classify the pkts as short or long, packet size <
	 * mpdu_size_threshold => short */
	t_u32 mpdu_size_threshold;
	/* set for field debug mode. Driver should collect all statistics
	 * regardless of performance impact. */
	t_u32 aggressive_statistics_gathering;
	/** Value */
	t_u8 value[];
} MLAN_PACK_END HostCmd_DS_802_11_LINK_STATISTIC;

/**_HostCmd_TX_RATE_QUERY */
typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY {
	/** Tx rate */
	t_u8 tx_rate;
	/** Tx Rate Info:
	 * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
	 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
	 * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
	 * [Bit4,Bit7] AX Guard Interval: 00, 01, 02 */
	t_u8 tx_rate_info;
	/**
	 * BIT0: DCM
	 * BIT3-BIT1: tone mode
	 **  000: 26  tone
	 **  001: 52  tone
	 **  010: 106 tone
	 **  011: 242 tone
	 **  100: 484 tone
	 **  101: 996 tone
	 * BIT7-BIT4: resvd
	 **/
	t_u8 ext_tx_rate_info;
} MLAN_PACK_END HostCmd_TX_RATE_QUERY;

typedef MLAN_PACK_START struct _hs_config_param {
	/** bit0=1: broadcast data
	 * bit1=1: unicast data
	 * bit2=1: mac events
	 * bit3=1: multicast data
	 */
	t_u32 conditions;
	/** GPIO pin or 0xff for interface */
	t_u8 gpio;
	/** gap in milliseconds or or 0xff for special setting when
	 *  GPIO is used to wakeup host
	 */
	t_u8 gap;
} MLAN_PACK_END hs_config_param;

/** HS Action 0x0001 - Configure enhanced host sleep mode,
 * 0x0002 - Activate enhanced host sleep mode
 */
typedef enum _Host_Sleep_Action {
	HS_CONFIGURE = 0x0001,
	HS_ACTIVATE = 0x0002,
} Host_Sleep_Action;

/** Structure definition for activating enhanced hs */
typedef MLAN_PACK_START struct __hs_activate_param {
	/** response control 0x00 - response not needed, 0x01 - response needed
	 */
	t_u16 resp_ctrl;
} MLAN_PACK_END hs_activate_param;

/** HostCmd_DS_802_11_HS_CFG_ENH */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_HS_CFG_ENH {
	/** Action 0x0001 - Configure enhanced host sleep mode,
	 *  0x0002 - Activate enhanced host sleep mode
	 */
	t_u16 action;

	union {
		/** Configure enhanced hs */
		hs_config_param hs_config;
		/** Activate enhanced hs */
		hs_activate_param hs_activate;
	} params;
} MLAN_PACK_END HostCmd_DS_802_11_HS_CFG_ENH;

/** HostCmd_CMD_802_11_ROBUSTCOEX */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ROBUSTCOEX {
	/** Action */
	t_u16 action;
	/** RSVD */
	t_u16 rsvd;
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_802_11_ROBUSTCOEX;

/** HostCmd_CMD_DMCS_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_DMCS_CFG {
	/** Action */
	t_u16 action;
	/** SubCmd of DMCS */
	t_u16 subcmd;
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_DMCS_CFG;

#if defined(PCIE)
/** HostCmd_CMD_SSU */
typedef MLAN_PACK_START struct _HostCmd_DS_SSU_CFG {
	/** Action */
	t_u16 action;
	/** # of FFT sample to skip */
	t_u32 nskip;
	/** # of FFT sample selected to dump */
	t_u32 nsel;
	/** Down sample ADC input for buffering */
	t_u32 adcdownsample;
	/** Mask Out ADC Data From Spectral Packet */
	t_u32 mask_adc_pkt;
	/** Enable 16-Bit FFT Output Data Precision in Spectral Packet */
	t_u32 out_16bits;
	/** Enable power spectrum in dB for spectral packet */
	t_u32 spec_pwr_enable;
	/** Enable Spectral Packet Rate Reduction in dB output format */
	t_u32 rate_deduction;
	/** # of Spectral packets over which spectral data to be averaged */
	t_u32 n_pkt_avg;
	/** ret: Calculated fft length in dw */
	t_u32 fft_len;
	/** ret: Calculated adc length in dw */
	t_u32 adc_len;
	/** ret: Calculated record length in dw */
	t_u32 rec_len;
	/** Mapped address of DMA buffer */
	t_u32 buffer_base_addr[2];
	/** Total size of allocated buffer for SSU DMA */
	t_u32 buffer_pool_size;
	/** ret: Calculated buffer numbers */
	t_u32 number_of_buffers;
	/** ret: Calculated buffer size in byte for each descriptor */
	t_u32 buffer_size;
} MLAN_PACK_END HostCmd_DS_SSU_CFG;
#endif

/** SNMP_MIB_INDEX */
typedef enum _SNMP_MIB_INDEX {
	OpRateSet_i = 1,
	DtimPeriod_i = 3,
	RtsThresh_i = 5,
	ShortRetryLim_i = 6,
	LongRetryLim_i = 7,
	FragThresh_i = 8,
	Dot11D_i = 9,
	Dot11H_i = 10,
	WwsMode_i = 17,
	Thermal_i = 34,
	NullPktPeriod_i = 37,
	SignalextEnable_i = 41,
	ECSAEnable_i = 42,
	StopDeauth_i = 44,
} SNMP_MIB_INDEX;

/** max SNMP buf size */
#define MAX_SNMP_BUF_SIZE 128

#ifdef UAP_SUPPORT
/**  HostCmd_CMD_802_11_SNMP_MIB */
typedef MLAN_PACK_START struct _HostCmd_DS_UAP_802_11_SNMP_MIB {
	/** SNMP query type */
	t_u16 query_type;
	/** snmp oid buf */
	t_u8 snmp_data[];
} MLAN_PACK_END HostCmd_DS_UAP_802_11_SNMP_MIB;
#endif

/**  HostCmd_CMD_802_11_SNMP_MIB */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SNMP_MIB {
	/** SNMP query type */
	t_u16 query_type;
	/** SNMP object ID */
	t_u16 oid;
	/** SNMP buffer size */
	t_u16 buf_size;
	/** Value */
	t_u8 value[1];
} MLAN_PACK_END HostCmd_DS_802_11_SNMP_MIB;

/** Radio on */
#define RADIO_ON 0x01
/** Radio off */
#define RADIO_OFF 0x00

/** HostCmd_CMD_802_11_RADIO_CONTROL */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RADIO_CONTROL {
	/** Action */
	t_u16 action;
	/** Control */
	t_u16 control;
} MLAN_PACK_END HostCmd_DS_802_11_RADIO_CONTROL;

/** MrvlRateScope_t */
typedef MLAN_PACK_START struct _MrvlRateScope_t {
	/** Header Type */
	t_u16 type;
	/** Header Length */
	t_u16 length;
	/** Bitmap of HR/DSSS rates */
	t_u16 hr_dsss_rate_bitmap;
	/** Bitmap of OFDM rates */
	t_u16 ofdm_rate_bitmap;
	/** Bitmap of HT-MCSs allowed for initial rate */
	t_u16 ht_mcs_rate_bitmap[8];
	t_u16 vht_mcs_rate_bitmap[8];
	t_u16 he_mcs_rate_bitmap[8];
} MLAN_PACK_END MrvlRateScope_t;

/** MrvlRateDropPattern_t */
typedef MLAN_PACK_START struct _MrvlRateDropPattern_t {
	/** Header Type */
	t_u16 type;
	/** Header Length */
	t_u16 length;
	/** Rate Drop Mode */
	t_u32 rate_drop_mode;
	/* MrvlRateDropControl_t RateDropControl[]; */
} MLAN_PACK_END MrvlRateDropPattern_t;

typedef MLAN_PACK_START struct _MrvlIETypes_rate_setting_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Rate Setting */
	t_u16 rate_setting;
} MLAN_PACK_END MrvlIETypes_rate_setting_t;

/** HostCmd_DS_TX_RATE_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG {
	/** Action */
	t_u16 action;
	t_u16 reserved_1;
	/* MrvlRateScope_t RateScope;
	 * MrvlRateDropPattern_t RateDrop; */
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_TX_RATE_CFG;

/** Power_Group_t */
typedef MLAN_PACK_START struct _Power_Group_t {
	/** Modulation Class */
	t_u8 modulation_class;
	/** MCS Code or Legacy RateID */
	t_u8 first_rate_code;
	/** MCS Code or Legacy RateID */
	t_u8 last_rate_code;
	/** Power Adjustment Step */
	t_s8 power_step;
	/** Minimal Tx Power Level [dBm] */
	t_s8 power_min;
	/** Maximal Tx Power Level [dBm] */
	t_s8 power_max;
	/** 0: HTBW20, 1: HTBW40 */
	t_u8 ht_bandwidth;
	/** Reserved */
	t_u8 reserved;
} MLAN_PACK_END Power_Group_t;

/** MrvlTypes_Power_Group_t */
typedef MLAN_PACK_START struct _MrvlTypes_Power_Group_t {
	/** Header Type */
	t_u16 type;
	/** Header Length */
	t_u16 length;
	/* Power_Group_t PowerGroups */
} MLAN_PACK_END MrvlTypes_Power_Group_t;

/** HostCmd_CMD_TXPWR_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_TXPWR_CFG {
	/** Action */
	t_u16 action;
	/** Power group configuration index */
	t_u16 cfg_index;
	/** Power group configuration mode */
	t_u32 mode;
	/* MrvlTypes_Power_Group_t PowerGrpCfg[]*/
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_TXPWR_CFG;

/** HostCmd_CMD_802_11_RF_TX_POWER */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_TX_POWER {
	/** Action */
	t_u16 action;
	/** Current power level */
	t_s16 current_level;
	/** Maximum power */
	t_s8 max_power;
	/** Minimum power */
	t_s8 min_power;
} MLAN_PACK_END HostCmd_DS_802_11_RF_TX_POWER;

/** Connection type infra */
#define CONNECTION_TYPE_INFRA 0
/** Connection type adhoc */
#define CONNECTION_TYPE_ADHOC 1
#ifdef WIFI_DIRECT_SUPPORT
/** BSS Mode: WIFIDIRECT Client */
#define BSS_MODE_WIFIDIRECT_CLIENT 0
/** BSS Mode: WIFIDIRECT GO */
#define BSS_MODE_WIFIDIRECT_GO 2
#endif
/** HostCmd_DS_SET_BSS_MODE */
typedef MLAN_PACK_START struct _HostCmd_DS_SET_BSS_MODE {
	/** connection type */
	t_u8 con_type;
} MLAN_PACK_END HostCmd_DS_SET_BSS_MODE;

/** HT Capabilities element */
typedef MLAN_PACK_START struct _MrvlIETypes_HTCap_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** HTCap struct */
	HTCap_t ht_cap;
} MLAN_PACK_END MrvlIETypes_HTCap_t;
/** VHT Capabilities element */
typedef MLAN_PACK_START struct _MrvlIETypes_VHTCap_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** VHTCap struct */
	VHT_capa_t vht_cap;
} MLAN_PACK_END MrvlIETypes_VHTCap_t;

/** HostCmd_DS_REMAIN_ON_CHANNEL */
typedef MLAN_PACK_START struct _HostCmd_DS_REMAIN_ON_CHANNEL {
	/** Action 0-GET, 1-SET, 4 CLEAR*/
	t_u16 action;
	/** Not used set to zero */
	t_u8 status;
	/** Not used set to zero */
	t_u8 reserved;
	/** Band cfg */
	Band_Config_t bandcfg;
	/** channel */
	t_u8 channel;
	/** remain time: Unit ms*/
	t_u32 remain_period;
} MLAN_PACK_END HostCmd_DS_REMAIN_ON_CHANNEL;

#ifdef WIFI_DIRECT_SUPPORT
/** HostCmd_DS_WIFI_DIRECT_MODE */
typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_MODE {
	/** Action 0-GET, 1-SET*/
	t_u16 action;
	/**0:disable 1:listen 2:GO 3:p2p client 4:find 5:stop find*/
	t_u16 mode;
} MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_MODE;

/** MrvlIEtypes_NoA_setting_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_NoA_setting_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** enable/disable */
	t_u8 enable;
	/** index */
	t_u16 index;
	/** NoA count */
	t_u8 noa_count;
	/** NoA duration */
	t_u32 noa_duration;
	/** NoA interval */
	t_u32 noa_interval;
} MLAN_PACK_END MrvlIEtypes_NoA_setting_t;

/** MrvlIEtypes_NoA_setting_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_OPP_PS_setting_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** enable/disable && ct_window */
	t_u8 enable;
} MLAN_PACK_END MrvlIEtypes_OPP_PS_setting_t;

/** HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG {
	/** Action 0-GET, 1-SET */
	t_u16 action;
	/** MrvlIEtypes_NoA_setting_t
	 *  MrvlIEtypes_OPP_PS_setting_t
	 */
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG;
#endif

MLAN_PACK_START struct coalesce_filt_field_param {
	t_u8 operation;
	t_u8 operand_len;
	t_u16 offset;
	t_u8 operand_byte_stream[4];
} MLAN_PACK_END;

MLAN_PACK_START struct coalesce_receive_filt_rule {
	MrvlIEtypesHeader_t header;
	t_u8 num_of_fields;
	t_u8 pkt_type;
	t_u16 max_coalescing_delay;
	struct coalesce_filt_field_param params[];
} MLAN_PACK_END;

/** HostCmd_DS_COALESCE_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_COALESCE_CONFIG {
	/** Action 0-GET, 1-SET */
	t_u16 action;
	t_u16 num_of_rules;
	struct coalesce_receive_filt_rule rule[];
} MLAN_PACK_END HostCmd_DS_COALESCE_CONFIG;

/** TLV type : FW support max connection TLV */
#define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 0x117) /* 0x0217 */
/** MrvlIEtypes_Max_Conn_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Max_Conn_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** FW support max P2P connection */
	t_u8 max_p2p_conn;
	/** FW support max STA connection */
	t_u8 max_sta_conn;
} MLAN_PACK_END MrvlIEtypes_Max_Conn_t;

/** exceed max p2p connection event */
typedef MLAN_PACK_START struct _event_exceed_max_p2p_conn {
	/** Event ID */
	t_u16 event_id;
	/** BSS index number for multiple BSS support */
	t_u8 bss_index;
	/** BSS type */
	t_u8 bss_type;
	/** When exceed max, the mac address who request p2p connect */
	t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END event_exceed_max_p2p_conn;

#ifdef STA_SUPPORT

/**
 * @brief Structure used internally in the wlan driver to configure a scan.
 *
 * Sent to the command process module to configure the firmware
 *   scan command prepared by wlan_cmd_802_11_scan.
 *
 * @sa wlan_scan_networks
 *
 */
typedef MLAN_PACK_START struct _wlan_scan_cmd_config {
	/**
	 *  BSS Type to be sent in the firmware command
	 *
	 *  Field can be used to restrict the types of networks returned in the
	 *    scan.  Valid settings are:
	 *
	 *   - MLAN_SCAN_MODE_BSS  (infrastructure)
	 *   - MLAN_SCAN_MODE_IBSS (adhoc)
	 *   - MLAN_SCAN_MODE_ANY  (unrestricted, adhoc and infrastructure)
	 */
	t_u8 bss_mode;

	/**
	 *  Specific BSSID used to filter scan results in the firmware
	 */
	t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH];

	/**
	 *  Length of TLVs sent in command starting at tlvBuffer
	 */
	t_u32 tlv_buf_len;

	/**
	 *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
	 *
	 *  TLV_TYPE_CHANLIST, MrvlIEtypes_ChanListParamSet_t
	 *  TLV_TYPE_SSID, MrvlIEtypes_SsIdParamSet_t
	 */
	t_u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored here */
} MLAN_PACK_END wlan_scan_cmd_config;

/**
 *  Sructure to retrieve the scan table
 */
typedef MLAN_PACK_START struct {
	/**
	 *  - Zero based scan entry to start retrieval in command request
	 *  - Number of scans entries returned in command response
	 */
	t_u32 scan_number;
	/**
	 * Buffer marker for multiple wlan_ioctl_get_scan_table_entry
	 * structures. Each struct is padded to the nearest 32 bit boundary.
	 */
	t_u8 scan_table_entry_buf[1];
} MLAN_PACK_END wlan_get_scan_table_info;

/** Generic structure defined for parsing WPA/RSN IEs for GTK/PTK OUIs */
typedef MLAN_PACK_START struct {
	/** Group key oui */
	t_u8 GrpKeyOui[4];
	/** Number of PTKs */
	t_u8 PtkCnt[2];
	/** Ptk body starts here */
	t_u8 PtkBody[4];
} MLAN_PACK_END IEBody;
#endif /* STA_SUPPORT */

/*
 * This scan handle Country Information IE(802.11d compliant)
 * Define data structure for HostCmd_CMD_802_11_SCAN
 */
/** HostCmd_DS_802_11_SCAN */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN {
	/** BSS mode */
	t_u8 bss_mode;
	/** BSSID */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
	/** TLV buffer */
	t_u8 tlv_buffer[1];
	/** MrvlIEtypes_SsIdParamSet_t      SsIdParamSet;
	 *  MrvlIEtypes_ChanListParamSet_t  ChanListParamSet;
	 *  MrvlIEtypes_RatesParamSet_t     OpRateSet;
	 */
} MLAN_PACK_END HostCmd_DS_802_11_SCAN;

/** fw_cap_info bit to indicate enhance ext scan type */
#define ENHANCE_EXT_SCAN_ENABLE MBIT(19)
/** mlan_event_scan_result data structure */
typedef MLAN_PACK_START struct _mlan_event_scan_result {
	/** Event ID */
	t_u16 event_id;
	/** BSS index number for multiple BSS support */
	t_u8 bss_index;
	/** BSS type */
	t_u8 bss_type;
	/** More event available or not */
	t_u8 more_event;
	/** Reserved */
	t_u8 reserved[3];
	/** Size of the response buffer */
	t_u16 buf_size;
	/** Number of BSS in scan response */
	t_u8 num_of_set;
} MLAN_PACK_END mlan_event_scan_result, *pmlan_event_scan_result;

/** ext scan status report event */
typedef MLAN_PACK_START struct _mlan_event_scan_status {
	/** Event ID */
	t_u16 event_id;
	/** BSS index number for multiple BSS support */
	t_u8 bss_index;
	/** BSS type */
	t_u8 bss_type;
	/** scan status */
	t_u8 scan_status;
	/** result */
	t_u16 buf_len;
	/** event buf */
	t_u8 event_buf[];
} MLAN_PACK_END mlan_event_scan_status, *pmlan_event_scan_status;

/*
 * This scan handle Country Information IE(802.11d compliant)
 * Define data structure for HostCmd_CMD_802_11_SCAN_EXT
 */
/** HostCmd_DS_802_11_SCAN_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_EXT {
	/** Scan type for ext scan
	 *  0: default type: cmd resp after ext scan report event
	 *  1: enhanced type: cmd resp before ext scan report event
	 *  2: scan cancelled: cancel scan during scan processing
	 */
	t_u8 ext_scan_type;
	/** Reserved */
	t_u8 reserved[3];
	/** TLV buffer */
	t_u8 tlv_buffer[1];
	/** MrvlIEtypes_Bssid_List_t            BssIdList;
	 *  MrvlIEtypes_SsIdParamSet_t          SSIDParamSet;
	 *  MrvlIEtypes_ChanListParamSet_t      ChanListParamSet;
	 *  MrvlIEtypes_RatesParamSet_t         OpRateSet;
	 *  MrvlIEtypes_NumProbes_t             NumProbes;
	 *  MrvlIEtypes_WildCardSsIdParamSet_t  WildCardSSIDParamSet;
	 *  MrvlIEtypes_BssMode_t               BssMode;
	 */
} MLAN_PACK_END HostCmd_DS_802_11_SCAN_EXT;

/** MrvlIEtypes_BssMode */
typedef MLAN_PACK_START struct _MrvlIEtypes_BssMode_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/* INFRA/IBSS/AUTO */
	t_u8 bss_mode;
} MLAN_PACK_END MrvlIEtypes_BssMode_t;

/** BSS scan Rsp */
typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Rsp_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** BSSID of the BSS descriptor */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
	/** Beacon/Probe response buffer */
	t_u8 frame_body[1];
} MLAN_PACK_END MrvlIEtypes_Bss_Scan_Rsp_t;

typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Info_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** RSSI for scan entry */
	t_s16 rssi;
	/** Channel ANPI */
	t_s16 anpi;
	/** Channel load (parts per 255) */
	t_u8 cca_busy_fraction;
	/** Band */
	Band_Config_t bandcfg;
	/** Channel */
	t_u8 channel;
	/** Reserved */
	t_u8 reserved;
	/** TSF data */
	t_u64 tsf;
} MLAN_PACK_END MrvlIEtypes_Bss_Scan_Info_t;

/** HostCmd_DS_RX_MGMT_IND */
typedef MLAN_PACK_START struct _HostCmd_DS_RX_MGMT_IND {
	/** Action */
	t_u16 action;
	/** Mgmt frame subtype mask */
	t_u32 mgmt_subtype_mask;
} MLAN_PACK_END HostCmd_DS_RX_MGMT_IND;

/** HostCmd_DS_802_11_SCAN_RSP */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_RSP {
	/** Size of BSS descriptor */
	t_u16 bss_descript_size;
	/** Numner of sets */
	t_u8 number_of_sets;
	/** BSS descriptor and TLV buffer */
	t_u8 bss_desc_and_tlv_buffer[1];
} MLAN_PACK_END HostCmd_DS_802_11_SCAN_RSP;

/** HostCmd_DS_802_11_BG_SCAN_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_CONFIG {
	/** action */
	t_u16 action;
	/** 0: disable, 1: enable */
	t_u8 enable;
	/** bss type */
	t_u8 bss_type;
	/** num of channel per scan */
	t_u8 chan_per_scan;
	/** reserved field */
	t_u8 reserved;
	/** reserved field */
	t_u16 reserved1;
	/** interval between consecutive scans */
	t_u32 scan_interval;
	/** reserved field */
	t_u32 reserved2;
	/** condition to trigger report to host */
	t_u32 report_condition;
	/** reserved field */
	t_u16 reserved3;
} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_CONFIG;

/** HostCmd_DS_802_11_BG_SCAN_QUERY */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY {
	/** Flush */
	t_u8 flush;
} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY;

/** HostCmd_DS_802_11_BG_SCAN_QUERY_RSP */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY_RSP {
	/** Report condition */
	t_u32 report_condition;
	/** Scan response */
	HostCmd_DS_802_11_SCAN_RSP scan_resp;
} MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY_RSP;

/** MrvlIEtypes_StartLater_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_StartLater_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/* 0 - BGScan start immediately, 1 - BGScan will start later after "Scan
	 * Interval" */
	t_u16 value;
} MLAN_PACK_END MrvlIEtypes_StartLater_t;

/** MrvlIEtypes_RepeatCount_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RepeatCount_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/* Repeat count */
	t_u16 repeat_count;
} MLAN_PACK_END MrvlIEtypes_RepeatCount_t;

/** MrvlIEtypes_DomainParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_DomainParamSet {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Country code */
	t_u8 country_code[COUNTRY_CODE_LEN];
	/** Set of subbands */
	IEEEtypes_SubbandSet_t sub_band[1];
} MLAN_PACK_END MrvlIEtypes_DomainParamSet_t;

/** HostCmd_DS_802_11D_DOMAIN_INFO */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO {
	/** Action */
	t_u16 action;
	/** Domain parameter set */
	MrvlIEtypes_DomainParamSet_t domain;
} MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO;

/** HostCmd_DS_802_11D_DOMAIN_INFO_RSP */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO_RSP {
	/** Action */
	t_u16 action;
	/** Domain parameter set */
	MrvlIEtypes_DomainParamSet_t domain;
} MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO_RSP;

/** HostCmd_DS_11N_ADDBA_REQ */
typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_REQ {
	/** Result of the ADDBA Request Operation */
	t_u8 add_req_result;
	/** Peer MAC address */
	t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** Dialog Token */
	t_u8 dialog_token;
	/** Block Ack Parameter Set */
	t_u16 block_ack_param_set;
	/** Block Act Timeout Value */
	t_u16 block_ack_tmo;
	/** Starting Sequence Number */
	t_u16 ssn;
} MLAN_PACK_END HostCmd_DS_11N_ADDBA_REQ;

/** HostCmd_DS_11N_ADDBA_RSP */
typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_RSP {
	/** Result of the ADDBA Response Operation */
	t_u8 add_rsp_result;
	/** Peer MAC address */
	t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** Dialog Token */
	t_u8 dialog_token;
	/** Status Code */
	t_u16 status_code;
	/** Block Ack Parameter Set */
	t_u16 block_ack_param_set;
	/** Block Act Timeout Value */
	t_u16 block_ack_tmo;
	/** Starting Sequence Number */
	t_u16 ssn;
} MLAN_PACK_END HostCmd_DS_11N_ADDBA_RSP;

/** HostCmd_DS_11N_DELBA */
typedef MLAN_PACK_START struct _HostCmd_DS_11N_DELBA {
	/** Result of the ADDBA Request Operation */
	t_u8 del_result;
	/** Peer MAC address */
	t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** Delete Block Ack Parameter Set */
	t_u16 del_ba_param_set;
	/** Reason Code sent for DELBA */
	t_u16 reason_code;
	/** Reserved */
	t_u8 reserved;
} MLAN_PACK_END HostCmd_DS_11N_DELBA;

/** HostCmd_DS_11N_BATIMEOUT */
typedef MLAN_PACK_START struct _HostCmd_DS_11N_BATIMEOUT {
	/** TID */
	t_u8 tid;
	/** Peer MAC address */
	t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
	/** Delete Block Ack Parameter Set */
	t_u8 origninator;
} MLAN_PACK_END HostCmd_DS_11N_BATIMEOUT;

/** HostCmd_DS_11N_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_11N_CFG {
	/** Action */
	t_u16 action;
	/** HTTxCap */
	t_u16 ht_tx_cap;
	/** HTTxInfo */
	t_u16 ht_tx_info;
	/** Misc configuration */
	t_u16 misc_config;
} MLAN_PACK_END HostCmd_DS_11N_CFG;

/** HostCmd_DS_11N_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_REJECT_ADDBA_REQ {
	/** Action */
	t_u16 action;
	/** Bit0    : host sleep activated
	 *  Bit1    : auto reconnect enabled
	 *  Others  : reserved
	 */
	t_u32 conditions;
} MLAN_PACK_END HostCmd_DS_REJECT_ADDBA_REQ;

/** HostCmd_DS_TXBUF_CFG*/
typedef MLAN_PACK_START struct _HostCmd_DS_TXBUF_CFG {
	/** Action */
	t_u16 action;
	/** Buffer Size */
	t_u16 buff_size;
	/** End Port_for Multiport */
	t_u16 mp_end_port;
	/** Reserved */
	t_u16 reserved3;
} MLAN_PACK_END HostCmd_DS_TXBUF_CFG;

/** HostCmd_DS_AMSDU_AGGR_CTRL */
typedef MLAN_PACK_START struct _HostCmd_DS_AMSDU_AGGR_CTRL {
	/** Action */
	t_u16 action;
	/** Enable */
	t_u16 enable;
	/** Get the current Buffer Size valid */
	t_u16 curr_buf_size;
} MLAN_PACK_END HostCmd_DS_AMSDU_AGGR_CTRL;

/** HostCmd_DS_11AC_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_11AC_CFG {
	/** Action */
	t_u16 action;
	/** BandConfig */
	t_u8 band_config;
	/** Misc Configuration */
	t_u8 misc_config;
	/** VHT Capability Info */
	t_u32 vht_cap_info;
	/** VHT Support MCS Set */
	t_u8 vht_supp_mcs_set[VHT_MCS_SET_LEN];
} MLAN_PACK_END HostCmd_DS_11AC_CFG;

/** HostCmd_DS_11ACTXBUF_CFG*/
typedef MLAN_PACK_START struct _HostCmd_DS_11ACTXBUF_CFG {
	/** Action */
	t_u16 action;
	/** Buffer Size */
	t_u16 buff_size;
	/** End Port_for Multiport */
	t_u16 mp_end_port;
	/** Reserved */
	t_u16 reserved3;
} MLAN_PACK_END HostCmd_DS_11ACTXBUF_CFG;

/** HostCmd_DS_11AX_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CFG {
	/** Action */
	t_u16 action;
	/** BandConfig */
	t_u8 band_config;
	/** TLV for HE capability or HE operation */
	t_u8 val[];
} MLAN_PACK_END HostCmd_DS_11AX_CFG;

/** HostCmd_DS_11AX_CMD_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CMD_CFG {
	/** Action */
	t_u16 action;
	/** CMD_SUBID */
	t_u16 sub_id;
	/** TLV or value for cmd */
	t_u8 val[];
} MLAN_PACK_END HostCmd_DS_11AX_CMD_CFG;

/** HostCmd_DS_RANGE_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_RANGE_EXT {
	/** Action */
	t_u16 action;
	/** Range ext mode */
	t_u8 mode;
} MLAN_PACK_END HostCmd_DS_RANGE_EXT;

/** Type definition of hostcmd_twt_setup */
typedef struct MLAN_PACK_START _hostcmd_twt_setup {
	/** Implicit, 0: TWT session is explicit, 1: Session is implicit */
	t_u8 implicit;
	/** Announced, 0: Unannounced, 1: Announced TWT */
	t_u8 announced;
	/** Trigger Enabled, 0: Non-Trigger enabled, 1: Trigger enabled TWT */
	t_u8 trigger_enabled;
	/** TWT Information Disabled, 0: TWT info enabled, 1: TWT info disabled
	 */
	t_u8 twt_info_disabled;
	/** Negotiation Type, 0: Future Individual TWT SP start time, 1: Next
	 * Wake TBTT time */
	t_u8 negotiation_type;
	/** TWT Wakeup Duration, time after which the TWT requesting STA can
	 * transition to doze state */
	t_u8 twt_wakeup_duration;
	/** Flow Identifier. Range: [0-7]*/
	t_u8 flow_identifier;
	/** Hard Constraint, 0: FW can tweak the TWT setup parameters if it is
	 *rejected by AP.
	 ** 1: Firmware should not tweak any parameters. */
	t_u8 hard_constraint;
	/** TWT Exponent, Range: [0-63] */
	t_u8 twt_exponent;
	/** TWT Mantissa Range: [0-sizeof(UINT16)] */
	t_u16 twt_mantissa;
	/** TWT Request Type, 0: REQUEST_TWT, 1: SUGGEST_TWT*/
	t_u8 twt_request;
	/** TWT Setup State. Set to 0 by driver, filled by FW in response*/
	t_u8 twt_setup_state;
	/** Reserved, set to 0. */
	t_u8 reserved[2];
} MLAN_PACK_END hostcmd_twt_setup, *phostcmd_twt_setup;

/** Type definition of hostcmd_twt_teardown */
typedef struct MLAN_PACK_START _hostcmd_twt_teardown {
	/** TWT Flow Identifier. Range: [0-7] */
	t_u8 flow_identifier;
	/** Negotiation Type. 0: Future Individual TWT SP start time, 1: Next
	 * Wake TBTT time */
	t_u8 negotiation_type;
	/** Tear down all TWT. 1: To teardown all TWT, 0 otherwise */
	t_u8 teardown_all_twt;
	/** TWT Teardown State. Set to 0 by driver, filled by FW in response */
	t_u8 twt_teardown_state;
	/** Reserved, set to 0. */
	t_u8 reserved[3];
} MLAN_PACK_END hostcmd_twt_teardown, *phostcmd_twt_teardown;

/** HostCmd_DS_TWT_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_TWT_CFG {
	/** Action */
	t_u16 action;
	/** CMD_SUBID */
	t_u16 sub_id;
	/** TWT Setup/Teardown configuration parameters */
	union {
		/** TWT Setup config for Sub ID: MLAN_11AX_TWT_SETUP_SUBID */
		hostcmd_twt_setup twt_setup;
		/** TWT Teardown config for Sub ID: MLAN_11AX_TWT_TEARDOWN_SUBID
		 */
		hostcmd_twt_teardown twt_teardown;
	} param;
} MLAN_PACK_END HostCmd_DS_TWT_CFG;

/** HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG {
	/** Action */
	t_u16 action;
	/** Current system clock */
	t_u16 cur_sys_clk;
	/** Clock type */
	t_u16 sys_clk_type;
	/** Length of clocks */
	t_u16 sys_clk_len;
	/** System clocks */
	t_u16 sys_clk[16];
} MLAN_PACK_END HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG;

/** MrvlIEtypes_WmmParamSet_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_WmmParamSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** WMM IE */
	t_u8 wmm_ie[1];
} MLAN_PACK_END MrvlIEtypes_WmmParamSet_t;

/** MrvlIEtypes_WmmQueueStatus_t */
typedef MLAN_PACK_START struct {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Queue index */
	t_u8 queue_index;
	/** Disabled flag */
	t_u8 disabled;
	/** Medium time allocation in 32us units*/
	t_u16 medium_time;
	/** Flow required flag */
	t_u8 flow_required;
	/** Flow created flag */
	t_u8 flow_created;
	/** Reserved */
	t_u32 reserved;
} MLAN_PACK_END MrvlIEtypes_WmmQueueStatus_t;

/** Size of a TSPEC.  Used to allocate necessary buffer space in commands */
#define WMM_TSPEC_SIZE 63

/** Extra IE bytes allocated in messages for appended IEs after a TSPEC */
#define WMM_ADDTS_EXTRA_IE_BYTES 256

/** Extra TLV bytes allocated in messages for configuring WMM Queues */
#define WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES 64

/** Number of bins in the histogram for the HostCmd_DS_WMM_QUEUE_STATS */
#define WMM_STATS_PKTS_HIST_BINS 7

/**
 *  @brief Firmware command structure to retrieve the firmware WMM status.
 *
 *  Used to retrieve the status of each WMM AC Queue in TLV
 *    format (MrvlIEtypes_WmmQueueStatus_t) as well as the current WMM
 *    parameter IE advertised by the AP.
 *
 *  Used in response to a EVENT_WMM_STATUS_CHANGE event signaling
 *    a QOS change on one of the ACs or a change in the WMM Parameter in
 *    the Beacon.
 *
 *  TLV based command, byte arrays used for max sizing purpose. There are no
 *    arguments sent in the command, the TLVs are returned by the firmware.
 */
typedef MLAN_PACK_START struct {
	/** Queue status TLV */
	t_u8 queue_status_tlv[sizeof(MrvlIEtypes_WmmQueueStatus_t) *
			      MAX_AC_QUEUES];
	/** WMM parameter TLV */
	t_u8 wmm_param_tlv[sizeof(IEEEtypes_WmmParameter_t) + 2];
} MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS;

/**
 *  @brief Command structure for the HostCmd_CMD_WMM_ADDTS_REQ firmware command
 */
typedef MLAN_PACK_START struct {
	mlan_cmd_result_e command_result; /**< Command result */
	t_u32 timeout_ms; /**< Timeout value in milliseconds */
	t_u8 dialog_token; /**< Dialog token */
	t_u8 ieee_status_code; /**< IEEE status code */
	t_u8 tspec_data[WMM_TSPEC_SIZE]; /**< TSPEC data */
	t_u8 addts_extra_ie_buf[WMM_ADDTS_EXTRA_IE_BYTES]; /**< Extra IE buffer
							    */
} MLAN_PACK_END HostCmd_DS_WMM_ADDTS_REQ;

/**
 *  @brief Command structure for the HostCmd_CMD_WMM_DELTS_REQ firmware command
 */
typedef MLAN_PACK_START struct {
	mlan_cmd_result_e command_result; /**< Command result */
	t_u8 dialog_token; /**< Dialog token */
	t_u8 ieee_reason_code; /**< IEEE reason code */
	t_u8 tspec_data[WMM_TSPEC_SIZE]; /**< TSPEC data */
} MLAN_PACK_END HostCmd_DS_WMM_DELTS_REQ;

/**
 *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_CONFIG firmware cmd
 *
 *  Set/Get/Default the Queue parameters for a specific AC in the firmware.
 */
typedef MLAN_PACK_START struct {
	mlan_wmm_queue_config_action_e action; /**< Set, Get, or Default */
	mlan_wmm_ac_e access_category; /**< WMM_AC_BK(0) to WMM_AC_VO(3) */
	/** @brief MSDU lifetime expiry per 802.11e
	 *
	 *   - Ignored if 0 on a set command
	 *   - Set to the 802.11e specified 500 TUs when defaulted
	 */
	t_u16 msdu_lifetime_expiry;
	t_u8 tlv_buffer[WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES]; /**< Not supported */
} MLAN_PACK_END HostCmd_DS_WMM_QUEUE_CONFIG;

/**
 *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_STATS firmware cmd
 *
 *  Turn statistical collection on/off for a given AC or retrieve the
 *    accumulated stats for an AC and clear them in the firmware.
 */
typedef MLAN_PACK_START struct {
	mlan_wmm_queue_stats_action_e action; /**< Start, Stop, or Get */
#ifdef BIG_ENDIAN_SUPPORT
	t_u8 select_bin : 7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
	t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC
				     */
#else
	t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC
				     */
	t_u8 select_bin : 7; /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
#endif
	t_u16 pkt_count; /**< Number of successful packets transmitted */
	t_u16 pkt_loss; /**< Packets lost; not included in pktCount */
	t_u32 avg_queue_delay; /**< Average Queue delay in microsec */
	t_u32 avg_tx_delay; /**< Average Transmission delay in microsec */
	t_u16 used_time; /**< Calc used time - units of 32 microsec */
	t_u16 policed_time; /**< Calc policed time - units of 32 microsec */
	/** @brief Queue Delay Histogram; number of packets per queue delay
	 * range
	 *
	 *  [0] -  0ms <= delay < 5ms
	 *  [1] -  5ms <= delay < 10ms
	 *  [2] - 10ms <= delay < 20ms
	 *  [3] - 20ms <= delay < 30ms
	 *  [4] - 30ms <= delay < 40ms
	 *  [5] - 40ms <= delay < 50ms
	 *  [6] - 50ms <= delay < msduLifetime (TUs)
	 */
	t_u16 delay_histogram[WMM_STATS_PKTS_HIST_BINS];
	/** Reserved */
	t_u16 reserved_1;
} MLAN_PACK_END HostCmd_DS_WMM_QUEUE_STATS;

/**
 *  @brief Command structure for the HostCmd_CMD_WMM_TS_STATUS firmware cmd
 *
 *  Query the firmware to get the status of the WMM Traffic Streams
 */
typedef MLAN_PACK_START struct {
	/** TSID: Range: 0->7 */
	t_u8 tid;
	/** TSID specified is valid */
	t_u8 valid;
	/** AC TSID is active on */
	t_u8 access_category;
	/** UP specified for the TSID */
	t_u8 user_priority;
	/** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */
	t_u8 psb;
	/** Uplink(1), Downlink(2), Bidirectional(3) */
	t_u8 flow_dir;
	/** Medium time granted for the TSID */
	t_u16 medium_time;
} MLAN_PACK_END HostCmd_DS_WMM_TS_STATUS;

/** Firmware status for a specific AC */
typedef MLAN_PACK_START struct {
	/** Disabled flag */
	t_u8 disabled;
	/** Flow required flag */
	t_u8 flow_required;
	/** Flow created flag */
	t_u8 flow_created;
} MLAN_PACK_END WmmAcStatus_t;

/**  Local Power Capability */
typedef MLAN_PACK_START struct _MrvlIEtypes_PowerCapability_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Minmum power */
	t_s8 min_power;
	/** Maximum power */
	t_s8 max_power;
} MLAN_PACK_END MrvlIEtypes_PowerCapability_t;

/** HT Information element */
typedef MLAN_PACK_START struct _MrvlIETypes_HTInfo_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** HTInfo struct */
	HTInfo_t ht_info;
} MLAN_PACK_END MrvlIETypes_HTInfo_t;

/** 20/40 BSS Coexistence element */
typedef MLAN_PACK_START struct _MrvlIETypes_2040BSSCo_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** BSSCo2040_t struct */
	BSSCo2040_t bss_co_2040;
} MLAN_PACK_END MrvlIETypes_2040BSSCo_t;

/** Extended Capabilities element */
typedef MLAN_PACK_START struct _MrvlIETypes_ExtCap_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** ExtCap_t struct */
	ExtCap_t ext_cap;
} MLAN_PACK_END MrvlIETypes_ExtCap_t;

/** Supported operating classes element */
typedef MLAN_PACK_START struct _MrvlIETypes_SuppOperClass_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Current operationg class **/
	t_u8 current_oper_class;
	/** Operating class list */
	t_u8 oper_class[1];
} MLAN_PACK_END MrvlIETypes_SuppOperClass_t;

/** Oper_class channel bandwidth element */
typedef MLAN_PACK_START struct _MrvlIEtypes_chan_bw_oper_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** channel oper bandwidth*/
	mlan_ds_bw_chan_oper ds_chan_bw_oper;
} MLAN_PACK_END MrvlIEtypes_chan_bw_oper_t;

/** Qos Info */
typedef MLAN_PACK_START struct _MrvlIETypes_qosinfo_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** qos_info*/
	t_u8 qos_info;
} MLAN_PACK_END MrvlIETypes_qosinfo_t;

/** Overlapping BSS Scan Parameters element */
typedef MLAN_PACK_START struct _MrvlIETypes_OverlapBSSScanParam_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** OBSSScanParam_t struct */
	OBSSScanParam_t obss_scan_param;
} MLAN_PACK_END MrvlIETypes_OverlapBSSScanParam_t;

/** Set of MCS values that STA desires to use within the BSS */
typedef MLAN_PACK_START struct _MrvlIETypes_HTOperationalMCSSet_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** Bitmap indicating MCSs that STA desires to use within the BSS */
	t_u8 ht_operational_mcs_bitmap[16];
} MLAN_PACK_END MrvlIETypes_HTOperationalMCSSet_t;

/** VHT Operations IE */
typedef MLAN_PACK_START struct _MrvlIETypes_VHTOprat_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	t_u8 chan_width;
	t_u8 chan_center_freq_1;
	t_u8 chan_center_freq_2;
	/** Basic MCS set map, each 2 bits stands for a Nss */
	t_u16 basic_MCS_map;
} MLAN_PACK_END MrvlIETypes_VHTOprat_t;

/** VHT Transmit Power Envelope IE */
typedef MLAN_PACK_START struct _MrvlIETypes_VHTtxpower_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	t_u8 max_tx_power;
	t_u8 chan_center_freq;
	t_u8 chan_width;
} MLAN_PACK_END MrvlIETypes_VHTtxpower_t;

/** Extended Power Constraint IE */
typedef MLAN_PACK_START struct _MrvlIETypes_ExtPwerCons_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** channel width */
	t_u8 chan_width;
	/** local power constraint */
	t_u8 local_power_cons;
} MLAN_PACK_END MrvlIETypes_ExtPwerCons_t;

/** Extended BSS Load IE */
typedef MLAN_PACK_START struct _MrvlIETypes_ExtBSSload_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	t_u8 MU_MIMO_capa_count;
	t_u8 stream_underutilization;
	t_u8 VHT40_util;
	t_u8 VHT80_util;
	t_u8 VHT160_util;
} MLAN_PACK_END MrvlIETypes_ExtBSSload_t;

/** Quiet Channel IE */
typedef MLAN_PACK_START struct _MrvlIETypes_QuietChan_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	t_u8 AP_quiet_mode;
	t_u8 quiet_count;
	t_u8 quiet_period;
	t_u16 quiet_dur;
	t_u16 quiet_offset;
} MLAN_PACK_END MrvlIETypes_QuietChan_t;

/** Wide Bandwidth Channel Switch IE */
typedef MLAN_PACK_START struct _MrvlIETypes_BWSwitch_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	t_u8 new_chan_width;
	t_u8 new_chan_center_freq_1;
	t_u8 new_chan_center_freq_2;
} MLAN_PACK_END MrvlIETypes_BWSwitch_t;

/** AID IE */
typedef MLAN_PACK_START struct _MrvlIETypes_AID_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** AID number */
	t_u16 AID;
} MLAN_PACK_END MrvlIETypes_AID_t;

/** Operating Mode Notification IE */
typedef MLAN_PACK_START struct _MrvlIETypes_OperModeNtf_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** operating mdoe */
	t_u8 oper_mode;
} MLAN_PACK_END MrvlIETypes_OperModeNtf_t;

/** bf global args */
typedef struct MLAN_PACK_START _bf_global_cfg_args {
	/** Global enable/disable bf */
	t_u8 bf_enbl;
	/** Global enable/disable sounding */
	t_u8 sounding_enbl;
	/** FB Type */
	t_u8 fb_type;
	/** SNR Threshold */
	t_u8 snr_threshold;
	/** Sounding interval */
	t_u16 sounding_interval;
	/** BF mode */
	t_u8 bf_mode;
	/** Reserved */
	t_u8 reserved;
} MLAN_PACK_END bf_global_cfg_args;

/** bf_trigger_sound_args_t */
typedef MLAN_PACK_START struct _bf_trigger_sound_args_t {
	/** Peer MAC address */
	t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
	/** Status */
	t_u8 status;
} MLAN_PACK_END bf_trigger_sound_args_t;

/** bf periodicity args */
typedef MLAN_PACK_START struct _bf_periodicity_args {
	/** Peer MAC address */
	t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
	/** Current Tx BF Interval */
	t_u16 interval;
	/** Status */
	t_u8 status;
} MLAN_PACK_END bf_periodicity_args;

/** bf peer configuration args */
typedef struct MLAN_PACK_START _bf_peer_args {
	/** Peer MAC address */
	t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
	/** Reserved */
	t_u16 reserved;
	/** Enable/Disable Beamforming */
	t_u8 bf_enbl;
	/** Enable/Disable sounding */
	t_u8 sounding_enbl;
	/** FB Type */
	t_u8 fb_type;
} MLAN_PACK_END bf_peer_args;

/** bf_snr_thr_t */
typedef MLAN_PACK_START struct _bf_snr_thr_t {
	/** Peer MAC address */
	t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
	/** SNR */
	t_u8 snr;
} MLAN_PACK_END bf_snr_thr_t;

/** HostCmd_DS_TX_BF_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_TX_BF_CFG {
	/* Beamforming action */
	t_u16 bf_action;
	/* action - SET/GET*/
	t_u16 action;

	MLAN_PACK_START union {
		bf_global_cfg_args bf_global_cfg;
		bf_trigger_sound_args_t bf_sound_args;
		bf_periodicity_args bf_periodicity;
		bf_peer_args tx_bf_peer;
		bf_snr_thr_t bf_snr;
	} MLAN_PACK_END body;
} MLAN_PACK_END HostCmd_DS_TX_BF_CFG;

#ifdef WIFI_DIRECT_SUPPORT
/** MrvlIEtypes_psk_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** PSK */
	t_u8 psk[MLAN_MAX_KEY_LENGTH];
} MLAN_PACK_END MrvlIEtypes_psk_t;
#endif /* WIFI_DIRECT_SUPPORT */

/** MrvlIEtypes_PMK_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** PMK */
	t_u8 pmk[1];
} MLAN_PACK_END MrvlIEtypes_PMK_t;

/** MrvlIEtypes_Passphrase_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Passphrase_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Passphrase */
	char passphrase[1];
} MLAN_PACK_END MrvlIEtypes_Passphrase_t;

/** MrvlIEtypes_SAE_Password_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_SAE_Password_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** SAE Password */
	char sae_password[1];
} MLAN_PACK_END MrvlIEtypes_SAE_Password_t;

/* rsnMode -
 *      Bit 0    : No RSN
 *      Bit 1-2  : RFU
 *      Bit 3    : WPA
 *      Bit 4    : WPA-NONE
 *      Bit 5    : WPA2
 *      Bit 6    : AES CCKM
 *      Bit 7-15 : RFU
 */
/** MrvlIEtypes_EncrProto_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_EncrProto_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** EncrProto */
	t_u16 rsn_mode;
} MLAN_PACK_END MrvlIEtypes_EncrProto_t;

/** MrvlIEtypes_Bssid_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Bssid */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END MrvlIEtypes_Bssid_t;

/*
 * This struct will handle GET,SET,CLEAR function for embedded
 * supplicant.
 * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PMK
 */
/** HostCmd_DS_802_11_SUPPLICANT_PMK */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PMK {
	/** CMD Action GET/SET/CLEAR */
	t_u16 action;
	/** CacheResult initialized to 0 */
	t_u16 cache_result;
	/** TLV Buffer */
	t_u8 tlv_buffer[1];
	/** MrvlIEtypes_SsidParamSet_t  SsidParamSet;
	 * MrvlIEtypes_PMK_t           Pmk;
	 * MrvlIEtypes_Passphrase_t    Passphrase;
	 * MrvlIEtypes_Bssid_t         Bssid;
	 **/
} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PMK;

/*
 * This struct will GET the Supplicant supported bitmaps
 * The GET_CURRENT action will get the network profile used
 * for the current assocation.
 * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PROFILE
 */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PROFILE {
	/** GET/SET/GET_CURRENT */
	t_u16 action;
	/** Reserved */
	t_u16 reserved;
	/** TLVBuffer */
	t_u8 tlv_buf[1];
	/* MrvlIEtypes_EncrProto_t */
} MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PROFILE;

/* unicastCipher -
 *      Bit 0   : RFU
 *      Bit 1   : RFU
 *      Bit 2   : TKIP
 *      Bit 3   : AES CCKM
 *      Bit 2-7 : RFU
 * multicastCipher -
 *      Bit 0   : WEP40
 *      Bit 1   : WEP104
 *      Bit 2   : TKIP
 *      Bit 3   : AES
 *      Bit 4-7 : Reserved for now
 */
/** MrvlIEtypes_Cipher_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_Cipher_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** PairCipher */
	t_u8 pair_cipher;
	/** GroupCipher */
	t_u8 group_cipher;
} MLAN_PACK_END MrvlIEtypes_Cipher_t;

/** RFType */
typedef MLAN_PACK_START struct _RFType_t {
	/** band info */
	Band_Config_t bandcfg;
	/** reserved */
	t_u8 reserved;
} MLAN_PACK_END RFType_t;

/** HostCmd_CMD_802_11_RF_CHANNEL */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_CHANNEL {
	/** Action */
	t_u16 action;
	/** Current channel */
	t_u16 current_channel;
	/** RF type */
	RFType_t rf_type;
	/** Reserved field */
	t_u16 reserved;
#ifdef STA_SUPPORT
	/** Reserved */
	t_u8 reserved_1[32];
#else /* STA_SUPPORT */
	/** List of channels */
	t_u8 channel_list[32];
#endif /* !STA_SUPPORT */
} MLAN_PACK_END HostCmd_DS_802_11_RF_CHANNEL;

/** HostCmd_DS_VERSION_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_VERSION_EXT {
	/** Selected version string */
	t_u8 version_str_sel;
	/** Version string */
	char version_str[128];
} MLAN_PACK_END HostCmd_DS_VERSION_EXT;

#define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237)
#define TLV_TYPE_REGION_INFO (PROPRIETARY_TLV_BASE_ID + 238)
#define TLV_TYPE_POWER_TABLE (PROPRIETARY_TLV_BASE_ID + 262)
#define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317)
/** HostCmd_DS_CHAN_REGION_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CHAN_REGION_CFG {
	/** Action */
	t_u16 action;
} MLAN_PACK_END HostCmd_DS_CHAN_REGION_CFG;

/** HostCmd_CMD_CW_MODE_CTRL */
typedef MLAN_PACK_START struct _HostCmd_DS_CW_MODE_CTRL {
	/** Action for CW Tone Control */
	t_u16 action;
	/** Mode of Operation 0: Disbale 1: Tx Continuous Packet 2: Tx
	 * Continuous Wave */
	t_u8 mode;
	/** channel */
	t_u8 channel;
	/** channel info*/
	t_u8 chanInfo;
	/** Tx Power level in dBm */
	t_u16 txPower;
	/** Packet Length */
	t_u16 pktLength;
	/** bit rate Info */
	t_u32 rateInfo;
} MLAN_PACK_END HostCmd_DS_CW_MODE_CTRL;

/** HostCmd_CMD_802_11_RF_ANTENNA */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_ANTENNA {
	/** Action for Tx antenna */
	t_u16 action_tx;
	/** Tx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
	t_u16 tx_antenna_mode;
	/** Action for Rx antenna */
	t_u16 action_rx;
	/** Rx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
	t_u16 rx_antenna_mode;
} MLAN_PACK_END HostCmd_DS_802_11_RF_ANTENNA;

/** HostCmd_DS_802_11_IBSS_STATUS */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_IBSS_STATUS {
	/** Action */
	t_u16 action;
	/** Enable */
	t_u16 enable;
	/** BSSID */
	t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
	/** Beacon interval */
	t_u16 beacon_interval;
	/** ATIM window interval */
	t_u16 atim_window;
	/** User G rate protection */
	t_u16 use_g_rate_protect;
} MLAN_PACK_END HostCmd_DS_802_11_IBSS_STATUS;

/** HostCmd_DS_MGMT_IE_LIST_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_MGMT_IE_LIST {
	/** Action */
	t_u16 action;
	/** Get/Set mgmt IE */
	mlan_ds_misc_custom_ie ds_mgmt_ie;
} MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG;

/** HostCmd_CMD_MAC_REG_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS {
	/** Action */
	t_u16 action;
	/** MAC register offset */
	t_u16 offset;
	/** MAC register value */
	t_u32 value;
} MLAN_PACK_END HostCmd_DS_MAC_REG_ACCESS;

/** HostCmd_CMD_BCA_REG_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_BCA_REG_ACCESS {
	/** Action */
	t_u16 action;
	/** BCA register offset */
	t_u16 offset;
	/** BCA register value */
	t_u32 value;
} MLAN_PACK_END HostCmd_DS_BCA_REG_ACCESS;

/** HostCmd_CMD_BBP_REG_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_BBP_REG_ACCESS {
	/** Acion */
	t_u16 action;
	/** BBP register offset */
	t_u16 offset;
	/** BBP register value */
	t_u8 value;
	/** Reserved field */
	t_u8 reserved[3];
} MLAN_PACK_END HostCmd_DS_BBP_REG_ACCESS;

/**  HostCmd_CMD_RF_REG_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_RF_REG_ACCESS {
	/** Action */
	t_u16 action;
	/** RF register offset */
	t_u16 offset;
	/** RF register value */
	t_u8 value;
	/** Reserved field */
	t_u8 reserved[3];
} MLAN_PACK_END HostCmd_DS_RF_REG_ACCESS;

/** HostCmd_DS_802_11_EEPROM_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_EEPROM_ACCESS {
	/** Action */
	t_u16 action;

	/** multiple 4 */
	t_u16 offset;
	/** Number of bytes */
	t_u16 byte_count;
	/** Value */
	t_u8 value;
} MLAN_PACK_END HostCmd_DS_802_11_EEPROM_ACCESS;

/** HostCmd_DS_MEM_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_MEM_ACCESS {
	/** Action */
	t_u16 action;
	/** Reserved field */
	t_u16 reserved;
	/** Address */
	t_u32 addr;
	/** Value */
	t_u32 value;
} MLAN_PACK_END HostCmd_DS_MEM_ACCESS;

/** HostCmd_DS_TARGET_ACCESS */
typedef MLAN_PACK_START struct _HostCmd_DS_TARGET_ACCESS {
	/** Action */
	t_u16 action;
	/** CSU Target Device. 1: CSU, 2: PSU */
	t_u16 csu_target;
	/** Target Device Address */
	t_u16 address;
	/** Data */
	t_u8 data;
} MLAN_PACK_END HostCmd_DS_TARGET_ACCESS;

/** HostCmd_DS_SUBSCRIBE_EVENT */
typedef MLAN_PACK_START struct _HostCmd_DS_SUBSCRIBE_EVENT {
	/** Action */
	t_u16 action;
	/** Bitmap of subscribed events */
	t_u16 event_bitmap;
} MLAN_PACK_END HostCmd_DS_SUBSCRIBE_EVENT;

/** HostCmd_DS_OTP_USER_DATA */
typedef MLAN_PACK_START struct _HostCmd_DS_OTP_USER_DATA {
	/** Action */
	t_u16 action;
	/** Reserved field */
	t_u16 reserved;
	/** User data length */
	t_u16 user_data_length;
	/** User data */
	t_u8 user_data[1];
} MLAN_PACK_END HostCmd_DS_OTP_USER_DATA;

/** HostCmd_CMD_HS_WAKEUP_REASON */
typedef MLAN_PACK_START struct _HostCmd_DS_HS_WAKEUP_REASON {
	/** wakeupReason:
	 * 0: unknown
	 * 1: Broadcast data matched
	 * 2: Multicast data matched
	 * 3: Unicast data matched
	 * 4: Maskable event matched
	 * 5. Non-maskable event matched
	 * 6: Non-maskable condition matched (EAPoL rekey)
	 * 7: Magic pattern matched
	 * Others: reserved. (set to 0) */
	t_u16 wakeup_reason;
} MLAN_PACK_END HostCmd_DS_HS_WAKEUP_REASON;

/** MrvlIEtypes_HsWakeHoldoff_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_HsWakeHoldoff_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Minimum delay between HsActive and HostWake (in msec) */
	t_u16 min_wake_holdoff;
} MLAN_PACK_END MrvlIEtypes_HsWakeHoldoff_t;

/** MrvlIEtypes_PsParamsInHs_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_PsParamsInHs_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Host sleep wake interval(in msec) */
	t_u32 hs_wake_interval;
	/** Host sleep inactivity timeout (in msec) */
	t_u32 hs_inactivity_timeout;
} MLAN_PACK_END MrvlIEtypes_PsParamsInHs_t;

/** MrvlIEtypes_WakeupSourceGPIO_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_WakeupSourceGPIO_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** GPIO for indication of wakeup source */
	t_u8 ind_gpio;
	/** Level on ind_gpio for normal wakeup source */
	t_u8 level;
} MLAN_PACK_END MrvlIEtypes_WakeupSourceGPIO_t;

/** MrvlIEtypes_RobustcoexSourceGPIO_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_RobustcoexSourceGPIO_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** GPIO cfg for external bt request */
	t_u8 enable;
	/** GPIO number */
	t_u8 gpio_num;
	/** GPIO Polarity */
	t_u8 gpio_polarity;
} MLAN_PACK_END MrvlIEtypes_RobustcoexSourceGPIO_t;

#define MAX_NUM_MAC 2

typedef MLAN_PACK_START struct _dmcs_chan_status {
	/** Channel number */
	t_u8 channel;
	/** Number of AP on this channel */
	t_u8 ap_count;
	/** Number of STA on this channel*/
	t_u8 sta_count;
} MLAN_PACK_END dmcs_chan_status;

typedef MLAN_PACK_START struct _dmcs_status {
	/** radio ID */
	t_u8 radio_id;
	/** Running mode
	 ** 0 - Idle
	 ** 1 - DBC
	 ** 2 - DRCS
	 */
	t_u8 running_mode;
	/** Channel status of this radio */
	dmcs_chan_status chan_status[2];
} MLAN_PACK_END dmcs_status;

/** MrvlIEtypes_DmcsConfig_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_DmcsConfig_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Mapping policy */
	t_u8 mapping_policy;
	/** Radio status of DMCS */
	dmcs_status radio_status[MAX_NUM_MAC];
} MLAN_PACK_END MrvlIEtypes_DmcsStatus_t;

#define ANTMODE_FW_DECISION 0xff
/** MrvlIEtypes_HS_Antmode_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_HS_Antmode_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Tx Path antenna mode*/
	t_u8 txpath_antmode;
	/** Rx Path antenna mode */
	t_u8 rxpath_antmode;
} MLAN_PACK_END MrvlIEtypes_HS_Antmode_t;

typedef MLAN_PACK_START struct _MrvlIEtypes_WakeupExtend_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Events that will be forced ignore **/
	t_u32 event_force_ignore;
	/** Events that will use extend gap to inform host*/
	t_u32 event_use_ext_gap;
	/** Extend gap*/
	t_u8 ext_gap;
	/** GPIO wave level*/
	t_u8 gpio_wave;
} MLAN_PACK_END MrvlIEtypes_WakeupExtend_t;

#define EVENT_MANAGEMENT_FRAME_WAKEUP 136
typedef MLAN_PACK_START struct _mgmt_frame_filter {
	/** action - bitmap
	 ** On matching rx'd pkt and filter during NON_HOSTSLEEP mode:
	 **   Action[1]=0  Discard
	 **   Action[1]=1  Allow
	 ** Note that default action on non-match is "Allow".
	 **
	 ** On matching rx'd pkt and filter during HOSTSLEEP mode:
	 **   Action[1:0]=00  Discard and Not Wake host
	 **   Action[1:0]=01  Discard and Wake host
	 **   Action[1:0]=10  Invalid
	 ** Note that default action on non-match is "Discard and Not Wake
	 *host".
	 **/
	t_u8 action;
	/** Frame type(p2p...)
	 ** type=0: invalid
	 ** type=1: p2p
	 ** type=0xff: management frames(assoc req/rsp, probe req/rsp,...)
	 ** type=others: reserved
	 **/
	t_u8 type;
	/** Frame mask according to each type
	 ** When type=1 for p2p, frame-mask have following define:
	 **    Bit      Frame
	 **     0       GO Negotiation Request
	 **     1       GO Negotiation Response
	 **     2       GO Negotiation Confirmation
	 **     3       P2P Invitation Request
	 **     4       P2P Invitation Response
	 **     5       Device Discoverability Request
	 **     6       Device Discoverability Response
	 **     7       Provision Discovery Request
	 **     8       Provision Discovery Response
	 **     9       Notice of Absence
	 **     10      P2P Presence Request
	 **     11      P2P Presence Response
	 **     12      GO Discoverability Request
	 **     13-31   Reserved
	 **
	 ** When type=others, frame-mask is reserved.
	 **/
	t_u32 frame_mask;
} MLAN_PACK_END mgmt_frame_filter;

#define MAX_MGMT_FRAME_FILTER 2
/** MrvlIEtypes_MgmtFrameFilter_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_MgmtFrameFilter_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** management frame filters */
	mgmt_frame_filter filter[MAX_MGMT_FRAME_FILTER];
} MLAN_PACK_END MrvlIEtypes_MgmtFrameFilter_t;

/** HostCmd_DS_INACTIVITY_TIMEOUT_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_INACTIVITY_TIMEOUT_EXT {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/** uS, 0 means 1000uS(1ms) */
	t_u16 timeout_unit;
	/** Inactivity timeout for unicast data */
	t_u16 unicast_timeout;
	/** Inactivity timeout for multicast data */
	t_u16 mcast_timeout;
	/** Timeout for additional RX traffic after Null PM1 packet exchange */
	t_u16 ps_entry_timeout;
	/** Reserved to further expansion */
	t_u16 reserved;
} MLAN_PACK_END HostCmd_DS_INACTIVITY_TIMEOUT_EXT;

/** HostCmd_DS_INDEPENDENT_RESET_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_INDEPENDENT_RESET_CFG {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/** out band independent reset */
	t_u8 ir_mode;
	/** gpio pin */
	t_u8 gpio_pin;
} MLAN_PACK_END HostCmd_DS_INDEPENDENT_RESET_CFG;

/** HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT */
typedef MLAN_PACK_START struct _HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/** ps inactivity timeout value */
	t_u16 inact_tmo;
} MLAN_PACK_END HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT;

/** TLV type : STA Mac address */
#define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x20) /* 0x0120 */

#define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 0xEC) /*0x01EC*/

/** MrvlIEtypes_MacAddr_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** mac address */
	t_u8 mac[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END MrvlIEtypes_MacAddr_t;

/** Assoc Request */
#define SUBTYPE_ASSOC_REQUEST 0
/** ReAssoc Request */
#define SUBTYPE_REASSOC_REQUEST 2
/** Probe Resp */
#define SUBTYPE_PROBE_RESP 5
/** Disassoc Request */
#define SUBTYPE_DISASSOC 10
/** Auth Request */
#define SUBTYPE_AUTH 11
/** Deauth Request */
#define SUBTYPE_DEAUTH 12
/** Action frame */
#define SUBTYPE_ACTION 13
/** beacon */
#define SUBTYPE_BEACON 8

#ifdef UAP_SUPPORT
/** TLV type : AP Channel band Config */
#define TLV_TYPE_UAP_CHAN_BAND_CONFIG                                          \
	(PROPRIETARY_TLV_BASE_ID + 0x2a) /* 0x012a */
/** TLV type : AP Mac address */
#define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x2b) /* 0x012b */
/** TLV type : AP Beacon period */
#define TLV_TYPE_UAP_BEACON_PERIOD                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x2c) /* 0x012c                             \
					  */
/** TLV type : AP DTIM period */
#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2d) /* 0x012d */
/** TLV type : AP Tx power */
#define TLV_TYPE_UAP_TX_POWER (PROPRIETARY_TLV_BASE_ID + 0x2f) /* 0x012f */
/** TLV type : AP SSID broadcast control */
#define TLV_TYPE_UAP_BCAST_SSID_CTL                                            \
	(PROPRIETARY_TLV_BASE_ID + 0x30) /* 0x0130 */
/** TLV type : AP Preamble control */
#define TLV_TYPE_UAP_PREAMBLE_CTL                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x31) /* 0x0131                             \
					  */
/** TLV type : AP Antenna control */
#define TLV_TYPE_UAP_ANTENNA_CTL (PROPRIETARY_TLV_BASE_ID + 0x32) /* 0x0132 */
/** TLV type : AP RTS threshold */
#define TLV_TYPE_UAP_RTS_THRESHOLD                                             \
	(PROPRIETARY_TLV_BASE_ID + 0x33) /* 0x0133                             \
					  */
/** TLV type : AP Tx data rate */
#define TLV_TYPE_UAP_TX_DATA_RATE                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x35) /* 0x0135                             \
					  */
/** TLV type: AP Packet forwarding control */
#define TLV_TYPE_UAP_PKT_FWD_CTL (PROPRIETARY_TLV_BASE_ID + 0x36) /* 0x0136 */
/** TLV type: STA information */
#define TLV_TYPE_UAP_STA_INFO (PROPRIETARY_TLV_BASE_ID + 0x37) /* 0x0137 */
/** TLV type: AP STA MAC address filter */
#define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER                                       \
	(PROPRIETARY_TLV_BASE_ID + 0x38) /* 0x0138 */
/** TLV type: AP STA ageout timer */
#define TLV_TYPE_UAP_STA_AGEOUT_TIMER                                          \
	(PROPRIETARY_TLV_BASE_ID + 0x39) /* 0x0139 */
/** TLV type: AP WEP keys */
#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 0x3b) /* 0x013b */
/** TLV type: AP WPA passphrase */
#define TLV_TYPE_UAP_WPA_PASSPHRASE                                            \
	(PROPRIETARY_TLV_BASE_ID + 0x3c) /* 0x013c */
/** TLV type: AP protocol */
#define TLV_TYPE_UAP_ENCRYPT_PROTOCOL                                          \
	(PROPRIETARY_TLV_BASE_ID + 0x40) /* 0x0140 */
/** TLV type: AP AKMP */
#define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 0x41) /* 0x0141 */
/** TLV type: AP Fragment threshold */
#define TLV_TYPE_UAP_FRAG_THRESHOLD                                            \
	(PROPRIETARY_TLV_BASE_ID + 0x46) /* 0x0146 */
/** TLV type: AP Group rekey timer */
#define TLV_TYPE_UAP_GRP_REKEY_TIME                                            \
	(PROPRIETARY_TLV_BASE_ID + 0x47) /* 0x0147 */
/**TLV type : AP Max Station number */
#define TLV_TYPE_UAP_MAX_STA_CNT (PROPRIETARY_TLV_BASE_ID + 0x55) /* 0x0155 */
/**TLV type : AP Max Station number per chip */
#define TLV_TYPE_UAP_MAX_STA_CNT_PER_CHIP                                      \
	(PROPRIETARY_TLV_BASE_ID + 0x140) /* 0x0240 */
/**TLV type : AP Retry limit */
#define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 0x5d) /* 0x015d */
/** TLV type : AP MCBC data rate */
#define TLV_TYPE_UAP_MCBC_DATA_RATE                                            \
	(PROPRIETARY_TLV_BASE_ID + 0x62) /* 0x0162 */
/**TLV type: AP RSN replay protection */
#define TLV_TYPE_UAP_RSN_REPLAY_PROTECT                                        \
	(PROPRIETARY_TLV_BASE_ID + 0x64) /* 0x0164 */
/**TLV type: AP mgmt IE passthru mask */
#define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK                                     \
	(PROPRIETARY_TLV_BASE_ID + 0x70) /* 0x0170 */

/**TLV type: AP pairwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT                                     \
	(PROPRIETARY_TLV_BASE_ID + 0x75) /* 0x0175 */
/**TLV type: AP pairwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES                                     \
	(PROPRIETARY_TLV_BASE_ID + 0x76) /* 0x0176 */
/**TLV type: AP groupwise handshake timeout */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT                                     \
	(PROPRIETARY_TLV_BASE_ID + 0x77) /* 0x0177 */
/**TLV type: AP groupwise handshake retries */
#define TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES                                     \
	(PROPRIETARY_TLV_BASE_ID + 0x78) /* 0x0178 */
/** TLV type: AP PS STA ageout timer */
#define TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER                                       \
	(PROPRIETARY_TLV_BASE_ID + 0x7b) /* 0x017b */
/** TLV type : Pairwise Cipher */
#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x91) /* 0x0191 */
/** TLV type : Group Cipher */
#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x92) /* 0x0192 */
/** TLV type : BSS Status */
#define TLV_TYPE_BSS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x93) /* 0x0193 */
/** TLV type :  AP WMM params */
#define TLV_TYPE_AP_WMM_PARAM (PROPRIETARY_TLV_BASE_ID + 0xd0) /* 0x01d0 */
/** TLV type : AP Tx beacon rate */
#define TLV_TYPE_UAP_TX_BEACON_RATE                                            \
	(PROPRIETARY_TLV_BASE_ID + 288) /* 0x0220                              \
					 */

/** MrvlIEtypes_beacon_period_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** beacon period */
	t_u16 beacon_period;
} MLAN_PACK_END MrvlIEtypes_beacon_period_t;

/** MrvlIEtypes_dtim_period_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_dtim_period_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** DTIM period */
	t_u8 dtim_period;
} MLAN_PACK_END MrvlIEtypes_dtim_period_t;

/** MrvlIEtypes_tx_rate_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_tx_rate_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** tx data rate */
	t_u16 tx_data_rate;
} MLAN_PACK_END MrvlIEtypes_tx_rate_t;

/** MrvlIEtypes_mcbc_rate_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_mcbc_rate_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** mcbc data rate */
	t_u16 mcbc_data_rate;
} MLAN_PACK_END MrvlIEtypes_mcbc_rate_t;

/** MrvlIEtypes_tx_power_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_tx_power_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** tx power */
	t_u8 tx_power;
} MLAN_PACK_END MrvlIEtypes_tx_power_t;

/** MrvlIEtypes_bcast_ssid_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_bcast_ssid_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** bcast ssid control*/
	t_u8 bcast_ssid_ctl;
} MLAN_PACK_END MrvlIEtypes_bcast_ssid_t;

/** MrvlIEtypes_antenna_mode_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_antenna_mode_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** which antenna */
	t_u8 which_antenna;
	/** antenna mode*/
	t_u8 antenna_mode;
} MLAN_PACK_END MrvlIEtypes_antenna_mode_t;

/** MrvlIEtypes_pkt_forward_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_pkt_forward_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** pkt foward control */
	t_u8 pkt_forward_ctl;
} MLAN_PACK_END MrvlIEtypes_pkt_forward_t;

/** MrvlIEtypes_max_sta_count_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_max_sta_count_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** max station count */
	t_u16 max_sta_count;
} MLAN_PACK_END MrvlIEtypes_max_sta_count_t;

/** MrvlIEtypes_uap_max_sta_cnt */
typedef MLAN_PACK_START struct _MrvlIEtypes_uap_max_sta_cnt_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** max station count */
	t_u16 uap_max_sta;
} MLAN_PACK_END MrvlIEtypes_uap_max_sta_cnt_t;

/** MrvlIEtypes_sta_ageout_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_sta_ageout_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** station age out timer */
	t_u32 sta_ageout_timer;
} MLAN_PACK_END MrvlIEtypes_sta_ageout_t;

/** MrvlIEtypes_rts_threshold_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_rts_threshold_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** rts threshold */
	t_u16 rts_threshold;
} MLAN_PACK_END MrvlIEtypes_rts_threshold_t;

/** MrvlIEtypes_frag_threshold_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_frag_threshold_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** frag threshold */
	t_u16 frag_threshold;
} MLAN_PACK_END MrvlIEtypes_frag_threshold_t;

/** MrvlIEtypes_retry_limit_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_retry_limit_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** retry limit */
	t_u8 retry_limit;
} MLAN_PACK_END MrvlIEtypes_retry_limit_t;

/** MrvlIEtypes_eapol_pwk_hsk_timeout_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_timeout_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** pairwise update timeout in milliseconds */
	t_u32 pairwise_update_timeout;
} MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_timeout_t;

/** MrvlIEtypes_eapol_pwk_hsk_retries_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_retries_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** pairwise handshake retries */
	t_u32 pwk_retries;
} MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_retries_t;

/** MrvlIEtypes_eapol_gwk_hsk_timeout_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_timeout_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** groupwise update timeout in milliseconds */
	t_u32 groupwise_update_timeout;
} MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_timeout_t;

/** MrvlIEtypes_eapol_gwk_hsk_retries_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_retries_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** groupwise handshake retries */
	t_u32 gwk_retries;
} MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_retries_t;

/** MrvlIEtypes_mgmt_ie_passthru_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** mgmt IE mask value */
	t_u32 mgmt_ie_mask;
} MLAN_PACK_END MrvlIEtypes_mgmt_ie_passthru_t;

/** MrvlIEtypes_mac_filter_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_mac_filter_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Filter mode */
	t_u8 filter_mode;
	/** Number of STA MACs */
	t_u8 count;
	/** STA MAC addresses buffer */
	t_u8 mac_address[1];
} MLAN_PACK_END MrvlIEtypes_mac_filter_t;

/** MrvlIEtypes_auth_type_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_auth_type_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Authentication type */
	t_u8 auth_type;
} MLAN_PACK_END MrvlIEtypes_auth_type_t;

/** MrvlIEtypes_encrypt_protocol_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_encrypt_protocol_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** encryption protocol */
	t_u16 protocol;
} MLAN_PACK_END MrvlIEtypes_encrypt_protocol_t;

/** MrvlIEtypes_pwk_cipher_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_pwk_cipher_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** protocol */
	t_u16 protocol;
	/** pairwise cipher */
	t_u8 pairwise_cipher;
	/** reserved */
	t_u8 reserved;
} MLAN_PACK_END MrvlIEtypes_pwk_cipher_t;

/** MrvlIEtypes_gwk_cipher_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_gwk_cipher_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** group cipher */
	t_u8 group_cipher;
	/** reserved */
	t_u8 reserved;
} MLAN_PACK_END MrvlIEtypes_gwk_cipher_t;

/** MrvlIEtypes_akmp_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_akmp_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** key management */
	t_u16 key_mgmt;
	/** key management operation */
	t_u16 key_mgmt_operation;
} MLAN_PACK_END MrvlIEtypes_akmp_t;

/** MrvlIEtypes_passphrase_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_passphrase_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** passphrase */
	t_u8 passphrase[1];
} MLAN_PACK_END MrvlIEtypes_passphrase_t;

/** MrvlIEtypes_rsn_replay_prot_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_rsn_replay_prot_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** rsn replay proection */
	t_u8 rsn_replay_prot;
} MLAN_PACK_END MrvlIEtypes_rsn_replay_prot_t;

/** MrvlIEtypes_group_rekey_time_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_group_rekey_time_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** group key rekey time */
	t_u32 gk_rekey_time;
} MLAN_PACK_END MrvlIEtypes_group_rekey_time_t;

/** MrvlIEtypes_wep_key_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_wep_key_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** key index */
	t_u8 key_index;
	/** is default */
	t_u8 is_default;
	/** key data */
	t_u8 key[1];
} MLAN_PACK_END MrvlIEtypes_wep_key_t;

/** MrvlIEtypes_bss_status_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_bss_status_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** BSS status, READ only */
	t_u16 bss_status;
} MLAN_PACK_END MrvlIEtypes_bss_status_t;

/** MrvlIEtypes_preamble_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_preamble_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** preamble type, READ only */
	t_u8 preamble_type;
} MLAN_PACK_END MrvlIEtypes_preamble_t;

/** MrvlIEtypes_wmm_parameter_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_wmm_parameter_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** WMM parameter */
	WmmParameter_t wmm_para;
} MLAN_PACK_END MrvlIEtypes_wmm_parameter_t;

/** SNMP_MIB_UAP_INDEX */
typedef enum _SNMP_MIB_UAP_INDEX {
	tkip_mic_failures = 0x0b,
	ccmp_decrypt_errors = 0x0c,
	wep_undecryptable_count = 0x0d,
	wep_icv_error_count = 0x0e,
	decrypt_failure_count = 0xf,
	dot11_failed_count = 0x12,
	dot11_retry_count = 0x13,
	dot11_multi_retry_count = 0x14,
	dot11_frame_dup_count = 0x15,
	dot11_rts_success_count = 0x16,
	dot11_rts_failure_count = 0x17,
	dot11_ack_failure_count = 0x18,
	dot11_rx_fragment_count = 0x19,
	dot11_mcast_rx_frame_count = 0x1a,
	dot11_fcs_error_count = 0x1b,
	dot11_tx_frame_count = 0x1c,
	dot11_rsna_tkip_cm_invoked = 0x1d,
	dot11_rsna_4way_hshk_failures = 0x1e,
	dot11_mcast_tx_count = 0x1f,
} SNMP_MIB_UAP_INDEX;

/** MrvlIEtypes_snmp_oid_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_snmp_oid_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** data */
	t_u32 data;
} MLAN_PACK_END MrvlIEtypes_snmp_oid_t;

/** HostCmd_SYS_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_SYS_CONFIG {
	/** CMD Action GET/SET*/
	t_u16 action;
	/** Tlv buffer */
	t_u8 tlv_buffer[1];
} MLAN_PACK_END HostCmd_DS_SYS_CONFIG;

/** HostCmd_SYS_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_SYS_INFO {
	/** sys info */
	t_u8 sys_info[64];
} MLAN_PACK_END HostCmd_DS_SYS_INFO;

/** HostCmd_DS_STA_DEAUTH */
typedef MLAN_PACK_START struct _HostCmd_DS_STA_DEAUTH {
	/** mac address */
	t_u8 mac[MLAN_MAC_ADDR_LENGTH];
	/** reason code */
	t_u16 reason;
} MLAN_PACK_END HostCmd_DS_STA_DEAUTH;

/** HostCmd_DS_REPORT_MIC */
typedef MLAN_PACK_START struct _HostCmd_DS_REPORT_MIC {
	/** mac address */
	t_u8 mac[MLAN_MAC_ADDR_LENGTH];
} MLAN_PACK_END HostCmd_DS_REPORT_MIC;

/** HostCmd_UAP_OPER_CTRL */
typedef MLAN_PACK_START struct _HostCmd_DS_UAP_OPER_CTRL {
	/** CMD Action GET/SET*/
	t_u16 action;
	/** control*/
	t_u16 ctrl;
	/**channel operation*/
	t_u16 chan_opt;
	/**channel band tlv*/
	MrvlIEtypes_channel_band_t channel_band;
} MLAN_PACK_END HostCmd_DS_UAP_OPER_CTRL;

/** Host Command id: POWER_MGMT  */
#define HOST_CMD_POWER_MGMT_EXT 0x00ef
/** TLV type: AP Sleep param */
#define TLV_TYPE_AP_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6a) /* 0x016a */
/** TLV type: AP Inactivity Sleep param */
#define TLV_TYPE_AP_INACT_SLEEP_PARAM                                          \
	(PROPRIETARY_TLV_BASE_ID + 0x6b) /* 0x016b */

/** MrvlIEtypes_sleep_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_sleep_param_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** control bitmap */
	t_u32 ctrl_bitmap;
	/** min_sleep */
	t_u32 min_sleep;
	/** max_sleep */
	t_u32 max_sleep;
} MLAN_PACK_END MrvlIEtypes_sleep_param_t;

/** MrvlIEtypes_inact_sleep_param_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_inact_sleep_param_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** inactivity timeout */
	t_u32 inactivity_to;

	/** min_awake */
	t_u32 min_awake;
	/** max_awake */
	t_u32 max_awake;
} MLAN_PACK_END MrvlIEtypes_inact_sleep_param_t;

/** HostCmd_DS_POWER_MGMT */
typedef MLAN_PACK_START struct _HostCmd_DS_POWER_MGMT_EXT {
	/** CMD Action Get/Set*/
	t_u16 action;
	/** power mode */
	t_u16 power_mode;
} MLAN_PACK_END HostCmd_DS_POWER_MGMT_EXT;

/** MrvlIEtypes_ps_sta_ageout_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_ps_sta_ageout_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** station age out timer */
	t_u32 ps_sta_ageout_timer;
} MLAN_PACK_END MrvlIEtypes_ps_sta_ageout_t;

/** MrvlIEtypes_sta_info_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_sta_info_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** STA MAC address */
	t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
	/** Power Mgmt status */
	t_u8 power_mgmt_status;
	/** RSSI */
	t_s8 rssi;
	/** ie_buf */
	t_u8 ie_buf[];
} MLAN_PACK_END MrvlIEtypes_sta_info_t;

/** HostCmd_DS_STA_LIST */
typedef MLAN_PACK_START struct _HostCmd_DS_STA_LIST {
	/** Number of STAs */
	t_u16 sta_count;
	/* MrvlIEtypes_sta_info_t sta_info[]; */
	t_u8 tlv_buf[];
} MLAN_PACK_END HostCmd_DS_STA_LIST;

/** TLV ID : WAPI Information */
#define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 0x67) /* 0x0167 */

/** MrvlIEtypes_sta_info_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Multicast PN */
	t_u8 multicast_PN[16];
} MLAN_PACK_END MrvlIEtypes_wapi_info_t;
#endif /* UAP_SUPPORT */

/** HostCmd_DS_TX_RX_HISTOGRAM */
typedef MLAN_PACK_START struct _HostCmd_DS_TX_RX_HISTOGRAM {
	/**  Enable or disable  */
	t_u8 enable;
	/** Choose to get TX, RX or both */
	t_u16 action;
} MLAN_PACK_END HostCmd_DS_TX_RX_HISTOGRAM;

/** TLV buffer : 2040 coex config */
typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Enable */
	t_u8 enable_2040coex;
} MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t;

/**BT coexit scan time setting*/
typedef MLAN_PACK_START struct _MrvlIEtypes_BtCoexScanTime_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/**coex scan state  0: disable 1: enable*/
	t_u8 coex_scan;
	/**reserved*/
	t_u8 reserved;
	/**min scan time*/
	t_u16 min_scan_time;
	/**max scan time*/
	t_u16 max_scan_time;
} MLAN_PACK_END MrvlIEtypes_BtCoexScanTime_t;

/**BT coexit aggr win size */
typedef MLAN_PACK_START struct _MrvlIETypes_BtCoexAggrWinSize_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/**winsize  0: restore default winsize, 1: use below winsize */
	t_u8 coex_win_size;
	/**tx win size*/
	t_u8 tx_win_size;
	/**rx win size*/
	t_u8 rx_win_size;
	/**reserved*/
	t_u8 reserved;
} MLAN_PACK_END MrvlIETypes_BtCoexAggrWinSize_t;

/** MrvlIEtypes_eapol_pkt_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pkt_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** eapol pkt buf */
	t_u8 pkt_buf[];
} MLAN_PACK_END MrvlIEtypes_eapol_pkt_t;

/** HostCmd_DS_EAPOL_PKT */
typedef MLAN_PACK_START struct _HostCmd_DS_EAPOL_PKT {
	/** Action */
	t_u16 action;
	/** TLV buffer */
	MrvlIEtypes_eapol_pkt_t tlv_eapol;
} MLAN_PACK_END HostCmd_DS_EAPOL_PKT;

/** HostCmd_DS_OXYGEN_MIMO_SWITCH */
typedef MLAN_PACK_START struct _HostCmd_DS_MIMO_SWITCH {
	/** Tx path antanne mode */
	t_u8 txpath_antmode;
	/** Rx path antanne mode */
	t_u8 rxpath_antmode;
} MLAN_PACK_END HostCmd_DS_MIMO_SWITCH;

#ifdef RX_PACKET_COALESCE
typedef MLAN_PACK_START struct _HostCmd_DS_RX_PKT_COAL_CFG {
	/** Action */
	t_u16 action;
	/** Packet threshold */
	t_u32 packet_threshold;
	/** Timeout */
	t_u16 delay;
} MLAN_PACK_END HostCmd_DS_RX_PKT_COAL_CFG;
#endif

/** HostCmd_DS_DYN_BW */
typedef MLAN_PACK_START struct _HostCmd_DS_DYN_BW {
	/** Action */
	t_u16 action;
	/** Dynamic bandwidth */
	t_u16 dyn_bw;
} MLAN_PACK_END HostCmd_DS_DYN_BW;

/** Host Command ID : Packet aggregation CTRL */
#define HostCmd_CMD_PACKET_AGGR_CTRL 0x0251

/** HostCmd_DS_PACKET_AGGR_CTRL */
typedef MLAN_PACK_START struct _HostCmd_DS_PACKET_AGGR_AGGR_CTRL {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/** enable aggregation, BIT(0) TX, BIT(1)RX */
	t_u16 aggr_enable;
	/** Tx aggregation alignment */
	t_u16 tx_aggr_max_size;
	/** Tx aggregation max packet number */
	t_u16 tx_aggr_max_num;
	/** Tx aggregation alignment */
	t_u16 tx_aggr_align;
} MLAN_PACK_END HostCmd_DS_PACKET_AGGR_CTRL;

#ifdef USB
/** Host Command ID : Packet aggregation over host interface */
#define HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE 0x0117

/** TLV ID : USB Aggregation parameters */
#define MRVL_USB_AGGR_PARAM_TLV_ID                                             \
	(PROPRIETARY_TLV_BASE_ID + 0xB1) /* 0x1B1                              \
					  */

/** TLV size : USB Aggregation parameters, except header */
#define MRVL_USB_AGGR_PARAM_TLV_LEN (14)

/** VHT Operations IE */
typedef MLAN_PACK_START struct _MrvlIETypes_USBAggrParam_t {
	/** Header */
	MrvlIEtypesHeader_t header;

	/** Enable */
	t_u16 enable;
	/** Rx aggregation mode */
	t_u16 rx_aggr_mode;
	/** Rx aggregation alignment */
	t_u16 rx_aggr_align;
	/** Rx aggregation max packet/size */
	t_u16 rx_aggr_max;
	/** Rx aggrgation timeout, in microseconds */
	t_u16 rx_aggr_tmo;
	/** Tx aggregation mode */
	t_u16 tx_aggr_mode;
	/** Tx aggregation alignment */
	t_u16 tx_aggr_align;
} MLAN_PACK_END MrvlIETypes_USBAggrParam_t;

/** HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE */
typedef MLAN_PACK_START struct _HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE {
	/** ACT_GET/ACT_SET */
	t_u16 action;
	/**
	 *  Host interface aggregation control TLV(s) to be sent in the firmware
	 * command
	 *
	 *  TLV_USB_AGGR_PARAM, MrvlIETypes_USBAggrParam_t
	 */
	t_u8 tlv_buf[1];
} MLAN_PACK_END HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE;
#endif /* USB */

/** HostCmd_CONFIG_LOW_PWR_MODE */
typedef MLAN_PACK_START struct _HostCmd_CONFIG_LOW_PWR_MODE {
	/** Enable LPM */
	t_u8 enable;
} MLAN_PACK_END HostCmd_CONFIG_LOW_PWR_MODE;

/** HostCmd_CMD_GET_TSF */
typedef MLAN_PACK_START struct _HostCmd_DS_TSF {
	/** tsf value*/
	t_u64 tsf;
} MLAN_PACK_END HostCmd_DS_TSF;
/* WLAN_GET_TSF*/

typedef struct _HostCmd_DS_DFS_REPEATER_MODE {
	/** Set or Get */
	t_u16 action;
	/** 1 on or 0 off */
	t_u16 mode;
} HostCmd_DS_DFS_REPEATER_MODE;

/** HostCmd_DS_BOOT_SLEEP */
typedef MLAN_PACK_START struct _HostCmd_DS_BOOT_SLEEP {
	/** Set or Get */
	t_u16 action;
	/** 1 on or 0 off */
	t_u16 enable;
} MLAN_PACK_END HostCmd_DS_BOOT_SLEEP;

/**
 * @brief 802.11h Local Power Constraint NXP extended TLV
 */
typedef MLAN_PACK_START struct {
	MrvlIEtypesHeader_t header; /**< NXP TLV header: ID/Len */
	t_u8 chan; /**< Channel local constraint applies to */

	/** Power constraint included in beacons
	 *  and used by fw to offset 11d info
	 */
	t_u8 constraint;

} MLAN_PACK_END MrvlIEtypes_LocalPowerConstraint_t;

/*
 *
 * Data structures for driver/firmware command processing
 *
 */

/**  TPC Info structure sent in CMD_802_11_TPC_INFO command to firmware */
typedef MLAN_PACK_START struct {
	/**< Local constraint */
	MrvlIEtypes_LocalPowerConstraint_t local_constraint;
	/**< Power Capability */
	MrvlIEtypes_PowerCapability_t power_cap;

} MLAN_PACK_END HostCmd_DS_802_11_TPC_INFO;

/**  TPC Request structure sent in CMD_802_11_TPC_ADAPT_REQ
 *  command to firmware
 */
typedef MLAN_PACK_START struct {
	t_u8 dest_mac[MLAN_MAC_ADDR_LENGTH]; /**< Destination STA address  */
	t_u16 timeout; /**< Response timeout in ms */
	t_u8 rate_index; /**< IEEE Rate index to send request */

} MLAN_PACK_END HostCmd_TpcRequest;

/**  TPC Response structure received from the
 *   CMD_802_11_TPC_ADAPT_REQ command
 */
typedef MLAN_PACK_START struct {
	t_u8 tpc_ret_code; /**< Firmware command result status code */
	t_s8 tx_power; /**< Reported TX Power from the TPC Report element */
	t_s8 link_margin; /**< Reported link margin from the TPC Report element
			   */
	t_s8 rssi; /**< RSSI of the received TPC Report frame */

} MLAN_PACK_END HostCmd_TpcResponse;

/**  CMD_802_11_TPC_ADAPT_REQ substruct.
 *   Union of the TPC request and response
 */
typedef MLAN_PACK_START union {
	HostCmd_TpcRequest req; /**< Request struct sent to firmware */
	HostCmd_TpcResponse resp; /**< Response struct received from firmware */

} MLAN_PACK_END HostCmd_DS_802_11_TPC_ADAPT_REQ;

/**  CMD_802_11_CHAN_SW_ANN firmware command substructure */
typedef MLAN_PACK_START struct {
	t_u8 switch_mode; /**< Set to 1 for a quiet switch request, no STA tx */
	t_u8 new_chan; /**< Requested new channel */
	t_u8 switch_count; /**< Number of TBTTs until the switch is to occur */
} MLAN_PACK_END HostCmd_DS_802_11_CHAN_SW_ANN;

/**
 * @brief Enumeration of measurement types, including max supported
 *        enum for 11h/11k
 */
typedef MLAN_PACK_START enum _MeasType_t {
	WLAN_MEAS_BASIC = 0, /**< 11h: Basic */
	WLAN_MEAS_NUM_TYPES, /**< Number of enumerated measurements */
	WLAN_MEAS_11H_MAX_TYPE = WLAN_MEAS_BASIC, /**< Max 11h measurement */

} MLAN_PACK_END MeasType_t;

/**
 * @brief Mode octet of the measurement request element (7.3.2.21)
 */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
	/**< Reserved */
	t_u8 rsvd5_7 : 3;
	/**< 11k: duration spec. for meas. is mandatory */
	t_u8 duration_mandatory : 1;
	/**< 11h: en/disable report rcpt. of spec. type */
	t_u8 report : 1;
	/**< 11h: en/disable requests of specified type */
	t_u8 request : 1;
	/**< 11h: enable report/request bits */
	t_u8 enable : 1;
	/**< 11k: series or parallel with previous meas */
	t_u8 parallel : 1;
#else
	/**< 11k: series or parallel with previous meas */
	t_u8 parallel : 1;
	/**< 11h: enable report/request bits */
	t_u8 enable : 1;
	/**< 11h: en/disable requests of specified type */
	t_u8 request : 1;
	/**< 11h: en/disable report rcpt. of spec. type */
	t_u8 report : 1;
	/**< 11k: duration spec. for meas. is mandatory */
	t_u8 duration_mandatory : 1;
	/**< Reserved */
	t_u8 rsvd5_7 : 3;
#endif /* BIG_ENDIAN_SUPPORT */

} MLAN_PACK_END MeasReqMode_t;

/**
 * @brief Common measurement request structure (7.3.2.21.1 to 7.3.2.21.3)
 */
typedef MLAN_PACK_START struct {
	t_u8 channel; /**< Channel to measure */
	t_u64 start_time; /**< TSF Start time of measurement (0 for immediate)
			   */
	t_u16 duration; /**< TU duration of the measurement */

} MLAN_PACK_END MeasReqCommonFormat_t;

/**
 * @brief Basic measurement request structure (7.3.2.21.1)
 */
typedef MeasReqCommonFormat_t MeasReqBasic_t;

/**
 * @brief CCA measurement request structure (7.3.2.21.2)
 */
typedef MeasReqCommonFormat_t MeasReqCCA_t;

/**
 * @brief RPI measurement request structure (7.3.2.21.3)
 */
typedef MeasReqCommonFormat_t MeasReqRPI_t;

/**
 * @brief Union of the availble measurement request types.  Passed in the
 *        driver/firmware interface.
 */
typedef union {
	MeasReqBasic_t basic; /**< Basic measurement request */
	MeasReqCCA_t cca; /**< CCA measurement request */
	MeasReqRPI_t rpi; /**< RPI measurement request */

} MeasRequest_t;

/**
 * @brief Mode octet of the measurement report element (7.3.2.22)
 */
typedef MLAN_PACK_START struct {
#ifdef BIG_ENDIAN_SUPPORT
	t_u8 rsvd3_7 : 5; /**< Reserved */
	t_u8 refused : 1; /**< Measurement refused */
	t_u8 incapable : 1; /**< Incapable of performing measurement */
	t_u8 late : 1; /**< Start TSF time missed for measurement */
#else
	t_u8 late : 1; /**< Start TSF time missed for measurement */
	t_u8 incapable : 1; /**< Incapable of performing measurement */
	t_u8 refused : 1; /**< Measurement refused */
	t_u8 rsvd3_7 : 5; /**< Reserved */
#endif /* BIG_ENDIAN_SUPPORT */

} MLAN_PACK_END MeasRptMode_t;

/**
 * @brief Basic measurement report (7.3.2.22.1)
 */
typedef MLAN_PACK_START struct {
	t_u8 channel; /**< Channel to measured */
	t_u64 start_time; /**< Start time (TSF) of measurement */
	t_u16 duration; /**< Duration of measurement in TUs */
	MeasRptBasicMap_t map; /**< Basic measurement report */

} MLAN_PACK_END MeasRptBasic_t;

/**
 * @brief CCA measurement report (7.3.2.22.2)
 */
typedef MLAN_PACK_START struct {
	t_u8 channel; /**< Channel to measured */
	t_u64 start_time; /**< Start time (TSF) of measurement */
	t_u16 duration; /**< Duration of measurement in TUs  */
	t_u8 busy_fraction; /**< Fractional duration CCA indicated chan busy */

} MLAN_PACK_END MeasRptCCA_t;

/**
 * @brief RPI measurement report (7.3.2.22.3)
 */
typedef MLAN_PACK_START struct {
	t_u8 channel; /**< Channel to measured  */
	t_u64 start_time; /**< Start time (TSF) of measurement */
	t_u16 duration; /**< Duration of measurement in TUs  */
	t_u8 density[8]; /**< RPI Density histogram report */

} MLAN_PACK_END MeasRptRPI_t;

/**
 * @brief Union of the availble measurement report types.  Passed in the
 *        driver/firmware interface.
 */
typedef union {
	MeasRptBasic_t basic; /**< Basic measurement report */
	MeasRptCCA_t cca; /**< CCA measurement report */
	MeasRptRPI_t rpi; /**< RPI measurement report */

} MeasReport_t;

/**
 * @brief Structure passed to firmware to perform a measurement
 */
typedef MLAN_PACK_START struct {
	t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
	t_u8 dialog_token; /**< Measurement dialog toke */
	MeasReqMode_t req_mode; /**< Report mode  */
	MeasType_t meas_type; /**< Measurement type */
	MeasRequest_t req; /**< Measurement request data */

} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REQUEST,
	*pHostCmd_DS_MEASUREMENT_REQUEST;

/**
 * @brief Structure passed back from firmware with a measurement report,
 *        also can be to send a measurement report to another STA
 */
typedef MLAN_PACK_START struct {
	t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
	t_u8 dialog_token; /**< Measurement dialog token */
	MeasRptMode_t rpt_mode; /**< Report mode */
	MeasType_t meas_type; /**< Measurement type */
	MeasReport_t rpt; /**< Measurement report data */

} MLAN_PACK_END HostCmd_DS_MEASUREMENT_REPORT, *pHostCmd_DS_MEASUREMENT_REPORT;

typedef MLAN_PACK_START struct {
	t_u16 startFreq;
	Band_Config_t bandcfg;
	t_u8 chanNum;

} MLAN_PACK_END MrvlChannelDesc_t;

#ifdef OPCHAN
typedef MLAN_PACK_START struct {
	MrvlIEtypesHeader_t header; /**< Header */

	MrvlChannelDesc_t chanDesc;

	t_u16 controlFlags;
	t_u16 reserved;

	t_u8 actPower;
	t_u8 mdMinPower;
	t_u8 mdMaxPower;
	t_u8 mdPower;

} MLAN_PACK_END MrvlIEtypes_ChanControlDesc_t;

typedef MLAN_PACK_START struct {
	MrvlIEtypesHeader_t header; /**< Header */

	t_u16 chanGroupBitmap;
	ChanScanMode_t scanMode;
	t_u8 numChan;

	MrvlChannelDesc_t chanDesc[50];

} MLAN_PACK_END MrvlIEtypes_ChanGroupControl_t;

typedef MLAN_PACK_START struct {
	t_u16 action; /**< CMD Action Get/Set*/

	t_u8 tlv_buffer[1];

} MLAN_PACK_END HostCmd_DS_OPCHAN_CONFIG;

typedef MLAN_PACK_START struct {
	t_u16 action; /**< CMD Action Get/Set*/

	t_u8 tlv_buffer[1];

} MLAN_PACK_END HostCmd_DS_OPCHAN_CHANGROUP_CONFIG;

#define HostCmd_CMD_OPCHAN_CONFIG 0x00f8
#define HostCmd_CMD_OPCHAN_CHANGROUP_CONFIG 0x00f9
#endif

typedef MLAN_PACK_START struct {
	MrvlIEtypesHeader_t Header; /**< Header */

	MeasRptBasicMap_t map; /**< IEEE 802.11h basic meas report */
} MLAN_PACK_END MrvlIEtypes_ChanRpt11hBasic_t;

/* MrvlIEtypes_DfsW53Cfg_t*/
typedef MLAN_PACK_START struct {
	/* header */
	MrvlIEtypesHeader_t Header;
	/** df53cfg vlue*/
	t_u8 dfs53cfg;
} MLAN_PACK_END MrvlIEtypes_DfsW53Cfg_t;

typedef MLAN_PACK_START struct {
	MrvlChannelDesc_t chan_desc; /**< Channel band, number */
	t_u32 millisec_dwell_time; /**< Channel dwell time in milliseconds */
} MLAN_PACK_END HostCmd_DS_CHAN_RPT_REQ;

typedef MLAN_PACK_START struct {
	t_u32 cmd_result; /**< Rpt request command result (0 == SUCCESS) */
	t_u64 start_tsf; /**< TSF Measurement started */
	t_u32 duration; /**< Duration of measurement in microsecs */
	t_u8 tlv_buffer[1]; /**< TLV Buffer */
} MLAN_PACK_END HostCmd_DS_CHAN_RPT_RSP;

/** statistics threshold */
typedef MLAN_PACK_START struct {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** value */
	t_u8 value;
	/** reporting frequency */
	t_u8 frequency;
} MLAN_PACK_END MrvlIEtypes_BeaconHighRssiThreshold_t,
	MrvlIEtypes_BeaconLowRssiThreshold_t,
	MrvlIEtypes_BeaconHighSnrThreshold_t,
	MrvlIEtypes_BeaconLowSnrThreshold_t, MrvlIEtypes_FailureCount_t,
	MrvlIEtypes_DataLowRssiThreshold_t, MrvlIEtypes_DataHighRssiThreshold_t,
	MrvlIEtypes_DataLowSnrThreshold_t, MrvlIEtypes_DataHighSnrThreshold_t,
	MrvlIETypes_PreBeaconMissed_t, MrvlIEtypes_BeaconsMissed_t;

/** statistics threshold for LinkQuality */
typedef MLAN_PACK_START struct {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Link SNR threshold (dB) */
	t_u16 link_snr;
	/** Link SNR frequency */
	t_u16 link_snr_freq;
	/* Second minimum rate value as per the rate table below */
	t_u16 link_rate;
	/* Second minimum rate frequency */
	t_u16 link_rate_freq;
	/* Tx latency value (us) */
	t_u16 link_tx_latency;
	/* Tx latency frequency */
	t_u16 link_tx_lantency_freq;
} MLAN_PACK_END MrvlIEtypes_LinkQualityThreshold_t;

#ifdef PCIE
/** PCIE dual descriptor for data/event */
typedef MLAN_PACK_START struct _dual_desc_buf {
	/** buf size */
	t_u16 len;
	/** buffer descriptor flags */
	t_u16 flags;
	/** pkt size */
	t_u16 pkt_size;
	/** reserved */
	t_u16 reserved;
	/** Physical address of the buffer */
	t_u64 paddr;
} MLAN_PACK_END adma_dual_desc_buf, *padma_dual_desc_buf;

#if defined(PCIE8997) || defined(PCIE8897)
/** PCIE ring buffer description for DATA */
typedef MLAN_PACK_START struct _mlan_pcie_data_buf {
	/** Buffer descriptor flags */
	t_u16 flags;
	/** Offset of fragment/pkt to start of ip header */
	t_u16 offset;
	/** Fragment length of the buffer */
	t_u16 frag_len;
	/** Length of the buffer */
	t_u16 len;
	/** Physical address of the buffer */
	t_u64 paddr;
	/** Reserved */
	t_u32 reserved;
} MLAN_PACK_END mlan_pcie_data_buf, *pmlan_pcie_data_buf;

/** PCIE ring buffer description for EVENT */
typedef MLAN_PACK_START struct _mlan_pcie_evt_buf {
	/** Physical address of the buffer */
	t_u64 paddr;
	/** Length of the buffer */
	t_u16 len;
	/** Buffer descriptor flags */
	t_u16 flags;
} MLAN_PACK_END mlan_pcie_evt_buf, *pmlan_pcie_evt_buf;

/** PCIE host buffer configuration */
typedef MLAN_PACK_START struct _HostCmd_DS_PCIE_HOST_BUF_DETAILS {
	/** TX buffer descriptor ring address */
	t_u32 txbd_addr_lo;
	t_u32 txbd_addr_hi;
	/** TX buffer descriptor ring count */
	t_u32 txbd_count;

	/** RX buffer descriptor ring address */
	t_u32 rxbd_addr_lo;
	t_u32 rxbd_addr_hi;
	/** RX buffer descriptor ring count */
	t_u32 rxbd_count;

	/** Event buffer descriptor ring address */
	t_u32 evtbd_addr_lo;
	t_u32 evtbd_addr_hi;
	/** Event buffer descriptor ring count */
	t_u32 evtbd_count;
} HostCmd_DS_PCIE_HOST_BUF_DETAILS;
#endif
#endif

typedef MLAN_PACK_START struct _HostCmd_DS_SENSOR_TEMP {
	t_u32 temperature;
} MLAN_PACK_END HostCmd_DS_SENSOR_TEMP;

#ifdef STA_SUPPORT
typedef MLAN_PACK_START struct _HostCmd_DS_STA_CONFIGURE {
	/** Action Set or get */
	t_u16 action;
	/** Tlv buffer */
	t_u8 tlv_buffer[];
	/**MrvlIEtypes_channel_band_t band_channel; */
} MLAN_PACK_END HostCmd_DS_STA_CONFIGURE;
#endif

/** HostCmd_DS_AUTO_TX structure */
typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_TX {
	/** Action Set or get */
	t_u16 action;
	/** Tlv buffer */
	t_u8 tlv_buffer[];
} MLAN_PACK_END HostCmd_DS_AUTO_TX;

#define OID_CLOUD_KEEP_ALIVE 0
#define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 133
/** TLV for cloud keep alive control info */
#define TLV_TYPE_CLOUD_KEEP_ALIVE                                              \
	(PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** ID for cloud keep alive */
	t_u8 keep_alive_id;
	/** Enable/disable for this ID */
	t_u8 enable;
	/** TLV buffer */
	t_u8 tlv[];
} MLAN_PACK_END MrvlIEtypes_Cloud_Keep_Alive_t;

/** TLV for cloud keep alive control info */
#define TLV_TYPE_KEEP_ALIVE_CTRL                                               \
	(PROPRIETARY_TLV_BASE_ID + 0x103) /* 0x0100 + 259 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Ctrl_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** period to send keep alive packet */
	t_u32 snd_interval;
	/** period to send retry packet */
	t_u16 retry_interval;
	/** count to send retry packet */
	t_u16 retry_count;
} MLAN_PACK_END MrvlIEtypes_Keep_Alive_Ctrl_t;

/** TLV for cloud keep alive packet */
#define TLV_TYPE_KEEP_ALIVE_PKT                                                \
	(PROPRIETARY_TLV_BASE_ID + 0x104) /* 0x0100 + 260 */
typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Pkt_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** Ethernet Header */
	Eth803Hdr_t eth_header;
	/** packet buffer*/
	t_u8 ip_packet[];
} MLAN_PACK_END MrvlIEtypes_Keep_Alive_Pkt_t;

/** TLV to indicate firmware only keep probe response while scan */
#define TLV_TYPE_ONLYPROBERESP (PROPRIETARY_TLV_BASE_ID + 0xE9) /* 0x01E9 */
typedef MLAN_PACK_START struct _MrvlIEtypes_OnlyProberesp_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** only keep probe response */
	t_u8 proberesp_only;
} MLAN_PACK_END MrvlIEtypes_OnlyProberesp_t;

#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
#define HostCmd_CMD_CRYPTO 0x025e

#define HostCmd_CMD_CRYPTO_SUBCMD_PRF_HMAC_SHA1 (0x1)
#define HostCmd_CMD_CRYPTO_SUBCMD_HMAC_SHA1 (0x2)
#define HostCmd_CMD_CRYPTO_SUBCMD_HMAC_SHA256 (0x3)
#define HostCmd_CMD_CRYPTO_SUBCMD_SHA256 (0x4)
#define HostCmd_CMD_CRYPTO_SUBCMD_RIJNDAEL (0x5)
#define HostCmd_CMD_CRYPTO_SUBCMD_RC4 (0x6)
#define HostCmd_CMD_CRYPTO_SUBCMD_MD5 (0x7)
#define HostCmd_CMD_CRYPTO_SUBCMD_MRVL_F (0x8)
#define HostCmd_CMD_CRYPTO_SUBCMD_SHA256_KDF (0x9)

#define TLV_TYPE_CRYPTO_KEY (PROPRIETARY_TLV_BASE_ID + 308)
#define TLV_TYPE_CRYPTO_KEY_IV (PROPRIETARY_TLV_BASE_ID + 309)
#define TLV_TYPE_CRYPTO_KEY_PREFIX (PROPRIETARY_TLV_BASE_ID + 310)
#define TLV_TYPE_CRYPTO_KEY_DATA_BLK (PROPRIETARY_TLV_BASE_ID + 311)

/** MrvlIEParamSet_t */
typedef MLAN_PACK_START struct {
	/** Type */
	t_u16 Type;
	/** Length */
	t_u16 Length;
} MLAN_PACK_END MrvlIEParamSet_t;

/** HostCmd_DS_CRYPTO */
typedef MLAN_PACK_START struct _HostCmd_DS_CRYPTO {
	/** action */
	t_u16 action;
	/** subCmdCode */
	t_u8 subCmdCode;
	/** subCmd start */
	t_u8 subCmd[];
} MLAN_PACK_END HostCmd_DS_CRYPTO;

/** subcmd_prf_hmac_sha1 used by prf_hmac_sha1, md5 and sha256_kdf */
typedef MLAN_PACK_START struct _subcmd_prf_hmac_sha1 {
	/** output_len */
	t_u16 output_len;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END subcmd_prf_hmac_sha1_t, subcmd_md5_t, subcmd_sha256_kdf_t;

/** subcmd_hmac_sha1 used by hmac_sha1, hmac_sha256, sha256 */
typedef MLAN_PACK_START struct _subcmd_hmac_sha1 {
	/** output_len */
	t_u16 output_len;
	/** number of data blocks */
	t_u16 data_blks_nr;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END subcmd_hmac_sha1_t, subcmd_hmac_sha256_t, subcmd_sha256_t;

/** subcmd_rijndael, used by rijndael */
typedef MLAN_PACK_START struct _subcmd_rijndael {
	/** output_len */
	t_u16 output_len;
	/** sub action code */
	t_u8 sub_action_code;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END subcmd_rijndael_t;

/** subcmd_rc4, used by rc4 */
typedef MLAN_PACK_START struct _subcmd_rc4 {
	/** output_len */
	t_u16 output_len;
	/** skip bytes */
	t_u16 skip_bytes;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END subcmd_rc4_t;

/** subcmd_mrvf_f, used by mrvl_f*/
typedef MLAN_PACK_START struct _subcmd_mrvf_f {
	/** output_len */
	t_u16 output_len;
	/** iterations */
	t_u32 iterations;
	/** count */
	t_u32 count;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END subcmd_mrvl_f_t;

#endif

#ifdef UAP_SUPPORT
/** action add station */
#define HostCmd_ACT_ADD_STA 0x1
/** remove station */
#define HostCmd_ACT_REMOVE_STA 0x0
/** HostCmd_DS_ADD_STATION */
typedef MLAN_PACK_START struct _HostCmd_DS_ADD_STATION {
	/** 1 -add, 0 --delete */
	t_u16 action;
	/** aid */
	t_u16 aid;
	/** peer_mac */
	t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
	/** Listen Interval */
	int listen_interval;
	/** Capability Info */
	t_u16 cap_info;
	/** tlv start */
	t_u8 tlv[];
} MLAN_PACK_END HostCmd_DS_ADD_STATION;

/** Host Command ID : Add New Station */
#define HostCmd_CMD_ADD_NEW_STATION 0x025f
/** TLV id: station flag */
#define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313)
/**MrvlIEtypes_Sta_Flag_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_StaFlag_t {
	/** Header */
	MrvlIEtypesHeader_t header;
	/** station flag     */
	t_u32 sta_flags;
} MLAN_PACK_END MrvlIEtypes_StaFlag_t;
#endif

/** Host Command ID : _HostCmd_DS_BAND_STEERING */
typedef MLAN_PACK_START struct _HostCmd_DS_BAND_STEERING {
	/** ACT_GET/ACT_SET */
	t_u8 action;
	/** State */
	t_u8 state;
	/** probe requests to be blocked on 2g */
	t_u8 block_2g_prb_req;
	/** limit the btm request sent to STA at <max_btm_req_allowed>*/
	t_u8 max_btm_req_allowed;
} MLAN_PACK_END HostCmd_DS_BAND_STEERING;

/** HostCmd_CMD_RX_ABORT_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_RX_ABORT_CFG {
	/** Action */
	t_u16 action;
	/** Enable/disable rx abort on weak pkt rssi */
	t_u8 enable;
	/** rx weak rssi pkt threshold */
	t_s8 rssi_threshold;
} MLAN_PACK_END HostCmd_DS_CMD_RX_ABORT_CFG;
/** HostCmd_CMD_RX_ABORT_CFG_EXT */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_RX_ABORT_CFG_EXT {
	/** Action */
	t_u16 action;
	/** Enable/disable dyn rx abort on weak pkt rssi */
	t_u8 enable;
	/** specify rssi margin */
	t_s8 rssi_margin;
	/** specify ceil rssi threshold */
	t_s8 ceil_rssi_threshold;
} MLAN_PACK_END HostCmd_DS_CMD_RX_ABORT_CFG_EXT;

/** HostCmd_CMD_ARB_CONFIG */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_ARB_CONFIG {
	/** Action */
	t_u16 action;
	/** 0-4 */
	t_u32 arb_mode;
	/** 1: use FW enhancement, 0: use FW default */
	t_u32 reserved;
} MLAN_PACK_END HostCmd_DS_CMD_ARB_CONFIG;

/** HostCmd_DS_CMD_TX_AMPDU_PROT_MODE */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_AMPDU_PROT_MODE {
	/** Action */
	t_u16 action;
	/** Prot mode */
	t_u16 mode;
} MLAN_PACK_END HostCmd_DS_CMD_TX_AMPDU_PROT_MODE;

/** HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG {
	/** Action */
	t_u16 action;
	/** Cfg state */
	t_u16 state;
} MLAN_PACK_END HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG;

/** HostCmd_CMD_RATE_ADAPT_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_RATE_ADAPT_CFG {
	/** Action */
	t_u16 action;
	/** SR Rateadapt*/
	t_u8 sr_rateadapt;
	/** set low threshold */
	t_u8 ra_low_thresh;
	/** set high threshold */
	t_u8 ra_high_thresh;
	/** set interval */
	t_u16 ra_interval;
} MLAN_PACK_END HostCmd_DS_CMD_RATE_ADAPT_CFG;

/** HostCmd_CMD_CCK_DESENSE_CFG */
typedef MLAN_PACK_START struct _HostCmd_DS_CMD_CCK_DESENSE_CFG {
	/** Action */
	t_u16 action;
	/** cck desense mode: 0:disable 1:normal 2:dynamic */
	t_u16 mode;
	/** specify rssi margin */
	t_s8 margin;
	/** specify ceil rssi threshold */
	t_s8 ceil_thresh;
	/** cck desense "on" interval count */
	t_u8 num_on_intervals;
	/** cck desense "off" interval count */
	t_u8 num_off_intervals;
} MLAN_PACK_END HostCmd_DS_CMD_CCK_DESENSE_CFG;

/** HostCmd_DS_COMMAND */
typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
	/** Command Header : Command */
	t_u16 command;
	/** Command Header : Size */
	t_u16 size;
	/** Command Header : Sequence number */
	t_u16 seq_num;
	/** Command Header : Result */
	t_u16 result;
	/** Command Body */
	union {
		/** Hardware specifications */
		HostCmd_DS_GET_HW_SPEC hw_spec;
#ifdef SDIO
		HostCmd_DS_SDIO_SP_RX_AGGR_CFG sdio_rx_aggr;
#endif
		/** Cfg data */
		HostCmd_DS_802_11_CFG_DATA cfg_data;
		/** MAC control */
		HostCmd_DS_MAC_CONTROL mac_ctrl;
		/** MAC address */
		HostCmd_DS_802_11_MAC_ADDRESS mac_addr;
		/** MAC muticast address */
		HostCmd_DS_MAC_MULTICAST_ADR mc_addr;
		/** Get log */
		HostCmd_DS_802_11_GET_LOG get_log;
		/** Get link layer statistic */
		HostCmd_DS_802_11_LINK_STATISTIC get_link_statistic;
		/** RSSI information */
		HostCmd_DS_802_11_RSSI_INFO_EXT rssi_info_ext;
		/** RSSI information */
		HostCmd_DS_802_11_RSSI_INFO rssi_info;
		/** RSSI information response */
		HostCmd_DS_802_11_RSSI_INFO_RSP rssi_info_rsp;
		/** SNMP MIB */
		HostCmd_DS_802_11_SNMP_MIB smib;
#ifdef UAP_SUPPORT
		/** UAP SNMP MIB */
		HostCmd_DS_UAP_802_11_SNMP_MIB uap_smib;
#endif
		/** Radio control */
		HostCmd_DS_802_11_RADIO_CONTROL radio;
		/** RF channel */
		HostCmd_DS_802_11_RF_CHANNEL rf_channel;
		/** Tx rate query */
		HostCmd_TX_RATE_QUERY tx_rate;
		/** Tx rate configuration */
		HostCmd_DS_TX_RATE_CFG tx_rate_cfg;
		/** Tx power configuration */
		HostCmd_DS_TXPWR_CFG txp_cfg;
		/** RF Tx power configuration */
		HostCmd_DS_802_11_RF_TX_POWER txp;

		/** RF antenna */
		HostCmd_DS_802_11_RF_ANTENNA antenna;

		/** CW Mode: Tx CW Level control */
		HostCmd_DS_CW_MODE_CTRL cwmode;
		/** Enhanced power save command */
		HostCmd_DS_802_11_PS_MODE_ENH psmode_enh;
		HostCmd_DS_802_11_HS_CFG_ENH opt_hs_cfg;
		/** Scan */
		HostCmd_DS_802_11_SCAN scan;
		/** Extended Scan */
		HostCmd_DS_802_11_SCAN_EXT ext_scan;

		/** Mgmt frame subtype mask */
		HostCmd_DS_RX_MGMT_IND rx_mgmt_ind;
		/** Scan response */
		HostCmd_DS_802_11_SCAN_RSP scan_resp;

		HostCmd_DS_802_11_BG_SCAN_CONFIG bg_scan_config;
		HostCmd_DS_802_11_BG_SCAN_QUERY bg_scan_query;
		HostCmd_DS_802_11_BG_SCAN_QUERY_RSP bg_scan_query_resp;
		HostCmd_DS_SUBSCRIBE_EVENT subscribe_event;
		HostCmd_DS_OTP_USER_DATA otp_user_data;
		/** Associate */
		HostCmd_DS_802_11_ASSOCIATE associate;

		/** Associate response */
		HostCmd_DS_802_11_ASSOCIATE_RSP associate_rsp;
		/** Deauthenticate */
		HostCmd_DS_802_11_DEAUTHENTICATE deauth;
		/** Ad-Hoc start */
		HostCmd_DS_802_11_AD_HOC_START adhoc_start;
		/** Ad-Hoc start result */
		HostCmd_DS_802_11_AD_HOC_START_RESULT adhoc_start_result;
		/** Ad-Hoc join result */
		HostCmd_DS_802_11_AD_HOC_JOIN_RESULT adhoc_join_result;
		/** Ad-Hoc join */
		HostCmd_DS_802_11_AD_HOC_JOIN adhoc_join;
		/** Domain information */
		HostCmd_DS_802_11D_DOMAIN_INFO domain_info;
		/** Domain information response */
		HostCmd_DS_802_11D_DOMAIN_INFO_RSP domain_info_resp;
		HostCmd_DS_802_11_TPC_ADAPT_REQ tpc_req;
		HostCmd_DS_802_11_TPC_INFO tpc_info;
		HostCmd_DS_802_11_CHAN_SW_ANN chan_sw_ann;
		HostCmd_DS_CHAN_RPT_REQ chan_rpt_req;
		HostCmd_DS_MEASUREMENT_REQUEST meas_req;
		HostCmd_DS_MEASUREMENT_REPORT meas_rpt;
		/** Add BA request */
		HostCmd_DS_11N_ADDBA_REQ add_ba_req;
		/** Add BA response */
		HostCmd_DS_11N_ADDBA_RSP add_ba_rsp;
		/** Delete BA entry */
		HostCmd_DS_11N_DELBA del_ba;
		/** Tx buffer configuration */
		HostCmd_DS_TXBUF_CFG tx_buf;
		/** AMSDU Aggr Ctrl configuration */
		HostCmd_DS_AMSDU_AGGR_CTRL amsdu_aggr_ctrl;
		/** 11n configuration */
		HostCmd_DS_11N_CFG htcfg;
		/** reject addba req conditions configuration */
		HostCmd_DS_REJECT_ADDBA_REQ rejectaddbareq;
		/* RANDYTODO need add more */
		/** HostCmd_DS_11AC_CFG */
		HostCmd_DS_11AC_CFG vhtcfg;
		/** HostCmd_DS_11ACTXBUF_CFG*/
		HostCmd_DS_11ACTXBUF_CFG ac_tx_buf;
		/** 11n configuration */
		HostCmd_DS_TX_BF_CFG tx_bf_cfg;
		/** WMM status get */
		HostCmd_DS_WMM_GET_STATUS get_wmm_status;
		/** WMM ADDTS */
		HostCmd_DS_WMM_ADDTS_REQ add_ts;
		/** WMM DELTS */
		HostCmd_DS_WMM_DELTS_REQ del_ts;
		/** WMM set/get queue config */
		HostCmd_DS_WMM_QUEUE_CONFIG queue_config;
		/** WMM param config*/
		HostCmd_DS_WMM_PARAM_CONFIG param_config;
		/** WMM on/of/get queue statistics */
		HostCmd_DS_WMM_QUEUE_STATS queue_stats;
		/** WMM get traffic stream status */
		HostCmd_DS_WMM_TS_STATUS ts_status;
		/** Key material */
		HostCmd_DS_802_11_KEY_MATERIAL key_material;
		/** GTK Rekey parameters */
		HostCmd_DS_GTK_REKEY_PARAMS gtk_rekey;
		/** E-Supplicant PSK */
		HostCmd_DS_802_11_SUPPLICANT_PMK esupplicant_psk;
		/** E-Supplicant profile */
		HostCmd_DS_802_11_SUPPLICANT_PROFILE esupplicant_profile;
		/** Extended version */
		HostCmd_DS_VERSION_EXT verext;
		/** Adhoc Coalescing */
		HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing;
		/** Mgmt IE list configuration */
		HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list;
		/** System clock configuration */
		HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg;
		/** MAC register access */
		HostCmd_DS_MAC_REG_ACCESS mac_reg;
		/** BBP register access */
		HostCmd_DS_BBP_REG_ACCESS bbp_reg;
		/** RF register access */
		HostCmd_DS_RF_REG_ACCESS rf_reg;
		/** EEPROM register access */
		HostCmd_DS_802_11_EEPROM_ACCESS eeprom;
		/** Memory access */
		HostCmd_DS_MEM_ACCESS mem;
		/** Target device access */
		HostCmd_DS_TARGET_ACCESS target;
		/** BCA register access */
		HostCmd_DS_BCA_REG_ACCESS bca_reg;
		/** Inactivity timeout extend */
		HostCmd_DS_INACTIVITY_TIMEOUT_EXT inactivity_to;
#ifdef UAP_SUPPORT
		HostCmd_DS_SYS_CONFIG sys_config;
		HostCmd_DS_SYS_INFO sys_info;
		HostCmd_DS_STA_DEAUTH sta_deauth;
		HostCmd_DS_STA_LIST sta_list;
		HostCmd_DS_POWER_MGMT_EXT pm_cfg;
		HostCmd_DS_REPORT_MIC report_mic;
		HostCmd_DS_UAP_OPER_CTRL uap_oper_ctrl;
#endif /* UAP_SUPPORT */
		HostCmd_DS_TX_RX_HISTOGRAM tx_rx_histogram;

		/** Sleep period command */
		HostCmd_DS_802_11_SLEEP_PERIOD sleep_pd;
		/** Sleep params command */
		HostCmd_DS_802_11_SLEEP_PARAMS sleep_param;

#ifdef SDIO
		/** SDIO GPIO interrupt config command */
		HostCmd_DS_SDIO_GPIO_INT_CONFIG sdio_gpio_int;
		HostCmd_DS_SDIO_PULL_CTRL sdio_pull_ctl;
#endif
		HostCmd_DS_SET_BSS_MODE bss_mode;
		HostCmd_DS_CMD_TX_DATA_PAUSE tx_data_pause;
#if defined(PCIE)
#if defined(PCIE8997) || defined(PCIE8897)
		HostCmd_DS_PCIE_HOST_BUF_DETAILS pcie_host_spec;
#endif
#endif
		HostCmd_DS_REMAIN_ON_CHANNEL remain_on_chan;
#ifdef WIFI_DIRECT_SUPPORT
		HostCmd_DS_WIFI_DIRECT_MODE wifi_direct_mode;
		HostCmd_DS_WIFI_DIRECT_PARAM_CONFIG p2p_params_config;
#endif
		HostCmd_DS_COALESCE_CONFIG coalesce_config;
		HostCmd_DS_HS_WAKEUP_REASON hs_wakeup_reason;
		HostCmd_DS_PACKET_AGGR_CTRL aggr_ctrl;
#ifdef USB
		HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE packet_aggr;
#endif
		HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg;
		HostCmd_DS_TSF tsf;
		HostCmd_DS_DFS_REPEATER_MODE dfs_repeater;
#ifdef RX_PACKET_COALESCE
		HostCmd_DS_RX_PKT_COAL_CFG rx_pkt_coal_cfg;
#endif
		HostCmd_DS_EAPOL_PKT eapol_pkt;
		HostCmd_DS_SENSOR_TEMP temp_sensor;
		HostCMD_DS_APCMD_ACS_SCAN acs_scan;
		HostCmd_DS_MIMO_SWITCH mimo_switch;
#ifdef STA_SUPPORT
		HostCmd_DS_STA_CONFIGURE sta_cfg;
#endif
		/** GPIO Independent reset configure */
		HostCmd_DS_INDEPENDENT_RESET_CFG ind_rst_cfg;
		HostCmd_DS_802_11_PS_INACTIVITY_TIMEOUT ps_inact_tmo;
		HostCmd_DS_CHAN_REGION_CFG reg_cfg;
		HostCmd_DS_AUTO_TX auto_tx;
		HostCmd_DS_DYN_BW dyn_bw;
		HostCmd_DS_802_11_ROBUSTCOEX robustcoexparams;
		HostCmd_DS_DMCS_CFG dmcs;
#if defined(PCIE)
		HostCmd_DS_SSU_CFG ssu_params;
#endif
		/** boot sleep configure */
		HostCmd_DS_BOOT_SLEEP boot_sleep;
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
		/** crypto cmd */
		HostCmd_DS_CRYPTO crypto_cmd;
#endif
#ifdef UAP_SUPPORT
		/** Add station cmd */
		HostCmd_DS_ADD_STATION sta_info;
#endif
		/** HostCmd_DS_11AX_CFG */
		HostCmd_DS_11AX_CFG axcfg;
		/** HostCmd_DS_11AX_CMD_CFG */
		HostCmd_DS_11AX_CMD_CFG axcmd;
		HostCmd_DS_RANGE_EXT range_ext;
		/** HostCmd_DS_TWT_CFG */
		HostCmd_DS_TWT_CFG twtcfg;

		HostCmd_DS_CMD_RX_ABORT_CFG rx_abort_cfg;
		HostCmd_DS_CMD_RX_ABORT_CFG_EXT rx_abort_cfg_ext;
		HostCmd_DS_CMD_TX_AMPDU_PROT_MODE tx_ampdu_prot_mode;
		HostCmd_DS_CMD_RATE_ADAPT_CFG rate_adapt_cfg;
		HostCmd_DS_CMD_CCK_DESENSE_CFG cck_desense_cfg;
		/** trpc_config */
		HostCmd_DS_CHANNEL_TRPC_CONFIG ch_trpc_config;
		HostCmd_DS_LOW_POWER_MODE_CFG lpm_cfg;
		HostCmd_DS_BAND_STEERING band_steer_info;
		HostCmd_DS_BEACON_STUCK_CFG beacon_stuck_cfg;
		struct mfg_cmd_generic_cfg mfg_generic_cfg;
		struct mfg_cmd_tx_cont mfg_tx_cont;
		struct mfg_cmd_tx_frame2 mfg_tx_frame2;
		HostCmd_DS_CMD_ARB_CONFIG arb_cfg;
		HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
	} params;
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND;

/** PS_CMD_ConfirmSleep */
typedef MLAN_PACK_START struct _OPT_Confirm_Sleep {
	/** Command */
	t_u16 command;
	/** Size */
	t_u16 size;
	/** Sequence number */
	t_u16 seq_num;
	/** Result */
	t_u16 result;
	/** Action */
	t_u16 action;
	/** Sleep comfirm param definition */
	sleep_confirm_param sleep_cfm;
} MLAN_PACK_END OPT_Confirm_Sleep;

typedef struct MLAN_PACK_START _opt_sleep_confirm_buffer {
	/** Header for interface */
	t_u32 hdr;
	/** New power save command used to send
	 *  sleep confirmation to the firmware */
	OPT_Confirm_Sleep ps_cfm_sleep;
} MLAN_PACK_END opt_sleep_confirm_buffer;

/** req host side download vdll block */
#define VDLL_IND_TYPE_REQ 0
/** notify vdll start offset in firmware image */
#define VDLL_IND_TYPE_OFFSET 1

/** vdll indicate event structure */
typedef MLAN_PACK_START struct _vdll_ind {
	/*VDLL ind type*/
	t_u16 type;
	/*reserved*/
	t_u16 reserved;
	/*indicate the offset downloaded so far*/
	t_u32 offset;
	/*VDLL block size*/
	t_u16 block_len;
} MLAN_PACK_END vdll_ind, *pvdll_ind;
#ifdef PRAGMA_PACK
#pragma pack(pop)
#endif

#endif /* !_MLAN_FW_H_ */