aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_wifi_nme_prim.h
blob: 79187bab81c44da00cd08f974a2b3ac2c9b39b01 (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
/*****************************************************************************

            (c) Cambridge Silicon Radio Limited 2011
            All rights reserved and confidential information of CSR

            Refer to LICENSE.txt included with this source for details
            on the license terms.

*****************************************************************************/

/* Note: this is an auto-generated file. */

#ifndef CSR_WIFI_NME_PRIM_H__
#define CSR_WIFI_NME_PRIM_H__

#include "csr_types.h"
#include "csr_prim_defs.h"
#include "csr_sched.h"
#include "csr_wifi_common.h"
#include "csr_result.h"
#include "csr_wifi_fsm_event.h"
#include "csr_wifi_sme_prim.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifndef CSR_WIFI_NME_ENABLE
#error CSR_WIFI_NME_ENABLE MUST be defined inorder to use csr_wifi_nme_prim.h
#endif

#define CSR_WIFI_NME_PRIM                                               (0x0424)

typedef CsrPrim CsrWifiNmePrim;

typedef void (*CsrWifiNmeFrameFreeFunction)(void *frame);

/*******************************************************************************

  NAME
    CsrWifiNmeAuthMode

  DESCRIPTION
    WiFi Authentication Mode

 VALUES
    CSR_WIFI_NME_AUTH_MODE_80211_OPEN
                   - Connects to an open system network (i.e. no authentication,
                     no encryption) or to a WEP enabled network.
    CSR_WIFI_NME_AUTH_MODE_80211_SHARED
                   - Connect to a WEP enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_WPA
                   - Connects to a WPA Enterprise enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_WPAPSK
                   - Connects to a WPA with Pre-Shared Key enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_WPA2
                   - Connects to a WPA2 Enterprise enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_WPA2PSK
                   - Connects to a WPA2 with Pre-Shared Key enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_CCKM
                   - Connects to a CCKM enabled network.
    CSR_WIFI_NME_AUTH_MODE_WAPI_WAI
                   - Connects to a WAPI Enterprise enabled network.
    CSR_WIFI_NME_AUTH_MODE_WAPI_WAIPSK
                   - Connects to a WAPI with Pre-Shared Key enabled network.
    CSR_WIFI_NME_AUTH_MODE_8021X_OTHER1X
                   - For future use.

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeAuthMode;
#define CSR_WIFI_NME_AUTH_MODE_80211_OPEN      ((CsrWifiNmeAuthMode) 0x0001)
#define CSR_WIFI_NME_AUTH_MODE_80211_SHARED    ((CsrWifiNmeAuthMode) 0x0002)
#define CSR_WIFI_NME_AUTH_MODE_8021X_WPA       ((CsrWifiNmeAuthMode) 0x0004)
#define CSR_WIFI_NME_AUTH_MODE_8021X_WPAPSK    ((CsrWifiNmeAuthMode) 0x0008)
#define CSR_WIFI_NME_AUTH_MODE_8021X_WPA2      ((CsrWifiNmeAuthMode) 0x0010)
#define CSR_WIFI_NME_AUTH_MODE_8021X_WPA2PSK   ((CsrWifiNmeAuthMode) 0x0020)
#define CSR_WIFI_NME_AUTH_MODE_8021X_CCKM      ((CsrWifiNmeAuthMode) 0x0040)
#define CSR_WIFI_NME_AUTH_MODE_WAPI_WAI        ((CsrWifiNmeAuthMode) 0x0080)
#define CSR_WIFI_NME_AUTH_MODE_WAPI_WAIPSK     ((CsrWifiNmeAuthMode) 0x0100)
#define CSR_WIFI_NME_AUTH_MODE_8021X_OTHER1X   ((CsrWifiNmeAuthMode) 0x0200)

/*******************************************************************************

  NAME
    CsrWifiNmeBssType

  DESCRIPTION
    Type of BSS

 VALUES
    CSR_WIFI_NME_BSS_TYPE_INFRASTRUCTURE
                   - Infrastructure BSS type where access to the network is via
                     one or several Access Points.
    CSR_WIFI_NME_BSS_TYPE_ADHOC
                   - Adhoc or Independent BSS Type where one Station acts as a
                     host and future stations can join the adhoc network without
                     needing an access point.
    CSR_WIFI_NME_BSS_TYPE_RESERVED
                   - To be in sync with SME.This is not used.
    CSR_WIFI_NME_BSS_TYPE_P2P
                   - P2P mode of operation.

*******************************************************************************/
typedef u8 CsrWifiNmeBssType;
#define CSR_WIFI_NME_BSS_TYPE_INFRASTRUCTURE   ((CsrWifiNmeBssType) 0x00)
#define CSR_WIFI_NME_BSS_TYPE_ADHOC            ((CsrWifiNmeBssType) 0x01)
#define CSR_WIFI_NME_BSS_TYPE_RESERVED         ((CsrWifiNmeBssType) 0x02)
#define CSR_WIFI_NME_BSS_TYPE_P2P              ((CsrWifiNmeBssType) 0x03)

/*******************************************************************************

  NAME
    CsrWifiNmeCcxOptionsMask

  DESCRIPTION
    Enumeration type defining possible mask values for setting CCX options.

 VALUES
    CSR_WIFI_NME_CCX_OPTION_NONE - No CCX option is set.
    CSR_WIFI_NME_CCX_OPTION_CCKM - CCX option cckm is set.

*******************************************************************************/
typedef u8 CsrWifiNmeCcxOptionsMask;
#define CSR_WIFI_NME_CCX_OPTION_NONE   ((CsrWifiNmeCcxOptionsMask) 0x00)
#define CSR_WIFI_NME_CCX_OPTION_CCKM   ((CsrWifiNmeCcxOptionsMask) 0x01)

/*******************************************************************************

  NAME
    CsrWifiNmeConfigAction

  DESCRIPTION

 VALUES
    CSR_WIFI_PIN_ENTRY_PUSH_BUTTON -
    CSR_WIFI_PIN_ENTRY_DISPLAY_PIN -
    CSR_WIFI_PIN_ENTRY_ENTER_PIN   -

*******************************************************************************/
typedef u8 CsrWifiNmeConfigAction;
#define CSR_WIFI_PIN_ENTRY_PUSH_BUTTON   ((CsrWifiNmeConfigAction) 0x00)
#define CSR_WIFI_PIN_ENTRY_DISPLAY_PIN   ((CsrWifiNmeConfigAction) 0x01)
#define CSR_WIFI_PIN_ENTRY_ENTER_PIN     ((CsrWifiNmeConfigAction) 0x02)

/*******************************************************************************

  NAME
    CsrWifiNmeConnectionStatus

  DESCRIPTION
    Indicate the NME Connection Status when connecting or when disconnecting

 VALUES
    CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_DISCONNECTED
                   - NME is disconnected.
    CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_CONNECTING
                   - NME is in the process of connecting.
    CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_AUTHENTICATING
                   - NME is in the authentication stage of a connection attempt.
    CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_CONNECTED
                   - NME is connected.
    CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_DISCONNECTING
                   - NME is in the process of disconnecting.

*******************************************************************************/
typedef u8 CsrWifiNmeConnectionStatus;
#define CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_DISCONNECTED     ((CsrWifiNmeConnectionStatus) 0x00)
#define CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_CONNECTING       ((CsrWifiNmeConnectionStatus) 0x01)
#define CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_AUTHENTICATING   ((CsrWifiNmeConnectionStatus) 0x02)
#define CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_CONNECTED        ((CsrWifiNmeConnectionStatus) 0x03)
#define CSR_WIFI_NME_CONNECTION_STATUS_CONNECTION_STATUS_DISCONNECTING    ((CsrWifiNmeConnectionStatus) 0x04)

/*******************************************************************************

  NAME
    CsrWifiNmeCredentialType

  DESCRIPTION
    NME Credential Types

 VALUES
    CSR_WIFI_NME_CREDENTIAL_TYPE_OPEN_SYSTEM
                   - Credential Type Open System.
    CSR_WIFI_NME_CREDENTIAL_TYPE_WEP64
                   - Credential Type WEP-64
    CSR_WIFI_NME_CREDENTIAL_TYPE_WEP128
                   - Credential Type WEP-128
    CSR_WIFI_NME_CREDENTIAL_TYPE_WPA_PSK
                   - Credential Type WPA Pre-Shared Key
    CSR_WIFI_NME_CREDENTIAL_TYPE_WPA_PASSPHRASE
                   - Credential Type WPA pass phrase
    CSR_WIFI_NME_CREDENTIAL_TYPE_WPA2_PSK
                   - Credential Type WPA2 Pre-Shared Key.
    CSR_WIFI_NME_CREDENTIAL_TYPE_WPA2_PASSPHRASE
                   - Credential Type WPA2 pass phrase
    CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI_PSK
                   - Credential Type WAPI Pre-Shared Key.
    CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI_PASSPHRASE
                   - Credential Type WAPI pass phrase
    CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI
                   - Credential Type WAPI certificates
    CSR_WIFI_NME_CREDENTIAL_TYPE_8021X
                   - Credential Type 802.1X: the associated type supports
                     FAST/LEAP/TLS/TTLS/PEAP/etc.

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeCredentialType;
#define CSR_WIFI_NME_CREDENTIAL_TYPE_OPEN_SYSTEM       ((CsrWifiNmeCredentialType) 0x0000)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WEP64             ((CsrWifiNmeCredentialType) 0x0001)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WEP128            ((CsrWifiNmeCredentialType) 0x0002)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WPA_PSK           ((CsrWifiNmeCredentialType) 0x0003)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WPA_PASSPHRASE    ((CsrWifiNmeCredentialType) 0x0004)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WPA2_PSK          ((CsrWifiNmeCredentialType) 0x0005)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WPA2_PASSPHRASE   ((CsrWifiNmeCredentialType) 0x0006)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI_PSK          ((CsrWifiNmeCredentialType) 0x0007)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI_PASSPHRASE   ((CsrWifiNmeCredentialType) 0x0008)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_WAPI              ((CsrWifiNmeCredentialType) 0x0009)
#define CSR_WIFI_NME_CREDENTIAL_TYPE_8021X             ((CsrWifiNmeCredentialType) 0x000A)

/*******************************************************************************

  NAME
    CsrWifiNmeEapMethod

  DESCRIPTION
    Outer EAP method with possibly inner method.

 VALUES
    CSR_WIFI_NME_EAP_METHOD_TLS
                   - EAP-TLS Method.
    CSR_WIFI_NME_EAP_METHOD_TTLS_MSCHAPV2
                   - EAP-TTLS Method with MSCHAPV2.
    CSR_WIFI_NME_EAP_METHOD_PEAP_GTC
                   - EAP-PEAP Method with GTC.
    CSR_WIFI_NME_EAP_METHOD_PEAP_MSCHAPV2
                   - EAP-PEAP Method with MSCHAPV2.
    CSR_WIFI_NME_EAP_METHOD_SIM
                   - EAP-SIM Method.
    CSR_WIFI_NME_EAP_METHOD_AKA
                   - EAP-AKA Method.
    CSR_WIFI_NME_EAP_METHOD_FAST_GTC
                   - EAP-FAST Method with GTC.
    CSR_WIFI_NME_EAP_METHOD_FAST_MSCHAPV2
                   - EAP-FAST Method with MSCHAPV2.
    CSR_WIFI_NME_EAP_METHOD_LEAP
                   - EAP-LEAP Method.

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEapMethod;
#define CSR_WIFI_NME_EAP_METHOD_TLS             ((CsrWifiNmeEapMethod) 0x0001)
#define CSR_WIFI_NME_EAP_METHOD_TTLS_MSCHAPV2   ((CsrWifiNmeEapMethod) 0x0002)
#define CSR_WIFI_NME_EAP_METHOD_PEAP_GTC        ((CsrWifiNmeEapMethod) 0x0004)
#define CSR_WIFI_NME_EAP_METHOD_PEAP_MSCHAPV2   ((CsrWifiNmeEapMethod) 0x0008)
#define CSR_WIFI_NME_EAP_METHOD_SIM             ((CsrWifiNmeEapMethod) 0x0010)
#define CSR_WIFI_NME_EAP_METHOD_AKA             ((CsrWifiNmeEapMethod) 0x0020)
#define CSR_WIFI_NME_EAP_METHOD_FAST_GTC        ((CsrWifiNmeEapMethod) 0x0040)
#define CSR_WIFI_NME_EAP_METHOD_FAST_MSCHAPV2   ((CsrWifiNmeEapMethod) 0x0080)
#define CSR_WIFI_NME_EAP_METHOD_LEAP            ((CsrWifiNmeEapMethod) 0x0100)

/*******************************************************************************

  NAME
    CsrWifiNmeEncryption

  DESCRIPTION
    WiFi Encryption method

 VALUES
    CSR_WIFI_NME_ENCRYPTION_CIPHER_NONE
                   - No encryprion set.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP40
                   - 40 bytes WEP key for peer to peer communication.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP104
                   - 104 bytes WEP key for peer to peer communication.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_TKIP
                   - TKIP key for peer to peer communication.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_CCMP
                   - CCMP key for peer to peer communication.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_SMS4
                   - SMS4 key for peer to peer communication.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_WEP40
                   - 40 bytes WEP key for broadcast messages.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_WEP104
                   - 104 bytes WEP key for broadcast messages.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_TKIP
                   - TKIP key for broadcast messages.
    CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_CCMP
                   - CCMP key for broadcast messages
    CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_SMS4
                   - SMS4 key for broadcast messages.

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEncryption;
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_NONE              ((CsrWifiNmeEncryption) 0x0000)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP40    ((CsrWifiNmeEncryption) 0x0001)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_WEP104   ((CsrWifiNmeEncryption) 0x0002)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_TKIP     ((CsrWifiNmeEncryption) 0x0004)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_CCMP     ((CsrWifiNmeEncryption) 0x0008)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_PAIRWISE_SMS4     ((CsrWifiNmeEncryption) 0x0010)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_WEP40       ((CsrWifiNmeEncryption) 0x0020)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_WEP104      ((CsrWifiNmeEncryption) 0x0040)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_TKIP        ((CsrWifiNmeEncryption) 0x0080)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_CCMP        ((CsrWifiNmeEncryption) 0x0100)
#define CSR_WIFI_NME_ENCRYPTION_CIPHER_GROUP_SMS4        ((CsrWifiNmeEncryption) 0x0200)

/*******************************************************************************

  NAME
    CsrWifiNmeIndications

  DESCRIPTION
    NME indications

 VALUES
    CSR_WIFI_NME_INDICATIONS_IND_AP_STATION
                   - NME AP Station Indication.
    CSR_WIFI_NME_INDICATIONS_IND_AP_STOP
                   - NME AP Stop Indication.
    CSR_WIFI_NME_INDICATIONS_IND_SIM_UMTS_AUTH
                   - NME UMTS Authentication Indication.
    CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_START
                   - NME P2P Group Start Indication.
    CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_STATUS
                   - NME P2P Group Status Indication.
    CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_ROLE
                   - NME P2P Group Role Indication.
    CSR_WIFI_NME_INDICATIONS_IND_PROFILE_DISCONNECT
                   - NME Profile Disconnect Indication.
    CSR_WIFI_NME_INDICATIONS_IND_PROFILE_UPDATE
                   - NME Profile Update Indication.
    CSR_WIFI_NME_INDICATIONS_IND_SIM_IMSI_GET
                   - NME GET IMSI Indication.
    CSR_WIFI_NME_INDICATIONS_IND_SIM_GSM_AUTH
                   - NME GSM Authentication Indication.
    CSR_WIFI_NME_INDICATIONS_ALL
                   - Used to register for all available indications

*******************************************************************************/
typedef CsrUint32 CsrWifiNmeIndications;
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STATION           ((CsrWifiNmeIndications) 0x00100000)
#define CSR_WIFI_NME_INDICATIONS_IND_AP_STOP              ((CsrWifiNmeIndications) 0x00200000)
#define CSR_WIFI_NME_INDICATIONS_IND_SIM_UMTS_AUTH        ((CsrWifiNmeIndications) 0x01000000)
#define CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_START      ((CsrWifiNmeIndications) 0x02000000)
#define CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_STATUS     ((CsrWifiNmeIndications) 0x04000000)
#define CSR_WIFI_NME_INDICATIONS_IND_P2P_GROUP_ROLE       ((CsrWifiNmeIndications) 0x08000000)
#define CSR_WIFI_NME_INDICATIONS_IND_PROFILE_DISCONNECT   ((CsrWifiNmeIndications) 0x10000000)
#define CSR_WIFI_NME_INDICATIONS_IND_PROFILE_UPDATE       ((CsrWifiNmeIndications) 0x20000000)
#define CSR_WIFI_NME_INDICATIONS_IND_SIM_IMSI_GET         ((CsrWifiNmeIndications) 0x40000000)
#define CSR_WIFI_NME_INDICATIONS_IND_SIM_GSM_AUTH         ((CsrWifiNmeIndications) 0x80000000)
#define CSR_WIFI_NME_INDICATIONS_ALL                      ((CsrWifiNmeIndications) 0xFFFFFFFF)

/*******************************************************************************

  NAME
    CsrWifiNmeSecError

  DESCRIPTION
    NME Security Errors
    place holder for the security library abort reason

 VALUES
    CSR_WIFI_NME_SEC_ERROR_SEC_ERROR_UNKNOWN
                   - Unknown Security Error.

*******************************************************************************/
typedef u8 CsrWifiNmeSecError;
#define CSR_WIFI_NME_SEC_ERROR_SEC_ERROR_UNKNOWN   ((CsrWifiNmeSecError) 0x00)

/*******************************************************************************

  NAME
    CsrWifiNmeSimCardType

  DESCRIPTION
    (U)SIM Card (or UICC) types

 VALUES
    CSR_WIFI_NME_SIM_CARD_TYPE_2G   - 2G SIM card, capable of performing GSM
                                      authentication only.
    CSR_WIFI_NME_SIM_CARD_TYPE_3G   - UICC supporting USIM application, capable
                                      of performing UMTS authentication only.
    CSR_WIFI_NME_SIM_CARD_TYPE_2G3G - UICC supporting both USIM and SIM
                                      applications, capable of performing both
                                      UMTS and GSM authentications.

*******************************************************************************/
typedef u8 CsrWifiNmeSimCardType;
#define CSR_WIFI_NME_SIM_CARD_TYPE_2G     ((CsrWifiNmeSimCardType) 0x01)
#define CSR_WIFI_NME_SIM_CARD_TYPE_3G     ((CsrWifiNmeSimCardType) 0x02)
#define CSR_WIFI_NME_SIM_CARD_TYPE_2G3G   ((CsrWifiNmeSimCardType) 0x03)

/*******************************************************************************

  NAME
    CsrWifiNmeUmtsAuthResult

  DESCRIPTION
    Only relevant for UMTS Authentication. It indicates if the UICC has
    successfully authenticated the network or otherwise.

 VALUES
    CSR_WIFI_NME_UMTS_AUTH_RESULT_SUCCESS
                   - Successful outcome from USIM indicating that the card has
                     successfully authenticated the network.
    CSR_WIFI_NME_UMTS_AUTH_RESULT_SYNC_FAIL
                   - Unsuccessful outcome from USIM indicating that the card is
                     requesting the network to synchronise and re-try again. If
                     no further request is received an NME timer will expire and
                     the authentication is aborted.
    CSR_WIFI_NME_UMTS_AUTH_RESULT_REJECT
                   - Unsuccessful outcome from USIM indicating that the card has
                     rejected the network and that the authentication is
                     aborted.

*******************************************************************************/
typedef u8 CsrWifiNmeUmtsAuthResult;
#define CSR_WIFI_NME_UMTS_AUTH_RESULT_SUCCESS     ((CsrWifiNmeUmtsAuthResult) 0x00)
#define CSR_WIFI_NME_UMTS_AUTH_RESULT_SYNC_FAIL   ((CsrWifiNmeUmtsAuthResult) 0x01)
#define CSR_WIFI_NME_UMTS_AUTH_RESULT_REJECT      ((CsrWifiNmeUmtsAuthResult) 0x02)

/*******************************************************************************

  NAME
    CsrWifiNmeWmmQosInfo

  DESCRIPTION
    Defines bits for the QoS Info octect as defined in the WMM specification.
    The values of this type are used across the NME/SME/Router API's and they
    must be kept consistent with the corresponding types in the .xml of the
    other interfaces

 VALUES
    CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_ALL
                   - WMM AP may deliver all buffered frames.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_VO
                   - To enable the triggering and delivery of QoS Voice.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_VI
                   - To enable the triggering and delivery of QoS Video.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_BK
                   - To enable the triggering and delivery of QoS Background.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_BE
                   - To enable the triggering and delivery of QoS Best Effort.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_TWO
                   - WMM AP may deliver a maximum of 2 buffered frames per
                     Unscheduled Service Period (USP).
    CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_FOUR
                   - WMM AP may deliver a maximum of 4 buffered frames per USP.
    CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_SIX
                   - WMM AP may deliver a maximum of 6 buffered frames per USP.

*******************************************************************************/
typedef u8 CsrWifiNmeWmmQosInfo;
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_ALL    ((CsrWifiNmeWmmQosInfo) 0x00)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_VO            ((CsrWifiNmeWmmQosInfo) 0x01)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_VI            ((CsrWifiNmeWmmQosInfo) 0x02)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_BK            ((CsrWifiNmeWmmQosInfo) 0x04)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_BE            ((CsrWifiNmeWmmQosInfo) 0x08)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_TWO    ((CsrWifiNmeWmmQosInfo) 0x20)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_FOUR   ((CsrWifiNmeWmmQosInfo) 0x40)
#define CSR_WIFI_NME_WMM_QOS_INFO_AC_MAX_SP_SIX    ((CsrWifiNmeWmmQosInfo) 0x60)


/*******************************************************************************

  NAME
    CsrWifiNmeEapMethodMask

  DESCRIPTION
    Mask type for use with the values defined by CsrWifiNmeEapMethod.

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEapMethodMask;
/*******************************************************************************

  NAME
    CsrWifiNmeEncryptionMask

  DESCRIPTION
    Mask type for use with the values defined by CsrWifiNmeEncryption

*******************************************************************************/
typedef CsrUint16 CsrWifiNmeEncryptionMask;
/*******************************************************************************

  NAME
    CsrWifiNmeIndicationsMask

  DESCRIPTION
    Mask type for use with the values defined by CsrWifiNmeIndications

*******************************************************************************/
typedef CsrUint32 CsrWifiNmeIndicationsMask;
/*******************************************************************************

  NAME
    CsrWifiNmeNmeIndicationsMask

  DESCRIPTION
    Mask type for use with the values defined by CsrWifiNmeNmeIndications.
    Used to overlap the unused portion of the unifi_IndicationsMask For NME
    specific indications

*******************************************************************************/
typedef CsrUint32 CsrWifiNmeNmeIndicationsMask;
/*******************************************************************************

  NAME
    CsrWifiNmeWmmQosInfoMask

  DESCRIPTION
    Mask type for use with the values defined by CsrWifiNmeWmmQosInfo

*******************************************************************************/
typedef u8 CsrWifiNmeWmmQosInfoMask;


/*******************************************************************************

  NAME
    CsrWifiNmeEmpty

  DESCRIPTION
    Empty Structure to indicate that no credentials are available.

  MEMBERS
    empty  - Only element of the empty structure (always set to 0).

*******************************************************************************/
typedef struct
{
    u8 empty;
} CsrWifiNmeEmpty;

/*******************************************************************************

  NAME
    CsrWifiNmePassphrase

  DESCRIPTION
    Structure holding the ASCII Pass Phrase data.

  MEMBERS
    encryptionMode - Encryption type as defined in CsrWifiSmeEncryption.
    passphrase     - Pass phrase ASCII value.

*******************************************************************************/
typedef struct
{
    CsrUint16      encryptionMode;
    CsrCharString *passphrase;
} CsrWifiNmePassphrase;

/*******************************************************************************

  NAME
    CsrWifiNmePsk

  DESCRIPTION
    Structure holding the Pre-Shared Key data.

  MEMBERS
    encryptionMode - Encryption type as defined in CsrWifiSmeEncryption.
    psk            - Pre-Shared Key value.

*******************************************************************************/
typedef struct
{
    CsrUint16 encryptionMode;
    u8  psk[32];
} CsrWifiNmePsk;

/*******************************************************************************

  NAME
    CsrWifiNmeWapiCredentials

  DESCRIPTION
    Structure holding WAPI credentials data.

  MEMBERS
    certificateLength   - Length in bytes of the following client certificate.
    certificate         - The actual client certificate data (if present).
                          DER/PEM format supported.
    privateKeyLength    - Length in bytes of the following private key.
    privateKey          - The actual private key. DER/PEM format.
    caCertificateLength - Length in bytes of the following certificate authority
                          certificate.
    caCertificate       - The actual certificate authority certificate data. If
                          not supplied the received certificate authority
                          certificate is assumed to be validate, if present the
                          received certificate is validated against it. DER/PEM
                          format supported.

*******************************************************************************/
typedef struct
{
    CsrUint32 certificateLength;
    u8 *certificate;
    CsrUint16 privateKeyLength;
    u8 *privateKey;
    CsrUint32 caCertificateLength;
    u8 *caCertificate;
} CsrWifiNmeWapiCredentials;

/*******************************************************************************

  NAME
    CsrWifiNmeConnectAttempt

  DESCRIPTION
    Structure holding Connection attempt data.

  MEMBERS
    bssid         - Id of Basic Service Set connections attempt have been made
                    to.
    status        - Status returned to indicate the success or otherwise of the
                    connection attempt.
    securityError - Security error status indicating the nature of the failure
                    to connect.

*******************************************************************************/
typedef struct
{
    CsrWifiMacAddress  bssid;
    CsrResult          status;
    CsrWifiNmeSecError securityError;
} CsrWifiNmeConnectAttempt;

/*******************************************************************************

  NAME
    CsrWifiNmeEapCredentials

  DESCRIPTION
    Supports the use of multiple EAP methods via a single structure. The
    methods required are indicated by the value set in the eapMethodMask

  MEMBERS
    eapMethodMask
                   - Bit mask of supported EAP methods
                     Currently only supports the setting of one bit.
                     Required for all the EAP methods.
    authMode
                   - Bit mask representing the authentication types that may be
                     supported by a suitable AP. An AP must support at least one
                     of the authentication types specified to be considered for
                     connection. Required for all EAP methods.
    encryptionMode
                   - Bit mask representing the encryption types that may be
                     supported by a suitable AP. An AP must support a suitable
                     mix of the pairwise and group encryption types requested to
                     be considered for connection. Required for all EAP methods.
    userName
                   - User name. Required for all EAP methods except: SIM or AKA.
    userPassword
                   - User Password. Required for all EAP methods except: TLS,
                     SIM or AKA.
    authServerUserIdentity
                   - Authentication server user Identity. Required for all EAP
                     methods except: TLS, SIM, AKA or FAST.
    clientCertificateLength
                   - Length in bytes of the following client certificate (if
                     present). Only required for TLS.
    clientCertificate
                   - The actual client certificate data (if present). Only
                     required for TLS. DER/PEM format supported.
    certificateAuthorityCertificateLength
                   - Length in bytes of the following certificate authority
                     certificate (if present). Optional for TLS, TTLS, PEAP.
    certificateAuthorityCertificate
                   - The actual certificate authority certificate data (if
                     present). If not supplied the received certificate
                     authority certificate is assumed to be valid, if present
                     the received certificate is validated against it. Optional
                     for TLS, TTLS, PEAP. DER/PEM format supported.
    privateKeyLength
                   - Length in bytes of the following private key (if present).
                     Only required for TLS.
    privateKey
                   - The actual private key (if present). Only required for TLS.
                     DER/PEM format, maybe password protected.
    privateKeyPassword
                   - Optional password to protect the private key.
    sessionLength
                   - Length in bytes of the following session field Supported
                     for all EAP methods except: SIM or AKA.
    session
                   - Session information to support faster re-authentication.
                     Supported for all EAP methods except: SIM or AKA.
    allowPacProvisioning
                   - If TRUE: PAC provisioning is allowed 'over-the_air';
                     If FALSE: a PAC must be supplied.
                     Only required for FAST.
    pacLength
                   - Length the following PAC field. If allowPacProvisioning is
                     FALSE then the PAC MUST be supplied (i.e. non-zero). Only
                     required for FAST.
    pac
                   - The actual PAC data. If allowPacProvisioning is FALSE then
                     the PAC MUST be supplied. Only required for FAST.
    pacPassword
                   - Optional password to protect the PAC. Only required for
                     FAST.

*******************************************************************************/
typedef struct
{
    CsrWifiNmeEapMethodMask  eapMethodMask;
    CsrWifiSmeAuthModeMask   authMode;
    CsrWifiNmeEncryptionMask encryptionMode;
    CsrCharString           *userName;
    CsrCharString           *userPassword;
    CsrCharString           *authServerUserIdentity;
    CsrUint32                clientCertificateLength;
    u8                *clientCertificate;
    CsrUint32                certificateAuthorityCertificateLength;
    u8                *certificateAuthorityCertificate;
    CsrUint16                privateKeyLength;
    u8                *privateKey;
    CsrCharString           *privateKeyPassword;
    CsrUint32                sessionLength;
    u8                *session;
    CsrBool                  allowPacProvisioning;
    CsrUint32                pacLength;
    u8                *pac;
    CsrCharString           *pacPassword;
} CsrWifiNmeEapCredentials;

/*******************************************************************************

  NAME
    CsrWifiNmePeerConfig

  DESCRIPTION
    Structure holding Peer Config data.

  MEMBERS
    p2pDeviceId         -
    groupCapabilityMask -
    groupOwnerIntent    -

*******************************************************************************/
typedef struct
{
    CsrWifiMacAddress                p2pDeviceId;
    CsrWifiSmeP2pGroupCapabilityMask groupCapabilityMask;
    u8                         groupOwnerIntent;
} CsrWifiNmePeerConfig;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileIdentity

  DESCRIPTION
    The identity of a profile is defined as the unique combination the BSSID
    and SSID.

  MEMBERS
    bssid  - ID of Basic Service Set for or the P2pDevice address of the GO for
             which a connection attempt was made.
    ssid   - Service Set Id.

*******************************************************************************/
typedef struct
{
    CsrWifiMacAddress bssid;
    CsrWifiSsid       ssid;
} CsrWifiNmeProfileIdentity;

/*******************************************************************************

  NAME
    CsrWifiNmeWep128Keys

  DESCRIPTION
    Structure holding WEP Authentication Type and WEP keys that can be used
    when using WEP128.

  MEMBERS
    wepAuthType    - Mask to select the WEP authentication type (Open or Shared)
    selectedWepKey - Index to one of the four keys below indicating the
                     currently used WEP key.
    key1           - Value for key number 1.
    key2           - Value for key number 2.
    key3           - Value for key number 3.
    key4           - Value for key number 4.

*******************************************************************************/
typedef struct
{
    CsrWifiSmeAuthModeMask wepAuthType;
    u8               selectedWepKey;
    u8               key1[13];
    u8               key2[13];
    u8               key3[13];
    u8               key4[13];
} CsrWifiNmeWep128Keys;

/*******************************************************************************

  NAME
    CsrWifiNmeWep64Keys

  DESCRIPTION
    Structure for holding WEP Authentication Type and WEP keys that can be
    used when using WEP64.

  MEMBERS
    wepAuthType    - Mask to select the WEP authentication type (Open or Shared)
    selectedWepKey - Index to one of the four keys below indicating the
                     currently used WEP key.
    key1           - Value for key number 1.
    key2           - Value for key number 2.
    key3           - Value for key number 3.
    key4           - Value for key number 4.

*******************************************************************************/
typedef struct
{
    CsrWifiSmeAuthModeMask wepAuthType;
    u8               selectedWepKey;
    u8               key1[5];
    u8               key2[5];
    u8               key3[5];
    u8               key4[5];
} CsrWifiNmeWep64Keys;

/*******************************************************************************

  NAME
    CsrWifiNmeCredentials

  DESCRIPTION
    Structure containing the Credentials data.

  MEMBERS
    credentialType            - Credential type value (as defined in the
                                enumeration type).
    credential                - Union containing credentials which depends on
                                credentialType parameter.
    credentialeap             -
    credentialwapiPassphrase  -
    credentialwpa2Passphrase  -
    credentialwpa2Psk         -
    credentialwapiPsk         -
    credentialwpaPassphrase   -
    credentialwapi            -
    credentialwep128Key       -
    credentialwpaPsk          -
    credentialopenSystem      -
    credentialwep64Key        -

*******************************************************************************/
typedef struct
{
    CsrWifiNmeCredentialType credentialType;
    union {
        CsrWifiNmeEapCredentials  eap;
        CsrWifiNmePassphrase      wapiPassphrase;
        CsrWifiNmePassphrase      wpa2Passphrase;
        CsrWifiNmePsk             wpa2Psk;
        CsrWifiNmePsk             wapiPsk;
        CsrWifiNmePassphrase      wpaPassphrase;
        CsrWifiNmeWapiCredentials wapi;
        CsrWifiNmeWep128Keys      wep128Key;
        CsrWifiNmePsk             wpaPsk;
        CsrWifiNmeEmpty           openSystem;
        CsrWifiNmeWep64Keys       wep64Key;
    } credential;
} CsrWifiNmeCredentials;

/*******************************************************************************

  NAME
    CsrWifiNmeProfile

  DESCRIPTION
    Structure containing the Profile data.

  MEMBERS
    profileIdentity - Profile Identity.
    wmmQosInfoMask  - Mask for WMM QoS information.
    bssType         - Type of BSS (Infrastructure or Adhoc).
    channelNo       - Channel Number.
    ccxOptionsMask  - Options mask for Cisco Compatible Extentions.
    cloakedSsid     - Flag to decide whether the SSID is cloaked (not
                      transmitted) or not.
    credentials     - Credentials data.

*******************************************************************************/
typedef struct
{
    CsrWifiNmeProfileIdentity profileIdentity;
    CsrWifiNmeWmmQosInfoMask  wmmQosInfoMask;
    CsrWifiNmeBssType         bssType;
    u8                  channelNo;
    u8                  ccxOptionsMask;
    CsrBool                   cloakedSsid;
    CsrWifiNmeCredentials     credentials;
} CsrWifiNmeProfile;


/* Downstream */
#define CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST            (0x0000)

#define CSR_WIFI_NME_PROFILE_SET_REQ                      ((CsrWifiNmePrim) (0x0000 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_DELETE_REQ                   ((CsrWifiNmePrim) (0x0001 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_DELETE_ALL_REQ               ((CsrWifiNmePrim) (0x0002 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_ORDER_SET_REQ                ((CsrWifiNmePrim) (0x0003 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_CONNECT_REQ                  ((CsrWifiNmePrim) (0x0004 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_REQ                              ((CsrWifiNmePrim) (0x0005 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_CANCEL_REQ                       ((CsrWifiNmePrim) (0x0006 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_CONNECTION_STATUS_GET_REQ            ((CsrWifiNmePrim) (0x0007 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_IMSI_GET_RES                     ((CsrWifiNmePrim) (0x0008 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_GSM_AUTH_RES                     ((CsrWifiNmePrim) (0x0009 + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_UMTS_AUTH_RES                    ((CsrWifiNmePrim) (0x000A + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_CONFIG_SET_REQ                   ((CsrWifiNmePrim) (0x000B + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_EVENT_MASK_SET_REQ                   ((CsrWifiNmePrim) (0x000C + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST))


#define CSR_WIFI_NME_PRIM_DOWNSTREAM_HIGHEST           (0x000C + CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST)

/* Upstream */
#define CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST              (0x0000 + CSR_PRIM_UPSTREAM)

#define CSR_WIFI_NME_PROFILE_SET_CFM                      ((CsrWifiNmePrim)(0x0000 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_DELETE_CFM                   ((CsrWifiNmePrim)(0x0001 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_DELETE_ALL_CFM               ((CsrWifiNmePrim)(0x0002 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_ORDER_SET_CFM                ((CsrWifiNmePrim)(0x0003 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_CONNECT_CFM                  ((CsrWifiNmePrim)(0x0004 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_CFM                              ((CsrWifiNmePrim)(0x0005 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_CANCEL_CFM                       ((CsrWifiNmePrim)(0x0006 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_CONNECTION_STATUS_GET_CFM            ((CsrWifiNmePrim)(0x0007 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_UPDATE_IND                   ((CsrWifiNmePrim)(0x0008 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_PROFILE_DISCONNECT_IND               ((CsrWifiNmePrim)(0x0009 + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_IMSI_GET_IND                     ((CsrWifiNmePrim)(0x000A + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_GSM_AUTH_IND                     ((CsrWifiNmePrim)(0x000B + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_SIM_UMTS_AUTH_IND                    ((CsrWifiNmePrim)(0x000C + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_WPS_CONFIG_SET_CFM                   ((CsrWifiNmePrim)(0x000D + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_EVENT_MASK_SET_CFM                   ((CsrWifiNmePrim)(0x000E + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST))

#define CSR_WIFI_NME_PRIM_UPSTREAM_HIGHEST             (0x000E + CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST)

#define CSR_WIFI_NME_PRIM_DOWNSTREAM_COUNT             (CSR_WIFI_NME_PRIM_DOWNSTREAM_HIGHEST + 1 - CSR_WIFI_NME_PRIM_DOWNSTREAM_LOWEST)
#define CSR_WIFI_NME_PRIM_UPSTREAM_COUNT               (CSR_WIFI_NME_PRIM_UPSTREAM_HIGHEST   + 1 - CSR_WIFI_NME_PRIM_UPSTREAM_LOWEST)

/*******************************************************************************

  NAME
    CsrWifiNmeProfileSetReq

  DESCRIPTION
    Creates or updates an existing profile in the NME that matches the unique
    identity of the profile. Each profile is identified by the combination of
    BSSID and SSID. The profile contains all the required credentials for
    attempting to connect to the network. Creating or updating a profile via
    the NME PROFILE SET REQ does NOT add the profile to the preferred profile
    list within the NME used for the NME auto-connect behaviour.

  MEMBERS
    common  - Common header for use with the CsrWifiFsm Module
    profile - Specifies the identity and credentials of the network.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent   common;
    CsrWifiNmeProfile profile;
} CsrWifiNmeProfileSetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileDeleteReq

  DESCRIPTION
    Will delete the profile with a matching identity, but does NOT modify the
    preferred profile list.

  MEMBERS
    common          - Common header for use with the CsrWifiFsm Module
    profileIdentity - Identity (BSSID, SSID) of profile to be deleted.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent           common;
    CsrWifiNmeProfileIdentity profileIdentity;
} CsrWifiNmeProfileDeleteReq;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileDeleteAllReq

  DESCRIPTION
    Deletes all profiles present in the NME, but does NOT modify the
    preferred profile list.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
} CsrWifiNmeProfileDeleteAllReq;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileOrderSetReq

  DESCRIPTION
    Defines the preferred order that profiles present in the NME should be
    used during the NME auto-connect behaviour.
    If profileIdentitysCount == 0, it removes any existing preferred profile
    list already present in the NME, effectively disabling the auto-connect
    behaviour.
    NOTE: Profile identities that do not match any profile stored in the NME
    are ignored during the auto-connect procedure.
    NOTE: during auto-connect the NME will only attempt to join an existing
    adhoc network and it will never attempt to host an adhoc network; for
    hosting and adhoc network, use CSR_WIFI_NME_PROFILE_CONNECT_REQ

  MEMBERS
    common                - Common header for use with the CsrWifiFsm Module
    interfaceTag          - Interface Identifier; unique identifier of an
                            interface
    profileIdentitysCount - The number of profiles identities in the list.
    profileIdentitys      - Points to the list of profile identities.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent            common;
    CsrUint16                  interfaceTag;
    u8                   profileIdentitysCount;
    CsrWifiNmeProfileIdentity *profileIdentitys;
} CsrWifiNmeProfileOrderSetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileConnectReq

  DESCRIPTION
    Requests the NME to attempt to connect to the specified profile.
    Overrides any current connection attempt.

  MEMBERS
    common          - Common header for use with the CsrWifiFsm Module
    interfaceTag    - Interface Identifier; unique identifier of an interface
    profileIdentity - Identity (BSSID, SSID) of profile to be connected to.
                      It must match an existing profile in the NME.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent           common;
    CsrUint16                 interfaceTag;
    CsrWifiNmeProfileIdentity profileIdentity;
} CsrWifiNmeProfileConnectReq;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsReq

  DESCRIPTION
    Requests the NME to look for WPS enabled APs and attempt to perform WPS
    to determine the appropriate security credentials to connect to the AP.
    If the PIN == '00000000' then 'push button mode' is indicated, otherwise
    the PIN has to match that of the AP. 4 digit pin is passed by sending the
    pin digits in pin[0]..pin[3] and rest of the contents filled with '-'.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    pin          - PIN value.
    ssid         - Service Set identifier
    bssid        - ID of Basic Service Set for which a WPS connection attempt is
                   being made.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent   common;
    CsrUint16         interfaceTag;
    u8          pin[8];
    CsrWifiSsid       ssid;
    CsrWifiMacAddress bssid;
} CsrWifiNmeWpsReq;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsCancelReq

  DESCRIPTION
    Requests the NME to cancel any WPS procedure that it is currently
    performing. This includes WPS registrar activities started because of
    CSR_WIFI_NME_AP_REGISTER.request

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrUint16       interfaceTag;
} CsrWifiNmeWpsCancelReq;

/*******************************************************************************

  NAME
    CsrWifiNmeConnectionStatusGetReq

  DESCRIPTION
    Requests the current connection status of the NME.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrUint16       interfaceTag;
} CsrWifiNmeConnectionStatusGetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeSimImsiGetRes

  DESCRIPTION
    Response from the application that received the NME SIM IMSI GET IND.

  MEMBERS
    common   - Common header for use with the CsrWifiFsm Module
    status   - Indicates the outcome of the requested operation: STATUS_SUCCESS
               or STATUS_ERROR.
    imsi     - The value of the IMSI obtained from the UICC.
    cardType - The UICC type (GSM only (SIM), UMTS only (USIM), Both).

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent       common;
    CsrResult             status;
    CsrCharString        *imsi;
    CsrWifiNmeSimCardType cardType;
} CsrWifiNmeSimImsiGetRes;

/*******************************************************************************

  NAME
    CsrWifiNmeSimGsmAuthRes

  DESCRIPTION
    Response from the application that received the NME SIM GSM AUTH IND. For
    each GSM authentication round a GSM Ciphering key (Kc) and a signed
    response (SRES) are produced. Since 2 or 3 GSM authentication rounds are
    used the 2 or 3 Kc's obtained respectively are combined into one buffer
    and similarly the 2 or 3 SRES's obtained are combined into another
    buffer. The order of Kc values (SRES values respectively) in their buffer
    is the same as that of their corresponding RAND values in the incoming
    indication.

  MEMBERS
    common     - Common header for use with the CsrWifiFsm Module
    status     - Indicates the outcome of the requested operation:
                 STATUS_SUCCESS or STATUS_ERROR
    kcsLength  - Length in Bytes of Kc buffer. Legal values are: 16 or 24.
    kcs        - Kc buffer holding 2 or 3 Kc values.
    sresLength - Length in Bytes of SRES buffer. Legal values are: 8 or 12.
    sres       - SRES buffer holding 2 or 3 SRES values.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
    u8        kcsLength;
    u8       *kcs;
    u8        sresLength;
    u8       *sres;
} CsrWifiNmeSimGsmAuthRes;

/*******************************************************************************

  NAME
    CsrWifiNmeSimUmtsAuthRes

  DESCRIPTION
    Response from the application that received the NME SIM UMTS AUTH IND.
    The values of umtsCipherKey, umtsIntegrityKey, resParameterLength and
    resParameter are only meanigful when result = UMTS_AUTH_RESULT_SUCCESS.
    The value of auts is only meaningful when
    result=UMTS_AUTH_RESULT_SYNC_FAIL.

  MEMBERS
    common             - Common header for use with the CsrWifiFsm Module
    status             - Indicates the outcome of the requested operation:
                         STATUS_SUCCESS or STATUS_ERROR.
    result             - The result of UMTS authentication as performed by the
                         UICC which could be: Success, Authentication Reject or
                         Synchronisation Failure. For all these 3 outcomes the
                         value of status is success.
    umtsCipherKey      - The UMTS Cipher Key as calculated and returned by the
                         UICC.
    umtsIntegrityKey   - The UMTS Integrity Key as calculated and returned by
                         the UICC.
    resParameterLength - The length (in bytes) of the RES parameter (min=4; max
                         = 16).
    resParameter       - The RES parameter as calculated and returned by the
                         UICC.
    auts               - The AUTS parameter as calculated and returned by the
                         UICC.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent          common;
    CsrResult                status;
    CsrWifiNmeUmtsAuthResult result;
    u8                 umtsCipherKey[16];
    u8                 umtsIntegrityKey[16];
    u8                 resParameterLength;
    u8                *resParameter;
    u8                 auts[14];
} CsrWifiNmeSimUmtsAuthRes;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsConfigSetReq

  DESCRIPTION
    This primitive passes the WPS information for the device to NME. This may
    be accepted only if no interface is active.

  MEMBERS
    common    - Common header for use with the CsrWifiFsm Module
    wpsConfig - WPS config.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent     common;
    CsrWifiSmeWpsConfig wpsConfig;
} CsrWifiNmeWpsConfigSetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeEventMaskSetReq

  DESCRIPTION
    The wireless manager application may register with the NME to receive
    notification of interesting events. Indications will be sent only if the
    wireless manager explicitly registers to be notified of that event.
    indMask is a bit mask of values defined in CsrWifiNmeIndicationsMask.

  MEMBERS
    common  - Common header for use with the CsrWifiFsm Module
    indMask - Set mask with values from CsrWifiNmeIndications

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent           common;
    CsrWifiNmeIndicationsMask indMask;
} CsrWifiNmeEventMaskSetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileSetCfm

  DESCRIPTION
    Reports the status of the NME PROFILE SET REQ; the request will only fail
    if the details specified in the profile contains an invalid combination
    of parameters for example specifying the profile as cloaked but not
    specifying the SSID. The NME doesn't limit the number of profiles that
    may be created. The NME assumes that the entity configuring it is aware
    of the appropriate limits.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Indicates the success or otherwise of the requested operation.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeProfileSetCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileDeleteCfm

  DESCRIPTION
    Reports the status of the CSR_WIFI_NME_PROFILE_DELETE_REQ.
    Returns CSR_WIFI_NME_STATUS_NOT_FOUND if there is no matching profile.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Indicates the success or otherwise of the requested operation.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeProfileDeleteCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileDeleteAllCfm

  DESCRIPTION
    Reports the status of the CSR_WIFI_NME_PROFILE_DELETE_ALL_REQ.
    Returns always CSR_WIFI_NME_STATUS_SUCCESS.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Indicates the success or otherwise of the requested operation, but
             in this case it always set to success.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeProfileDeleteAllCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileOrderSetCfm

  DESCRIPTION
    Confirmation to UNIFI_NME_PROFILE_ORDER_SET.request.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    status       - Indicates the success or otherwise of the requested
                   operation.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrUint16       interfaceTag;
    CsrResult       status;
} CsrWifiNmeProfileOrderSetCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileConnectCfm

  DESCRIPTION
    Reports the status of the NME PROFILE CONNECT REQ. If unsuccessful the
    connectAttempt parameters contain details of the APs that the NME
    attempted to connect to before reporting the failure of the request.

  MEMBERS
    common               - Common header for use with the CsrWifiFsm Module
    interfaceTag         - Interface Identifier; unique identifier of an
                           interface
    status               - Indicates the success or otherwise of the requested
                           operation.
    connectAttemptsCount - This parameter is relevant only if
                           status!=CSR_WIFI_NME_STATUS_SUCCESS.
                           Number of connection attempt elements provided with
                           this primitive
    connectAttempts      - This parameter is relevant only if
                           status!=CSR_WIFI_NME_STATUS_SUCCESS.
                           Points to the list of connection attempt elements
                           provided with this primitive
                           Each element of the list provides information about
                           an AP on which the connection attempt was made and
                           the error that occurred during the attempt.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent           common;
    CsrUint16                 interfaceTag;
    CsrResult                 status;
    u8                  connectAttemptsCount;
    CsrWifiNmeConnectAttempt *connectAttempts;
} CsrWifiNmeProfileConnectCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsCfm

  DESCRIPTION
    Reports the status of the NME WPS REQ.
    If CSR_WIFI_NME_STATUS_SUCCESS, the profile parameter contains the
    identity and credentials of the AP.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    status       - Indicates the success or otherwise of the requested
                   operation.
    profile      - This parameter is relevant only if
                   status==CSR_WIFI_NME_STATUS_SUCCESS.
                   The identity and credentials of the network.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent   common;
    CsrUint16         interfaceTag;
    CsrResult         status;
    CsrWifiNmeProfile profile;
} CsrWifiNmeWpsCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsCancelCfm

  DESCRIPTION
    Reports the status of the NME WPS REQ, the request is always SUCCESSFUL.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    status       - Only returns CSR_WIFI_NME_STATUS_SUCCESS

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrUint16       interfaceTag;
    CsrResult       status;
} CsrWifiNmeWpsCancelCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeConnectionStatusGetCfm

  DESCRIPTION
    Reports the connection status of the NME.

  MEMBERS
    common           - Common header for use with the CsrWifiFsm Module
    interfaceTag     - Interface Identifier; unique identifier of an interface
    status           - Indicates the success or otherwise of the requested
                       operation.
    connectionStatus - NME current connection status

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent            common;
    CsrUint16                  interfaceTag;
    CsrResult                  status;
    CsrWifiNmeConnectionStatus connectionStatus;
} CsrWifiNmeConnectionStatusGetCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileUpdateInd

  DESCRIPTION
    Indication generated from the NME (if an application subscribes to
    receive it) that informs that application that the contained profile has
    changed.
    For example, either the credentials EAP-FAST PAC file or the session data
    within the profile has changed.
    It is up to the application whether it stores this updated profile or
    not.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    profile      - The identity and credentials of the network.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent   common;
    CsrUint16         interfaceTag;
    CsrWifiNmeProfile profile;
} CsrWifiNmeProfileUpdateInd;

/*******************************************************************************

  NAME
    CsrWifiNmeProfileDisconnectInd

  DESCRIPTION
    Indication generated from the NME (if an application subscribes to
    receive it) that informs that application that the current profile
    connection has disconnected. The indication will contain information
    about APs that it attempted to maintain the connection via i.e. in the
    case of failed roaming.

  MEMBERS
    common               - Common header for use with the CsrWifiFsm Module
    interfaceTag         - Interface Identifier; unique identifier of an
                           interface
    connectAttemptsCount - Number of connection attempt elements provided with
                           this primitive
    connectAttempts      - Points to the list of connection attempt elements
                           provided with this primitive
                           Each element of the list provides information about
                           an AP on which the connection attempt was made and
                           the error occurred during the attempt.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent           common;
    CsrUint16                 interfaceTag;
    u8                  connectAttemptsCount;
    CsrWifiNmeConnectAttempt *connectAttempts;
} CsrWifiNmeProfileDisconnectInd;

/*******************************************************************************

  NAME
    CsrWifiNmeSimImsiGetInd

  DESCRIPTION
    Indication generated from the NME (if an application subscribes to
    receive it) that requests the IMSI and UICC type from the UICC Manager.
    This indication is generated when the NME is attempting to connect to a
    profile configured for EAP-SIM/AKA. An application MUST register to
    receive this indication for the NME to support the EAP-SIM/AKA credential
    types. Otherwise the NME has no route to obtain the information from the
    UICC.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
} CsrWifiNmeSimImsiGetInd;

/*******************************************************************************

  NAME
    CsrWifiNmeSimGsmAuthInd

  DESCRIPTION
    Indication generated from the NME (if an application subscribes to
    receive it) that requests the UICC Manager to perform a GSM
    authentication on behalf of the NME. This indication is generated when
    the NME is attempting to connect to a profile configured for EAP-SIM. An
    application MUST register to receive this indication for the NME to
    support the EAP-SIM credential types. Otherwise the NME has no route to
    obtain the information from the UICC. EAP-SIM authentication requires 2
    or 3 GSM authentication rounds and therefore 2 or 3 RANDS (GSM Random
    Challenges) are included.

  MEMBERS
    common      - Common header for use with the CsrWifiFsm Module
    randsLength - GSM RAND is 16 bytes long hence valid values are 32 (2 RANDS)
                  or 48 (3 RANDs).
    rands       - 2 or 3 RANDs values.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u8        randsLength;
    u8       *rands;
} CsrWifiNmeSimGsmAuthInd;

/*******************************************************************************

  NAME
    CsrWifiNmeSimUmtsAuthInd

  DESCRIPTION
    Indication generated from the NME (if an application subscribes to
    receive it) that requests the UICC Manager to perform a UMTS
    authentication on behalf of the NME. This indication is generated when
    the NME is attempting to connect to a profile configured for EAP-AKA. An
    application MUST register to receive this indication for the NME to
    support the EAP-AKA credential types. Otherwise the NME has no route to
    obtain the information from the USIM. EAP-AKA requires one UMTS
    authentication round and therefore only one RAND and one AUTN values are
    included.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    rand   - UMTS RAND value.
    autn   - UMTS AUTN value.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u8        rand[16];
    u8        autn[16];
} CsrWifiNmeSimUmtsAuthInd;

/*******************************************************************************

  NAME
    CsrWifiNmeWpsConfigSetCfm

  DESCRIPTION
    Confirm.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Status of the request.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeWpsConfigSetCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeEventMaskSetCfm

  DESCRIPTION
    The NME calls the primitive to report the result of the request
    primitive.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Reports the result of the request

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeEventMaskSetCfm;


#ifdef __cplusplus
}
#endif

#endif /* CSR_WIFI_NME_PRIM_H__ */