summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx/hal.h
blob: 2a1db9756fd5fbd7c11f2e9883a4d0ba00eea48f (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
/*
 * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef _HAL_H_
#define _HAL_H_

/*---------------------------------------------------------------------------
  API VERSIONING INFORMATION

  The RIVA API is versioned as MAJOR.MINOR.VERSION.REVISION
  The MAJOR is incremented for major product/architecture changes
      (and then MINOR/VERSION/REVISION are zeroed)
  The MINOR is incremented for minor product/architecture changes
      (and then VERSION/REVISION are zeroed)
  The VERSION is incremented if a significant API change occurs
      (and then REVISION is zeroed)
  The REVISION is incremented if an insignificant API change occurs
      or if a new API is added
  All values are in the range 0..255 (ie they are 8-bit values)
 ---------------------------------------------------------------------------*/
#define WCN36XX_HAL_VER_MAJOR 1
#define WCN36XX_HAL_VER_MINOR 4
#define WCN36XX_HAL_VER_VERSION 1
#define WCN36XX_HAL_VER_REVISION 2

/* This is to force compiler to use the maximum of an int ( 4 bytes ) */
#define WCN36XX_HAL_MAX_ENUM_SIZE    0x7FFFFFFF
#define WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE    0x7FFF

/* Max no. of transmit categories */
#define STACFG_MAX_TC    8

/* The maximum value of access category */
#define WCN36XX_HAL_MAX_AC  4

#define WCN36XX_HAL_IPV4_ADDR_LEN       4

#define WCN36XX_HAL_STA_INVALID_IDX 0xFF
#define WCN36XX_HAL_BSS_INVALID_IDX 0xFF

/* Default Beacon template size */
#define BEACON_TEMPLATE_SIZE 0x180

/* Minimum PVM size that the FW expects. See comment in smd.c for details. */
#define TIM_MIN_PVM_SIZE 6

/* Param Change Bitmap sent to HAL */
#define PARAM_BCN_INTERVAL_CHANGED                      (1 << 0)
#define PARAM_SHORT_PREAMBLE_CHANGED                 (1 << 1)
#define PARAM_SHORT_SLOT_TIME_CHANGED                 (1 << 2)
#define PARAM_llACOEXIST_CHANGED                            (1 << 3)
#define PARAM_llBCOEXIST_CHANGED                            (1 << 4)
#define PARAM_llGCOEXIST_CHANGED                            (1 << 5)
#define PARAM_HT20MHZCOEXIST_CHANGED                  (1<<6)
#define PARAM_NON_GF_DEVICES_PRESENT_CHANGED (1<<7)
#define PARAM_RIFS_MODE_CHANGED                            (1<<8)
#define PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED   (1<<9)
#define PARAM_OBSS_MODE_CHANGED                               (1<<10)
#define PARAM_BEACON_UPDATE_MASK \
	(PARAM_BCN_INTERVAL_CHANGED |					\
	 PARAM_SHORT_PREAMBLE_CHANGED |					\
	 PARAM_SHORT_SLOT_TIME_CHANGED |				\
	 PARAM_llACOEXIST_CHANGED |					\
	 PARAM_llBCOEXIST_CHANGED |					\
	 PARAM_llGCOEXIST_CHANGED |					\
	 PARAM_HT20MHZCOEXIST_CHANGED |					\
	 PARAM_NON_GF_DEVICES_PRESENT_CHANGED |				\
	 PARAM_RIFS_MODE_CHANGED |					\
	 PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED |				\
	 PARAM_OBSS_MODE_CHANGED)

/* dump command response Buffer size */
#define DUMPCMD_RSP_BUFFER 100

/* version string max length (including NULL) */
#define WCN36XX_HAL_VERSION_LENGTH  64

/* How many frames until we start a-mpdu TX session */
#define WCN36XX_AMPDU_START_THRESH	20

#define WCN36XX_MAX_SCAN_SSIDS		9
#define WCN36XX_MAX_SCAN_IE_LEN		500

/* message types for messages exchanged between WDI and HAL */
enum wcn36xx_hal_host_msg_type {
	/* Init/De-Init */
	WCN36XX_HAL_START_REQ = 0,
	WCN36XX_HAL_START_RSP = 1,
	WCN36XX_HAL_STOP_REQ = 2,
	WCN36XX_HAL_STOP_RSP = 3,

	/* Scan */
	WCN36XX_HAL_INIT_SCAN_REQ = 4,
	WCN36XX_HAL_INIT_SCAN_RSP = 5,
	WCN36XX_HAL_START_SCAN_REQ = 6,
	WCN36XX_HAL_START_SCAN_RSP = 7,
	WCN36XX_HAL_END_SCAN_REQ = 8,
	WCN36XX_HAL_END_SCAN_RSP = 9,
	WCN36XX_HAL_FINISH_SCAN_REQ = 10,
	WCN36XX_HAL_FINISH_SCAN_RSP = 11,

	/* HW STA configuration/deconfiguration */
	WCN36XX_HAL_CONFIG_STA_REQ = 12,
	WCN36XX_HAL_CONFIG_STA_RSP = 13,
	WCN36XX_HAL_DELETE_STA_REQ = 14,
	WCN36XX_HAL_DELETE_STA_RSP = 15,
	WCN36XX_HAL_CONFIG_BSS_REQ = 16,
	WCN36XX_HAL_CONFIG_BSS_RSP = 17,
	WCN36XX_HAL_DELETE_BSS_REQ = 18,
	WCN36XX_HAL_DELETE_BSS_RSP = 19,

	/* Infra STA asscoiation */
	WCN36XX_HAL_JOIN_REQ = 20,
	WCN36XX_HAL_JOIN_RSP = 21,
	WCN36XX_HAL_POST_ASSOC_REQ = 22,
	WCN36XX_HAL_POST_ASSOC_RSP = 23,

	/* Security */
	WCN36XX_HAL_SET_BSSKEY_REQ = 24,
	WCN36XX_HAL_SET_BSSKEY_RSP = 25,
	WCN36XX_HAL_SET_STAKEY_REQ = 26,
	WCN36XX_HAL_SET_STAKEY_RSP = 27,
	WCN36XX_HAL_RMV_BSSKEY_REQ = 28,
	WCN36XX_HAL_RMV_BSSKEY_RSP = 29,
	WCN36XX_HAL_RMV_STAKEY_REQ = 30,
	WCN36XX_HAL_RMV_STAKEY_RSP = 31,

	/* Qos Related */
	WCN36XX_HAL_ADD_TS_REQ = 32,
	WCN36XX_HAL_ADD_TS_RSP = 33,
	WCN36XX_HAL_DEL_TS_REQ = 34,
	WCN36XX_HAL_DEL_TS_RSP = 35,
	WCN36XX_HAL_UPD_EDCA_PARAMS_REQ = 36,
	WCN36XX_HAL_UPD_EDCA_PARAMS_RSP = 37,
	WCN36XX_HAL_ADD_BA_REQ = 38,
	WCN36XX_HAL_ADD_BA_RSP = 39,
	WCN36XX_HAL_DEL_BA_REQ = 40,
	WCN36XX_HAL_DEL_BA_RSP = 41,

	WCN36XX_HAL_CH_SWITCH_REQ = 42,
	WCN36XX_HAL_CH_SWITCH_RSP = 43,
	WCN36XX_HAL_SET_LINK_ST_REQ = 44,
	WCN36XX_HAL_SET_LINK_ST_RSP = 45,
	WCN36XX_HAL_GET_STATS_REQ = 46,
	WCN36XX_HAL_GET_STATS_RSP = 47,
	WCN36XX_HAL_UPDATE_CFG_REQ = 48,
	WCN36XX_HAL_UPDATE_CFG_RSP = 49,

	WCN36XX_HAL_MISSED_BEACON_IND = 50,
	WCN36XX_HAL_UNKNOWN_ADDR2_FRAME_RX_IND = 51,
	WCN36XX_HAL_MIC_FAILURE_IND = 52,
	WCN36XX_HAL_FATAL_ERROR_IND = 53,
	WCN36XX_HAL_SET_KEYDONE_MSG = 54,

	/* NV Interface */
	WCN36XX_HAL_DOWNLOAD_NV_REQ = 55,
	WCN36XX_HAL_DOWNLOAD_NV_RSP = 56,

	WCN36XX_HAL_ADD_BA_SESSION_REQ = 57,
	WCN36XX_HAL_ADD_BA_SESSION_RSP = 58,
	WCN36XX_HAL_TRIGGER_BA_REQ = 59,
	WCN36XX_HAL_TRIGGER_BA_RSP = 60,
	WCN36XX_HAL_UPDATE_BEACON_REQ = 61,
	WCN36XX_HAL_UPDATE_BEACON_RSP = 62,
	WCN36XX_HAL_SEND_BEACON_REQ = 63,
	WCN36XX_HAL_SEND_BEACON_RSP = 64,

	WCN36XX_HAL_SET_BCASTKEY_REQ = 65,
	WCN36XX_HAL_SET_BCASTKEY_RSP = 66,
	WCN36XX_HAL_DELETE_STA_CONTEXT_IND = 67,
	WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ = 68,
	WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP = 69,

	/* PTT interface support */
	WCN36XX_HAL_PROCESS_PTT_REQ = 70,
	WCN36XX_HAL_PROCESS_PTT_RSP = 71,

	/* BTAMP related events */
	WCN36XX_HAL_SIGNAL_BTAMP_EVENT_REQ = 72,
	WCN36XX_HAL_SIGNAL_BTAMP_EVENT_RSP = 73,
	WCN36XX_HAL_TL_HAL_FLUSH_AC_REQ = 74,
	WCN36XX_HAL_TL_HAL_FLUSH_AC_RSP = 75,

	WCN36XX_HAL_ENTER_IMPS_REQ = 76,
	WCN36XX_HAL_EXIT_IMPS_REQ = 77,
	WCN36XX_HAL_ENTER_BMPS_REQ = 78,
	WCN36XX_HAL_EXIT_BMPS_REQ = 79,
	WCN36XX_HAL_ENTER_UAPSD_REQ = 80,
	WCN36XX_HAL_EXIT_UAPSD_REQ = 81,
	WCN36XX_HAL_UPDATE_UAPSD_PARAM_REQ = 82,
	WCN36XX_HAL_CONFIGURE_RXP_FILTER_REQ = 83,
	WCN36XX_HAL_ADD_BCN_FILTER_REQ = 84,
	WCN36XX_HAL_REM_BCN_FILTER_REQ = 85,
	WCN36XX_HAL_ADD_WOWL_BCAST_PTRN = 86,
	WCN36XX_HAL_DEL_WOWL_BCAST_PTRN = 87,
	WCN36XX_HAL_ENTER_WOWL_REQ = 88,
	WCN36XX_HAL_EXIT_WOWL_REQ = 89,
	WCN36XX_HAL_HOST_OFFLOAD_REQ = 90,
	WCN36XX_HAL_SET_RSSI_THRESH_REQ = 91,
	WCN36XX_HAL_GET_RSSI_REQ = 92,
	WCN36XX_HAL_SET_UAPSD_AC_PARAMS_REQ = 93,
	WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ = 94,

	WCN36XX_HAL_ENTER_IMPS_RSP = 95,
	WCN36XX_HAL_EXIT_IMPS_RSP = 96,
	WCN36XX_HAL_ENTER_BMPS_RSP = 97,
	WCN36XX_HAL_EXIT_BMPS_RSP = 98,
	WCN36XX_HAL_ENTER_UAPSD_RSP = 99,
	WCN36XX_HAL_EXIT_UAPSD_RSP = 100,
	WCN36XX_HAL_SET_UAPSD_AC_PARAMS_RSP = 101,
	WCN36XX_HAL_UPDATE_UAPSD_PARAM_RSP = 102,
	WCN36XX_HAL_CONFIGURE_RXP_FILTER_RSP = 103,
	WCN36XX_HAL_ADD_BCN_FILTER_RSP = 104,
	WCN36XX_HAL_REM_BCN_FILTER_RSP = 105,
	WCN36XX_HAL_SET_RSSI_THRESH_RSP = 106,
	WCN36XX_HAL_HOST_OFFLOAD_RSP = 107,
	WCN36XX_HAL_ADD_WOWL_BCAST_PTRN_RSP = 108,
	WCN36XX_HAL_DEL_WOWL_BCAST_PTRN_RSP = 109,
	WCN36XX_HAL_ENTER_WOWL_RSP = 110,
	WCN36XX_HAL_EXIT_WOWL_RSP = 111,
	WCN36XX_HAL_RSSI_NOTIFICATION_IND = 112,
	WCN36XX_HAL_GET_RSSI_RSP = 113,
	WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_RSP = 114,

	/* 11k related events */
	WCN36XX_HAL_SET_MAX_TX_POWER_REQ = 115,
	WCN36XX_HAL_SET_MAX_TX_POWER_RSP = 116,

	/* 11R related msgs */
	WCN36XX_HAL_AGGR_ADD_TS_REQ = 117,
	WCN36XX_HAL_AGGR_ADD_TS_RSP = 118,

	/* P2P  WLAN_FEATURE_P2P */
	WCN36XX_HAL_SET_P2P_GONOA_REQ = 119,
	WCN36XX_HAL_SET_P2P_GONOA_RSP = 120,

	/* WLAN Dump commands */
	WCN36XX_HAL_DUMP_COMMAND_REQ = 121,
	WCN36XX_HAL_DUMP_COMMAND_RSP = 122,

	/* OEM_DATA FEATURE SUPPORT */
	WCN36XX_HAL_START_OEM_DATA_REQ = 123,
	WCN36XX_HAL_START_OEM_DATA_RSP = 124,

	/* ADD SELF STA REQ and RSP */
	WCN36XX_HAL_ADD_STA_SELF_REQ = 125,
	WCN36XX_HAL_ADD_STA_SELF_RSP = 126,

	/* DEL SELF STA SUPPORT */
	WCN36XX_HAL_DEL_STA_SELF_REQ = 127,
	WCN36XX_HAL_DEL_STA_SELF_RSP = 128,

	/* Coex Indication */
	WCN36XX_HAL_COEX_IND = 129,

	/* Tx Complete Indication */
	WCN36XX_HAL_OTA_TX_COMPL_IND = 130,

	/* Host Suspend/resume messages */
	WCN36XX_HAL_HOST_SUSPEND_IND = 131,
	WCN36XX_HAL_HOST_RESUME_REQ = 132,
	WCN36XX_HAL_HOST_RESUME_RSP = 133,

	WCN36XX_HAL_SET_TX_POWER_REQ = 134,
	WCN36XX_HAL_SET_TX_POWER_RSP = 135,
	WCN36XX_HAL_GET_TX_POWER_REQ = 136,
	WCN36XX_HAL_GET_TX_POWER_RSP = 137,

	WCN36XX_HAL_P2P_NOA_ATTR_IND = 138,

	WCN36XX_HAL_ENABLE_RADAR_DETECT_REQ = 139,
	WCN36XX_HAL_ENABLE_RADAR_DETECT_RSP = 140,
	WCN36XX_HAL_GET_TPC_REPORT_REQ = 141,
	WCN36XX_HAL_GET_TPC_REPORT_RSP = 142,
	WCN36XX_HAL_RADAR_DETECT_IND = 143,
	WCN36XX_HAL_RADAR_DETECT_INTR_IND = 144,
	WCN36XX_HAL_KEEP_ALIVE_REQ = 145,
	WCN36XX_HAL_KEEP_ALIVE_RSP = 146,

	/* PNO messages */
	WCN36XX_HAL_SET_PREF_NETWORK_REQ = 147,
	WCN36XX_HAL_SET_PREF_NETWORK_RSP = 148,
	WCN36XX_HAL_SET_RSSI_FILTER_REQ = 149,
	WCN36XX_HAL_SET_RSSI_FILTER_RSP = 150,
	WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ = 151,
	WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP = 152,
	WCN36XX_HAL_PREF_NETW_FOUND_IND = 153,

	WCN36XX_HAL_SET_TX_PER_TRACKING_REQ = 154,
	WCN36XX_HAL_SET_TX_PER_TRACKING_RSP = 155,
	WCN36XX_HAL_TX_PER_HIT_IND = 156,

	WCN36XX_HAL_8023_MULTICAST_LIST_REQ = 157,
	WCN36XX_HAL_8023_MULTICAST_LIST_RSP = 158,

	WCN36XX_HAL_SET_PACKET_FILTER_REQ = 159,
	WCN36XX_HAL_SET_PACKET_FILTER_RSP = 160,
	WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_REQ = 161,
	WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
	WCN36XX_HAL_CLEAR_PACKET_FILTER_REQ = 163,
	WCN36XX_HAL_CLEAR_PACKET_FILTER_RSP = 164,

	/*
	 * This is temp fix. Should be removed once Host and Riva code is
	 * in sync.
	 */
	WCN36XX_HAL_INIT_SCAN_CON_REQ = 165,

	WCN36XX_HAL_SET_POWER_PARAMS_REQ = 166,
	WCN36XX_HAL_SET_POWER_PARAMS_RSP = 167,

	WCN36XX_HAL_TSM_STATS_REQ = 168,
	WCN36XX_HAL_TSM_STATS_RSP = 169,

	/* wake reason indication (WOW) */
	WCN36XX_HAL_WAKE_REASON_IND = 170,

	/* GTK offload support */
	WCN36XX_HAL_GTK_OFFLOAD_REQ = 171,
	WCN36XX_HAL_GTK_OFFLOAD_RSP = 172,
	WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ = 173,
	WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP = 174,

	WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ = 175,
	WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_RSP = 176,
	WCN36XX_HAL_EXCLUDE_UNENCRYPTED_IND = 177,

	WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ = 178,
	WCN36XX_HAL_SET_THERMAL_MITIGATION_RSP = 179,

	WCN36XX_HAL_UPDATE_VHT_OP_MODE_REQ = 182,
	WCN36XX_HAL_UPDATE_VHT_OP_MODE_RSP = 183,

	WCN36XX_HAL_P2P_NOA_START_IND = 184,

	WCN36XX_HAL_GET_ROAM_RSSI_REQ = 185,
	WCN36XX_HAL_GET_ROAM_RSSI_RSP = 186,

	WCN36XX_HAL_CLASS_B_STATS_IND = 187,
	WCN36XX_HAL_DEL_BA_IND = 188,
	WCN36XX_HAL_DHCP_START_IND = 189,
	WCN36XX_HAL_DHCP_STOP_IND = 190,

	/* Scan Offload(hw) APIs */
	WCN36XX_HAL_START_SCAN_OFFLOAD_REQ = 204,
	WCN36XX_HAL_START_SCAN_OFFLOAD_RSP = 205,
	WCN36XX_HAL_STOP_SCAN_OFFLOAD_REQ = 206,
	WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP = 207,
	WCN36XX_HAL_UPDATE_CHANNEL_LIST_REQ = 208,
	WCN36XX_HAL_UPDATE_CHANNEL_LIST_RSP = 209,
	WCN36XX_HAL_SCAN_OFFLOAD_IND = 210,

	WCN36XX_HAL_AVOID_FREQ_RANGE_IND = 233,

	WCN36XX_HAL_PRINT_REG_INFO_IND = 259,

	WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
};

/* Enumeration for Version */
enum wcn36xx_hal_host_msg_version {
	WCN36XX_HAL_MSG_VERSION0 = 0,
	WCN36XX_HAL_MSG_VERSION1 = 1,
	/* define as 2 bytes data */
	WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF,
	WCN36XX_HAL_MSG_VERSION_MAX_FIELD = WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
};

enum driver_type {
	DRIVER_TYPE_PRODUCTION = 0,
	DRIVER_TYPE_MFG = 1,
	DRIVER_TYPE_DVT = 2,
	DRIVER_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum wcn36xx_hal_stop_type {
	HAL_STOP_TYPE_SYS_RESET,
	HAL_STOP_TYPE_SYS_DEEP_SLEEP,
	HAL_STOP_TYPE_RF_KILL,
	HAL_STOP_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum wcn36xx_hal_sys_mode {
	HAL_SYS_MODE_NORMAL,
	HAL_SYS_MODE_LEARN,
	HAL_SYS_MODE_SCAN,
	HAL_SYS_MODE_PROMISC,
	HAL_SYS_MODE_SUSPEND_LINK,
	HAL_SYS_MODE_ROAM_SCAN,
	HAL_SYS_MODE_ROAM_SUSPEND_LINK,
	HAL_SYS_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum phy_chan_bond_state {
	/* 20MHz IF bandwidth centered on IF carrier */
	PHY_SINGLE_CHANNEL_CENTERED = 0,

	/* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
	PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,

	/* 40MHz IF bandwidth centered on IF carrier */
	PHY_DOUBLE_CHANNEL_CENTERED = 2,

	/* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
	PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,

	/* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
	PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4,

	/* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
	PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5,

	/* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
	PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6,

	/* 20/40MHZ offset LOW 40/80MHZ offset LOW */
	PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,

	/* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
	PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8,

	/* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
	PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9,

	/* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
	PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,

	PHY_CHANNEL_BONDING_STATE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* Spatial Multiplexing(SM) Power Save mode */
enum wcn36xx_hal_ht_mimo_state {
	/* Static SM Power Save mode */
	WCN36XX_HAL_HT_MIMO_PS_STATIC = 0,

	/* Dynamic SM Power Save mode */
	WCN36XX_HAL_HT_MIMO_PS_DYNAMIC = 1,

	/* reserved */
	WCN36XX_HAL_HT_MIMO_PS_NA = 2,

	/* SM Power Save disabled */
	WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT = 3,

	WCN36XX_HAL_HT_MIMO_PS_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* each station added has a rate mode which specifies the sta attributes */
enum sta_rate_mode {
	STA_TAURUS = 0,
	STA_TITAN,
	STA_POLARIS,
	STA_11b,
	STA_11bg,
	STA_11a,
	STA_11n,
	STA_11ac,
	STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* 1,2,5.5,11 */
#define WCN36XX_HAL_NUM_DSSS_RATES           4

/* 6,9,12,18,24,36,48,54 */
#define WCN36XX_HAL_NUM_OFDM_RATES           8

/* 72,96,108 */
#define WCN36XX_HAL_NUM_POLARIS_RATES       3

#define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET    16

enum wcn36xx_hal_bss_type {
	WCN36XX_HAL_INFRASTRUCTURE_MODE,

	/* Added for softAP support */
	WCN36XX_HAL_INFRA_AP_MODE,

	WCN36XX_HAL_IBSS_MODE,

	/* Added for BT-AMP support */
	WCN36XX_HAL_BTAMP_STA_MODE,

	/* Added for BT-AMP support */
	WCN36XX_HAL_BTAMP_AP_MODE,

	WCN36XX_HAL_AUTO_MODE,

	WCN36XX_HAL_DONOT_USE_BSS_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum wcn36xx_hal_nw_type {
	WCN36XX_HAL_11A_NW_TYPE,
	WCN36XX_HAL_11B_NW_TYPE,
	WCN36XX_HAL_11G_NW_TYPE,
	WCN36XX_HAL_11N_NW_TYPE,
	WCN36XX_HAL_DONOT_USE_NW_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
};

#define WCN36XX_HAL_MAC_RATESET_EID_MAX            12

enum wcn36xx_hal_ht_operating_mode {
	/* No Protection */
	WCN36XX_HAL_HT_OP_MODE_PURE,

	/* Overlap Legacy device present, protection is optional */
	WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY,

	/* No legacy device, but 20 MHz HT present */
	WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT,

	/* Protection is required */
	WCN36XX_HAL_HT_OP_MODE_MIXED,

	WCN36XX_HAL_HT_OP_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* Encryption type enum used with peer */
enum ani_ed_type {
	WCN36XX_HAL_ED_NONE,
	WCN36XX_HAL_ED_WEP40,
	WCN36XX_HAL_ED_WEP104,
	WCN36XX_HAL_ED_TKIP,
	WCN36XX_HAL_ED_CCMP,
	WCN36XX_HAL_ED_WPI,
	WCN36XX_HAL_ED_AES_128_CMAC,
	WCN36XX_HAL_ED_NOT_IMPLEMENTED = WCN36XX_HAL_MAX_ENUM_SIZE
};

#define WLAN_MAX_KEY_RSC_LEN                16
#define WLAN_WAPI_KEY_RSC_LEN               16

/* MAX key length when ULA is used */
#define WCN36XX_HAL_MAC_MAX_KEY_LENGTH              32
#define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS     4

/*
 * Enum to specify whether key is used for TX only, RX only or both.
 */
enum ani_key_direction {
	WCN36XX_HAL_TX_ONLY,
	WCN36XX_HAL_RX_ONLY,
	WCN36XX_HAL_TX_RX,
	WCN36XX_HAL_TX_DEFAULT,
	WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum ani_wep_type {
	WCN36XX_HAL_WEP_STATIC,
	WCN36XX_HAL_WEP_DYNAMIC,
	WCN36XX_HAL_WEP_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum wcn36xx_hal_link_state {

	WCN36XX_HAL_LINK_IDLE_STATE = 0,
	WCN36XX_HAL_LINK_PREASSOC_STATE = 1,
	WCN36XX_HAL_LINK_POSTASSOC_STATE = 2,
	WCN36XX_HAL_LINK_AP_STATE = 3,
	WCN36XX_HAL_LINK_IBSS_STATE = 4,

	/* BT-AMP Case */
	WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE = 5,
	WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE = 6,
	WCN36XX_HAL_LINK_BTAMP_AP_STATE = 7,
	WCN36XX_HAL_LINK_BTAMP_STA_STATE = 8,

	/* Reserved for HAL Internal Use */
	WCN36XX_HAL_LINK_LEARN_STATE = 9,
	WCN36XX_HAL_LINK_SCAN_STATE = 10,
	WCN36XX_HAL_LINK_FINISH_SCAN_STATE = 11,
	WCN36XX_HAL_LINK_INIT_CAL_STATE = 12,
	WCN36XX_HAL_LINK_FINISH_CAL_STATE = 13,
	WCN36XX_HAL_LINK_LISTEN_STATE = 14,

	WCN36XX_HAL_LINK_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

enum wcn36xx_hal_stats_mask {
	HAL_SUMMARY_STATS_INFO = 0x00000001,
	HAL_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
	HAL_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
	HAL_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
	HAL_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
	HAL_PER_STA_STATS_INFO = 0x00000020
};

/* BT-AMP events type */
enum bt_amp_event_type {
	BTAMP_EVENT_CONNECTION_START,
	BTAMP_EVENT_CONNECTION_STOP,
	BTAMP_EVENT_CONNECTION_TERMINATED,

	/* This and beyond are invalid values */
	BTAMP_EVENT_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
};

/* PE Statistics */
enum pe_stats_mask {
	PE_SUMMARY_STATS_INFO = 0x00000001,
	PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
	PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
	PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
	PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
	PE_PER_STA_STATS_INFO = 0x00000020,

	/* This and beyond are invalid values */
	PE_STATS_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/*
 * Configuration Parameter IDs
 */
#define WCN36XX_HAL_CFG_STA_ID				0
#define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA		1
#define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA		2
#define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE		3
#define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN		4
#define WCN36XX_HAL_CFG_CAL_PERIOD			5
#define WCN36XX_HAL_CFG_CAL_CONTROL			6
#define WCN36XX_HAL_CFG_PROXIMITY			7
#define WCN36XX_HAL_CFG_NETWORK_DENSITY			8
#define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME			9
#define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU		10
#define WCN36XX_HAL_CFG_RTS_THRESHOLD			11
#define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT		12
#define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT		13
#define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD		14
#define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO		15
#define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE		16
#define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO		17
#define WCN36XX_HAL_CFG_FIXED_RATE			18
#define WCN36XX_HAL_CFG_RETRYRATE_POLICY		19
#define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY		20
#define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY		21
#define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION		22
#define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ	23
#define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ	24
#define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ	25
#define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ		26
#define WCN36XX_HAL_CFG_MAX_BA_SESSIONS			27
#define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT	28
#define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER		29
#define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR		30
#define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE	31
#define WCN36XX_HAL_CFG_STATS_PERIOD			32
#define WCN36XX_HAL_CFG_CFP_MAX_DURATION		33
#define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED		34
#define WCN36XX_HAL_CFG_DTIM_PERIOD			35
#define WCN36XX_HAL_CFG_EDCA_WMM_ACBK			36
#define WCN36XX_HAL_CFG_EDCA_WMM_ACBE			37
#define WCN36XX_HAL_CFG_EDCA_WMM_ACVO			38
#define WCN36XX_HAL_CFG_EDCA_WMM_ACVI			39
#define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH		40
#define WCN36XX_HAL_CFG_MAX_BA_BUFFERS			41
#define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD		42
#define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG	43
#define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG	44
#define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG	45
#define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG	46
#define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS	47
#define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL		48
#define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD		49
#define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER		50
#define WCN36XX_HAL_CFG_PS_MAX_PS_POLL			51
#define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD		52
#define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD		53
#define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
#define WCN36XX_HAL_CFG_PS_IGNORE_DTIM			55
#define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM	56
#define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE		57
#define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT	58
#define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN		59
#define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI		60
#define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS	61
#define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI			62
#define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS	63
#define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE		64
#define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST	65
#define WCN36XX_HAL_CFG_TX_POWER_24_20			66
#define WCN36XX_HAL_CFG_TX_POWER_24_40			67
#define WCN36XX_HAL_CFG_TX_POWER_50_20			68
#define WCN36XX_HAL_CFG_TX_POWER_50_40			69
#define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING	70
#define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL	71
#define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4		72
#define WCN36XX_HAL_CFG_MAX_TX_POWER_5			73
#define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD	74
#define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP		75
#define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE		76
#define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK	77
#define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS	78
#define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT	79
#define WCN36XX_HAL_CFG_WCNSS_API_VERSION		80
#define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT		81
#define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT		82
#define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST		83
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT		84
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT		85
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT		86
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT		87
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN		88
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN	89
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN	90
#define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN		91
#define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT		92
#define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN		93
#define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC		94
#define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP		95
#define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO		96
#define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER		97
#define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT			98
#define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION	99
#define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER	100
#define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT	101
#define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT		102
#define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER	103
#define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE		104
#define WCN36XX_HAL_CFG_ENABLE_NAT_KEEP_ALIVE_FILTER	105
#define WCN36XX_HAL_CFG_ENABLE_SAP_OBSS_PROT		106
#define WCN36XX_HAL_CFG_PSPOLL_DATA_RECEP_TIMEOUT	107
#define WCN36XX_HAL_CFG_TDLS_PUAPSD_BUFFER_STA_CAPABLE	108
#define WCN36XX_HAL_CFG_TDLS_PUAPSD_MASK		109
#define WCN36XX_HAL_CFG_TDLS_PUAPSD_INACTIVITY_TIME	110
#define WCN36XX_HAL_CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD	111
#define WCN36XX_HAL_CFG_ANTENNA_DIVERSITY		112
#define WCN36XX_HAL_CFG_ATH_DISABLE			113
#define WCN36XX_HAL_CFG_FLEXCONNECT_POWER_FACTOR	114
#define WCN36XX_HAL_CFG_ENABLE_ADAPTIVE_RX_DRAIN	115
#define WCN36XX_HAL_CFG_TDLS_OFF_CHANNEL_CAPABLE	116
#define WCN36XX_HAL_CFG_MWS_COEX_V1_WAN_FREQ		117
#define WCN36XX_HAL_CFG_MWS_COEX_V1_WLAN_FREQ		118
#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG		119
#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG2		120
#define WCN36XX_HAL_CFG_MWS_COEX_V2_WAN_FREQ		121
#define WCN36XX_HAL_CFG_MWS_COEX_V2_WLAN_FREQ		122
#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG		123
#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG2		124
#define WCN36XX_HAL_CFG_MWS_COEX_V3_WAN_FREQ		125
#define WCN36XX_HAL_CFG_MWS_COEX_V3_WLAN_FREQ		126
#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG		127
#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG2		128
#define WCN36XX_HAL_CFG_MWS_COEX_V4_WAN_FREQ		129
#define WCN36XX_HAL_CFG_MWS_COEX_V4_WLAN_FREQ		130
#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG		131
#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG2		132
#define WCN36XX_HAL_CFG_MWS_COEX_V5_WAN_FREQ		133
#define WCN36XX_HAL_CFG_MWS_COEX_V5_WLAN_FREQ		134
#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG		135
#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG2		136
#define WCN36XX_HAL_CFG_MWS_COEX_V6_WAN_FREQ		137
#define WCN36XX_HAL_CFG_MWS_COEX_V6_WLAN_FREQ		138
#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG		139
#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG2		140
#define WCN36XX_HAL_CFG_MWS_COEX_V7_WAN_FREQ		141
#define WCN36XX_HAL_CFG_MWS_COEX_V7_WLAN_FREQ		142
#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG		143
#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG2		144
#define WCN36XX_HAL_CFG_MWS_COEX_V8_WAN_FREQ		145
#define WCN36XX_HAL_CFG_MWS_COEX_V8_WLAN_FREQ		146
#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG		147
#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG2		148
#define WCN36XX_HAL_CFG_MWS_COEX_V9_WAN_FREQ		149
#define WCN36XX_HAL_CFG_MWS_COEX_V9_WLAN_FREQ		150
#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG		151
#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG2		152
#define WCN36XX_HAL_CFG_MWS_COEX_V10_WAN_FREQ		153
#define WCN36XX_HAL_CFG_MWS_COEX_V10_WLAN_FREQ		154
#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG		155
#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG2		156
#define WCN36XX_HAL_CFG_MWS_COEX_MODEM_BACKOFF		157
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG1		158
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG2		159
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG3		160
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG4		161
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG5		162
#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG6		163
#define WCN36XX_HAL_CFG_SAR_POWER_BACKOFF		164
#define WCN36XX_HAL_CFG_GO_LINK_MONITOR_TIMEOUT		165
#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_WLAN_LEN	166
#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_BT_LEN	167
#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_WLAN_LEN	168
#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_BT_LEN	169
#define WCN36XX_HAL_CFG_RMC_FIXED_RATE			170
#define WCN36XX_HAL_CFG_ASD_PROBE_INTERVAL		171
#define WCN36XX_HAL_CFG_ASD_TRIGGER_THRESHOLD		172
#define WCN36XX_HAL_CFG_ASD_RTT_RSSI_HYST_THRESHOLD	173
#define WCN36XX_HAL_CFG_BTC_CTS2S_ON_STA_DURING_SCO	174
#define WCN36XX_HAL_CFG_SHORT_PREAMBLE			175
#define WCN36XX_HAL_CFG_SHORT_SLOT_TIME			176
#define WCN36XX_HAL_CFG_DELAYED_BA			177
#define WCN36XX_HAL_CFG_IMMEDIATE_BA			178
#define WCN36XX_HAL_CFG_DOT11_MODE			179
#define WCN36XX_HAL_CFG_HT_CAPS				180
#define WCN36XX_HAL_CFG_AMPDU_PARAMS			181
#define WCN36XX_HAL_CFG_TX_BF_INFO			182
#define WCN36XX_HAL_CFG_ASC_CAP_INFO			183
#define WCN36XX_HAL_CFG_EXT_HT_CAPS			184
#define WCN36XX_HAL_CFG_QOS_ENABLED			185
#define WCN36XX_HAL_CFG_WME_ENABLED			186
#define WCN36XX_HAL_CFG_WSM_ENABLED			187
#define WCN36XX_HAL_CFG_WMM_ENABLED			188
#define WCN36XX_HAL_CFG_UAPSD_PER_AC_BITMASK		189
#define WCN36XX_HAL_CFG_MCS_RATES			190
#define WCN36XX_HAL_CFG_VHT_CAPS			191
#define WCN36XX_HAL_CFG_VHT_RX_SUPP_MCS			192
#define WCN36XX_HAL_CFG_VHT_TX_SUPP_MCS			193
#define WCN36XX_HAL_CFG_RA_FILTER_ENABLE		194
#define WCN36XX_HAL_CFG_RA_RATE_LIMIT_INTERVAL		195
#define WCN36XX_HAL_CFG_BTC_FATAL_HID_NSNIFF_BLK	196
#define WCN36XX_HAL_CFG_BTC_CRITICAL_HID_NSNIFF_BLK	197
#define WCN36XX_HAL_CFG_BTC_DYN_A2DP_TX_QUEUE_THOLD	198
#define WCN36XX_HAL_CFG_BTC_DYN_OPP_TX_QUEUE_THOLD	199
#define WCN36XX_HAL_CFG_LINK_FAIL_TIMEOUT		200
#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_SP		201
#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT		202
#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT		203
#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT_MEAS_WINDOW	204
#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT_MEAS_WINDOW	205
#define WCN36XX_HAL_CFG_MAX_PSPOLL_IN_WMM_UAPSD_PS_MODE	206
#define WCN36XX_HAL_CFG_MAX_UAPSD_INACTIVITY_INTERVALS	207
#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_WMMPS		208
#define WCN36XX_HAL_CFG_BURST_MODE_BE_TXOP_VALUE	209
#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE	210
#define WCN36XX_HAL_CFG_BTC_FAST_WLAN_CONN_PREF		211
#define WCN36XX_HAL_CFG_ENABLE_RTSCTS_HTVHT		212
#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_WLAN_LEN	213
#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_BT_LEN	214
#define WCN36XX_HAL_CFG_LINK_FAIL_TX_CNT		215
#define WCN36XX_HAL_CFG_TOGGLE_ARP_BDRATES		216
#define WCN36XX_HAL_CFG_OPTIMIZE_CA_EVENT		217
#define WCN36XX_HAL_CFG_EXT_SCAN_CONC_MODE		218
#define WCN36XX_HAL_CFG_BAR_WAKEUP_HOST_DISABLE		219
#define WCN36XX_HAL_CFG_SAR_BOFFSET_CORRECTION_ENABLE	220
#define WCN36XX_HAL_CFG_UNITS_OF_BCN_WAIT_TIME		221
#define WCN36XX_HAL_CFG_CONS_BCNMISS_COUNT		222
#define WCN36XX_HAL_CFG_BTC_DISABLE_WLAN_LINK_CRITICAL	223
#define WCN36XX_HAL_CFG_DISABLE_SCAN_DURING_SCO		224
#define WCN36XX_HAL_CFG_TRIGGER_NULLFRAME_BEFORE_HB	225
#define WCN36XX_HAL_CFG_ENABLE_POWERSAVE_OFFLOAD	226
#define WCN36XX_HAL_CFG_MAX_PARAMS			227

/* Specify the starting bitrate, 11B and 11A/G rates can be specified in
 * multiples of 0.5 So for 5.5 mbps => 11. for MCS 0 - 7 rates, Bit 7 should
 * set to 1 and Bit 0-6 represent the MCS index. so for MCS2 => 130.
 * Any invalid non-zero value or unsupported rate will set the start rate
 * to 6 mbps.
 */
#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE	210

/* Message definitons - All the messages below need to be packed */

/* Definition for HAL API Version. */
struct wcnss_wlan_version {
	u8 revision;
	u8 version;
	u8 minor;
	u8 major;
} __packed;

/* Definition for Encryption Keys */
struct wcn36xx_hal_keys {
	u8 id;

	/* 0 for multicast */
	u8 unicast;

	enum ani_key_direction direction;

	/* Usage is unknown */
	u8 rsc[WLAN_MAX_KEY_RSC_LEN];

	/* =1 for authenticator,=0 for supplicant */
	u8 pae_role;

	u16 length;
	u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
} __packed;

/*
 * set_sta_key_params Moving here since it is shared by
 * configbss/setstakey msgs
 */
struct wcn36xx_hal_set_sta_key_params {
	/* STA Index */
	u16 sta_index;

	/* Encryption Type used with peer */
	enum ani_ed_type enc_type;

	/* STATIC/DYNAMIC - valid only for WEP */
	enum ani_wep_type wep_type;

	/* Default WEP key, valid only for static WEP, must between 0 and 3. */
	u8 def_wep_idx;

	/* valid only for non-static WEP encyrptions */
	struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];

	/*
	 * Control for Replay Count, 1= Single TID based replay count on Tx
	 * 0 = Per TID based replay count on TX
	 */
	u8 single_tid_rc;

} __packed;

/* 4-byte control message header used by HAL*/
struct wcn36xx_hal_msg_header {
	enum wcn36xx_hal_host_msg_type msg_type:16;
	enum wcn36xx_hal_host_msg_version msg_version:16;
	u32 len;
} __packed;

/* Config format required by HAL for each CFG item*/
struct wcn36xx_hal_cfg {
	/* Cfg Id. The Id required by HAL is exported by HAL
	 * in shared header file between UMAC and HAL.*/
	u16 id;

	/* Length of the Cfg. This parameter is used to go to next cfg
	 * in the TLV format.*/
	u16 len;

	/* Padding bytes for unaligned address's */
	u16 pad_bytes;

	/* Reserve bytes for making cfgVal to align address */
	u16 reserve;

	/* Following the uCfgLen field there should be a 'uCfgLen' bytes
	 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
} __packed;

struct wcn36xx_hal_mac_start_parameters {
	/* Drive Type - Production or FTM etc */
	enum driver_type type;

	/* Length of the config buffer */
	u32 len;

	/* Following this there is a TLV formatted buffer of length
	 * "len" bytes containing all config values.
	 * The TLV is expected to be formatted like this:
	 * 0           15            31           31+CFG_LEN-1        length-1
	 * |   CFG_ID   |   CFG_LEN   |   CFG_BODY    |  CFG_ID  |......|
	 */
} __packed;

struct wcn36xx_hal_mac_start_req_msg {
	/* config buffer must start in TLV format just here */
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_mac_start_parameters params;
} __packed;

struct wcn36xx_hal_mac_start_rsp_params {
	/* success or failure */
	u16 status;

	/* Max number of STA supported by the device */
	u8 stations;

	/* Max number of BSS supported by the device */
	u8 bssids;

	/* API Version */
	struct wcnss_wlan_version version;

	/* CRM build information */
	u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];

	/* hardware/chipset/misc version information */
	u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];

} __packed;

struct wcn36xx_hal_mac_start_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_mac_start_rsp_params start_rsp_params;
} __packed;

struct wcn36xx_hal_mac_stop_req_params {
	/* The reason for which the device is being stopped */
	enum wcn36xx_hal_stop_type reason;

} __packed;

struct wcn36xx_hal_mac_stop_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_mac_stop_req_params stop_req_params;
} __packed;

struct wcn36xx_hal_mac_stop_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

struct wcn36xx_hal_update_cfg_req_msg {
	/*
	 * Note: The length specified in tHalUpdateCfgReqMsg messages should be
	 * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
	 */
	struct wcn36xx_hal_msg_header header;

	/* Length of the config buffer. Allows UMAC to update multiple CFGs */
	u32 len;

	/*
	 * Following this there is a TLV formatted buffer of length
	 * "uConfigBufferLen" bytes containing all config values.
	 * The TLV is expected to be formatted like this:
	 * 0           15            31           31+CFG_LEN-1        length-1
	 * |   CFG_ID   |   CFG_LEN   |   CFG_BODY    |  CFG_ID  |......|
	 */

} __packed;

struct wcn36xx_hal_update_cfg_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

} __packed;

/* Frame control field format (2 bytes) */
struct wcn36xx_hal_mac_frame_ctl {

#ifndef ANI_LITTLE_BIT_ENDIAN

	u8 subType:4;
	u8 type:2;
	u8 protVer:2;

	u8 order:1;
	u8 wep:1;
	u8 moreData:1;
	u8 powerMgmt:1;
	u8 retry:1;
	u8 moreFrag:1;
	u8 fromDS:1;
	u8 toDS:1;

#else

	u8 protVer:2;
	u8 type:2;
	u8 subType:4;

	u8 toDS:1;
	u8 fromDS:1;
	u8 moreFrag:1;
	u8 retry:1;
	u8 powerMgmt:1;
	u8 moreData:1;
	u8 wep:1;
	u8 order:1;

#endif

};

/* Sequence control field */
struct wcn36xx_hal_mac_seq_ctl {
	u8 fragNum:4;
	u8 seqNumLo:4;
	u8 seqNumHi:8;
};

/* Management header format */
struct wcn36xx_hal_mac_mgmt_hdr {
	struct wcn36xx_hal_mac_frame_ctl fc;
	u8 durationLo;
	u8 durationHi;
	u8 da[6];
	u8 sa[6];
	u8 bssId[6];
	struct wcn36xx_hal_mac_seq_ctl seqControl;
};

/* FIXME: pronto v1 apparently has 4 */
#define WCN36XX_HAL_NUM_BSSID               2

/* Scan Entry to hold active BSS idx's */
struct wcn36xx_hal_scan_entry {
	u8 bss_index[WCN36XX_HAL_NUM_BSSID];
	u8 active_bss_count;
};

struct wcn36xx_hal_init_scan_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* LEARN - AP Role
	   SCAN - STA Role */
	enum wcn36xx_hal_sys_mode mode;

	/* BSSID of the BSS */
	u8 bssid[ETH_ALEN];

	/* Whether BSS needs to be notified */
	u8 notify;

	/* Kind of frame to be used for notifying the BSS (Data Null, QoS
	 * Null, or CTS to Self). Must always be a valid frame type. */
	u8 frame_type;

	/* UMAC has the option of passing the MAC frame to be used for
	 * notifying the BSS. If non-zero, HAL will use the MAC frame
	 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
	 * appropriate MAC frame based on frameType. */
	u8 frame_len;

	/* Following the framelength there is a MAC frame buffer if
	 * frameLength is non-zero. */
	struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;

	/* Entry to hold number of active BSS idx's */
	struct wcn36xx_hal_scan_entry scan_entry;
};

struct wcn36xx_hal_init_scan_con_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* LEARN - AP Role
	   SCAN - STA Role */
	enum wcn36xx_hal_sys_mode mode;

	/* BSSID of the BSS */
	u8 bssid[ETH_ALEN];

	/* Whether BSS needs to be notified */
	u8 notify;

	/* Kind of frame to be used for notifying the BSS (Data Null, QoS
	 * Null, or CTS to Self). Must always be a valid frame type. */
	u8 frame_type;

	/* UMAC has the option of passing the MAC frame to be used for
	 * notifying the BSS. If non-zero, HAL will use the MAC frame
	 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
	 * appropriate MAC frame based on frameType. */
	u8 frame_length;

	/* Following the framelength there is a MAC frame buffer if
	 * frameLength is non-zero. */
	struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;

	/* Entry to hold number of active BSS idx's */
	struct wcn36xx_hal_scan_entry scan_entry;

	/* Single NoA usage in Scanning */
	u8 use_noa;

	/* Indicates the scan duration (in ms) */
	u16 scan_duration;

};

struct wcn36xx_hal_init_scan_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

} __packed;

struct wcn36xx_hal_start_scan_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Indicates the channel to scan */
	u8 scan_channel;
} __packed;

struct wcn36xx_hal_start_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u32 start_tsf[2];
	u8 tx_mgmt_power;

} __packed;

struct wcn36xx_hal_end_scan_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Indicates the channel to stop scanning. Not used really. But
	 * retained for symmetry with "start Scan" message. It can also
	 * help in error check if needed. */
	u8 scan_channel;
} __packed;

struct wcn36xx_hal_end_scan_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

struct wcn36xx_hal_finish_scan_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Identifies the operational state of the AP/STA
	 * LEARN - AP Role SCAN - STA Role */
	enum wcn36xx_hal_sys_mode mode;

	/* Operating channel to tune to. */
	u8 oper_channel;

	/* Channel Bonding state If 20/40 MHz is operational, this will
	 * indicate the 40 MHz extension channel in combination with the
	 * control channel */
	enum phy_chan_bond_state cb_state;

	/* BSSID of the BSS */
	u8 bssid[ETH_ALEN];

	/* Whether BSS needs to be notified */
	u8 notify;

	/* Kind of frame to be used for notifying the BSS (Data Null, QoS
	 * Null, or CTS to Self). Must always be a valid frame type. */
	u8 frame_type;

	/* UMAC has the option of passing the MAC frame to be used for
	 * notifying the BSS. If non-zero, HAL will use the MAC frame
	 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
	 * appropriate MAC frame based on frameType. */
	u8 frame_length;

	/* Following the framelength there is a MAC frame buffer if
	 * frameLength is non-zero. */
	struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;

	/* Entry to hold number of active BSS idx's */
	struct wcn36xx_hal_scan_entry scan_entry;

} __packed;

