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_deprecated.h
3835 lines (3575 loc) · 141 KB
/
wifi_hal_deprecated.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_DEPRECATED_H__
#define __WIFI_HAL_DEPRECATED_H__
#ifdef __cplusplus
extern "C"{
#endif
typedef struct _wifi_basicTrafficStats
{
ULONG wifi_BytesSent;
ULONG wifi_BytesReceived;
ULONG wifi_PacketsSent;
ULONG wifi_PacketsReceived;
ULONG wifi_Associations;
} wifi_basicTrafficStats_t;
typedef struct _wifi_radioTrafficStats
{
ULONG wifi_ErrorsSent;
ULONG wifi_ErrorsReceived;
ULONG wifi_DiscardPacketsSent;
ULONG wifi_DiscardPacketsReceived;
ULONG wifi_PLCPErrorCount;
ULONG wifi_FCSErrorCount;
ULONG wifi_InvalidMACCount;
ULONG wifi_PacketsOtherReceived;
INT wifi_Noise;
} wifi_radioTrafficStats_t;
typedef struct _wifi_ssidTrafficStats
{
ULONG wifi_RetransCount;
ULONG wifi_FailedRetransCount;
ULONG wifi_RetryCount;
ULONG wifi_MultipleRetryCount;
ULONG wifi_ACKFailureCount;
ULONG wifi_AggregatedPacketCount;
} wifi_ssidTrafficStats_t;
typedef struct _wifi_neighbor_ap
{
CHAR ap_Radio[64];
CHAR ap_SSID[64];
CHAR ap_BSSID[64];
CHAR ap_Mode[64];
UINT ap_Channel;
INT ap_SignalStrength;
CHAR ap_SecurityModeEnabled[64];
CHAR ap_EncryptionMode[64];
CHAR ap_OperatingFrequencyBand[16];
CHAR ap_SupportedStandards[64];
CHAR ap_OperatingStandards[16];
CHAR ap_OperatingChannelBandwidth[16];
UINT ap_BeaconPeriod;
INT ap_Noise;
CHAR ap_BasicDataTransferRates[256];
CHAR ap_SupportedDataTransferRates[256];
UINT ap_DTIMPeriod;
UINT ap_ChannelUtilization;
} wifi_neighbor_ap_t;
//<<
typedef struct _wifi_diag_ipping_setting
{
CHAR ipping_Interface[256]; /**< The value MUST be the path name of a row in the IP.Interface table. The IP-layer interface over which the test is to be performed. This identifies the source IP address to use when performing the test. Example: Device.IP.Interface.1. If an empty string is specified, the CPE MUST use the interface as directed by its routing policy (Forwarding table entries) to determine the appropriate interface. */
CHAR ipping_Host[256]; /**< Host name or address of the host to ping. In the case where Host is specified by name, and the name resolves to more than one address, it is up to the device implementation to choose which address to use. */
UINT ipping_NumberOfRepetitions; /**< Number of repetitions of the ping test to perform before reporting the results. */
UINT ipping_Timeout; /**< Timeout in milliseconds for the ping test. */
UINT ipping_DataBlockSize; /**< Size of the data block in bytes to be sent for each ping. */
UINT ipping_DSCP; /**< DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero. */
} wifi_diag_ipping_setting_t;
typedef struct _wifi_diag_ipping_result
{
CHAR ipping_DiagnosticsState[64]; /**< Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName, Error_Internal, Error_Other */
UINT ipping_SuccessCount; /**< Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test. */
UINT ipping_FailureCount; /**< Result parameter indicating the number of failed pings in the most recent ping test. */
UINT ipping_AverageResponseTime; /**< Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
UINT ipping_MinimumResponseTime; /**< Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
UINT ipping_MaximumResponseTime; /**< Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
} wifi_diag_ipping_result_t;
//----------------ASSO. DEV-------------------------------------------
//>> Deprecated: used for old RDKB code.
typedef struct _wifi_device
{
UCHAR wifi_devMacAddress[6];
CHAR wifi_devIPAddress[64];
BOOL wifi_devAssociatedDeviceAuthentiationState;
INT wifi_devSignalStrength;
INT wifi_devTxRate;
INT wifi_devRxRate;
} wifi_device_t;
//<<
typedef struct athstat_results{
u_int32_t rtx_total;
u_int32_t tx_total;
u_int32_t rx_total;
u_int32_t rx_own;
u_int32_t d_rx_t; // delta rx_total
u_int32_t d_rx_o; // delta rx_own
} athstat_results_t;
typedef enum
{
WIFI_CSA_DEAUTH_MODE_NONE = 0,
WIFI_CSA_DEAUTH_MODE_UCAST,
WIFI_CSA_DEAUTH_MODE_BCAST
} wifi_csaDeauthMode_t;
typedef enum
{
WIFI_SCANFILTER_MODE_DISABLED = 0,
WIFI_SCANFILTER_MODE_ENABLED,
WIFI_SCANFILTER_MODE_FIRST
} wifi_scanFilterMode_t;
typedef enum
{
WIFI_MAC_ACL_MODE_DISABLED = 0,
WIFI_MAC_ACL_MODE_WHITELIST = 1,
WIFI_MAC_ACL_MODE_BLACKLIST = 2
} wifi_macAclMode_t;
// The pulling function to retrieve the existing authenticated device Mac for specified VAP
typedef struct _mac_t {
unsigned char byte[6];
} mac_t;
typedef struct _wifi_channelStats2 {
UINT ch_Frequency; /**< Current primary channel centre frequency */
INT ch_NoiseFloor; /**< Current noise floor on channel */
INT ch_Non80211Noise; /**< Current non 802.11 noise on channel */
INT ch_Max80211Rssi; /**< Max RSSI from the neighbor AP in dbm on this channel */
UINT ch_ObssUtil; /**< Other bss utilization for last interval */
UINT ch_SelfBssUtil; /**< Self bss utilization for last interval */
} wifi_channelStats2_t;
typedef struct _wifi_channelMetrics {
INT channel_number; /**< Each channel is only 20MHz bandwidth */
BOOL channel_in_pool; /**< If channel_in_pool is false, driver do not need to scan this channel */
INT channel_noise; /**< This is used to return the average noise floor in dbm */
BOOL channel_radar_noise; /**< If channel_number is in DFS channel, this is used to return if radar signal is present on DFS channel (5G only) */
INT channel_non_80211_noise; /**< Average non 802.11 noise */
INT channel_utilization; /**< This is used to return the 802.11 utilization in percent */
INT channel_txpower; /**< This is used to return the current txpower in dbm on this channel */
wifi_apRssi_t channel_rssi_list[64]; /**< RSSI list from the neighbor AP on this channel. The list should be sorted descendly based on ap_rssi. If there are more than 64 AP on this channel, return first 64. */
UINT channel_rssi_count; /**< RSSI counter in channel_rssi_list */
} wifi_channelMetrics_t;
typedef struct _wifi_radioTrafficStatsMeasure
{
INT radio_RadioStatisticsMeasuringRate; /**< Input //"The rate at which radio related statistics are periodically collected. Only statistics that explicitly indicate the use of this parameter MUST use the rate set in this parameter Other parameter's are assumed to collect data in real-time or nearly real-time. Default value is 30 seconds. This parameter MUST be persistent across reboots. If this parameter is changed, then use of the new rate MUST be deferred until the start of the next interval and all metrics using this rate MUST return -1 until the completion of the next full interval Units in Seconds" */
INT radio_RadioStatisticsMeasuringInterval; /**< Input //The interval for which radio data MUST be retained in order and at the end of which appropriate calculations are executed and reflected in the associated radio object's. Only statistics that explicitly indicate the use of this parameter MUST use the interval set in this parameter Default value is 30 minutes. This parameter MUST be persistent across reboots. If this item is modified, then all metrics leveraging this interval as well as the metrics "Total number 802.11 packet of TX" and "Total number 802.11 packet of RX" MUST be re-initialized immediately. Additionally, the "Statistics Start Time" must be reset to the current time. Units in Seconds */
} wifi_radioTrafficStatsMeasure_t; //for radio only
//---------------------------------------------------------------------------------------------------
INT wifi_getTWTParams(CHAR *sta, wifi_twt_params_t *twt_params);
INT wifi_setBSSColorEnabled (INT apIndex, BOOL enabled);
INT wifi_getBSSColorEnabled(INT apIndex, BOOL *enabled);
INT wifi_getRadioChannelStats2(INT radioIndex, wifi_channelStats2_t *outputChannelStats2);
/* wifi_getHalVersion() function */
/**
* @brief Get the wifi hal version in string.
*
* Eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION
*
* @param[out] output_string WiFi Hal version to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @sideeffect None
*/
//Wifi system api
//Get the wifi hal version in string, eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION
INT wifi_getHalVersion(CHAR *output_string);
/* wifi_getRadioCountryCode() function */
/**
* @brief Outputs the country code to a max 64 character string
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Country code 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_getRadioCountryCode(INT radioIndex, CHAR *output_string);
/* wifi_setRadioCountryCode() function */
/**
* @brief Set the country code for selected Wi-Fi radio channel.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] CountryCode Country code
*
* @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_setRadioCountryCode(INT radioIndex, CHAR *CountryCode);
/* wifi_pushCountryCode() function */
/**
* @brief Set the country code for both wifi radios and apply them. wifi reset automatically if necessary.
* The function need to return immediately.
*
* @param[in] CountryCode Country code
*
* @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_pushCountryCode(CHAR *CountryCode);
typedef struct _wifi_associated_dev2
{
mac_address_t cli_MACAddress; /**< The MAC address of an associated device. */
CHAR cli_IPAddress[64]; /**< IP of the associated device */
BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */
UINT cli_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the associated device. */
UINT cli_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the associated device to the access point. */
INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */
UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */
BOOL cli_Active; /**< boolean-Whether or not this node is currently present in the WiFi AccessPoint network. */
CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */
CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */
INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */
CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */
ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */
ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */
INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */
INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */
INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */
UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */
UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */
ULLONG cli_Associations; /**< Stats handle used to determine reconnects; increases for every association (stat delta calcualtion) */
} wifi_associated_dev2_t;
typedef enum
{
WIFI_RADIO_QUEUE_TYPE_VI = 0,
WIFI_RADIO_QUEUE_TYPE_VO,
WIFI_RADIO_QUEUE_TYPE_BE,
WIFI_RADIO_QUEUE_TYPE_BK,
WIFI_RADIO_QUEUE_TYPE_CAB,
WIFI_RADIO_QUEUE_TYPE_BCN,
WIFI_RADIO_QUEUE_MAX_QTY,
WIFI_RADIO_QUEUE_TYPE_NONE = -1
} wifi_radioQueueType_t;
// Structure to return BTM extended capability from devices on the LAN.
// The peer and capability arrays are parallel
// and have the same number of entries.
typedef struct {
UINT entries; /**< Number of entries in each of the following arrays. */
mac_address_t peer[MAX_BTM_DEVICES]; /**< Array a peer device MAC addresses. */
BOOL capability[MAX_BTM_DEVICES]; /**< Array of bool indicating peer BSS transition capability. */
} wifi_BTMCapabilities_t;
//---------------------------------------------------------------------------------------------------
// Air Time Management HAL.
//---------------------------------------------------------------------------------------------------
/**
* @brief Get the ATM(Air Time Management) Capable.
*
* @param[out] output_bool Indication as to whether Air Time Management is supported.
*
* @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_getATMCapable(BOOL *output_bool);
/**
* @brief Set ATM Enable.
*
* The type of algorithm to apply across the configured Access Points and/or clients;
*
* @param[in] enable Boolean value to set/unset ATM.
* False indicates Disabled
True indicates Dynamic (Sharing of unused Airtime Between AP Groups allowed)
*
* @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_setATMEnable(BOOL enable);
/**
* @brief Get ATM Enable status.
*
* @param[out] output_enable Returns the ATM enable 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_getATMEnable(BOOL *output_enable);
/**
* @brief Set Access Point Air Time Percent.
*
* @param[in] apIndex Index of Access Point array.
* @param[in] ap_AirTimePercent The Percentage of Available Airtime assigned to this ATM Access Point Group (5%-100%)
* The sum of all percentages assigned to all groups must be <= 100%"
*
* @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_setApATMAirTimePercent(INT apIndex, UINT ap_AirTimePercent);
/**
* @brief Get Ap Air Time Percent.
*
* @param[in] apIndex The index of Access Point array.
* @param[out] output_ap_AirTimePercent The Percentage of Available Airtime assigned to this
* ATM Access Point Group (5%-100%)
*
* @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_getApATMAirTimePercent(INT apIndex, UINT *output_ap_AirTimePercent);
/**
* @brief Get the list for Air Time Percent for each Station.
*
* @param[in] apIndex The index of Access Point array.
* @param[out] output_sta_MAC_ATM_array Caller allocated buffer.
* output_sta_MAC_ATM_array contains the atm array in format
* of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent"
* @param[out] buf_size The size for output_sta_MAC_ATM_array
*
* @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_getApATMSta(INT apIndex, UCHAR *output_sta_MAC_ATM_array, UINT buf_size); //output_sta_MAC_ATM_array contains the atm array in format of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent"
//buf_size is the size for output_sta_MAC_ATM_array
/* wifi_getRadioNumberOfEntries() function */
/**
* @brief Get the total number of radios in this wifi subsystem.
*
* @param[out] output Total number of radios 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.
*
*/
//Get the total number of radios in this wifi subsystem
INT wifi_getRadioNumberOfEntries(ULONG *output);
/* wifi_getSSIDNumberOfEntries() function */
/**
* @brief Get the total number of SSID entries in this wifi subsystem.
*
* @param[out] output Total number of SSID entries 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.
*
*/
//Get the total number of SSID entries in this wifi subsystem
INT wifi_getSSIDNumberOfEntries(ULONG *output);
/**
* @brief Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Maximum bit rate supported, 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.
*
*/
//Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string);
/* wifi_getRadioSupportedFrequencyBands() function */
/**
* @brief Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Supported frequency bands, 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.
*
*/
//Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioSupportedFrequencyBands(INT radioIndex, CHAR *output_string);
/* wifi_getRadioOperatingFrequencyBand() function */
/**
* @brief Get the frequency band at which the radio is operating, eg: "2.4GHz".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Operating frequency band, 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.
*
*/
//Get the frequency band at which the radio is operating, eg: "2.4GHz"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioOperatingFrequencyBand(INT radioIndex, CHAR *output_string);
/* wifi_getRadioSupportedStandards() function */
/**
* @brief Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Supported radio mode, 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.
*
*/
//Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string);
/** Deprecated: used for old RDKB code. **/
/* wifi_getRadioStandard() function */
/**
* @brief Get the radio operating mode, and pure mode flag. eg: "ac".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Radio operating mode, to be returned
* @param[out] gOnly Boolean pointer variable need to be updated based on the "output_string"
* @param[out] nOnly Boolean pointer variable need to be updated based on the "output_string"
* @param[out] acOnly Boolean pointer variable need to be updated based on the "output_string"
*
* @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.
*
*/
//Get the radio operating mode, and pure mode flag. eg: "ac"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly);
/* wifi_getRadioMode() function */
/**
* @brief Get the radio operating mode, and pure mode flag. eg: "ac".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Radio operating mode, to be returned
* @param[out] pureMode Pointer to pure mode bit map starting from LSB b only, g only, a only,
* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32
*
* @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.
*
*/
//Get the radio operating mode, and pure mode flag. eg: "ac"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioMode(INT radioIndex, CHAR *output_string, UINT *pureMode);
/** Deprecated: used for old RDKB code. **/
/* wifi_setRadioChannelMode() function */
/**
* @brief Set the radio operating mode, and pure mode flag.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channelMode Pass the channelMode for specified radio index
* @param[in] gOnlyFlag Pass operating mode flag for setting pure mode flag
* @param[in] nOnlyFlag Pass operating mode flag for setting pure mode flag
* @param[in] acOnlyFlag Pass operating mode flag for setting pure mode flag
*
* @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.
*
*/
//Set the radio operating mode, and pure mode flag.
INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag);
/* wifi_setRadioMode() function */
/**
* @brief Set the radio operating mode, and pure mode flag.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channelMode Pass the channelMode for specified radio index
* @param[in] pureMode Pass flag for setting pure mode bit map starting from LSB b only, g only, a only,
* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32
*
* @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.
*
*/
//Set the radio operating mode, and pure mode flag.
INT wifi_setRadioMode(INT radioIndex, CHAR *channelMode, UINT pureMode);
/* wifi_getRadioPossibleChannels() function */
/**
* @brief Get the list of supported channel. eg: "1-11".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string List of supported radio channels, 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.
*
*/
//Get the list of supported channel. eg: "1-11"
//The output_string is a max length 128 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string);
#ifndef WIFI_HAL_VERSION_3_PHASE2
/* wifi_getRadioChannelsInUse() function */
/**
* @brief Get the list of supported channel. eg: "1-11".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string List of supported radio channels, 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.
*
*/
//Get the list for used channel. eg: "1,6,9,11"
//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string);
#endif
/* wifi_getRadioChannel() function */
/**
* @brief Get the running channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Running channel number, 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_getRadioChannel(INT radioIndex,ULONG *output_ulong);
/* wifi_setRadioChannel() function */
/**
* @brief Set the running channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channel Channel number to be set as running wifi radio channel
*
* @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_setRadioChannel(INT radioIndex, ULONG channel); //AP only
/* wifi_setRadioAutoChannelEnable() function */
/**
* @brief Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio.
*
* This "auto channel" means the auto channel selection when radio is up.
* (which is different from the dynamic channel/frequency selection (DFC/DCS))
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Enable/Disable selected radio channel as auto channel radio
*
* @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.
*
*/
//Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio
//This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS))
INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable);
/* wifi_getRadioAutoChannelSupported() function */
/**
* @brief Check if the driver support the AutoChannel.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Value of Auto Channel Supported, 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.
*
*/
//Check if the driver support the AutoChannel
INT wifi_getRadioAutoChannelSupported(INT radioIndex, BOOL *output_bool);
/* wifi_getRadioAutoChannelEnable() function */
/**
* @brief Get the AutoChannel enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Auto Channel 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.
*
*/
//Get the AutoChannel enable status
INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool);
/* wifi_getRadioDCSSupported() function */
/**
* @brief Check if the driver support the DCS.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool DCS Supported flag for the 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.
*
*/
//Check if the driver support the DCS
INT wifi_getRadioDCSSupported(INT radioIndex, BOOL *output_bool);
/* wifi_getRadioDCSEnable() function */
/**
* @brief Get DCS of the selected wifi radio channel's enable/disable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool DCS Enable flag for the selected 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_getRadioDCSEnable(INT radioIndex, BOOL *output_bool);
/* wifi_setRadioDCSEnable() function */
/**
* @brief Enable/Disable selected wifi radio channel's DCS.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] enable Set the value of DCS Enable flag for the selected radio 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_setRadioDCSEnable(INT radioIndex, BOOL enable);
/* wifi_getRadioDCSChannelPool() function */
/**
* @brief Get radio DCS channel pool.
*
* The output_string is a max length 256 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
* The value of this parameter is a comma seperated list of channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_pool DCS channel pool for the selected 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.
*
*/
//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
//The value of this parameter is a comma seperated list of channel number
INT wifi_getRadioDCSChannelPool(INT radioIndex, CHAR *output_pool);
/* wifi_setRadioDCSChannelPool() function */
/**
* @brief Set radio DCS channel pool.
*
* The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
* The value of this parameter is a comma seperated list of channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] pool Set DCS channel pool for the selected radio 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_setRadioDCSChannelPool(INT radioIndex, CHAR *pool);
/* wifi_getRadioDCSScanTime() function */
/**
* @brief Get radio DCS scan time.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_interval_seconds Get the interval time in seconds
* @param[out] output_dwell_milliseconds Get the dwell time in milliseconds
*
* @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_getRadioDCSScanTime(INT radioIndex, INT *output_interval_seconds, INT *output_dwell_milliseconds);
/* wifi_setRadioDCSScanTime() function */
/**
* @brief Set radio DCS scan time.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] interval_seconds Set the interval time in seconds
* @param[in] dwell_milliseconds Set the dwell time in milliseconds
*
* @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