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_radio.h
1027 lines (952 loc) · 34 KB
/
wifi_hal_radio.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_RADIO_H__
#define __WIFI_HAL_RADIO_H__
#ifdef __cplusplus
extern "C"{
#endif
/**
* @addtogroup WIFI_HAL_TYPES
* @{
*/
/**
* @brief Guard intervals types
*/
typedef enum {
wifi_guard_interval_400 = 0x01,
wifi_guard_interval_800 = 0x02,
wifi_guard_interval_1600 = 0x04,
wifi_guard_interval_3200 = 0x08,
wifi_guard_interval_auto = 0x10,
} wifi_guard_interval_t;
#define MAXNUMSECONDARYCHANNELS 7
typedef enum {
WIFI_EVENT_RADAR_DETECTED,
WIFI_EVENT_RADAR_CAC_FINISHED,
WIFI_EVENT_RADAR_CAC_ABORTED,
WIFI_EVENT_RADAR_NOP_FINISHED,
WIFI_EVENT_RADAR_PRE_CAC_EXPIRED,
WIFI_EVENT_RADAR_CAC_STARTED
} wifi_radar_eventType_t;
typedef enum {
CHAN_STATE_AVAILABLE = 1,
CHAN_STATE_DFS_NOP_FINISHED,
CHAN_STATE_DFS_NOP_START,
CHAN_STATE_DFS_CAC_START,
CHAN_STATE_DFS_CAC_COMPLETED
} wifi_channelState_t;
typedef struct _wifi_channelMap_t {
INT ch_number;
wifi_channelState_t ch_state;
} wifi_channelMap_t;
/**
* @brief Wifi Radio Operation Parameters
*/
typedef struct {
BOOL enable; /**< The radio enable. */
wifi_freq_bands_t band; /**< the radio frequency band. */
BOOL autoChannelEnabled; /**< set bAutoChannelEnabled to TRUE to enable Auto Channel. */
UINT op_class; /**< The Operating class. */
UINT channel; /**< The radio primary channel. */
UINT numSecondaryChannels; /**< The number odf secondary channels in the list */
UINT channelSecondary[MAXNUMSECONDARYCHANNELS]; /**< The List of secondary radio channel. */
wifi_channelBandwidth_t channelWidth; /**< The channel bandwidth. */
wifi_ieee80211Variant_t variant; /**< The radio operating mode */
UINT csa_beacon_count; /**< Specifies how long CSA need to be announced. */
wifi_countrycode_type_t countryCode; /**< The country code. */
wifi_operating_env_t operatingEnvironment; /**< The wifi Operating environment */
wifi_channelMap_t channel_map[64];
BOOL DCSEnabled; /**< set DCSEnabled to TRUE to enable DCS. */
UINT dtimPeriod; /**< The DTIM period. */
UINT beaconInterval; /**< The beacon interval. */
UINT operatingClass; /**< The Operating class. */
UINT basicDataTransmitRates; /**< The basic data transmit rates in Mbps. It uses bitmask to return multiples bitrates and wifi_bitrate_t has the definition of valid values*/
UINT operationalDataTransmitRates; /**< The operational data transmit rates in Mbps. It uses bitmask to return multiples bitrates and wifi_bitrate_t has the definition of valid values*/
UINT fragmentationThreshold; /**< The fragmentation threshold in bytes. */
wifi_guard_interval_t guardInterval; /**< The guard interval. */
UINT transmitPower; /**< The transmit power in percentage, eg "75", "100". */
UINT rtsThreshold; /**< The packet size threshold in bytes to apply RTS/CTS backoff rules. */
BOOL factoryResetSsid;
UINT radioStatsMeasuringRate;
UINT radioStatsMeasuringInterval;
BOOL ctsProtection;
BOOL obssCoex;
BOOL stbcEnable;
BOOL greenFieldEnable;
UINT userControl;
UINT adminControl;
UINT chanUtilThreshold;
BOOL chanUtilSelfHealEnable;
BOOL DfsEnabled;
BOOL DfsEnabledBootup;
} __attribute__((packed)) wifi_radio_operationParam_t;
/**
* @brief Enhanced Distributed Channel Access parameters
*/
typedef struct {
CHAR aifsn; /**< Arbitration Inter-Frame Space Number */
CHAR cw_min; /**< Lower bound Contention Window. */
CHAR cw_max; /**< Upper bound Contention Window. */
CHAR timer; /**< */
} wifi_edca_t;
typedef enum {
wifi_dl_data_ack_immediate,
wifi_dl_data_block_ack_immediate,
wifi_dl_data_block_ack_deferred,
} wifi_dl_data_ack_type_t;
/** @} */ //END OF GROUP WIFI_HAL_TYPES
/**
* @addtogroup WIFI_HAL_APIS
* @{
*/
/* wifi_getRadioResetCount() function */
/**
* @brief Get the radio reset count.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_int Reset count, 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_getRadioResetCount(INT radioIndex, ULONG *output_int);
/* wifi_factoryResetRadios() function */
/**
* @brief Restore all radio parameters without touching access point parameters.
*
* A Specific implementation may dictate some functionalities since different hardware implementations
* may have different requirements.
*
* @param None
*
* @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.
*
*/
//Restore all radio parameters without touch access point parameters
INT wifi_factoryResetRadios();
/* wifi_factoryResetRadio() function */
/**
* @brief Restore selected radio parameters without touching access point parameters.
*
* @param radioIndex Index of Wi-Fi 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.
*
*/
//Restore selected radio parameters without touch access point parameters
INT wifi_factoryResetRadio(int radioIndex);
/* wifi_getRadioEnable() function */
/**
* @brief Get the Radio enable config parameter.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Radio 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.
*
*/
//Get the Radio enable config parameter
INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool);
/* wifi_setRadioEnable() function */
/**
* @brief Set the Radio enable config parameter.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set the selected radio's status as Enable/Disable
*
* @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 enable config parameter
INT wifi_setRadioEnable(INT radioIndex, BOOL enable);
/* wifi_getRadioStatus() function */
/**
* @brief Get the Radio enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Selected radio's 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.
*
*/
//Get the Radio enable status
INT wifi_getRadioStatus(INT radioIndex, BOOL *output_bool);
/* wifi_getRadioIfName() function */
/**
* @brief Get the Radio Interface name from platform, eg "wifi0".
*
* @param radioIndex Index of Wi-Fi radio channel
* @param output_string Interface 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.
*
*/
//Get the Radio Interface name from platform, eg "wifi0"
INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string);
#ifdef 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] channel_list List of supported radio channels, to be returned
*
* @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
*
* @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(wifi_radio_index_t radioIndex, wifi_channels_list_t* channel_list);
#endif
/* wifi_getRadioDfsEnable() function */
/**
* @brief Get the Dfs enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Get DFS Enable status of the selected 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_getRadioDfsEnable(INT radioIndex, BOOL *output_bool);
/* wifi_setRadioDfsEnable() function */
/**
* @brief Set the Dfs enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set DFS Enable status of the selected 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_setRadioDfsEnable(INT radioIndex, BOOL enabled);
/* wifi_getRadioDfsAtBootUpEnable() function */
/**
* @brief Get the Dfs enable on Bootup status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] enable Get DFS Enable on bootup status of the selected 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_getRadioDfsAtBootUpEnable(INT radioIndex, BOOL *enable);
/* wifi_setRadioDfsAtBootUpEnable() function */
/**
* @brief Set the Dfs enable on Bootup status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set DFS Enable on Bootup status of the selected 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_setRadioDfsAtBootUpEnable(INT radioIndex, BOOL enable);
/* wifi_getRadioMCS() function */
/**
* @brief Get the Modulation Coding Scheme index, eg: "-1", "1", "15".
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_INT Modulation Coding Scheme 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_getRadioMCS(INT radioIndex, INT *output_INT);
/* wifi_setRadioMCS() function */
/**
* @brief Set the Modulation Coding Scheme index, eg: "-1", "1", "15".
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] MCS Modulation Coding Scheme index 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_setRadioMCS(INT radioIndex, INT MCS);
/* wifi_getRadioTransmitPower() function */
/**
* @brief Get current Transmit Power in dBm units.
*
* The transmit power value is in dBm units of full power for this radio.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Current Transmit power value, 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_getRadioTransmitPower(INT radioIndex, ULONG *output_ulong);
/* wifi_getRadioPercentageTransmitPower() function E.g : "75" "100"*/
/**
* @brief Get current Transmit Power level in units of full power.
*
* The transmit power is a percentage value of full power for this radio.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Current Transmit power percentage value, 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_getRadioPercentageTransmitPower(INT radioIndex, ULONG *output_ulong);
/* wifi_setRadioTransmitPower() function */
/**
* @brief Set current Transmit Power, eg "75", "100".
*
* The transmit power level is in units of full power for this radio.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] TransmitPower Transmit power 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_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower);
/* wifi_getRadioCarrierSenseThresholdRange() function */
/**
* @brief Indicates the Carrier Sense ranges supported by the radio.
*
* It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Carrier sense threshold range, 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_getRadioCarrierSenseThresholdRange(INT radioIndex, INT *output); //P3
/* wifi_getRadioCarrierSenseThresholdInUse() function */
/**
* @brief The RSSI signal level at which CS/CCA detects a busy condition.
*
* This attribute enables Access Points to increase minimum sensitivity to avoid detecting busy condition
* from multiple/weak Wi-Fi sources in dense Wi-Fi environments.
* It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Carrier sense threshold in use, 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_getRadioCarrierSenseThresholdInUse(INT radioIndex, INT *output); //P3
/* wifi_setRadioCarrierSenseThresholdInUse() function */
/**
* @brief Set Carrier sense threshold in use for the selected radio index.
*
* The RSSI signal level at which CS/CCA detects a busy condition.
* This attribute enables Access Point to increase minimum sensitivity to avoid detecting busy condition
* from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] threshold Carrier sense threshold, 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_setRadioCarrierSenseThresholdInUse(INT radioIndex, INT threshold); //P3
//-----------------------------------------------------------------------------------------------------
/* wifi_applyRadioSettings() function */
/**
* @brief This API is used to apply (push) all previously set radio level variables and make these settings active in the hardware.
*
* Not all implementations may need this function.
* If not needed for a particular implementation simply return no-error (0).
*
* @param[in] radioIndex Index of Wi-Fi 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_applyRadioSettings(INT radioIndex);
/* wifi_setRadioCtsProtectionEnable() function */
/**
* @brief Enables CTS protection for the radio used by this Access Point.
*
* @param[in] apIndex Access Point index
* @param[in] enable CTS protection 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_setRadioCtsProtectionEnable(INT apIndex, BOOL enable); //P3
/* wifi_setRadioObssCoexistenceEnable() function */
/**
* @brief Enables OBSS Coexistence - fall back to 20MHz if necessary for the radio used by this AP.
*
* @param[in] apIndex Access Point index
* @param[in] enable OBSS Coexistence 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_setRadioObssCoexistenceEnable(INT apIndex, BOOL enable);
/* wifi_setRadioFragmentationThreshold() function */
/**
* @brief Sets the fragmentation threshold in bytes for the radio used by this Access Point.
*
* @param[in] apIndex Access Point index
* @param[in] threshold Fragmentation Threshold 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_setRadioFragmentationThreshold(INT apIndex, UINT threshold); //P3
/* wifi_setRadioSTBCEnable() function */
/**
* @brief Enable STBC mode in the hardware.
* 0 == not enabled, 1 == enabled.
*
* @param[in] radioIndex Radio index
* @param[in] STBC_Enable STBC mode 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_setRadioSTBCEnable(INT radioIndex, BOOL STBC_Enable);
/* wifi_getRadioAMSDUEnable() function */
/**
* @brief Outputs A-MSDU enable status, 0 == not enabled, 1 == enabled.
*
* @param[in] radioIndex Radio index
* @param[out] output_bool A-MSDU 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_getRadioAMSDUEnable(INT radioIndex, BOOL *output_bool);
/* wifi_setRadioAMSDUEnable() function */
/**
* @brief Enables A-MSDU in the hardware, 0 == not enabled, 1 == enabled.
*
* @param[in] radioIndex Radio index
* @param[out] amsduEnable A-MSDU enable status 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_setRadioAMSDUEnable(INT radioIndex, BOOL amsduEnable);
/* wifi_getRadioUpTime() function */
/**
* @brief Get the number of seconds elapsed since radio is started.
*
* @param[in] radioIndex Radio index
* @param[in] uptime Wifi uptime, 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_getRadioUpTime(INT radioIndex, ULONG *uptime); // get the number of seconds elapsed since radio is started
/* wifi_getRadioReverseDirectionGrantSupported() function */
/**
* @brief Get radio RDG enable Support.
*
* @param[in] radioIndex Radio index
* @param[out] output_bool RDG enable support value, 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_getRadioReverseDirectionGrantSupported(INT radioIndex, BOOL *output_bool); //Get radio RDG enable Support
/* wifi_getRadioAutoBlockAckEnable() function */
/**
* @brief Get radio auto block ack enable setting.
*
* @param[in] radioIndex Radio index
* @param[out] output_bool Auto block ack enable setting value, 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_getRadioAutoBlockAckEnable(INT radioIndex, BOOL *output_bool); //Get radio auto block ack enable setting
/* wifi_setRadioAutoBlockAckEnable() function */
/**
* @brief Set radio auto block ack enable setting.
*
* @param[in] radioIndex Radio index
* @param[in] enable Auto block ack enable setting 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_setRadioAutoBlockAckEnable(INT radioIndex, BOOL enable); //Set radio auto block ack enable setting
/* wifi_getRadioIGMPSnoopingEnable() function */
/**
* @brief Get radio IGMP snooping enable setting.
*
* @param[in] radioIndex Radio index
* @param[out] output_bool Radio IGMP snooping enable setting, 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_getRadioIGMPSnoopingEnable(INT radioIndex, BOOL *output_bool); //Get radio IGMP snooping enable setting
/* wifi_setRadioIGMPSnoopingEnable() function */
/**
* @brief Set radio IGMP snooping enable setting.
*
* @param[in] radioIndex Radio index
* @param[out] enable Radio IGMP snooping enable setting
*
* @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_setRadioIGMPSnoopingEnable(INT radioIndex, BOOL enable); //Set radio IGMP snooping enable setting
/**
* @brief Set Zero DFS State
*
* The Zero DFS feature can be enabled or disabled. For EU countries
* the "Pre-CAC" can be also set. If the "Pre-CAC" is set, then
* after passing background CAC driver can start background CAC
* on the next channel.
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[in] enabled True if ZeroDFS must be enabled, false otherwise.
* @param[in] precac Valid only for EU regulatory domain. If set,
* after passing requested backgronund CAN, driver
* can start background CAC on the next channel.
*
* @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_setZeroDFSState(UINT radioIndex, BOOL enable, BOOL precac);
/**
* @brief Get Zero DFS State
*
* The Zero DFS feature can be enabled or disabled. For EU countries
* the "Pre-CAC" can be also set. If the "Pre-CAC" is set, then
* after passing background CAC driver can start background CAC
* on next channel.
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[out] enabled True if ZeroDFS is enabled, false otherwise.
* @param[out] precac Valid only for EU regulatory domain. If true,
* then driver can start background CAC on
* the next channel.
*
* @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_getZeroDFSState(UINT radioIndex, BOOL *enable, BOOL *precac);
/* 802.11ax HAL API prototypes */
INT wifi_setDownlinkMuType(INT radio_index, wifi_dl_mu_type_t mu_type);
INT wifi_getDownlinkMuType(INT radio_index, wifi_dl_mu_type_t *mu_type);
INT wifi_setUplinkMuType(INT radio_index, wifi_ul_mu_type_t mu_type);
INT wifi_getUplinkMuType(INT radio_index, wifi_ul_mu_type_t *mu_type);
INT wifi_setGuardInterval(INT radio_index, wifi_guard_interval_t guard_interval);
INT wifi_getGuardInterval(INT radio_index, wifi_guard_interval_t *guard_interval);
INT wifi_setBSSColor(INT radio_index, UCHAR color);
INT wifi_getBSSColor(INT radio_index, UCHAR *color);
/**
* @brief Get the list of avaiable BSS color
*
* This API return a list of availables BSS color that can be used to
* to configure the radio using wifi_setBSSColor API.
* This list should be created based on neighbours BSS color and
* the station reports.
*
* @param[in] radio_index Index of Wi-Fi radio
* @param[in] maxNumberColors Maximum number of color that can be
retuned
* @param[out] colorList The list of avaiable BSS color
* @param[out] numColorReturned Number of color returned in the list
*
* @return The status of the operation
* @retval WIFI_HAL_SUCCESS if successful
* @retval WIFI_HAL_ERROR if an generic error is detected
* @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected
* @retval WIFI_HAL_UNSUPPORTED if the API is not supported
* @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid
* @retval WIFI_HAL_INVALID_VALUE if the value is invalid
*
* @execution Synchronous
* @sideeffect None
*
*/
INT wifi_getAvailableBSSColor(INT radio_index, INT maxNumberColors, UCHAR* colorList, INT *numColorReturned);
/**
* @brief Get MU (Multi-User) EDCA (Enhanced Distributed Channel Access) parameter
*
* @param[in] radio_index Index of Wi-Fi radio
* @param[in] ac The Access Category
* @param[out] edca The MU EDCA parameters
*
* @return The status of the operation
* @retval WIFI_HAL_SUCCESS if successful
* @retval WIFI_HAL_ERROR if an generic error is detected
* @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected
* @retval WIFI_HAL_UNSUPPORTED if the API is not supported
* @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid
* @retval WIFI_HAL_INVALID_VALUE if the value is invalid
*
* @execution Synchronous
* @sideeffect None
*
*/
INT wifi_getMuEdca(INT radio_index, wifi_access_category_t ac, wifi_edca_t *edca);
INT wifi_setDownlinkDataAckType (INT radio_index,
wifi_dl_data_ack_type_t ack_type);
INT wifi_get80211axDefaultParameters (INT radio_index, wifi_80211ax_params_t *params);
/////////////////////////// tri radio definitions /////////////////////////////////
/**
* @brief Set Radio Operating Parameters
*
* This API is used to configured all radio operation parameter in a
* single set. it includes channel number, channelWidth, mode and
* auto channel configuration.
*
* @param[in] radio_index Index of Wi-Fi radio
* @param[in] operationParam Radio Operating Parameters
*
* @return The status of the operation
* @retval WIFI_HAL_SUCCESS if successful
* @retval WIFI_HAL_ERROR if an generic error is detected
* @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected
* @retval WIFI_HAL_UNSUPPORTED if the API is not supported
* @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid
* @retval WIFI_HAL_INVALID_VALUE if the value is invalid
*
* @execution Synchronous
* @sideeffect None
*
*/
INT wifi_setRadioOperatingParameters(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam);
/**
* @brief Get Radio Operating Parameters
*
* @param[in] radio_index Index of Wi-Fi radio
* @param[out] operationParam Radio Operating Parameters
*
* @return The status of the operation
* @retval WIFI_HAL_SUCCESS if successful
* @retval WIFI_HAL_ERROR if an generic error is detected
* @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected
* @retval WIFI_HAL_UNSUPPORTED if the API is not supported
* @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid
* @retval WIFI_HAL_INVALID_VALUE if the value is invalid
*
* @execution Synchronous
* @sideeffect None
*
*/
INT wifi_getRadioOperatingParameters(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam);
/* wifi_getScanResults() function */
/**
* Description: Return scan results
* Parameters :
* ap_index - index of client VAP