struct wcn36xx_hal_finish_scan_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

} __packed;

enum wcn36xx_hal_scan_type {
	WCN36XX_HAL_SCAN_TYPE_PASSIVE = 0x00,
	WCN36XX_HAL_SCAN_TYPE_ACTIVE = WCN36XX_HAL_MAX_ENUM_SIZE
};

struct wcn36xx_hal_mac_ssid {
	u8 length;
	u8 ssid[32];
} __packed;

struct wcn36xx_hal_start_scan_offload_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* BSSIDs hot list */
	u8 num_bssid;
	u8 bssids[4][ETH_ALEN];

	/* Directed probe-requests will be sent for listed SSIDs (max 10)*/
	u8 num_ssid;
	struct wcn36xx_hal_mac_ssid ssids[10];

	/* Report AP with hidden ssid */
	u8 scan_hidden;

	/* Self MAC address */
	u8 mac[ETH_ALEN];

	/* BSS type */
	enum wcn36xx_hal_bss_type bss_type;

	/* Scan type */
	enum wcn36xx_hal_scan_type scan_type;

	/* Minimum scanning time on each channel (ms) */
	u32 min_ch_time;

	/* Maximum scanning time on each channel */
	u32 max_ch_time;

	/* Is a p2p search */
	u8 p2p_search;

	/* Channels to scan */
	u8 num_channel;
	u8 channels[80];

	/* IE field */
	u16 ie_len;
	u8 ie[WCN36XX_MAX_SCAN_IE_LEN];
} __packed;

