This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwifi_hal_ap.h
2735 lines (2490 loc) · 99.9 KB
/
wifi_hal_ap.h
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
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WIFI_HAL_AP_H__
#define __WIFI_HAL_AP_H__
#ifdef __cplusplus
extern "C"{
#endif
/**
* @addtogroup WIFI_HAL_TYPES
* @{
*/
typedef struct _wifi_trafficStats
{
ULONG wifi_ErrorsSent;
ULONG wifi_ErrorsReceived;
ULONG wifi_UnicastPacketsSent;
ULONG wifi_UnicastPacketsReceived;
ULONG wifi_DiscardedPacketsSent;
ULONG wifi_DiscardedPacketsReceived;
ULONG wifi_MulticastPacketsSent;
ULONG wifi_MulticastPacketsReceived;
ULONG wifi_BroadcastPacketsSent;
ULONG wifi_BroadcastPacketsRecevied;
ULONG wifi_UnknownPacketsReceived;
} wifi_trafficStats_t;
typedef enum {
wifi_ipv4_field_values_not_available,
wifi_ipv4_field_values_available,
wifi_ipv4_field_values_post_restricted,
wifi_ipv4_field_values_single_nated_private,
wifi_ipv4_field_values_double_nated_private,
wifi_ipv4_field_values_port_restricted_single_nated,
wifi_ipv4_field_values_port_restricted_double_nated,
wifi_ipv4_field_values_not_known
} wifi_ipv4_field_values_t;
typedef enum {
wifi_ipv6_field_values_not_available,
wifi_ipv6_field_values_available,
wifi_ipv6_field_values_not_known
} wifi_ipv6_field_values_t;
typedef struct {
UCHAR field_format;
}__attribute__((packed)) wifi_ipAddressAvailabality_t;
typedef enum {
wifi_auth_id_reserved,
wifi_auth_id_expanded_eap,
wifi_auth_id_inner_auth_eap,
wifi_auth_id_expanded_inner_auth_eap,
wifi_auth_id_credential_type,
wifi_auth_id_tunneled_eap,
}wifi_auth_id_t;
typedef struct {
UCHAR id;
UCHAR length;
UCHAR val[16];
}__attribute__((packed)) wifi_authMethod_t;
typedef struct {
UCHAR length;
UCHAR method;
UCHAR auth_param_count;
wifi_authMethod_t auth_method[16];
}__attribute__((packed)) wifi_eapMethod_t;
typedef struct {
USHORT data_field_length;
UCHAR encoding;
UCHAR realm_length;
UCHAR realm[256];
UCHAR eap_method_count;
wifi_eapMethod_t eap_method[16];
} __attribute__((packed))wifi_naiRealm_t;
typedef struct {
USHORT nai_realm_count;
wifi_naiRealm_t nai_realm_tuples[20];
}__attribute__((packed)) wifi_naiRealmElement_t;
typedef struct {
UCHAR length;
UCHAR language[3];
UCHAR name[256];
}__attribute__((packed)) wifi_venueName_t;
typedef struct {
UCHAR venueGroup;
UCHAR venueType;
wifi_venueName_t venueNameTuples[16];
}__attribute__((packed)) wifi_venueNameElement_t;
typedef struct {
UCHAR PLMN[3];
}__attribute__((packed)) wifi_plmn_t;
typedef struct {
UCHAR iei;//copy zero for now.
UCHAR plmn_length;
UCHAR number_of_plmns;
wifi_plmn_t plmn[16];
}__attribute__((packed))wifi_3gpp_plmn_list_information_element_t;
typedef struct {
UCHAR gud;
UCHAR uhdLength;//Length of remaining fields
wifi_3gpp_plmn_list_information_element_t plmn_information;
}__attribute__((packed)) wifi_3gppCellularNetwork_t;
typedef struct {
UCHAR length;
UCHAR domainName[255]; //max domain name allowed based on the spec.
}__attribute__((packed)) wifi_domainNameTuple_t;
typedef struct {
wifi_domainNameTuple_t domainNameTuple[4];
}__attribute__((packed)) wifi_domainName_t;
typedef struct {
UCHAR length;
UCHAR oui[15];
}__attribute__((packed)) wifi_ouiDuple_t;
typedef struct {
wifi_ouiDuple_t ouiDuple[32];
}__attribute__((packed)) wifi_roamingConsortium_t;
typedef struct {
USHORT capabilityList[64];
}__attribute__((packed)) wifi_capabilityListANQP_t;
typedef struct {
UCHAR wifiRoamingConsortiumCount;
UCHAR wifiRoamingConsortiumOui[3][15+1];//only 3 OIS is allowed in beacon and probe responses OIS length is variable between 3-15
UCHAR wifiRoamingConsortiumLen[3];
}__attribute__((packed)) wifi_roamingConsortiumElement_t;
//HS2 Related ANQP Elements start
//=========================================Start-HS-Operator Friendly Name=========================================================================
//HS2.0 Operator Name Duple #1 HS2.0 Operator Name Duple #2 ...... HS2.0 Operator Name Duple #n
// variable variable variable
//HS2.0 Operator name Duple
//Length Language Code Operator Name
// 1 (3+ operator name) 3 variable
typedef struct _wifi_HS2_OperatorNameDuple_t // figure 9-595
{
UCHAR length; //length is 3(language code)+number of octects in operator name field eg. operatorName= aaaa length is 4+3 = 7
UCHAR languageCode[3];
UCHAR operatorName[252]; //based on spec the maximum length of operator name is 252
} __attribute__((packed)) wifi_HS2_OperatorNameDuple_t;
typedef struct
{
wifi_HS2_OperatorNameDuple_t operatorNameDuple[16]; //putting 16 duples supported for now story RDKB-1317 does not tell how many duples we are supporting nor the spec (spec mentions n duples)
} __attribute__((packed)) wifi_HS2_OperatorFriendlyName_t;
//=========================================End-HS2-Operator Friendly Name=========================================================================
//=========================================Start-HS2-Wan Metrics Element=========================================================================
//WAN Info Downlink Speed Uplink Speed Downlink Load Uplink Load LMD
// 1 4 4 1 1 2
typedef struct // figure 9-595
{
UCHAR wanInfo;
UINT downLinkSpeed;
UINT upLinkSpeed;
UCHAR downLinkLoad;
UCHAR upLinkLoad;
USHORT lmd;
} __attribute__((packed)) wifi_HS2_WANMetrics_t;
//WAN Info Bit fields
// B0 B1 B2 B3 B4 B7
// Link Status Symetric Link At Capacity Reserved
//Bits: 2 1 1 4
typedef enum
{
wifi_hs2_wan_info_reserved,
wifi_hs2_wan_info_linkup,
wifi_hs2_wan_info_linkdown,
wifi_hs2_wan_info_link_in_test_state
} wifi_HS2_Wan_Info_Link_Status_t;
//=========================================End-HS2-Wan Metrics Element=========================================================================
//=========================================Start-HS2-Connection Capability Element=========================================================================
//Proto Port Tuple #1 Proto Port Tuple #2 ............. Proto Port Tuple #n
// 4 4(optional) 4(optional)
//Proto Port Tuple Format
//IP Protocol Port Number Status
// 1 2 1
typedef struct // figure 9-595
{
UCHAR ipProtocol;
USHORT portNumber;
UCHAR status;
} __attribute__((packed)) wifi_HS2_Proto_Port_Tuple_t;
typedef struct // figure 9-595
{
wifi_HS2_Proto_Port_Tuple_t protoPortTuple[16];//putting 16 duples supported for now. story RDKB-1317 does not tell how many duples we are supporting nor the spec (spec mentions n duples)
} __attribute__((packed)) wifi_HS2_ConnectionCapability_t;
typedef enum
{
wifi_hs2_connection_capability_closed,
wifi_hs2_connection_capability_open,
wifi_hs2_connection_capability_unknown,
wifi_hs2_connection_capability_reserved
} wifi_HS2_ConnectionCapability_Status_t;
//=========================================End-HS2-Connection Capability Element=========================================================================
//=========================================Start-HS2-NAI Realm Query Element=========================================================================
//NAI Realm Count NAI Home Realm NAI Home Realm .... NAI Home Realm
// Name Data #1 Name Data #2 Name Data #n
// 1 variable (variable optional) (variable optional)
//NAI Realm Encoding NAI Home Realm Name Length NAI Home Realm
// 1 1 variable
typedef struct// figure 9-595
{
UCHAR encoding;
UCHAR length;
UCHAR name[255];//per spec maximum length is 255
} __attribute__((packed)) wifi_HS2_NAI_Home_Realm_Data_t;
typedef struct// figure 9-595
{
UCHAR realmCount;
wifi_HS2_NAI_Home_Realm_Data_t homeRealmData[20];//as realm count is unsigned char we can put 255 realms here spec says n story does not define how many we support
} __attribute__((packed)) wifi_HS2_NAI_Home_Realm_Query_t;
//=========================================End-HS2-NAI Realm Query Element=========================================================================
//=========================================Start-HS-Capability List=========================================================================
//HS2.0 Capability #1 HS2.0 Capability #2 ...... HS2.0 Capability #n
// 1 0 or 1 (optional) 0 or 1 (optional)
//=========================================End-HS-Capability List=========================================================================
typedef struct
{
UCHAR capabilityList[64];
} __attribute__((packed)) wifi_HS2_CapabilityList_t;
typedef struct {
unsigned char descriptor;
unsigned char key_info[2];
unsigned short key_len;
unsigned char replay[8];
unsigned char nonce[32];
unsigned char init_vector[16];
unsigned char rsc[8];
unsigned char key_id[8];
unsigned char mic[16];
unsigned short len;
unsigned char data[0];
} wifi_eapol_key_frame_t;
typedef enum {
wifi_eap_code_request = 1,
wifi_eap_code_response,
wifi_eap_code_success,
wifi_eap_code_failure,
} wifi_eap_code_t;
typedef struct {
unsigned char code;
unsigned char id;
unsigned short len;
unsigned char data[0];
} __attribute__((__packed__)) wifi_eap_frame_t;
typedef enum {
wifi_eapol_type_eap_packet,
wifi_eapol_type_eapol_start,
wifi_eapol_type_eapol_logoff,
wifi_eapol_type_eapol_key,
} wifi_eapol_type_t;
typedef struct {
unsigned char version;
unsigned char type;
unsigned short len;
unsigned char data[0];
} __attribute__((__packed__)) wifi_8021x_frame_t;
typedef enum {
wifi_direction_unknown,
wifi_direction_uplink,
wifi_direction_downlink
} wifi_direction_t;
/**
* @brief RADIUS Server information.
*
* Structure which holds the the RADIUS server settings.
*/
typedef struct _wifi_radius_setting_t
{
INT RadiusServerRetries; /**< Number of retries for Radius requests. */
INT RadiusServerRequestTimeout; /**< Radius request timeout in seconds after which the request must be retransmitted for the # of retries available. */
INT PMKLifetime; /**< Default time in seconds after which a Wi-Fi client is forced to ReAuthenticate (def 8 hrs) */
BOOL PMKCaching; /**< Enable or disable caching of PMK. */
INT PMKCacheInterval; /**< Time interval in seconds after which the PMKSA (Pairwise Master Key Security Association) cache is purged (def 5 minutes). */
INT MaxAuthenticationAttempts; /**< Indicates the # of time, a client can attempt to login with incorrect credentials. When this limit is reached, the client is blacklisted and not allowed to attempt loging into the network. Settings this parameter to 0 (zero) disables the blacklisting feature. */
INT BlacklistTableTimeout; /**< Time interval in seconds for which a client will continue to be blacklisted once it is marked so. */
INT IdentityRequestRetryInterval; /**< Time Interval in seconds between identity requests retries. A value of 0 (zero) disables it */
INT QuietPeriodAfterFailedAuthentication; /**< The enforced quiet period (time interval) in seconds following failed authentication. A value of 0 (zero) disables it. */
//UCHAR RadiusSecret[64]; //<! The secret used for handshaking with the RADIUS server [RFC2865]. When read, this parameter returns an empty string, regardless of the actual value.
} wifi_radius_setting_t;
/**
* @brief Represents the wifi scan modes.
*/
typedef enum
{
WIFI_RADIO_SCAN_MODE_NONE = 0,
WIFI_RADIO_SCAN_MODE_FULL,
WIFI_RADIO_SCAN_MODE_ONCHAN,
WIFI_RADIO_SCAN_MODE_OFFCHAN,
WIFI_RADIO_SCAN_MODE_SURVEY
} wifi_neighborScanMode_t;
/**
* @brief Eap types
*/
typedef enum {
WIFI_EAP_TYPE_NONE = 0,
WIFI_EAP_TYPE_IDENTITY = 1 /* RFC 3748 */,
WIFI_EAP_TYPE_NOTIFICATION = 2 /* RFC 3748 */,
WIFI_EAP_TYPE_NAK = 3 /* Response only, RFC 3748 */,
WIFI_EAP_TYPE_MD5 = 4, /* RFC 3748 */
WIFI_EAP_TYPE_OTP = 5 /* RFC 3748 */,
WIFI_EAP_TYPE_GTC = 6, /* RFC 3748 */
WIFI_EAP_TYPE_TLS = 13 /* RFC 2716 */,
WIFI_EAP_TYPE_LEAP = 17 /* Cisco proprietary */,
WIFI_EAP_TYPE_SIM = 18 /* RFC 4186 */,
WIFI_EAP_TYPE_TTLS = 21 /* RFC 5281 */,
WIFI_EAP_TYPE_AKA = 23 /* RFC 4187 */,
WIFI_EAP_TYPE_PEAP = 25 /* draft-josefsson-pppext-eap-tls-eap-06.txt */,
WIFI_EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */,
WIFI_EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */,
WIFI_EAP_TYPE_TNC = 38 /* TNC IF-T v1.0-r3; note: tentative assignment;
* type 38 has previously been allocated for
* EAP-HTTP Digest, (funk.com) */,
WIFI_EAP_TYPE_FAST = 43 /* RFC 4851 */,
WIFI_EAP_TYPE_PAX = 46 /* RFC 4746 */,
WIFI_EAP_TYPE_PSK = 47 /* RFC 4764 */,
WIFI_EAP_TYPE_SAKE = 48 /* RFC 4763 */,
WIFI_EAP_TYPE_IKEV2 = 49 /* RFC 5106 */,
WIFI_EAP_TYPE_AKA_PRIME = 50 /* RFC 5448 */,
WIFI_EAP_TYPE_GPSK = 51 /* RFC 5433 */,
WIFI_EAP_TYPE_PWD = 52 /* RFC 5931 */,
WIFI_EAP_TYPE_EKE = 53 /* RFC 6124 */,
WIFI_EAP_TYPE_TEAP = 55 /* RFC 7170 */,
WIFI_EAP_TYPE_EXPANDED = 254 /* RFC 3748 */
} wifi_eap_t;
/** @} */ //END OF GROUP WIFI_HAL_TYPES
/**
* @addtogroup WIFI_HAL_APIS
* @{
*/
INT wifi_getWifiTrafficStats(INT apIndex, wifi_trafficStats_t *output_struct); //!< Outputs more detailed traffic stats per AP
#ifdef WIFI_HAL_VERSION_3_PHASE2
/* wifi_getApAssociatedDevice() function */
/**
* @brief Gets the ApAssociatedDevice list for client MAC addresses
*
* @param[in] apIndex Access Point index
* @param[out] output_deviceMacAddressArray List of devices MAC, to be returned
* @param[in] maxNumDevices Max number of devices that can be returned
* @param[out] output_numDevices number of entries returned in the array
*
* @return The status of the operation
* @retval WIFI_HAL_SUCCESS if successful
* @retval Error code if any error is detected (WIFI_HAL_ERROR, WIFI_HAL_UNSUPPORTED, etc)
*
* @execution Synchronous
* @sideeffect None
*
*
*/
INT wifi_getApAssociatedDevice(INT ap_index, mac_address_t *output_deviceMacAddressArray, UINT maxNumDevices, UINT *output_numDevices);
#endif
/* wifi_factoryResetAP() function */
/**
* @brief Restore Access point paramters to default without change other AP nor Radio parameters (No need to reboot wifi)
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_factoryResetAP(int apIndex);
/* wifi_deleteAp() function */
/**
* @brief Deletes this access point entry on the hardware, clears all internal variables associated with this access point.
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_deleteAp(INT apIndex); // deletes this ap entry on the hardware, clears all internal variables associaated with this ap
/* wifi_getApName() function */
/**
* @brief Outputs a 16 byte or less name associated with the Access Point.
* String buffer must be pre-allocated by the caller.
*
* @param[in] apIndex Access Point index
* @param[out] output_string Access Point name, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApName(INT apIndex, CHAR *output_string); // Outputs a 16 byte or less name assocated with the AP. String buffer must be pre-allocated by the caller
/* wifi_setApRtsThreshold() function */
/**
* @brief Sets the packet size threshold in bytes to apply RTS/CTS backoff rules.
*
* @param[in] apIndex Access Point index
* @param[in] threshold Packet size threshold
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApRtsThreshold(INT apIndex, UINT threshold); // sets the packet size threshold in bytes to apply RTS/CTS backoff rules.
/* wifi_removeApSecVaribles() function */
/**
* @brief Deletes internal security variable settings for this access point.
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_removeApSecVaribles(INT apIndex); // deletes internal security varable settings for this ap
/* wifi_disableApEncryption() function */
/**
* @brief Changes the hardware settings to disable encryption on this access point.
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_disableApEncryption(INT apIndex); // changes the hardware settings to disable encryption on this ap
/* wifi_getApNumDevicesAssociated() function */
/**
* @brief Outputs the number of stations associated per Access Point.
*
* @param[in] apIndex Access Point index
* @param[out] output_ulong Number of stations, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApNumDevicesAssociated(INT apIndex, ULONG *output_ulong); // Outputs the number of stations associated per AP
#ifdef WIFI_HAL_VERSION_3_PHASE2
/* wifi_kickApAssociatedDevice() function */
/**
* @brief Manually removes any active wi-fi association with the device specified on this access point.
*
* @param[in] apIndex Access Point index
* @param[in] client_mac Client device MAC address
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_kickApAssociatedDevice(INT apIndex, mac_address_t client_mac); // manually removes any active wi-fi association with the device specified on this ap
#endif
/* wifi_getApRadioIndex() function */
/**
* @brief Outputs the radio index for the specified access point.
*
* @param[in] apIndex Access Point index
* @param[out] output_int Radio index, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApRadioIndex(INT apIndex, INT *output_int); // outputs the radio index for the specified ap
/* wifi_getApAclDevices() function */
/**
* @brief Get the ACL MAC list per Access Point.
*
* @param[in] apIndex Access Point index
* @param[out] macArray Mac Array list, to be returned // in formate as "11:22:33:44:55:66\n11:22:33:44:55:67\n"
* @param[in] maxArraySize Array size
* @param[out] output_numEntries size list returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
#ifdef WIFI_HAL_VERSION_3_PHASE2
INT wifi_getApAclDevices(INT apIndex, mac_address_t *macArray, UINT maxArraySize, UINT* output_numEntries); // Get the ACL MAC list per AP
#endif
/* wifi_addApAclDevice() function */
/**
* @brief Adds the mac address to the filter list.
*
* @param[in] apIndex Access Point index
* @param[in] DeviceMacAddress Mac Address of a device
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
#ifdef WIFI_HAL_VERSION_3_PHASE2
INT wifi_addApAclDevice(INT apIndex, mac_address_t DeviceMacAddress); // adds the mac address to the filter list
#endif
/**
* @brief Deletes all Device MAC address from the Access control filter list.
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
*/
INT wifi_delApAclDevices(INT apINdex);
/* wifi_getApAclDeviceNum() function */
/**
* @brief Outputs the number of devices in the filter list.
*
* @param[in] apIndex Access Point index
* @param[out] output_uint Number of devices, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApAclDeviceNum(INT apIndex, UINT *output_uint); // outputs the number of devices in the filter list
/* wifi_kickApAclAssociatedDevices() function */
/**
* @brief Enable kick for devices on acl black list.
*
* @param[in] apIndex Access Point index
* @param[in] enable Enable/disable kick for devices on acl black list
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_kickApAclAssociatedDevices(INT apIndex,BOOL enable); // enable kick for devices on acl black list
/* wifi_kickApAclAssociatedDevices() function */
/**
* @brief Enable kick for devices on acl black list.
*
* @param[in] apIndex Access Point index
* @param[in] enable Enable/disable kick for devices on acl black list
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_kickApAclAssociatedDevices(INT apIndex,BOOL enable); // enable kick for devices on acl black list
/* wifi_setApMacAddressControlMode() function */
/**
* @brief Sets the mac address filter control mode.
*
* - 0 : filter as disabled
* - 1 : filter as whitelist
* - 2 : filter as blacklist.
*
* @param[in] apIndex Access Point index
* @param[in] filterMode Mac Address filter control mode
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApMacAddressControlMode(INT apIndex, INT filterMode); // sets the mac address filter control mode. 0 == filter disabled, 1 == filter as whitelist, 2 == filter as blacklist
/**
* @brief This function is to read the ACL mode.
*
* @param[in] apIndex Access Point index
* @param[out] output_filterMode Mac Address control mode
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApMacAddressControlMode(INT apIndex, INT *output_filterMode);
/* wifi_setApVlanID() function */
/**
* @brief Sets the vlan ID for this access point to an internal environment variable.
*
* @param[in] apIndex Access Point index
* @param[in] vlanId VLAN ID
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApVlanID(INT apIndex, INT vlanId); // sets the vlan ID for this ap to an internal environment variable
/* wifi_resetApVlanCfg() function */
/**
* @brief Reset the vlan configuration for this access point.
*
* @param[in] apIndex Access Point index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_resetApVlanCfg(INT apIndex); // reset the vlan configuration for this ap
/* wifi_setApEnable() function */
/**
* @brief Sets the Access Point enable status variable for the specified access point.
*
* @param[in] apIndex Access Point index
* @param[in] enable Enable/Disable AP enable status variable
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApEnable(INT apIndex, BOOL enable); // sets the AP enable status variable for the specified ap.
/* wifi_getApEnable() function */
/**
* @brief Outputs the setting of the internal variable that is set by wifi_setEnable().
*
* @param[in] apIndex Access Point index
* @param[out] output_bool AP enable status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApEnable(INT apIndex, BOOL *output_bool); // Outputs the setting of the internal variable that is set by wifi_setEnable().
/* wifi_getApStatus() function */
/**
* @brief Outputs the AP "Enabled" "Disabled" status from driver.
*
* @param[in] apIndex Access Point index
* @param[out] output_string AP status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_getApStatus(INT apIndex, CHAR *output_string);// Outputs the AP "Enabled" "Disabled" status from driver
/* wifi_getApSsidAdvertisementEnable() function */
/**
* @brief Indicates whether or not beacons include the SSID name.
*
* Outputs 1 if SSID on the AP is enabled, else ouputs 0.
*
* @param[in] apIndex Access Point index
* @param[out] output_bool SSID Advertisement enabled, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
//Indicates whether or not beacons include the SSID name.
INT wifi_getApSsidAdvertisementEnable(INT apIndex, BOOL *output_bool);// outputs a 1 if SSID on the AP is enabled, else ouputs 0
/* wifi_setApSsidAdvertisementEnable() function */
/**
* @brief Sets an internal variable for ssid advertisement.
*
* Set to 1 to enable, set to 0 to disable.
*
* @param[in] apIndex Access Point index
* @param[in] enable SSID Advertisement enable value
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApSsidAdvertisementEnable(INT apIndex, BOOL enable); // sets an internal variable for ssid advertisement. Set to 1 to enable, set to 0 to disable
/* wifi_getApRetryLimit() function */
/**
* @brief Get the maximum number of retransmission for a packet.
*
* This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit.
*
* @param[in] apIndex Access Point index
* @param[out] output Maximum number of retransmission for a packet, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
//The maximum number of retransmission for a packet. This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit.
INT wifi_getApRetryLimit(INT apIndex, UINT *output);
/* wifi_setApRetryLimit() function */
/**
* @brief Set the maximum number of retransmission for a packet.
*
* This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit.
*
* @param[in] apIndex Access Point index
* @param[in] number Maximum number of retransmission for a packet
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApRetryLimit(INT apIndex, UINT number);
/* wifi_getApWmmEnable() function */
/**
* @brief Indicates whether WMM support is currently enabled.
*
* When enabled, this is indicated in beacon frames.
*
* @param[in] apIndex Access Point index
* @param[out] output WMM support enabled status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
//Whether WMM support is currently enabled. When enabled, this is indicated in beacon frames.
INT wifi_getApWmmEnable(INT apIndex, BOOL *output);
/* wifi_setApWmmEnable() function */
/**
* @brief Enables/disables WMM on the hardwawre for this AP. enable==1, disable == 0.
*
* @param[in] apIndex Access Point index
* @param[in] enable WMM support enabled status
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_setApWmmEnable(INT apIndex, BOOL enable); // enables/disables WMM on the hardwawre for this AP. enable==1, disable == 0
/* wifi_getApWmmUapsdEnable() function */
/**