struct wcn36xx_hal_start_scan_offload_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

enum wcn36xx_hal_scan_offload_ind_type {
	/* Scan has been started */
	WCN36XX_HAL_SCAN_IND_STARTED = 0x01,
	/* Scan has been completed */
	WCN36XX_HAL_SCAN_IND_COMPLETED = 0x02,
	/* Moved to foreign channel */
	WCN36XX_HAL_SCAN_IND_FOREIGN_CHANNEL = 0x08,
	/* scan request has been dequeued */
	WCN36XX_HAL_SCAN_IND_DEQUEUED = 0x10,
	/* preempted by other high priority scan */
	WCN36XX_HAL_SCAN_IND_PREEMPTED = 0x20,
	/* scan start failed */
	WCN36XX_HAL_SCAN_IND_FAILED = 0x40,
	 /*scan restarted */
	WCN36XX_HAL_SCAN_IND_RESTARTED = 0x80,
	WCN36XX_HAL_SCAN_IND_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

struct wcn36xx_hal_scan_offload_ind {
	struct wcn36xx_hal_msg_header header;

	u32 type;
	u32 channel_mhz;
	u32 scan_id;
} __packed;

struct wcn36xx_hal_stop_scan_offload_req_msg {
	struct wcn36xx_hal_msg_header header;
} __packed;

struct wcn36xx_hal_stop_scan_offload_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

#define WCN36XX_HAL_CHAN_REG1_MIN_PWR_MASK  0x000000ff
#define WCN36XX_HAL_CHAN_REG1_MAX_PWR_MASK  0x0000ff00
#define WCN36XX_HAL_CHAN_REG1_REG_PWR_MASK  0x00ff0000
#define WCN36XX_HAL_CHAN_REG1_CLASS_ID_MASK 0xff000000
#define WCN36XX_HAL_CHAN_REG2_ANT_GAIN_MASK 0x000000ff
#define WCN36XX_HAL_CHAN_INFO_FLAG_PASSIVE  BIT(7)
#define WCN36XX_HAL_CHAN_INFO_FLAG_DFS      BIT(10)
#define WCN36XX_HAL_CHAN_INFO_FLAG_HT       BIT(11)
#define WCN36XX_HAL_CHAN_INFO_FLAG_VHT      BIT(12)
#define WCN36XX_HAL_CHAN_INFO_PHY_11A       0
#define WCN36XX_HAL_CHAN_INFO_PHY_11BG      1
#define WCN36XX_HAL_DEFAULT_ANT_GAIN        6
#define WCN36XX_HAL_DEFAULT_MIN_POWER       6

struct wcn36xx_hal_channel_param {
	u32 mhz;
	u32 band_center_freq1;
	u32 band_center_freq2;
	u32 channel_info;
	u32 reg_info_1;
	u32 reg_info_2;
} __packed;

struct wcn36xx_hal_update_channel_list_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 num_channel;
	struct wcn36xx_hal_channel_param channels[80];
} __packed;

enum wcn36xx_hal_rate_index {
	HW_RATE_INDEX_1MBPS	= 0x82,
	HW_RATE_INDEX_2MBPS	= 0x84,
	HW_RATE_INDEX_5_5MBPS	= 0x8B,
	HW_RATE_INDEX_6MBPS	= 0x0C,
	HW_RATE_INDEX_9MBPS	= 0x12,
	HW_RATE_INDEX_11MBPS	= 0x96,
	HW_RATE_INDEX_12MBPS	= 0x18,
	HW_RATE_INDEX_18MBPS	= 0x24,
	HW_RATE_INDEX_24MBPS	= 0x30,
	HW_RATE_INDEX_36MBPS	= 0x48,
	HW_RATE_INDEX_48MBPS	= 0x60,
	HW_RATE_INDEX_54MBPS	= 0x6C
};

struct wcn36xx_hal_supported_rates {
	/*
	 * For Self STA Entry: this represents Self Mode.
	 * For Peer Stations, this represents the mode of the peer.
	 * On Station:
	 *
	 * --this mode is updated when PE adds the Self Entry.
	 *
	 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
	 *    is used to indicate the mode of the AP.
	 *
	 * ON AP:
	 *
	 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
	 *     for that BSS is used to indicate the self mode of the AP.
	 *
	 * -- OR when a station is associated, PE sends 'ADD_STA' message
	 *    with this mode updated.
	 */

	enum sta_rate_mode op_rate_mode;

	/* 11b, 11a and aniLegacyRates are IE rates which gives rate in
	 * unit of 500Kbps */
	u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
	u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
	u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
	u16 reserved;

	/* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
	 * supported) First 26 bits are reserved for those Titan rates and
	 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
	 * reserved. */
	/* Titan and Taurus Rates */
	u32 enhanced_rate_bitmap;

	/*
	 * 0-76 bits used, remaining reserved
	 * bits 0-15 and 32 should be set.
	 */
	u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];

	/*
	 * RX Highest Supported Data Rate defines the highest data
	 * rate that the STA is able to receive, in unites of 1Mbps.
	 * This value is derived from "Supported MCS Set field" inside
	 * the HT capability element.
	 */
	u16 rx_highest_data_rate;

} __packed;

struct wcn36xx_hal_config_sta_params {
	/* BSSID of STA */
	u8 bssid[ETH_ALEN];

	/* ASSOC ID, as assigned by UMAC */
	u16 aid;

	/* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
	u8 type;

	/* Short Preamble Supported. */
	u8 short_preamble_supported;

	/* MAC Address of STA */
	u8 mac[ETH_ALEN];

	/* Listen interval of the STA */
	u16 listen_interval;

	/* Support for 11e/WMM */
	u8 wmm_enabled;

	/* 11n HT capable STA */
	u8 ht_capable;

	/* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
	u8 tx_channel_width_set;

	/* RIFS mode 0 - NA, 1 - Allowed */
	u8 rifs_mode;

	/* L-SIG TXOP Protection mechanism
	   0 - No Support, 1 - Supported
	   SG - there is global field */
	u8 lsig_txop_protection;

	/* Max Ampdu Size supported by STA. TPE programming.
	   0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
	u8 max_ampdu_size;

	/* Max Ampdu density. Used by RA.  3 : 0~7 : 2^(11nAMPDUdensity -4) */
	u8 max_ampdu_density;

	/* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
	u8 max_amsdu_size;

	/* Short GI support for 40Mhz packets */
	u8 sgi_40mhz;

	/* Short GI support for 20Mhz packets */
	u8 sgi_20Mhz;

	/* TODO move this parameter to the end for 3680 */
	/* These rates are the intersection of peer and self capabilities. */
	struct wcn36xx_hal_supported_rates supported_rates;

	/* Robust Management Frame (RMF) enabled/disabled */
	u8 rmf;

	/* The unicast encryption type in the association */
	u32 encrypt_type;

	/* HAL should update the existing STA entry, if this flag is set. UMAC
	   will set this flag in case of RE-ASSOC, where we want to reuse the
	   old STA ID. 0 = Add, 1 = Update */
	u8 action;

	/* U-APSD Flags: 1b per AC.  Encoded as follows:
	   b7 b6 b5 b4 b3 b2 b1 b0 =
	   X  X  X  X  BE BK VI VO */
	u8 uapsd;

	/* Max SP Length */
	u8 max_sp_len;

	/* 11n Green Field preamble support
	   0 - Not supported, 1 - Supported */
	u8 green_field_capable;

	/* MIMO Power Save mode */
	enum wcn36xx_hal_ht_mimo_state mimo_ps;

	/* Delayed BA Support */
	u8 delayed_ba_support;

	/* Max AMPDU duration in 32us */
	u8 max_ampdu_duration;

	/* HT STA should set it to 1 if it is enabled in BSS. HT STA should
	 * set it to 0 if AP does not support it. This indication is sent
	 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
	 * rates. */
	u8 dsss_cck_mode_40mhz;

	/* Valid STA Idx when action=Update. Set to 0xFF when invalid!
	 * Retained for backward compalibity with existing HAL code */
	u8 sta_index;

	/* BSSID of BSS to which station is associated. Set to 0xFF when
	 * invalid. Retained for backward compalibity with existing HAL
	 * code */
	u8 bssid_index;

	u8 p2p;

	/* TODO add this parameter for 3680. */
	/* Reserved to align next field on a dword boundary */
	/* u8 reserved; */
} __packed;

struct wcn36xx_hal_config_sta_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_config_sta_params sta_params;
} __packed;

struct wcn36xx_hal_supported_rates_v1 {
	/* For Self STA Entry: this represents Self Mode.
	 * For Peer Stations, this represents the mode of the peer.
	 * On Station:
	 *
	 * --this mode is updated when PE adds the Self Entry.
	 *
	 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
	 *    is used to indicate the mode of the AP.
	 *
	 * ON AP:
	 *
	 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
	 *     for that BSS is used to indicate the self mode of the AP.
	 *
	 * -- OR when a station is associated, PE sends 'ADD_STA' message
	 *    with this mode updated.
	 */

	enum sta_rate_mode op_rate_mode;

	/* 11b, 11a and aniLegacyRates are IE rates which gives rate in
	 * unit of 500Kbps
	 */
	u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
	u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
	u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
	u16 reserved;

	/* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
	 * supported) First 26 bits are reserved for those Titan rates and
	 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
	 * reserved
	 * Titan and Taurus Rates
	 */
	u32 enhanced_rate_bitmap;

	/* 0-76 bits used, remaining reserved
	 * bits 0-15 and 32 should be set.
	 */
	u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];

	/* RX Highest Supported Data Rate defines the highest data
	 * rate that the STA is able to receive, in unites of 1Mbps.
	 * This value is derived from "Supported MCS Set field" inside
	 * the HT capability element.
	 */
	u16 rx_highest_data_rate;

	/* Indicates the Maximum MCS that can be received for each spatial
	 * stream.
	 */
	u16 vht_rx_mcs_map;

	/* Indicates the highest VHT data rate that the STA is able to
	 * receive.
	 */
	u16 vht_rx_highest_data_rate;

	/* Indicates the Maximum MCS that can be transmitted for each spatial
	 * stream.
	 */
	u16 vht_tx_mcs_map;

	/* Indicates the highest VHT data rate that the STA is able to
	 * transmit.
	 */
	u16 vht_tx_highest_data_rate;
} __packed;

struct wcn36xx_hal_config_sta_params_v1 {
	/* BSSID of STA */
	u8 bssid[ETH_ALEN];

	/* ASSOC ID, as assigned by UMAC */
	u16 aid;

	/* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
	u8 type;

	/* Short Preamble Supported. */
	u8 short_preamble_supported;

	/* MAC Address of STA */
	u8 mac[ETH_ALEN];

	/* Listen interval of the STA */
	u16 listen_interval;

	/* Support for 11e/WMM */
	u8 wmm_enabled;

	/* 11n HT capable STA */
	u8 ht_capable;

	/* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
	u8 tx_channel_width_set;

	/* RIFS mode 0 - NA, 1 - Allowed */
	u8 rifs_mode;

	/* L-SIG TXOP Protection mechanism
	   0 - No Support, 1 - Supported
	   SG - there is global field */
	u8 lsig_txop_protection;

	/* Max Ampdu Size supported by STA. TPE programming.
	   0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
	u8 max_ampdu_size;

	/* Max Ampdu density. Used by RA.  3 : 0~7 : 2^(11nAMPDUdensity -4) */
	u8 max_ampdu_density;

	/* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
	u8 max_amsdu_size;

	/* Short GI support for 40Mhz packets */
	u8 sgi_40mhz;

	/* Short GI support for 20Mhz packets */
	u8 sgi_20Mhz;

	/* Robust Management Frame (RMF) enabled/disabled */
	u8 rmf;

	/* The unicast encryption type in the association */
	u32 encrypt_type;

	/* HAL should update the existing STA entry, if this flag is set. UMAC
	   will set this flag in case of RE-ASSOC, where we want to reuse the
	   old STA ID. 0 = Add, 1 = Update */
	u8 action;

	/* U-APSD Flags: 1b per AC.  Encoded as follows:
	   b7 b6 b5 b4 b3 b2 b1 b0 =
	   X  X  X  X  BE BK VI VO */
	u8 uapsd;

	/* Max SP Length */
	u8 max_sp_len;

	/* 11n Green Field preamble support
	   0 - Not supported, 1 - Supported */
	u8 green_field_capable;

	/* MIMO Power Save mode */
	enum wcn36xx_hal_ht_mimo_state mimo_ps;

	/* Delayed BA Support */
	u8 delayed_ba_support;

	/* Max AMPDU duration in 32us */
	u8 max_ampdu_duration;

	/* HT STA should set it to 1 if it is enabled in BSS. HT STA should
	 * set it to 0 if AP does not support it. This indication is sent
	 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
	 * rates. */
	u8 dsss_cck_mode_40mhz;

	/* Valid STA Idx when action=Update. Set to 0xFF when invalid!
	 * Retained for backward compalibity with existing HAL code */
	u8 sta_index;

	/* BSSID of BSS to which station is associated. Set to 0xFF when
	 * invalid. Retained for backward compalibity with existing HAL
	 * code */
	u8 bssid_index;

	u8 p2p;

	/* Reserved to align next field on a dword boundary */
	u8 ht_ldpc_enabled:1;
	u8 vht_ldpc_enabled:1;
	u8 vht_tx_bf_enabled:1;
	u8 vht_tx_mu_beamformee_capable:1;
	u8 reserved:4;

	/* These rates are the intersection of peer and self capabilities. */
	struct wcn36xx_hal_supported_rates_v1 supported_rates;

	u8 vht_capable;
	u8 vht_tx_channel_width_set;

} __packed;

#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10

struct wcn36xx_hal_config_sta_req_msg_v1 {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_config_sta_params_v1 sta_params;
} __packed;

struct config_sta_rsp_params {
	/* success or failure */
	u32 status;

	/* Station index; valid only when 'status' field value SUCCESS */
	u8 sta_index;

	/* BSSID Index of BSS to which the station is associated */
	u8 bssid_index;

	/* DPU Index for PTK */
	u8 dpu_index;

	/* DPU Index for GTK */
	u8 bcast_dpu_index;

	/* DPU Index for IGTK  */
	u8 bcast_mgmt_dpu_idx;

	/* PTK DPU signature */
	u8 uc_ucast_sig;

	/* GTK DPU isignature */
	u8 uc_bcast_sig;

	/* IGTK DPU signature */
	u8 uc_mgmt_sig;

	u8 p2p;

} __packed;

struct wcn36xx_hal_config_sta_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	struct config_sta_rsp_params params;
} __packed;

/* Delete STA Request message */
struct wcn36xx_hal_delete_sta_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Index of STA to delete */
	u8 sta_index;

} __packed;

/* Delete STA Response message */
struct wcn36xx_hal_delete_sta_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* Index of STA deleted */
	u8 sta_id;
} __packed;

/* 12 Bytes long because this structure can be used to represent rate and
 * extended rate set IEs. The parser assume this to be at least 12 */
struct wcn36xx_hal_rate_set {
	u8 num_rates;
	u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
} __packed;

/* access category record */
struct wcn36xx_hal_aci_aifsn {
#ifndef ANI_LITTLE_BIT_ENDIAN
	u8 rsvd:1;
	u8 aci:2;
	u8 acm:1;
	u8 aifsn:4;
#else
	u8 aifsn:4;
	u8 acm:1;
	u8 aci:2;
	u8 rsvd:1;
#endif
} __packed;

/* contention window size */
struct wcn36xx_hal_mac_cw {
#ifndef ANI_LITTLE_BIT_ENDIAN
	u8 max:4;
	u8 min:4;
#else
	u8 min:4;
	u8 max:4;
#endif
} __packed;

struct wcn36xx_hal_edca_param_record {
	struct wcn36xx_hal_aci_aifsn aci;
	struct wcn36xx_hal_mac_cw cw;
	u16 txop_limit;
} __packed;

/* Concurrency role. These are generic IDs that identify the various roles
 *  in the software system. */
enum wcn36xx_hal_con_mode {
	WCN36XX_HAL_STA_MODE = 0,

	/* to support softAp mode . This is misleading.
	   It means AP MODE only. */
	WCN36XX_HAL_STA_SAP_MODE = 1,

	WCN36XX_HAL_P2P_CLIENT_MODE,
	WCN36XX_HAL_P2P_GO_MODE,
	WCN36XX_HAL_MONITOR_MODE,
};

/* This is a bit pattern to be set for each mode
 * bit 0 - sta mode
 * bit 1 - ap mode
 * bit 2 - p2p client mode
 * bit 3 - p2p go mode */
enum wcn36xx_hal_concurrency_mode {
	HAL_STA = 1,
	HAL_SAP = 2,

	/* to support sta, softAp  mode . This means STA+AP mode */
	HAL_STA_SAP = 3,

	HAL_P2P_CLIENT = 4,
	HAL_P2P_GO = 8,
	HAL_MAX_CONCURRENCY_PERSONA = 4
};

struct wcn36xx_hal_config_bss_params {
	/* BSSID */
	u8 bssid[ETH_ALEN];

	/* Self Mac Address */
	u8 self_mac_addr[ETH_ALEN];

	/* BSS type */
	enum wcn36xx_hal_bss_type bss_type;

	/* Operational Mode: AP =0, STA = 1 */
	u8 oper_mode;

	/* Network Type */
	enum wcn36xx_hal_nw_type nw_type;

	/* Used to classify PURE_11G/11G_MIXED to program MTU */
	u8 short_slot_time_supported;

	/* Co-exist with 11a STA */
	u8 lla_coexist;

	/* Co-exist with 11b STA */
	u8 llb_coexist;

	/* Co-exist with 11g STA */
	u8 llg_coexist;

	/* Coexistence with 11n STA */
	u8 ht20_coexist;

	/* Non GF coexist flag */
	u8 lln_non_gf_coexist;

	/* TXOP protection support */
	u8 lsig_tx_op_protection_full_support;

	/* RIFS mode */
	u8 rifs_mode;

	/* Beacon Interval in TU */
	u16 beacon_interval;

	/* DTIM period */
	u8 dtim_period;

	/* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
	u8 tx_channel_width_set;

	/* Operating channel */
	u8 oper_channel;

	/* Extension channel for channel bonding */
	u8 ext_channel;

	/* Reserved to align next field on a dword boundary */
	u8 reserved;

	/* TODO move sta to the end for 3680 */
	/* Context of the station being added in HW
	 *  Add a STA entry for "itself" -
	 *
	 *  On AP  - Add the AP itself in an "STA context"
	 *
	 *  On STA - Add the AP to which this STA is joining in an
	 *  "STA context"
	 */
	struct wcn36xx_hal_config_sta_params sta;
	/* SSID of the BSS */
	struct wcn36xx_hal_mac_ssid ssid;

	/* HAL should update the existing BSS entry, if this flag is set.
	 * UMAC will set this flag in case of reassoc, where we want to
	 * resue the the old BSSID and still return success 0 = Add, 1 =
	 * Update */
	u8 action;

	/* MAC Rate Set */
	struct wcn36xx_hal_rate_set rateset;

	/* Enable/Disable HT capabilities of the BSS */
	u8 ht;

	/* Enable/Disable OBSS protection */
	u8 obss_prot_enabled;

	/* RMF enabled/disabled */
	u8 rmf;

	/* HT Operating Mode operating mode of the 802.11n STA */
	enum wcn36xx_hal_ht_operating_mode ht_oper_mode;

	/* Dual CTS Protection: 0 - Unused, 1 - Used */
	u8 dual_cts_protection;

	/* Probe Response Max retries */
	u8 max_probe_resp_retry_limit;

	/* To Enable Hidden ssid */
	u8 hidden_ssid;

	/* To Enable Disable FW Proxy Probe Resp */
	u8 proxy_probe_resp;

	/* Boolean to indicate if EDCA params are valid. UMAC might not
	 * have valid EDCA params or might not desire to apply EDCA params
	 * during config BSS. 0 implies Not Valid ; Non-Zero implies
	 * valid */
	u8 edca_params_valid;

	/* EDCA Parameters for Best Effort Access Category */
	struct wcn36xx_hal_edca_param_record acbe;

	/* EDCA Parameters forBackground Access Category */
	struct wcn36xx_hal_edca_param_record acbk;

	/* EDCA Parameters for Video Access Category */
	struct wcn36xx_hal_edca_param_record acvi;

	/* EDCA Parameters for Voice Access Category */
	struct wcn36xx_hal_edca_param_record acvo;

	/* Ext Bss Config Msg if set */
	u8 ext_set_sta_key_param_valid;

	/* SetStaKeyParams for ext bss msg */
	struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;

	/* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
	 * wcn36xx_hal_con_mode */
	u8 wcn36xx_hal_persona;

	u8 spectrum_mgt_enable;

	/* HAL fills in the tx power used for mgmt frames in txMgmtPower */
	s8 tx_mgmt_power;

	/* maxTxPower has max power to be used after applying the power
	 * constraint if any */
	s8 max_tx_power;
} __packed;

struct wcn36xx_hal_config_bss_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_config_bss_params bss_params;
} __packed;

struct wcn36xx_hal_config_bss_params_v1 {
	/* BSSID */
	u8 bssid[ETH_ALEN];

	/* Self Mac Address */
	u8 self_mac_addr[ETH_ALEN];

	/* BSS type */
	enum wcn36xx_hal_bss_type bss_type;

	/* Operational Mode: AP =0, STA = 1 */
	u8 oper_mode;

	/* Network Type */
	enum wcn36xx_hal_nw_type nw_type;

	/* Used to classify PURE_11G/11G_MIXED to program MTU */
	u8 short_slot_time_supported;

	/* Co-exist with 11a STA */
	u8 lla_coexist;

	/* Co-exist with 11b STA */
	u8 llb_coexist;

	/* Co-exist with 11g STA */
	u8 llg_coexist;

	/* Coexistence with 11n STA */
	u8 ht20_coexist;

	/* Non GF coexist flag */
	u8 lln_non_gf_coexist;

	/* TXOP protection support */
	u8 lsig_tx_op_protection_full_support;

	/* RIFS mode */
	u8 rifs_mode;

	/* Beacon Interval in TU */
	u16 beacon_interval;

	/* DTIM period */
	u8 dtim_period;

	/* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
	u8 tx_channel_width_set;

	/* Operating channel */
	u8 oper_channel;

	/* Extension channel for channel bonding */
	u8 ext_channel;

	/* Reserved to align next field on a dword boundary */
	u8 reserved;

	/* SSID of the BSS */
	struct wcn36xx_hal_mac_ssid ssid;

	/* HAL should update the existing BSS entry, if this flag is set.
	 * UMAC will set this flag in case of reassoc, where we want to
	 * resue the the old BSSID and still return success 0 = Add, 1 =
	 * Update */
	u8 action;

	/* MAC Rate Set */
	struct wcn36xx_hal_rate_set rateset;

	/* Enable/Disable HT capabilities of the BSS */
	u8 ht;

	/* Enable/Disable OBSS protection */
	u8 obss_prot_enabled;

	/* RMF enabled/disabled */
	u8 rmf;

	/* HT Operating Mode operating mode of the 802.11n STA */
	enum wcn36xx_hal_ht_operating_mode ht_oper_mode;

	/* Dual CTS Protection: 0 - Unused, 1 - Used */
	u8 dual_cts_protection;

	/* Probe Response Max retries */
	u8 max_probe_resp_retry_limit;

	/* To Enable Hidden ssid */
	u8 hidden_ssid;

	/* To Enable Disable FW Proxy Probe Resp */
	u8 proxy_probe_resp;

	/* Boolean to indicate if EDCA params are valid. UMAC might not
	 * have valid EDCA params or might not desire to apply EDCA params
	 * during config BSS. 0 implies Not Valid ; Non-Zero implies
	 * valid */
	u8 edca_params_valid;

	/* EDCA Parameters for Best Effort Access Category */
	struct wcn36xx_hal_edca_param_record acbe;

	/* EDCA Parameters forBackground Access Category */
	struct wcn36xx_hal_edca_param_record acbk;

	/* EDCA Parameters for Video Access Category */
	struct wcn36xx_hal_edca_param_record acvi;

	/* EDCA Parameters for Voice Access Category */
	struct wcn36xx_hal_edca_param_record acvo;

	/* Ext Bss Config Msg if set */
	u8 ext_set_sta_key_param_valid;

	/* SetStaKeyParams for ext bss msg */
	struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;

	/* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
	 * wcn36xx_hal_con_mode */
	u8 wcn36xx_hal_persona;

	u8 spectrum_mgt_enable;

	/* HAL fills in the tx power used for mgmt frames in txMgmtPower */
	s8 tx_mgmt_power;

	/* maxTxPower has max power to be used after applying the power
	 * constraint if any */
	s8 max_tx_power;

	/* Context of the station being added in HW
	 *  Add a STA entry for "itself" -
	 *
	 *  On AP  - Add the AP itself in an "STA context"
	 *
	 *  On STA - Add the AP to which this STA is joining in an
	 *  "STA context"
	 */
	struct wcn36xx_hal_config_sta_params_v1 sta;

	u8 vht_capable;
	u8 vht_tx_channel_width_set;

} __packed;

#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2)

struct wcn36xx_hal_config_bss_req_msg_v1 {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_config_bss_params_v1 bss_params;
} __packed;

struct wcn36xx_hal_config_bss_rsp_params {
	/* Success or Failure */
	u32 status;

	/* BSS index allocated by HAL */
	u8 bss_index;

	/* DPU descriptor index for PTK */
	u8 dpu_desc_index;

	/* PTK DPU signature */
	u8 ucast_dpu_signature;

	/* DPU descriptor index for GTK */
	u8 bcast_dpu_desc_indx;

	/* GTK DPU signature */
	u8 bcast_dpu_signature;

	/* DPU descriptor for IGTK */
	u8 mgmt_dpu_desc_index;

	/* IGTK DPU signature */
	u8 mgmt_dpu_signature;

	/* Station Index for BSS entry */
	u8 bss_sta_index;

	/* Self station index for this BSS */
	u8 bss_self_sta_index;

	/* Bcast station for buffering bcast frames in AP role */
	u8 bss_bcast_sta_idx;

	/* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
	u8 mac[ETH_ALEN];

	/* HAL fills in the tx power used for mgmt frames in this field. */
	s8 tx_mgmt_power;

} __packed;

struct wcn36xx_hal_config_bss_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
} __packed;

struct wcn36xx_hal_delete_bss_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* BSS index to be deleted */
	u8 bss_index;

} __packed;

struct wcn36xx_hal_delete_bss_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Success or Failure */
	u32 status;

	/* BSS index that has been deleted */
	u8 bss_index;

} __packed;

struct wcn36xx_hal_join_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Indicates the BSSID to which STA is going to associate */
	u8 bssid[ETH_ALEN];

	/* Indicates the channel to switch to. */
	u8 channel;

	/* Self STA MAC */
	u8 self_sta_mac_addr[ETH_ALEN];

	/* Local power constraint */
	u8 local_power_constraint;

	/* Secondary channel offset */
	enum phy_chan_bond_state secondary_channel_offset;

	/* link State */
	enum wcn36xx_hal_link_state link_state;

	/* Max TX power */
	s8 max_tx_power;
} __packed;

struct wcn36xx_hal_join_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* HAL fills in the tx power used for mgmt frames in this field */
	u8 tx_mgmt_power;
} __packed;

struct post_assoc_req_msg {
	struct wcn36xx_hal_msg_header header;

	struct wcn36xx_hal_config_sta_params sta_params;
	struct wcn36xx_hal_config_bss_params bss_params;
};

struct post_assoc_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	struct config_sta_rsp_params sta_rsp_params;
	struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
};

/* This is used to create a set of WEP keys for a given BSS. */
struct wcn36xx_hal_set_bss_key_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* BSS Index of the BSS */
	u8 bss_idx;

	/* Encryption Type used with peer */
	enum ani_ed_type enc_type;

	/* Number of keys */
	u8 num_keys;

	/* Array of keys. */
	struct wcn36xx_hal_keys keys[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];

	/* Control for Replay Count, 1= Single TID based replay count on Tx
	 * 0 = Per TID based replay count on TX */
	u8 single_tid_rc;
} __packed;

/* tagged version of set bss key */
struct wcn36xx_hal_set_bss_key_req_msg_tagged {
	struct wcn36xx_hal_set_bss_key_req_msg Msg;
	u32 tag;
} __packed;

struct wcn36xx_hal_set_bss_key_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

/*
 * This is used  configure the key information on a given station.
 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
 * a preconfigured key from a BSS the station associated with; otherwise
 * a new key descriptor is created based on the key field.
 */
struct wcn36xx_hal_set_sta_key_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
} __packed;

struct wcn36xx_hal_set_sta_key_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

struct wcn36xx_hal_remove_bss_key_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* BSS Index of the BSS */
	u8 bss_idx;

	/* Encryption Type used with peer */
	enum ani_ed_type enc_type;

	/* Key Id */
	u8 key_id;

	/* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
	 * Static/Dynamic keys */
	enum ani_wep_type wep_type;
} __packed;

struct wcn36xx_hal_remove_bss_key_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

/*
 * This is used by PE to Remove the key information on a given station.
 */
struct wcn36xx_hal_remove_sta_key_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* STA Index */
	u16 sta_idx;

	/* Encryption Type used with peer */
	enum ani_ed_type enc_type;

	/* Key Id */
	u8 key_id;

	/* Whether to invalidate the Broadcast key or Unicast key. In case
	 * of WEP, the same key is used for both broadcast and unicast. */
	u8 unicast;

} __packed;

struct wcn36xx_hal_remove_sta_key_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/*success or failure */
	u32 status;

} __packed;

#ifdef FEATURE_OEM_DATA_SUPPORT

#ifndef OEM_DATA_REQ_SIZE
#define OEM_DATA_REQ_SIZE 134
#endif

#ifndef OEM_DATA_RSP_SIZE
#define OEM_DATA_RSP_SIZE 1968
#endif

struct start_oem_data_req_msg {
	struct wcn36xx_hal_msg_header header;

	u32 status;
	tSirMacAddr self_mac_addr;
	u8 oem_data_req[OEM_DATA_REQ_SIZE];

};

struct start_oem_data_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	u8 oem_data_rsp[OEM_DATA_RSP_SIZE];
};

#endif

struct wcn36xx_hal_switch_channel_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Channel number */
	u8 channel_number;

	/* Local power constraint */
	u8 local_power_constraint;

	/* Secondary channel offset */
	enum phy_chan_bond_state secondary_channel_offset;

	/* HAL fills in the tx power used for mgmt frames in this field. */
	u8 tx_mgmt_power;

	/* Max TX power */
	u8 max_tx_power;

	/* Self STA MAC */
	u8 self_sta_mac_addr[ETH_ALEN];

	/* VO WIFI comment: BSSID needed to identify session. As the
	 * request has power constraints, this should be applied only to
	 * that session Since MTU timing and EDCA are sessionized, this
	 * struct needs to be sessionized and bssid needs to be out of the
	 * VOWifi feature flag V IMP: Keep bssId field at the end of this
	 * msg. It is used to mantain backward compatbility by way of
	 * ignoring if using new host/old FW or old host/new FW since it is
	 * at the end of this struct
	 */
	u8 bssid[ETH_ALEN];
} __packed;

struct wcn36xx_hal_switch_channel_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Status */
	u32 status;

	/* Channel number - same as in request */
	u8 channel_number;

	/* HAL fills in the tx power used for mgmt frames in this field */
	u8 tx_mgmt_power;

	/* BSSID needed to identify session - same as in request */
	u8 bssid[ETH_ALEN];

} __packed;

struct wcn36xx_hal_process_ptt_msg_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Actual FTM Command body */
	u8 ptt_msg[];
} __packed;

struct wcn36xx_hal_process_ptt_msg_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* FTM Command response status */
	u32 ptt_msg_resp_status;
	/* Actual FTM Command body */
	u8 ptt_msg[];
} __packed;

struct update_edca_params_req_msg {
	struct wcn36xx_hal_msg_header header;

	/*BSS Index */
	u16 bss_index;

	/* Best Effort */
	struct wcn36xx_hal_edca_param_record acbe;

	/* Background */
	struct wcn36xx_hal_edca_param_record acbk;

	/* Video */
	struct wcn36xx_hal_edca_param_record acvi;

	/* Voice */
	struct wcn36xx_hal_edca_param_record acvo;
};

struct update_edca_params_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct dpu_stats_params {
	/* Index of STA to which the statistics */
	u16 sta_index;

	/* Encryption mode */
	u8 enc_mode;

	/* status */
	u32 status;

	/* Statistics */
	u32 send_blocks;
	u32 recv_blocks;
	u32 replays;
	u8 mic_error_cnt;
	u32 prot_excl_cnt;
	u16 format_err_cnt;
	u16 un_decryptable_cnt;
	u32 decrypt_err_cnt;
	u32 decrypt_ok_cnt;
};

struct wcn36xx_hal_stats_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Valid STA Idx for per STA stats request */
	u32 sta_id;

	/* Categories of stats requested as specified in eHalStatsMask */
	u32 stats_mask;
};

struct ani_summary_stats_info {
	/* Total number of packets(per AC) that were successfully
	 * transmitted with retries */
	u32 retry_cnt[4];

	/* The number of MSDU packets and MMPDU frames per AC that the
	 * 802.11 station successfully transmitted after more than one
	 * retransmission attempt */
	u32 multiple_retry_cnt[4];

	/* Total number of packets(per AC) that were successfully
	 * transmitted (with and without retries, including multi-cast,
	 * broadcast) */
	u32 tx_frm_cnt[4];

	/* Total number of packets that were successfully received (after
	 * appropriate filter rules including multi-cast, broadcast) */
	u32 rx_frm_cnt;

	/* Total number of duplicate frames received successfully */
	u32 frm_dup_cnt;

	/* Total number packets(per AC) failed to transmit */
	u32 fail_cnt[4];

	/* Total number of RTS/CTS sequence failures for transmission of a
	 * packet */
	u32 rts_fail_cnt;

	/* Total number packets failed transmit because of no ACK from the
	 * remote entity */
	u32 ack_fail_cnt;

	/* Total number of RTS/CTS sequence success for transmission of a
	 * packet */
	u32 rts_succ_cnt;

	/* The sum of the receive error count and dropped-receive-buffer
	 * error count. HAL will provide this as a sum of (FCS error) +
	 * (Fail get BD/PDU in HW) */
	u32 rx_discard_cnt;

	/*
	 * The receive error count. HAL will provide the RxP FCS error
	 * global counter. */
	u32 rx_error_cnt;

	/* The sum of the transmit-directed byte count, transmit-multicast
	 * byte count and transmit-broadcast byte count. HAL will sum TPE
	 * UC/MC/BCAST global counters to provide this. */
	u32 tx_byte_cnt;
};

/* defines tx_rate_flags */
enum tx_rate_info {
	/* Legacy rates */
	HAL_TX_RATE_LEGACY = 0x1,

	/* HT20 rates */
	HAL_TX_RATE_HT20 = 0x2,

	/* HT40 rates */
	HAL_TX_RATE_HT40 = 0x4,

	/* Rate with Short guard interval */
	HAL_TX_RATE_SGI = 0x8,

	/* Rate with Long guard interval */
	HAL_TX_RATE_LGI = 0x10
};

struct ani_global_class_a_stats_info {
	/* The number of MPDU frames received by the 802.11 station for
	 * MSDU packets or MMPDU frames */
	u32 rx_frag_cnt;

	/* The number of MPDU frames received by the 802.11 station for
	 * MSDU packets or MMPDU frames when a promiscuous packet filter
	 * was enabled */
	u32 promiscuous_rx_frag_cnt;

	/* The receiver input sensitivity referenced to a FER of 8% at an
	 * MPDU length of 1024 bytes at the antenna connector. Each element
	 * of the array shall correspond to a supported rate and the order
	 * shall be the same as the supporteRates parameter. */
	u32 rx_input_sensitivity;

	/* The maximum transmit power in dBm upto one decimal. for eg: if
	 * it is 10.5dBm, the value would be 105 */
	u32 max_pwr;

	/* Number of times the receiver failed to synchronize with the
	 * incoming signal after detecting the sync in the preamble of the
	 * transmitted PLCP protocol data unit. */
	u32 sync_fail_cnt;

	/* Legacy transmit rate, in units of 500 kbit/sec, for the most
	 * recently transmitted frame */
	u32 tx_rate;

	/* mcs index for HT20 and HT40 rates */
	u32 mcs_index;

	/* to differentiate between HT20 and HT40 rates; short and long
	 * guard interval */
	u32 tx_rate_flags;
};

struct ani_global_security_stats {
	/* The number of unencrypted received MPDU frames that the MAC
	 * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
	 * management information base (MIB) object is enabled */
	u32 rx_wep_unencrypted_frm_cnt;

	/* The number of received MSDU packets that that the 802.11 station
	 * discarded because of MIC failures */
	u32 rx_mic_fail_cnt;

	/* The number of encrypted MPDU frames that the 802.11 station
	 * failed to decrypt because of a TKIP ICV error */
	u32 tkip_icv_err;

	/* The number of received MPDU frames that the 802.11 discarded
	 * because of an invalid AES-CCMP format */
	u32 aes_ccmp_format_err;

	/* The number of received MPDU frames that the 802.11 station
	 * discarded because of the AES-CCMP replay protection procedure */
	u32 aes_ccmp_replay_cnt;

	/* The number of received MPDU frames that the 802.11 station
	 * discarded because of errors detected by the AES-CCMP decryption
	 * algorithm */
	u32 aes_ccmp_decrpt_err;

	/* The number of encrypted MPDU frames received for which a WEP
	 * decryption key was not available on the 802.11 station */
	u32 wep_undecryptable_cnt;

	/* The number of encrypted MPDU frames that the 802.11 station
	 * failed to decrypt because of a WEP ICV error */
	u32 wep_icv_err;

	/* The number of received encrypted packets that the 802.11 station
	 * successfully decrypted */
	u32 rx_decrypt_succ_cnt;

	/* The number of encrypted packets that the 802.11 station failed
	 * to decrypt */
	u32 rx_decrypt_fail_cnt;
};

struct ani_global_class_b_stats_info {
	struct ani_global_security_stats uc_stats;
	struct ani_global_security_stats mc_bc_stats;
};

struct ani_global_class_c_stats_info {
	/* This counter shall be incremented for a received A-MSDU frame
	 * with the stations MAC address in the address 1 field or an
	 * A-MSDU frame with a group address in the address 1 field */
	u32 rx_amsdu_cnt;

	/* This counter shall be incremented when the MAC receives an AMPDU
	 * from the PHY */
	u32 rx_ampdu_cnt;

	/* This counter shall be incremented when a Frame is transmitted
	 * only on the primary channel */
	u32 tx_20_frm_cnt;

	/* This counter shall be incremented when a Frame is received only
	 * on the primary channel */
	u32 rx_20_frm_cnt;

	/* This counter shall be incremented by the number of MPDUs
	 * received in the A-MPDU when an A-MPDU is received */
	u32 rx_mpdu_in_ampdu_cnt;

	/* This counter shall be incremented when an MPDU delimiter has a
	 * CRC error when this is the first CRC error in the received AMPDU
	 * or when the previous delimiter has been decoded correctly */
	u32 ampdu_delimiter_crc_err;
};

struct ani_per_sta_stats_info {
	/* The number of MPDU frames that the 802.11 station transmitted
	 * and acknowledged through a received 802.11 ACK frame */
	u32 tx_frag_cnt[4];

	/* This counter shall be incremented when an A-MPDU is transmitted */
	u32 tx_ampdu_cnt;

	/* This counter shall increment by the number of MPDUs in the AMPDU
	 * when an A-MPDU is transmitted */
	u32 tx_mpdu_in_ampdu_cnt;
};

struct wcn36xx_hal_stats_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Success or Failure */
	u32 status;

	/* STA Idx */
	u32 sta_index;

	/* Categories of STATS being returned as per eHalStatsMask */
	u32 stats_mask;

	/* message type is same as the request type */
	u16 msg_type;

	/* length of the entire request, includes the pStatsBuf length too */
	u16 msg_len;
};

struct wcn36xx_hal_set_link_state_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bssid[ETH_ALEN];
	enum wcn36xx_hal_link_state state;
	u8 self_mac_addr[ETH_ALEN];

} __packed;

struct set_link_state_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

/* TSPEC Params */
struct wcn36xx_hal_ts_info_tfc {
#ifndef ANI_LITTLE_BIT_ENDIAN
	u16 ackPolicy:2;
	u16 userPrio:3;
	u16 psb:1;
	u16 aggregation:1;
	u16 accessPolicy:2;
	u16 direction:2;
	u16 tsid:4;
	u16 trafficType:1;
#else
	u16 trafficType:1;
	u16 tsid:4;
	u16 direction:2;
	u16 accessPolicy:2;
	u16 aggregation:1;
	u16 psb:1;
	u16 userPrio:3;
	u16 ackPolicy:2;
#endif
};

/* Flag to schedule the traffic type */
struct wcn36xx_hal_ts_info_sch {
#ifndef ANI_LITTLE_BIT_ENDIAN
	u8 rsvd:7;
	u8 schedule:1;
#else
	u8 schedule:1;
	u8 rsvd:7;
#endif
};

/* Traffic and scheduling info */
struct wcn36xx_hal_ts_info {
	struct wcn36xx_hal_ts_info_tfc traffic;
	struct wcn36xx_hal_ts_info_sch schedule;
};

/* Information elements */
struct wcn36xx_hal_tspec_ie {
	u8 type;
	u8 length;
	struct wcn36xx_hal_ts_info ts_info;
	u16 nom_msdu_size;
	u16 max_msdu_size;
	u32 min_svc_interval;
	u32 max_svc_interval;
	u32 inact_interval;
	u32 suspend_interval;
	u32 svc_start_time;
	u32 min_data_rate;
	u32 mean_data_rate;
	u32 peak_data_rate;
	u32 max_burst_sz;
	u32 delay_bound;
	u32 min_phy_rate;
	u16 surplus_bw;
	u16 medium_time;
};

struct add_ts_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index */
	u16 sta_index;

	/* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
	u16 tspec_index;

	/* To program TPE with required parameters */
	struct wcn36xx_hal_tspec_ie tspec;

	/* U-APSD Flags: 1b per AC.  Encoded as follows:
	   b7 b6 b5 b4 b3 b2 b1 b0 =
	   X  X  X  X  BE BK VI VO */
	u8 uapsd;

	/* These parameters are for all the access categories */

	/* Service Interval */
	u32 service_interval[WCN36XX_HAL_MAX_AC];

	/* Suspend Interval */
	u32 suspend_interval[WCN36XX_HAL_MAX_AC];

	/* Delay Interval */
	u32 delay_interval[WCN36XX_HAL_MAX_AC];
};

struct add_rs_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct del_ts_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index */
	u16 sta_index;

	/* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
	u16 tspec_index;

	/* To lookup station id using the mac address */
	u8 bssid[ETH_ALEN];
};

struct del_ts_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

/* End of TSpec Parameters */

/* Start of BLOCK ACK related Parameters */

struct wcn36xx_hal_add_ba_session_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index */
	u16 sta_index;

	/* Peer MAC Address */
	u8 mac_addr[ETH_ALEN];

	/* ADDBA Action Frame dialog token
	   HAL will not interpret this object */
	u8 dialog_token;

	/* TID for which the BA is being setup
	   This identifies the TC or TS of interest */
	u8 tid;

	/* 0 - Delayed BA (Not supported)
	   1 - Immediate BA */
	u8 policy;

	/* Indicates the number of buffers for this TID (baTID)
	   NOTE - This is the requested buffer size. When this
	   is processed by HAL and subsequently by HDD, it is
	   possible that HDD may change this buffer size. Any
	   change in the buffer size should be noted by PE and
	   advertized appropriately in the ADDBA response */
	u16 buffer_size;

	/* BA timeout in TU's 0 means no timeout will occur */
	u16 timeout;

	/* b0..b3 - Fragment Number - Always set to 0
	   b4..b15 - Starting Sequence Number of first MSDU
	   for which this BA is setup */
	u16 ssn;

	/* ADDBA direction
	   1 - Originator
	   0 - Recipient */
	u8 direction;
} __packed;

struct wcn36xx_hal_add_ba_session_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* Dialog token */
	u8 dialog_token;

	/* TID for which the BA session has been setup */
	u8 ba_tid;

	/* BA Buffer Size allocated for the current BA session */
	u8 ba_buffer_size;

	u8 ba_session_id;

	/* Reordering Window buffer */
	u8 win_size;

	/* Station Index to id the sta */
	u8 sta_index;

	/* Starting Sequence Number */
	u16 ssn;
} __packed;

struct wcn36xx_hal_add_ba_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Session Id */
	u8 session_id;

	/* Reorder Window Size */
	u8 win_size;
/* Old FW 1.2.2.4 does not support this*/
#ifdef FEATURE_ON_CHIP_REORDERING
	u8 reordering_done_on_chip;
#endif
} __packed;

struct wcn36xx_hal_add_ba_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* Dialog token */
	u8 dialog_token;
} __packed;

struct add_ba_info {
	u16 ba_enable:1;
	u16 starting_seq_num:12;
	u16 reserved:3;
};

struct wcn36xx_hal_trigger_ba_rsp_candidate {
	u8 sta_addr[ETH_ALEN];
	struct add_ba_info ba_info[STACFG_MAX_TC];
} __packed;

struct wcn36xx_hal_trigger_ba_req_candidate {
	u8 sta_index;
	u8 tid_bitmap;
} __packed;

struct wcn36xx_hal_trigger_ba_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Session Id */
	u8 session_id;

	/* baCandidateCnt is followed by trigger BA
	 * Candidate List(tTriggerBaCandidate)
	 */
	u16 candidate_cnt;

} __packed;

struct wcn36xx_hal_trigger_ba_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* TO SUPPORT BT-AMP */
	u8 bssid[ETH_ALEN];

	/* success or failure */
	u32 status;

	/* baCandidateCnt is followed by trigger BA
	 * Rsp Candidate List(tTriggerRspBaCandidate)
	 */
	u16 candidate_cnt;
} __packed;

struct wcn36xx_hal_del_ba_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index */
	u16 sta_index;

	/* TID for which the BA session is being deleted */
	u8 tid;

	/* DELBA direction
	   1 - Originator
	   0 - Recipient */
	u8 direction;
} __packed;

struct wcn36xx_hal_del_ba_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
} __packed;

struct tsm_stats_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Traffic Id */
	u8 tid;

	u8 bssid[ETH_ALEN];
};

struct tsm_stats_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/*success or failure */
	u32 status;

	/* Uplink Packet Queue delay */
	u16 uplink_pkt_queue_delay;

	/* Uplink Packet Queue delay histogram */
	u16 uplink_pkt_queue_delay_hist[4];

	/* Uplink Packet Transmit delay */
	u32 uplink_pkt_tx_delay;

	/* Uplink Packet loss */
	u16 uplink_pkt_loss;

	/* Uplink Packet count */
	u16 uplink_pkt_count;

	/* Roaming count */
	u8 roaming_count;

	/* Roaming Delay */
	u16 roaming_delay;
};

struct set_key_done_msg {
	struct wcn36xx_hal_msg_header header;

	/*bssid of the keys */
	u8 bssidx;
	u8 enc_type;
};

struct wcn36xx_hal_nv_img_download_req_msg {
	/* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
	 * messages should be
	 * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
	 * nv_img_buffer_size */
	struct wcn36xx_hal_msg_header header;

	/* Fragment sequence number of the NV Image. Note that NV Image
	 * might not fit into one message due to size limitation of the SMD
	 * channel FIFO. UMAC can hence choose to chop the NV blob into
	 * multiple fragments starting with seqeunce number 0, 1, 2 etc.
	 * The last fragment MUST be indicated by marking the
	 * isLastFragment field to 1. Note that all the NV blobs would be
	 * concatenated together by HAL without any padding bytes in
	 * between.*/
	u16 frag_number;

	/* Is this the last fragment? When set to 1 it indicates that no
	 * more fragments will be sent by UMAC and HAL can concatenate all
	 * the NV blobs rcvd & proceed with the parsing. HAL would generate
	 * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
	 * after it receives each fragment */
	u16 last_fragment;

	/* NV Image size (number of bytes) */
	u32 nv_img_buffer_size;

	/* Following the 'nv_img_buffer_size', there should be
	 * nv_img_buffer_size bytes of NV Image i.e.
	 * u8[nv_img_buffer_size] */
} __packed;

struct wcn36xx_hal_nv_img_download_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Success or Failure. HAL would generate a
	 * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
	u32 status;
} __packed;

struct wcn36xx_hal_nv_store_ind {
	/* Note: The length specified in tHalNvStoreInd messages should be
	 * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
	struct wcn36xx_hal_msg_header header;

	/* NV Item */
	u32 table_id;

	/* Size of NV Blob */
	u32 nv_blob_size;

	/* Following the 'nvBlobSize', there should be nvBlobSize bytes of
	 * NV blob i.e. u8[nvBlobSize] */
};

/* End of Block Ack Related Parameters */

#define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6

/* Definition for MIC failure indication MAC reports this each time a MIC
 * failure occures on Rx TKIP packet
 */
struct mic_failure_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bssid[ETH_ALEN];

	/* address used to compute MIC */
	u8 src_addr[ETH_ALEN];

	/* transmitter address */
	u8 ta_addr[ETH_ALEN];

	u8 dst_addr[ETH_ALEN];

	u8 multicast;

	/* first byte of IV */
	u8 iv1;

	/* second byte of IV */
	u8 key_id;

	/* sequence number */
	u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];

	/* receive address */
	u8 rx_addr[ETH_ALEN];
};

struct update_vht_op_mode_req_msg {
	struct wcn36xx_hal_msg_header header;

	u16 op_mode;
	u16 sta_id;
};

struct update_vht_op_mode_params_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	u32 status;
};

struct update_beacon_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bss_index;

	/* shortPreamble mode. HAL should update all the STA rates when it
	 * receives this message */
	u8 short_preamble;

	/* short Slot time. */
	u8 short_slot_time;

	/* Beacon Interval */
	u16 beacon_interval;

	/* Protection related */
	u8 lla_coexist;
	u8 llb_coexist;
	u8 llg_coexist;
	u8 ht20_coexist;
	u8 lln_non_gf_coexist;
	u8 lsig_tx_op_protection_full_support;
	u8 rifs_mode;

	u16 param_change_bitmap;
};

struct update_beacon_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	u32 status;
};

struct wcn36xx_hal_send_beacon_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* length of the template + 6. Only qcom knows why */
	u32 beacon_length6;

	/* length of the template. */
	u32 beacon_length;

	/* Beacon data. */
	u8 beacon[BEACON_TEMPLATE_SIZE - sizeof(u32)];

	u8 bssid[ETH_ALEN];

	/* TIM IE offset from the beginning of the template. */
	u32 tim_ie_offset;

	/* P2P IE offset from the begining of the template */
	u16 p2p_ie_offset;
} __packed;

struct send_beacon_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	u32 status;
} __packed;

struct enable_radar_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bssid[ETH_ALEN];
	u8 channel;
};

struct enable_radar_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Link Parameters */
	u8 bssid[ETH_ALEN];

	/* success or failure */
	u32 status;
};

struct radar_detect_intr_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u8 radar_det_channel;
};

struct radar_detect_ind_msg {
	struct wcn36xx_hal_msg_header header;

	/* channel number in which the RADAR detected */
	u8 channel_number;

	/* RADAR pulse width in usecond */
	u16 radar_pulse_width;

	/* Number of RADAR pulses */
	u16 num_radar_pulse;
};

struct wcn36xx_hal_get_tpc_report_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 sta[ETH_ALEN];
	u8 dialog_token;
	u8 txpower;
};

struct wcn36xx_hal_get_tpc_report_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_send_probe_resp_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 probe_resp_template[BEACON_TEMPLATE_SIZE];
	u32 probe_resp_template_len;
	u32 proxy_probe_req_valid_ie_bmap[8];
	u8 bssid[ETH_ALEN];
};

struct send_probe_resp_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct send_unknown_frame_rx_ind_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_delete_sta_context_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u16 aid;
	u16 sta_id;

	/* TO SUPPORT BT-AMP */
	u8 bssid[ETH_ALEN];

	/* HAL copies bssid from the sta table. */
	u8 addr2[ETH_ALEN];

	/* To unify the keepalive / unknown A2 / tim-based disa */
	u16 reason_code;
} __packed;

struct indicate_del_sta {
	struct wcn36xx_hal_msg_header header;
	u8 aid;
	u8 sta_index;
	u8 bss_index;
	u8 reason_code;
	u32 status;
};

struct bt_amp_event_msg {
	struct wcn36xx_hal_msg_header header;

	enum bt_amp_event_type btAmpEventType;
};

struct bt_amp_event_rsp {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct tl_hal_flush_ac_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index. originates from HAL */
	u8 sta_id;

	/* TID for which the transmit queue is being flushed */
	u8 tid;
};

struct tl_hal_flush_ac_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Station Index. originates from HAL */
	u8 sta_id;

	/* TID for which the transmit queue is being flushed */
	u8 tid;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_enter_imps_req_msg {
	struct wcn36xx_hal_msg_header header;
} __packed;

struct wcn36xx_hal_exit_imps_req_msg {
	struct wcn36xx_hal_msg_header header;
} __packed;

struct wcn36xx_hal_enter_bmps_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bss_index;

	/* TBTT value derived from the last beacon */
#ifndef BUILD_QWPTTSTATIC
	u64 tbtt;
#endif
	u8 dtim_count;

	/* DTIM period given to HAL during association may not be valid, if
	 * association is based on ProbeRsp instead of beacon. */
	u8 dtim_period;

	/* For CCX and 11R Roaming */
	u32 rssi_filter_period;

	u32 num_beacon_per_rssi_average;
	u8 rssi_filter_enable;
} __packed;

struct wcn36xx_hal_exit_bmps_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 send_data_null;
	u8 bss_index;
} __packed;

struct wcn36xx_hal_missed_beacon_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bss_index;
} __packed;

/* Beacon Filtering data structures */

struct beacon_filter_ie {
	u8 element_id;
	u8 check_ie_presence;
	u8 offset;
	u8 value;
	u8 bitmask;
	u8 ref;
} __packed;

#define WCN36XX_FILTER_CAPABILITY_MASK		0x73cf
#define WCN36XX_FILTER_IE_DS_CHANNEL_MASK	0x00
#define WCN36XX_FILTER_IE_ERP_FILTER_MASK	0xF8
#define WCN36XX_FILTER_IE_EDCA_FILTER_MASK	0xF0
#define WCN36XX_FILTER_IE_QOS_FILTER_MASK	0xF0
#define WCN36XX_FILTER_IE_CHANNEL_SWITCH_MASK	0x00
#define WCN36XX_FILTER_IE_HT_BYTE0_FILTER_MASK	0x00
#define WCN36XX_FILTER_IE_HT_BYTE1_FILTER_MASK	0xF8
#define WCN36XX_FILTER_IE_HT_BYTE2_FILTER_MASK	0xEB
#define WCN36XX_FILTER_IE_HT_BYTE5_FILTER_MASK	0xFD
#define WCN36XX_FILTER_IE_PWR_CONSTRAINT_MASK	0x00
#define WCN36XX_FILTER_IE_OPMODE_NOTIF_MASK	0x00
#define WCN36XX_FILTER_IE_VHTOP_CHWIDTH_MASK	0xFC
#define WCN36XX_FILTER_IE_RSN_MASK		0x00
#define WCN36XX_FILTER_IE_VENDOR_MASK		0x00

/* The above structure would be followed by multiple of below mentioned
 * structure
 */

struct wcn36xx_hal_add_bcn_filter_req_msg {
	struct wcn36xx_hal_msg_header header;

	u16 capability_info;
	u16 capability_mask;
	u16 beacon_interval;
	u16 ie_num;
	u8 bss_index;
	u8 reserved;
} __packed;

struct wcn36xx_hal_rem_bcn_filter_req {
	struct wcn36xx_hal_msg_header header;

	u8 ie_Count;
	u8 rem_ie_id[1];
} __packed;

#define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD                  0
#define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD         1
#define WCN36XX_HAL_IPV6_NS_OFFLOAD                         2
#define WCN36XX_HAL_IPV6_ADDR_LEN                           16
#define WCN36XX_HAL_OFFLOAD_DISABLE                         0
#define WCN36XX_HAL_OFFLOAD_ENABLE                          1
#define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE             0x2
#define WCN36XX_HAL_OFFLOAD_MCAST_FILTER_ENABLE             0x4
#define WCN36XX_HAL_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE	\
	(WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_MCAST_FILTER_ENABLE)
#define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE	\
	(WCN36XX_HAL_OFFLOAD_ENABLE | WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE)
#define WCN36XX_HAL_IPV6_OFFLOAD_ADDR_MAX		0x02

struct wcn36xx_hal_ns_offload_params {
	u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
	u8 self_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];

	/* Only support 2 possible Network Advertisement IPv6 address */
	u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
	u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];

	u8 self_addr[ETH_ALEN];
	u8 src_ipv6_addr_valid:1;
	u8 target_ipv6_addr1_valid:1;
	u8 target_ipv6_addr2_valid:1;
	u8 reserved1:5;

	/* make it DWORD aligned */
	u8 reserved2;

	/* slot index for this offload */
	u32 slot_index;
	u8 bss_index;
} __packed;

struct wcn36xx_hal_host_offload_req {
	u8 offload_type;

	/* enable or disable */
	u8 enable;

	union {
		u8 host_ipv4_addr[4];
		u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
	} u;
} __packed;

struct wcn36xx_hal_host_offload_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_host_offload_req host_offload_params;
	struct wcn36xx_hal_ns_offload_params ns_offload_params;
} __packed;

/* Packet Types. */
#define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT              1
#define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP     2

/* Enable or disable keep alive */
#define WCN36XX_HAL_KEEP_ALIVE_DISABLE   0
#define WCN36XX_HAL_KEEP_ALIVE_ENABLE    1
#define WCN36XX_KEEP_ALIVE_TIME_PERIOD	 30 /* unit: s */

/* Keep Alive request. */
struct wcn36xx_hal_keep_alive_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 packet_type;
	u32 time_period;
	u8 host_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
	u8 dest_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
	u8 dest_addr[ETH_ALEN];
	u8 bss_index;
} __packed;

struct wcn36xx_hal_rssi_threshold_req_msg {
	struct wcn36xx_hal_msg_header header;

	s8 threshold1:8;
	s8 threshold2:8;
	s8 threshold3:8;
	u8 thres1_pos_notify:1;
	u8 thres1_neg_notify:1;
	u8 thres2_pos_notify:1;
	u8 thres2_neg_notify:1;
	u8 thres3_pos_notify:1;
	u8 thres3_neg_notify:1;
	u8 reserved10:2;
};

struct wcn36xx_hal_enter_uapsd_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bk_delivery:1;
	u8 be_delivery:1;
	u8 vi_delivery:1;
	u8 vo_delivery:1;
	u8 bk_trigger:1;
	u8 be_trigger:1;
	u8 vi_trigger:1;
	u8 vo_trigger:1;
	u8 bss_index;
};

struct wcn36xx_hal_exit_uapsd_req_msg {
	struct wcn36xx_hal_msg_header header;
	u8 bss_index;
};

#define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
#define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16

struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Pattern ID */
	u8 id;

	/* Pattern byte offset from beginning of the 802.11 packet to start
	 * of the wake-up pattern */
	u8 byte_Offset;

	/* Non-Zero Pattern size */
	u8 size;

	/* Pattern */
	u8 pattern[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];

	/* Non-zero pattern mask size */
	u8 mask_size;

	/* Pattern mask */
	u8 mask[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];

	/* Extra pattern */
	u8 extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];

	/* Extra pattern mask */
	u8 mask_extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];

	u8 bss_index;
};

struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Pattern ID of the wakeup pattern to be deleted */
	u8 id;
	u8 bss_index;
};

struct wcn36xx_hal_wowl_enter_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Enables/disables magic packet filtering */
	u8 magic_packet_enable;

	/* Magic pattern */
	u8 magic_pattern[ETH_ALEN];

	/* Enables/disables packet pattern filtering in firmware. Enabling
	 * this flag enables broadcast pattern matching in Firmware. If
	 * unicast pattern matching is also desired,
	 * ucUcastPatternFilteringEnable flag must be set tot true as well
	 */
	u8 pattern_filtering_enable;

	/* Enables/disables unicast packet pattern filtering. This flag
	 * specifies whether we want to do pattern match on unicast packets
	 * as well and not just broadcast packets. This flag has no effect
	 * if the ucPatternFilteringEnable (main controlling flag) is set
	 * to false
	 */
	u8 ucast_pattern_filtering_enable;

	/* This configuration is valid only when magicPktEnable=1. It
	 * requests hardware to wake up when it receives the Channel Switch
	 * Action Frame.
	 */
	u8 wow_channel_switch_receive;

	/* This configuration is valid only when magicPktEnable=1. It
	 * requests hardware to wake up when it receives the
	 * Deauthentication Frame.
	 */
	u8 wow_deauth_receive;

	/* This configuration is valid only when magicPktEnable=1. It
	 * requests hardware to wake up when it receives the Disassociation
	 * Frame.
	 */
	u8 wow_disassoc_receive;

	/* This configuration is valid only when magicPktEnable=1. It
	 * requests hardware to wake up when it has missed consecutive
	 * beacons. This is a hardware register configuration (NOT a
	 * firmware configuration).
	 */
	u8 wow_max_missed_beacons;

	/* This configuration is valid only when magicPktEnable=1. This is
	 * a timeout value in units of microsec. It requests hardware to
	 * unconditionally wake up after it has stayed in WoWLAN mode for
	 * some time. Set 0 to disable this feature.
	 */
	u8 wow_max_sleep;

	/* This configuration directs the WoW packet filtering to look for
	 * EAP-ID requests embedded in EAPOL frames and use this as a wake
	 * source.
	 */
	u8 wow_eap_id_request_enable;

	/* This configuration directs the WoW packet filtering to look for
	 * EAPOL-4WAY requests and use this as a wake source.
	 */
	u8 wow_eapol_4way_enable;

	/* This configuration allows a host wakeup on an network scan
	 * offload match.
	 */
	u8 wow_net_scan_offload_match;

	/* This configuration allows a host wakeup on any GTK rekeying
	 * error.
	 */
	u8 wow_gtk_rekey_error;

	/* This configuration allows a host wakeup on BSS connection loss.
	 */
	u8 wow_bss_connection_loss;

	u8 bss_index;
};

struct wcn36xx_hal_wowl_exit_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bss_index;
};

struct wcn36xx_hal_get_rssi_req_msg {
	struct wcn36xx_hal_msg_header header;
};

struct wcn36xx_hal_get_roam_rssi_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Valid STA Idx for per STA stats request */
	u32 sta_id;
};

struct wcn36xx_hal_set_uapsd_ac_params_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* STA index */
	u8 sta_idx;

	/* Access Category */
	u8 ac;

	/* User Priority */
	u8 up;

	/* Service Interval */
	u32 service_interval;

	/* Suspend Interval */
	u32 suspend_interval;

	/* Delay Interval */
	u32 delay_interval;
};

struct wcn36xx_hal_configure_rxp_filter_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 set_mcst_bcst_filter_setting;
	u8 set_mcst_bcst_filter;
};

struct wcn36xx_hal_enter_imps_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_exit_imps_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_enter_bmps_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
} __packed;

struct wcn36xx_hal_exit_bmps_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
} __packed;

struct wcn36xx_hal_enter_uapsd_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
};

struct wcn36xx_hal_exit_uapsd_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
};

struct wcn36xx_hal_rssi_notification_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u32 rssi_thres1_pos_cross:1;
	u32 rssi_thres1_neg_cross:1;
	u32 rssi_thres2_pos_cross:1;
	u32 rssi_thres2_neg_cross:1;
	u32 rssi_thres3_pos_cross:1;
	u32 rssi_thres3_neg_cross:1;
	u32 avg_rssi:8;
	u32 reserved:18;

};

struct wcn36xx_hal_get_rssio_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
	s8 rssi;

};

struct wcn36xx_hal_get_roam_rssi_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 sta_id;
	s8 rssi;
};

struct wcn36xx_hal_wowl_enter_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
	u8 bss_index;
};

struct wcn36xx_hal_wowl_exit_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
	u8 bss_index;
};

struct wcn36xx_hal_add_bcn_filter_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_rem_bcn_filter_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
	u8 bss_index;
};

struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
	u8 bss_index;
};

struct wcn36xx_hal_host_offload_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_keep_alive_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_set_rssi_thresh_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_configure_rxp_filter_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct set_max_tx_pwr_req {
	struct wcn36xx_hal_msg_header header;

	/* BSSID is needed to identify which session issued this request.
	 * As the request has power constraints, this should be applied
	 * only to that session */
	u8 bssid[ETH_ALEN];

	u8 self_addr[ETH_ALEN];

	/* In request, power == MaxTx power to be used. */
	u8 power;
};

struct set_max_tx_pwr_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* power == tx power used for management frames */
	u8 power;

	/* success or failure */
	u32 status;
};

struct set_tx_pwr_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* TX Power in milli watts */
	u32 tx_power;

	u8 bss_index;
};

struct set_tx_pwr_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct get_tx_pwr_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 sta_id;
};

struct get_tx_pwr_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* TX Power in milli watts */
	u32 tx_power;
};

struct set_p2p_gonoa_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 opp_ps;
	u32 ct_window;
	u8 count;
	u32 duration;
	u32 interval;
	u32 single_noa_duration;
	u8 ps_selection;
};

struct set_p2p_gonoa_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_add_sta_self_req {
	struct wcn36xx_hal_msg_header header;

	u8 self_addr[ETH_ALEN];
	u32 status;
} __packed;

struct wcn36xx_hal_add_sta_self_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* Self STA Index */
	u8 self_sta_index;

	/* DPU Index (IGTK, PTK, GTK all same) */
	u8 dpu_index;

	/* DPU Signature */
	u8 dpu_signature;
} __packed;

struct wcn36xx_hal_del_sta_self_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 self_addr[ETH_ALEN];
} __packed;

struct wcn36xx_hal_del_sta_self_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/*success or failure */
	u32 status;

	u8 self_addr[ETH_ALEN];
} __packed;

struct aggr_add_ts_req {
	struct wcn36xx_hal_msg_header header;

	/* Station Index */
	u16 sta_idx;

	/* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
	 * This will carry the bitmap with the bit positions representing
	 * different AC.s */
	u16 tspec_index;

	/* Tspec info per AC To program TPE with required parameters */
	struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];

	/* U-APSD Flags: 1b per AC.  Encoded as follows:
	   b7 b6 b5 b4 b3 b2 b1 b0 =
	   X  X  X  X  BE BK VI VO */
	u8 uapsd;

	/* These parameters are for all the access categories */

	/* Service Interval */
	u32 service_interval[WCN36XX_HAL_MAX_AC];

	/* Suspend Interval */
	u32 suspend_interval[WCN36XX_HAL_MAX_AC];

	/* Delay Interval */
	u32 delay_interval[WCN36XX_HAL_MAX_AC];
};

struct aggr_add_ts_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status0;

	/* FIXME PRIMA for future use for 11R */
	u32 status1;
};

struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 is_apps_cpu_awake;
};

struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_dump_cmd_req_msg {
	struct wcn36xx_hal_msg_header header;

	u32 arg1;
	u32 arg2;
	u32 arg3;
	u32 arg4;
	u32 arg5;
} __packed;

struct wcn36xx_hal_dump_cmd_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* Length of the responce message */
	u32 rsp_length;

	/* FIXME: Currently considering the the responce will be less than
	 * 100bytes */
	u8 rsp_buffer[DUMPCMD_RSP_BUFFER];
} __packed;

#define WLAN_COEX_IND_DATA_SIZE (4)
#define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
#define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)

struct coex_ind_msg {
	struct wcn36xx_hal_msg_header header;

	/* Coex Indication Type */
	u32 type;

	/* Coex Indication Data */
	u32 data[WLAN_COEX_IND_DATA_SIZE];
};

struct wcn36xx_hal_tx_compl_ind_msg {
	struct wcn36xx_hal_msg_header header;

	/* Tx Complete Indication Success or Failure */
	u32 status;
};

struct wcn36xx_hal_wlan_host_suspend_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u32 configured_mcst_bcst_filter_setting;
	u32 active_session_count;
};

struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u8 dot11_exclude_unencrypted;
	u8 bssid[ETH_ALEN];
};

struct noa_attr_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u8 index;
	u8 opp_ps_flag;
	u16 ctwin;

	u16 noa1_interval_count;
	u16 bss_index;
	u32 noa1_duration;
	u32 noa1_interval;
	u32 noa1_starttime;

	u16 noa2_interval_count;
	u16 reserved2;
	u32 noa2_duration;
	u32 noa2_interval;
	u32 noa2_start_time;

	u32 status;
};

struct noa_start_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u32 status;
	u32 bss_index;
};

struct wcn36xx_hal_wlan_host_resume_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 configured_mcst_bcst_filter_setting;
};

struct wcn36xx_hal_host_resume_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

struct wcn36xx_hal_del_ba_ind_msg {
	struct wcn36xx_hal_msg_header header;

	u16 sta_idx;

	/* Peer MAC Address, whose BA session has timed out */
	u8 peer_addr[ETH_ALEN];

	/* TID for which a BA session timeout is being triggered */
	u8 ba_tid;

	/* DELBA direction
	 * 1 - Originator
	 * 0 - Recipient
	 */
	u8 direction;

	u32 reason_code;

	/* TO SUPPORT BT-AMP */
	u8 bssid[ETH_ALEN];
};

/* PNO Messages */

/* Max number of channels that a network can be found on */
#define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS  26

/* Max number of channels that a network can be found on */
#define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX  60

/* Maximum numbers of networks supported by PNO */
#define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS  16

/* The number of scan time intervals that can be programmed into PNO */
#define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS    10

/* Maximum size of the probe template */
#define WCN36XX_HAL_PNO_MAX_PROBE_SIZE     450

/* Type of PNO enabling:
 *
 * Immediate - scanning will start immediately and PNO procedure will be
 * repeated based on timer
 *
 * Suspend - scanning will start at suspend
 *
 * Resume - scanning will start on system resume
 */
enum pno_mode {
	PNO_MODE_IMMEDIATE,
	PNO_MODE_ON_SUSPEND,
	PNO_MODE_ON_RESUME,
	PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* Authentication type */
enum auth_type {
	AUTH_TYPE_ANY = 0,
	AUTH_TYPE_OPEN_SYSTEM = 1,

	/* Upper layer authentication types */
	AUTH_TYPE_WPA = 2,
	AUTH_TYPE_WPA_PSK = 3,

	AUTH_TYPE_RSN = 4,
	AUTH_TYPE_RSN_PSK = 5,
	AUTH_TYPE_FT_RSN = 6,
	AUTH_TYPE_FT_RSN_PSK = 7,
	AUTH_TYPE_WAPI_WAI_CERTIFICATE = 8,
	AUTH_TYPE_WAPI_WAI_PSK = 9,

	AUTH_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* Encryption type */
enum ed_type {
	ED_ANY = 0,
	ED_NONE = 1,
	ED_WEP = 2,
	ED_TKIP = 3,
	ED_CCMP = 4,
	ED_WPI = 5,

	ED_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* SSID broadcast  type */
enum ssid_bcast_type {
	BCAST_UNKNOWN = 0,
	BCAST_NORMAL = 1,
	BCAST_HIDDEN = 2,

	BCAST_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};

/* The network description for which PNO will have to look for */
struct network_type {
	/* SSID of the BSS */
	struct wcn36xx_hal_mac_ssid ssid;

	/* Authentication type for the network */
	enum auth_type authentication;

	/* Encryption type for the network */
	enum ed_type encryption;

	/* Indicate the channel on which the Network can be found 0 - if
	 * all channels */
	u8 channel_count;
	u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];

	/* Indicates the RSSI threshold for the network to be considered */
	u8 rssi_threshold;
};

struct scan_timer {
	/* How much it should wait */
	u32 value;

	/* How many times it should repeat that wait value 0 - keep using
	 * this timer until PNO is disabled */
	u32 repeat;

	/* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
	 * times - after that it will wait 4s between consecutive scans
	 * until disabled */
};

/* The network parameters to be sent to the PNO algorithm */
struct scan_timers_type {
	/* set to 0 if you wish for PNO to use its default telescopic timer */
	u8 count;

	/* A set value represents the amount of time that PNO will wait
	 * between two consecutive scan procedures If the desired is for a
	 * uniform timer that fires always at the exact same interval - one
	 * single value is to be set If there is a desire for a more
	 * complex - telescopic like timer multiple values can be set -
	 * once PNO reaches the end of the array it will continue scanning
	 * at intervals presented by the last value */
	struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
};

/* Preferred network list request */
struct set_pref_netw_list_req {
	struct wcn36xx_hal_msg_header header;

	/* Enable PNO */
	u32 enable;

	/* Immediate,  On Suspend,   On Resume */
	enum pno_mode mode;

	/* Number of networks sent for PNO */
	u32 networks_count;

	/* The networks that PNO needs to look for */
	struct network_type networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];

	/* The scan timers required for PNO */
	struct scan_timers_type scan_timers;

	/* Probe template for 2.4GHz band */
	u16 band_24g_probe_size;
	u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];

	/* Probe template for 5GHz band */
	u16 band_5g_probe_size;
	u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
};

/* The network description for which PNO will have to look for */
struct network_type_new {
	/* SSID of the BSS */
	struct wcn36xx_hal_mac_ssid ssid;

	/* Authentication type for the network */
	enum auth_type authentication;

	/* Encryption type for the network */
	enum ed_type encryption;

	/* SSID broadcast type, normal, hidden or unknown */
	enum ssid_bcast_type bcast_network_type;

	/* Indicate the channel on which the Network can be found 0 - if
	 * all channels */
	u8 channel_count;
	u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];

	/* Indicates the RSSI threshold for the network to be considered */
	u8 rssi_threshold;
};

/* Preferred network list request new */
struct set_pref_netw_list_req_new {
	struct wcn36xx_hal_msg_header header;

	/* Enable PNO */
	u32 enable;

	/* Immediate,  On Suspend,   On Resume */
	enum pno_mode mode;

	/* Number of networks sent for PNO */
	u32 networks_count;

	/* The networks that PNO needs to look for */
	struct network_type_new networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];

	/* The scan timers required for PNO */
	struct scan_timers_type scan_timers;

	/* Probe template for 2.4GHz band */
	u16 band_24g_probe_size;
	u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];

	/* Probe template for 5GHz band */
	u16 band_5g_probe_size;
	u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
};

/* Preferred network list response */
struct set_pref_netw_list_resp {
	struct wcn36xx_hal_msg_header header;

	/* status of the request - just to indicate that PNO has
	 * acknowledged the request and will start scanning */
	u32 status;
};

/* Preferred network found indication */
struct pref_netw_found_ind {

	struct wcn36xx_hal_msg_header header;

	/* Network that was found with the highest RSSI */
	struct wcn36xx_hal_mac_ssid ssid;

	/* Indicates the RSSI */
	u8 rssi;
};

/* RSSI Filter request */
struct set_rssi_filter_req {
	struct wcn36xx_hal_msg_header header;

	/* RSSI Threshold */
	u8 rssi_threshold;
};

/* Set RSSI filter resp */
struct set_rssi_filter_resp {
	struct wcn36xx_hal_msg_header header;

	/* status of the request */
	u32 status;
};

/* Update scan params - sent from host to PNO to be used during PNO
 * scanningx */
struct wcn36xx_hal_update_scan_params_req {

	struct wcn36xx_hal_msg_header header;

	/* Host setting for 11d */
	u8 dot11d_enabled;

	/* Lets PNO know that host has determined the regulatory domain */
	u8 dot11d_resolved;

	/* Channels on which PNO is allowed to scan */
	u8 channel_count;
	u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];

	/* Minimum channel time */
	u16 active_min_ch_time;

	/* Maximum channel time */
	u16 active_max_ch_time;

	/* Minimum channel time */
	u16 passive_min_ch_time;

	/* Maximum channel time */
	u16 passive_max_ch_time;

	/* Cb State */
	enum phy_chan_bond_state state;
} __packed;

/* Update scan params - sent from host to PNO to be used during PNO
 * scanningx */
struct wcn36xx_hal_update_scan_params_req_ex {

	struct wcn36xx_hal_msg_header header;

	/* Host setting for 11d */
	u8 dot11d_enabled;

	/* Lets PNO know that host has determined the regulatory domain */
	u8 dot11d_resolved;

	/* Channels on which PNO is allowed to scan */
	u8 channel_count;
	u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];

	/* Minimum channel time */
	u16 active_min_ch_time;

	/* Maximum channel time */
	u16 active_max_ch_time;

	/* Minimum channel time */
	u16 passive_min_ch_time;

	/* Maximum channel time */
	u16 passive_max_ch_time;

	/* Cb State */
	enum phy_chan_bond_state state;
} __packed;

/* Update scan params - sent from host to PNO to be used during PNO
 * scanningx */
struct wcn36xx_hal_update_scan_params_resp {

	struct wcn36xx_hal_msg_header header;

	/* status of the request */
	u32 status;
} __packed;

struct wcn36xx_hal_set_tx_per_tracking_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* 0: disable, 1:enable */
	u8 tx_per_tracking_enable;

	/* Check period, unit is sec. */
	u8 tx_per_tracking_period;

	/* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
	u8 tx_per_tracking_ratio;

	/* A watermark of check number, once the tx packet exceed this
	 * number, we do the check, default is 5 */
	u32 tx_per_tracking_watermark;
};

struct wcn36xx_hal_set_tx_per_tracking_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

};

struct tx_per_hit_ind_msg {
	struct wcn36xx_hal_msg_header header;
};

/* Packet Filtering Definitions Begin */
#define    WCN36XX_HAL_PROTOCOL_DATA_LEN                  8
#define    WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS        240
#define    WCN36XX_HAL_MAX_NUM_FILTERS                   20
#define    WCN36XX_HAL_MAX_CMP_PER_FILTER                10

enum wcn36xx_hal_receive_packet_filter_type {
	HAL_RCV_FILTER_TYPE_INVALID,
	HAL_RCV_FILTER_TYPE_FILTER_PKT,
	HAL_RCV_FILTER_TYPE_BUFFER_PKT,
	HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
};

enum wcn36xx_hal_rcv_pkt_flt_protocol_type {
	HAL_FILTER_PROTO_TYPE_INVALID,
	HAL_FILTER_PROTO_TYPE_MAC,
	HAL_FILTER_PROTO_TYPE_ARP,
	HAL_FILTER_PROTO_TYPE_IPV4,
	HAL_FILTER_PROTO_TYPE_IPV6,
	HAL_FILTER_PROTO_TYPE_UDP,
	HAL_FILTER_PROTO_TYPE_MAX
};

enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type {
	HAL_FILTER_CMP_TYPE_INVALID,
	HAL_FILTER_CMP_TYPE_EQUAL,
	HAL_FILTER_CMP_TYPE_MASK_EQUAL,
	HAL_FILTER_CMP_TYPE_NOT_EQUAL,
	HAL_FILTER_CMP_TYPE_MAX
};

struct wcn36xx_hal_rcv_pkt_filter_params {
	u8 protocol_layer;
	u8 cmp_flag;

	/* Length of the data to compare */
	u16 data_length;

	/* from start of the respective frame header */
	u8 data_offset;

	/* Reserved field */
	u8 reserved;

	/* Data to compare */
	u8 compare_data[WCN36XX_HAL_PROTOCOL_DATA_LEN];

	/* Mask to be applied on the received packet data before compare */
	u8 data_mask[WCN36XX_HAL_PROTOCOL_DATA_LEN];
};

struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type {
	u8 id;
	u8 type;
	u8 params_count;
	u32 coleasce_time;
	u8 bss_index;
	struct wcn36xx_hal_rcv_pkt_filter_params params[1];
};

struct wcn36xx_hal_set_rcv_pkt_filter_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 id;
	u8 type;
	u8 params_count;
	u32 coalesce_time;
	struct wcn36xx_hal_rcv_pkt_filter_params params[1];
};

struct wcn36xx_hal_rcv_flt_mc_addr_list_type {
	/* from start of the respective frame header */
	u8 data_offset;

	u32 mc_addr_count;
	u8 mc_addr[WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS][ETH_ALEN];
	u8 bss_index;
} __packed;

struct wcn36xx_hal_set_pkt_filter_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
};

struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg {
	struct wcn36xx_hal_msg_header header;

	u8 bss_index;
};

struct wcn36xx_hal_rcv_flt_pkt_match_cnt {
	u8 id;
	u32 match_cnt;
};

struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* Success or Failure */
	u32 status;

	u32 match_count;
	struct wcn36xx_hal_rcv_flt_pkt_match_cnt
		matches[WCN36XX_HAL_MAX_NUM_FILTERS];
	u8 bss_index;
};

struct wcn36xx_hal_rcv_flt_pkt_clear_param {
	/* only valid for response message */
	u32 status;
	u8 id;
	u8 bss_index;
};

struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
};

struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
};

struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg {
	struct wcn36xx_hal_msg_header header;
	struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list;
} __packed;

struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg {
	struct wcn36xx_hal_msg_header header;
	u32 status;
	u8 bss_index;
};

/* Packet Filtering Definitions End */

struct wcn36xx_hal_set_power_params_req_msg {
	struct wcn36xx_hal_msg_header header;

	/*  Ignore DTIM */
	u32 ignore_dtim;

	/* DTIM Period */
	u32 dtim_period;

	/* Listen Interval */
	u32 listen_interval;

	/* Broadcast Multicast Filter  */
	u32 bcast_mcast_filter;

	/* Beacon Early Termination */
	u32 enable_bet;

	/* Beacon Early Termination Interval */
	u32 bet_interval;
} __packed;

struct wcn36xx_hal_set_power_params_resp {

	struct wcn36xx_hal_msg_header header;

	/* status of the request */
	u32 status;
} __packed;

/* Capability bitmap exchange definitions and macros starts */

enum place_holder_in_cap_bitmap {
	MCC = 0,
	P2P = 1,
	DOT11AC = 2,
	SLM_SESSIONIZATION = 3,
	DOT11AC_OPMODE = 4,
	SAP32STA = 5,
	TDLS = 6,
	P2P_GO_NOA_DECOUPLE_INIT_SCAN = 7,
	WLANACTIVE_OFFLOAD = 8,
	BEACON_OFFLOAD = 9,
	SCAN_OFFLOAD = 10,
	ROAM_OFFLOAD = 11,
	BCN_MISS_OFFLOAD = 12,
	STA_POWERSAVE = 13,
	STA_ADVANCED_PWRSAVE = 14,
	AP_UAPSD = 15,
	AP_DFS = 16,
	BLOCKACK = 17,
	PHY_ERR = 18,
	BCN_FILTER = 19,
	RTT = 20,
	RATECTRL = 21,
	WOW = 22,
	WLAN_ROAM_SCAN_OFFLOAD = 23,
	SPECULATIVE_PS_POLL = 24,
	SCAN_SCH = 25,
	IBSS_HEARTBEAT_OFFLOAD = 26,
	WLAN_SCAN_OFFLOAD = 27,
	WLAN_PERIODIC_TX_PTRN = 28,
	ADVANCE_TDLS = 29,
	BATCH_SCAN = 30,
	FW_IN_TX_PATH = 31,
	EXTENDED_NSOFFLOAD_SLOT = 32,
	CH_SWITCH_V1 = 33,
	HT40_OBSS_SCAN = 34,
	UPDATE_CHANNEL_LIST = 35,
	WLAN_MCADDR_FLT = 36,
	WLAN_CH144 = 37,
	NAN = 38,
	TDLS_SCAN_COEXISTENCE = 39,
	LINK_LAYER_STATS_MEAS = 40,
	MU_MIMO = 41,
	EXTENDED_SCAN = 42,
	DYNAMIC_WMM_PS = 43,
	MAC_SPOOFED_SCAN = 44,
	BMU_ERROR_GENERIC_RECOVERY = 45,
	DISA = 46,
	FW_STATS = 47,
	WPS_PRBRSP_TMPL = 48,
	BCN_IE_FLT_DELTA = 49,
	TDLS_OFF_CHANNEL = 51,
	RTT3 = 52,
	MGMT_FRAME_LOGGING = 53,
	ENHANCED_TXBD_COMPLETION = 54,
	LOGGING_ENHANCEMENT = 55,
	EXT_SCAN_ENHANCED = 56,
	MEMORY_DUMP_SUPPORTED = 57,
	PER_PKT_STATS_SUPPORTED = 58,
	EXT_LL_STAT = 60,
	WIFI_CONFIG = 61,
	ANTENNA_DIVERSITY_SELECTION = 62,

	MAX_FEATURE_SUPPORTED = 128,
};

#define WCN36XX_HAL_CAPS_SIZE 4

struct wcn36xx_hal_feat_caps_msg {

	struct wcn36xx_hal_msg_header header;

	u32 feat_caps[WCN36XX_HAL_CAPS_SIZE];
} __packed;

/* status codes to help debug rekey failures */
enum gtk_rekey_status {
	WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS = 0,

	/* rekey detected, but not handled */
	WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED = 1,

	/* MIC check error on M1 */
	WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR = 2,

	/* decryption error on M1  */
	WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR = 3,

	/* M1 replay detected */
	WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR = 4,

	/* missing GTK key descriptor in M1 */
	WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE = 5,

	/* missing iGTK key descriptor in M1 */
	WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE = 6,

	/* key installation error */
	WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR = 7,

	/* iGTK key installation error */
	WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR = 8,

	/* GTK rekey M2 response TX error */
	WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR = 9,

	/* non-specific general error */
	WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR = 255
};

/* wake reason types */
enum wake_reason_type {
	WCN36XX_HAL_WAKE_REASON_NONE = 0,

	/* magic packet match */
	WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET = 1,

	/* host defined pattern match */
	WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH = 2,

	/* EAP-ID frame detected */
	WCN36XX_HAL_WAKE_REASON_EAPID_PACKET = 3,

	/* start of EAPOL 4-way handshake detected */
	WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET = 4,

	/* network scan offload match */
	WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH = 5,

	/* GTK rekey status wakeup (see status) */
	WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS = 6,

	/* BSS connection lost */
	WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST = 7,
};

/*
  Wake Packet which is saved at tWakeReasonParams.DataStart
  This data is sent for any wake reasons that involve a packet-based wakeup :

  WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
  WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
  WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
  WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
  WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS

  The information is provided to the host for auditing and debug purposes

*/

/* Wake reason indication */
struct wcn36xx_hal_wake_reason_ind {
	struct wcn36xx_hal_msg_header header;

	/* see tWakeReasonType */
	u32 reason;

	/* argument specific to the reason type */
	u32 reason_arg;

	/* length of optional data stored in this message, in case HAL
	 * truncates the data (i.e. data packets) this length will be less
	 * than the actual length */
	u32 stored_data_len;

	/* actual length of data */
	u32 actual_data_len;

	/* variable length start of data (length == storedDataLen) see
	 * specific wake type */
	u8 data_start[1];

	u32 bss_index:8;
	u32 reserved:24;
};

#define WCN36XX_HAL_GTK_KEK_BYTES 16
#define WCN36XX_HAL_GTK_KCK_BYTES 16

#define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)

#define GTK_SET_BSS_KEY_TAG  0x1234AA55

struct wcn36xx_hal_gtk_offload_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* optional flags */
	u32 flags;

	/* Key confirmation key */
	u8 kck[WCN36XX_HAL_GTK_KCK_BYTES];

	/* key encryption key */
	u8 kek[WCN36XX_HAL_GTK_KEK_BYTES];

	/* replay counter */
	u64 key_replay_counter;

	u8 bss_index;
} __packed;

struct wcn36xx_hal_gtk_offload_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	u8 bss_index;
};

struct wcn36xx_hal_gtk_offload_get_info_req_msg {
	struct wcn36xx_hal_msg_header header;
	u8 bss_index;
} __packed;

struct wcn36xx_hal_gtk_offload_get_info_rsp_msg {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;

	/* last rekey status when the rekey was offloaded */
	u32 last_rekey_status;

	/* current replay counter value */
	u64 key_replay_counter;

	/* total rekey attempts */
	u32 total_rekey_count;

	/* successful GTK rekeys */
	u32 gtk_rekey_count;

	/* successful iGTK rekeys */
	u32 igtk_rekey_count;

	u8 bss_index;
} __packed;

struct dhcp_info {
	/* Indicates the device mode which indicates about the DHCP activity */
	u8 device_mode;

	u8 addr[ETH_ALEN];
};

struct dhcp_ind_status {
	struct wcn36xx_hal_msg_header header;

	/* success or failure */
	u32 status;
};

/*
 *   Thermal Mitigation mode of operation.
 *
 *  WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
 *
 *  WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
 *  and reducing transmit power
 *
 *  WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
enum wcn36xx_hal_thermal_mitigation_mode_type {
	HAL_THERMAL_MITIGATION_MODE_INVALID = -1,
	HAL_THERMAL_MITIGATION_MODE_0,
	HAL_THERMAL_MITIGATION_MODE_1,
	HAL_THERMAL_MITIGATION_MODE_2,
	HAL_THERMAL_MITIGATION_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
};


/*
 *   Thermal Mitigation level.
 * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
 *
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
 * This level indicates normal mode of operation
 *
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
 *
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
 *
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
 *
 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
 */
enum wcn36xx_hal_thermal_mitigation_level_type {
	HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
	HAL_THERMAL_MITIGATION_LEVEL_0,
	HAL_THERMAL_MITIGATION_LEVEL_1,
	HAL_THERMAL_MITIGATION_LEVEL_2,
	HAL_THERMAL_MITIGATION_LEVEL_3,
	HAL_THERMAL_MITIGATION_LEVEL_4,
	HAL_THERMAL_MITIGATION_LEVEL_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
};


/* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
struct set_thermal_mitigation_req_msg {
	struct wcn36xx_hal_msg_header header;

	/* Thermal Mitigation Operation Mode */
	enum wcn36xx_hal_thermal_mitigation_mode_type mode;

	/* Thermal Mitigation Level */
	enum wcn36xx_hal_thermal_mitigation_level_type level;
};

struct set_thermal_mitigation_resp {

	struct wcn36xx_hal_msg_header header;

	/* status of the request */
	u32 status;
};

/* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
 * provided to FW from Host via periodic messages */
struct stats_class_b_ind {
	struct wcn36xx_hal_msg_header header;

	/* Duration over which this stats was collected */
	u32 duration;

	/* Per STA Stats */

	/* TX stats */
	u32 tx_bytes_pushed;
	u32 tx_packets_pushed;

	/* RX stats */
	u32 rx_bytes_rcvd;
	u32 rx_packets_rcvd;
	u32 rx_time_total;
};

/* WCN36XX_HAL_PRINT_REG_INFO_IND */
struct wcn36xx_hal_print_reg_info_ind {
	struct wcn36xx_hal_msg_header header;

	u32 count;
	u32 scenario;
	u32 reason;

	struct {
		u32 addr;
		u32 value;
	} regs[];
} __packed;

#endif /* _HAL_H_ */