-
Notifications
You must be signed in to change notification settings - Fork 5
/
call_qcsapi.c
20433 lines (17487 loc) · 550 KB
/
call_qcsapi.c
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
/*SH0
*******************************************************************************
** **
** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. **
** **
** File : call_qcsapi.c **
** Description : **
** **
*******************************************************************************
** **
** Redistribution and use in source and binary forms, with or without **
** modification, are permitted provided that the following conditions **
** are met: **
** 1. Redistributions of source code must retain the above copyright **
** notice, this list of conditions and the following disclaimer. **
** 2. Redistributions in binary form must reproduce the above copyright **
** notice, this list of conditions and the following disclaimer in the **
** documentation and/or other materials provided with the distribution. **
** 3. The name of the author may not be used to endorse or promote products **
** derived from this software without specific prior written permission. **
** **
** Alternatively, this software may be distributed under the terms of the **
** GNU General Public License ("GPL") version 2, or (at your option) any **
** later version as published by the Free Software Foundation. **
** **
** In the case this software is distributed under the GPL license, **
** you should have received a copy of the GNU General Public License **
** along with this software; if not, write to the Free Software **
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **
** **
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR **
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES**
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. **
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, **
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT **
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,**
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY **
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT **
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF **
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **
** **
*******************************************************************************
EH0*/
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <errno.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <net80211/ieee80211_qos.h>
#include <net80211/ieee80211_dfs_reentry.h>
#include <net80211/ieee80211_ioctl.h>
#include <qtn/lhost_muc_comm.h>
#include <qtn/qtn_vlan.h>
#include "qcsapi.h"
#include "qcsapi_driver.h"
#include "call_qcsapi.h"
#include "qcsapi_sem.h"
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#endif
#ifndef max
#define max(a, b) ((a) < (b) ? (b) : (a))
#endif
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#define printf Do_not_use_printf
#define fprintf Do_not_use_fprintf
#define IP_ADDR_STR_LEN 16
#define BEACON_INTERVAL_WARNING_LOWER_LIMIT 24
#define BEACON_INTERVAL_WARNING_UPPER_LIMIT 100
static const struct
{
qcsapi_entry_point e_entry_point;
const char *api_name;
} qcsapi_entry_name[] =
{
{ e_qcsapi_errno_get_message, "get_error_message" },
{ e_qcsapi_store_ipaddr, "store_ipaddr" },
{ e_qcsapi_interface_enable, "enable_interface" },
{ e_qcsapi_interface_get_BSSID, "interface_BSSID" },
{ e_qcsapi_interface_get_mac_addr, "get_mac_addr" },
{ e_qcsapi_interface_get_mac_addr, "get_macaddr" },
{ e_qcsapi_interface_set_mac_addr, "set_mac_addr" },
{ e_qcsapi_interface_set_mac_addr, "set_macaddr" },
{ e_qcsapi_interface_get_counter, "get_counter" },
{ e_qcsapi_pm_get_counter, "get_pm_counter" },
{ e_qcsapi_pm_get_elapsed_time, "get_pm_elapsed_time" },
{ e_qcsapi_flash_image_update, "flash_image_update" },
{ e_qcsapi_firmware_get_version, "get_firmware_version" },
{ e_qcsapi_system_get_time_since_start, "get_time_since_start" },
{ e_qcsapi_get_system_status, "get_sys_status" },
{ e_qcsapi_led_get, "get_LED" },
{ e_qcsapi_led_set, "set_LED" },
{ e_qcsapi_led_pwm_enable, "set_LED_PWM" },
{ e_qcsapi_led_brightness, "set_LED_brightness" },
{ e_qcsapi_gpio_get_config, "get_GPIO_config" },
{ e_qcsapi_gpio_set_config, "set_GPIO_config" },
{ e_qcsapi_gpio_monitor_reset_device, "monitor_reset_device" },
{ e_qcsapi_gpio_enable_wps_push_button, "enable_wps_push_button" },
{ e_qcsapi_file_path_get_config, "get_file_path" },
{ e_qcsapi_file_path_set_config, "set_file_path" },
{ e_qcsapi_wifi_set_wifi_macaddr, "set_wifi_mac_addr" },
{ e_qcsapi_wifi_set_wifi_macaddr, "set_wifi_macaddr" },
{ e_qcsapi_wifi_create_restricted_bss, "wifi_create_restricted_bss"},
{ e_qcsapi_wifi_create_bss, "wifi_create_bss"},
{ e_qcsapi_wifi_remove_bss, "wifi_remove_bss"},
{ e_qcsapi_wifi_get_primary_interface, "get_primary_interface"},
{ e_qcsapi_wifi_get_interface_by_index, "get_interface_by_index"},
{ e_qcsapi_wifi_get_mode, "get_mode" },
{ e_qcsapi_wifi_set_mode, "set_mode" },
{ e_qcsapi_wifi_get_phy_mode, "get_phy_mode" },
{ e_qcsapi_wifi_set_phy_mode, "set_phy_mode" },
{ e_qcsapi_wifi_reload_in_mode, "reload_in_mode" },
{ e_qcsapi_wifi_rfenable, "rfenable" },
{ e_qcsapi_service_control, "service_control" },
{ e_qcsapi_wifi_rfstatus, "rfstatus" },
{ e_qcsapi_wifi_startprod, "startprod" },
{ e_qcsapi_is_startprod_done, "is_startprod_done"},
{ e_qcsapi_wifi_get_bw, "get_bw" },
{ e_qcsapi_wifi_set_bw, "set_bw" },
{ e_qcsapi_wifi_get_BSSID, "get_BSSID" },
{ e_qcsapi_wifi_get_config_BSSID, "get_config_BSSID" },
{ e_qcsapi_wifi_get_SSID, "get_SSID" },
{ e_qcsapi_wifi_set_SSID, "set_SSID" },
{ e_qcsapi_wifi_get_channel, "get_channel" },
{ e_qcsapi_wifi_set_channel, "set_channel" },
{ e_qcsapi_wifi_get_auto_channel, "get_auto_channel" },
{ e_qcsapi_wifi_set_auto_channel, "set_auto_channel" },
{ e_qcsapi_wifi_get_standard, "get_standard" },
{ e_qcsapi_wifi_get_standard, "get_802.11" },
{ e_qcsapi_wifi_get_dtim, "get_dtim" },
{ e_qcsapi_wifi_set_dtim, "set_dtim" },
{ e_qcsapi_wifi_get_assoc_limit, "get_dev_assoc_limit" },
{ e_qcsapi_wifi_set_assoc_limit, "set_dev_assoc_limit" },
{ e_qcsapi_wifi_get_bss_assoc_limit, "get_bss_assoc_limit" },
{ e_qcsapi_wifi_set_bss_assoc_limit, "set_bss_assoc_limit" },
{ e_qcsapi_interface_get_status, "get_status" },
{ e_qcsapi_interface_get_netmask, "get_netmask" },
{ e_qcsapi_interface_set_ip4, "set_ip" },
{ e_qcsapi_wifi_get_list_channels, "get_list_of_channels" },
{ e_qcsapi_wifi_get_list_channels, "get_channel_list" },
{ e_qcsapi_wifi_get_mode_switch, "get_mode_switch" },
{ e_qcsapi_wifi_get_mode_switch, "get_wifi_mode_switch" },
{ e_qcsapi_wifi_get_noise, "get_noise" },
{ e_qcsapi_wifi_get_rssi_by_chain, "get_rssi_by_chain" },
{ e_qcsapi_wifi_get_avg_snr, "get_avg_snr" },
{ e_qcsapi_wifi_get_option, "get_option" },
{ e_qcsapi_wifi_set_option, "set_option" },
{ e_qcsapi_wifi_get_rates, "get_rates" },
{ e_qcsapi_wifi_set_rates, "set_rates" },
{ e_qcsapi_wifi_get_max_bitrate, "get_max_bitrate" },
{ e_qcsapi_wifi_set_max_bitrate, "set_max_bitrate" },
{ e_qcsapi_wifi_get_beacon_type, "get_beacon_type" },
{ e_qcsapi_wifi_get_beacon_type, "get_beacon" },
{ e_qcsapi_wifi_set_beacon_type, "set_beacon_type" },
{ e_qcsapi_wifi_set_beacon_type, "set_beacon" },
{ e_qcsapi_wifi_get_beacon_interval, "get_beacon_interval" },
{ e_qcsapi_wifi_set_beacon_interval, "set_beacon_interval" },
{ e_qcsapi_wifi_get_list_regulatory_regions,
"get_regulatory_regions" },
{ e_qcsapi_wifi_get_list_regulatory_regions,
"get_list_regulatory_regions" },
{ e_qcsapi_wifi_get_regulatory_tx_power,
"get_regulatory_tx_power" },
{ e_qcsapi_wifi_get_configured_tx_power,
"get_configured_tx_power" },
{ e_qcsapi_wifi_set_regulatory_channel, "set_regulatory_channel" },
{ e_qcsapi_wifi_set_regulatory_region, "set_regulatory_region" },
{ e_qcsapi_wifi_get_regulatory_region, "get_regulatory_region" },
{ e_qcsapi_wifi_overwrite_country_code, "overwrite_country_code" },
{ e_qcsapi_wifi_get_list_regulatory_channels,
"get_list_regulatory_channels" },
{ e_qcsapi_wifi_get_list_regulatory_bands,
"get_list_regulatory_bands" },
{ e_qcsapi_wifi_get_regulatory_db_version,
"get_regulatory_db_version" },
{ e_qcsapi_wifi_set_regulatory_tx_power_cap,
"apply_regulatory_cap" },
{ e_qcsapi_wifi_restore_regulatory_tx_power,
"restore_regulatory_tx_power"},
{ e_qcsapi_wifi_set_chan_pri_inactive, "set_chan_pri_inactive" },
{ e_qcsapi_wifi_get_tx_power, "get_tx_power" },
{ e_qcsapi_wifi_set_tx_power, "set_tx_power" },
{ e_qcsapi_wifi_get_tx_power_ext, "get_tx_power_ext" },
{ e_qcsapi_wifi_set_tx_power_ext, "set_tx_power_ext" },
{ e_qcsapi_wifi_get_bw_power, "get_bw_power" },
{ e_qcsapi_wifi_set_bw_power, "set_bw_power" },
{ e_qcsapi_wifi_get_bf_power, "get_bf_power" },
{ e_qcsapi_wifi_set_bf_power, "set_bf_power" },
{ e_qcsapi_wifi_get_power_selection, "get_power_selection" },
{ e_qcsapi_wifi_set_power_selection, "set_power_selection" },
{ e_qcsapi_wifi_get_carrier_interference, "get_carrier_db" },
{ e_qcsapi_wifi_get_congestion_idx, "get_congest_idx" },
{ e_qcsapi_wifi_get_supported_tx_power_levels, "get_supported_tx_power" },
{ e_qcsapi_wifi_get_current_tx_power_level, "get_current_tx_power" },
{ e_qcsapi_wifi_set_power_constraint, "set_power_constraint"},
{ e_qcsapi_wifi_get_power_constraint, "get_power_constraint"},
{ e_qcsapi_wifi_set_tpc_interval, "set_tpc_query_interval"},
{ e_qcsapi_wifi_get_tpc_interval, "get_tpc_query_interval"},
{ e_qcsapi_wifi_get_assoc_records, "get_assoc_records" },
{ e_qcsapi_wifi_get_list_DFS_channels, "get_list_DFS_channels" },
{ e_qcsapi_wifi_is_channel_DFS, "is_channel_DFS" },
{ e_qcsapi_wifi_get_DFS_alt_channel, "get_DFS_alt_channel" },
{ e_qcsapi_wifi_set_DFS_alt_channel, "set_DFS_alt_channel" },
{ e_qcsapi_wifi_set_DFS_reentry, "start_dfsreentry"},
{ e_qcsapi_wifi_get_scs_cce_channels, "get_scs_cce_channels" },
{ e_qcsapi_wifi_get_dfs_cce_channels, "get_dfs_cce_channels" },
{ e_qcsapi_wifi_get_csw_records, "get_csw_records" },
{ e_qcsapi_wifi_get_radar_status, "get_radar_status" },
{ e_qcsapi_wifi_get_WEP_encryption_level,
"get_WEP_encryption_level" },
{ e_qcsapi_wifi_get_WPA_encryption_modes, "get_WPA_encryption_modes" },
{ e_qcsapi_wifi_set_WPA_encryption_modes, "set_WPA_encryption_modes" },
{ e_qcsapi_wifi_get_WPA_authentication_mode, "get_WPA_authentication_mode" },
{ e_qcsapi_wifi_set_WPA_authentication_mode, "set_WPA_authentication_mode" },
{ e_qcsapi_wifi_get_IEEE11i_encryption_modes, "get_IEEE11i_encryption_modes" },
{ e_qcsapi_wifi_set_IEEE11i_encryption_modes, "set_IEEE11i_encryption_modes" },
{ e_qcsapi_wifi_get_IEEE11i_authentication_mode, "get_IEEE11i_authentication_mode" },
{ e_qcsapi_wifi_set_IEEE11i_authentication_mode, "set_IEEE11i_authentication_mode" },
{ e_qcsapi_wifi_get_michael_errcnt, "get_michael_errcnt" },
{ e_qcsapi_wifi_get_pre_shared_key, "get_pre_shared_key" },
{ e_qcsapi_wifi_set_pre_shared_key, "set_pre_shared_key" },
{ e_qcsapi_wifi_get_eap_radius_ipaddr, "get_eap_radius_ipaddr" },
{ e_qcsapi_wifi_set_eap_radius_ipaddr, "set_eap_radius_ipaddr" },
{ e_qcsapi_wifi_get_eap_radius_port, "get_eap_radius_port" },
{ e_qcsapi_wifi_set_eap_radius_port, "set_eap_radius_port" },
{ e_qcsapi_wifi_set_own_ip_addr, "set_own_ip_addr" },
{ e_qcsapi_wifi_get_eap_shared_key, "get_eap_shared_key" },
{ e_qcsapi_wifi_set_eap_shared_key, "set_eap_shared_key" },
{ e_qcsapi_wifi_get_psk_auth_failures, "get_psk_auth_failures" },
{ e_qcsapi_wifi_get_pre_shared_key, "get_PSK" },
{ e_qcsapi_wifi_set_pre_shared_key, "set_PSK" },
{ e_qcsapi_wifi_get_key_passphrase, "get_passphrase" },
{ e_qcsapi_wifi_get_key_passphrase, "get_key_passphrase" },
{ e_qcsapi_wifi_set_key_passphrase, "set_passphrase" },
{ e_qcsapi_wifi_set_key_passphrase, "set_key_passphrase" },
{ e_qcsapi_wifi_get_group_key_interval, "get_group_key_interval" },
{ e_qcsapi_wifi_set_group_key_interval, "set_group_key_interval" },
{ e_qcsapi_wifi_get_pmf, "get_pmf" },
{ e_qcsapi_wifi_set_pmf, "set_pmf" },
{ e_qcsapi_wifi_get_count_associations, "get_count_assoc" },
{ e_qcsapi_wifi_get_count_associations, "get_count_associations" },
{ e_qcsapi_wifi_get_count_associations, "get_association_count" },
{ e_qcsapi_wifi_get_associated_device_mac_addr, "get_associated_device_mac_addr" },
{ e_qcsapi_wifi_get_associated_device_mac_addr, "get_station_mac_addr" },
{ e_qcsapi_wifi_get_associated_device_ip_addr, "get_associated_device_ip_addr" },
{ e_qcsapi_wifi_get_associated_device_ip_addr, "get_station_ip_addr" },
{ e_qcsapi_wifi_get_link_quality, "get_link_quality" },
{ e_qcsapi_wifi_get_rssi_per_association, "get_rssi" },
{ e_qcsapi_wifi_get_hw_noise_per_association, "get_hw_noise" },
{ e_qcsapi_wifi_get_rssi_in_dbm_per_association, "get_rssi_dbm" },
{ e_qcsapi_wifi_get_snr_per_association, "get_snr" },
{ e_qcsapi_wifi_get_rx_bytes_per_association, "get_rx_bytes" },
{ e_qcsapi_wifi_get_rx_bytes_per_association, "get_assoc_rx_bytes" },
{ e_qcsapi_wifi_get_tx_bytes_per_association, "get_tx_bytes" },
{ e_qcsapi_wifi_get_tx_bytes_per_association, "get_assoc_tx_bytes" },
{ e_qcsapi_wifi_get_rx_packets_per_association, "get_rx_packets" },
{ e_qcsapi_wifi_get_rx_packets_per_association, "get_assoc_rx_packets" },
{ e_qcsapi_wifi_get_tx_packets_per_association, "get_tx_packets" },
{ e_qcsapi_wifi_get_tx_packets_per_association, "get_assoc_tx_packets" },
{ e_qcsapi_wifi_get_tx_err_packets_per_association,
"get_tx_err_packets" },
{ e_qcsapi_wifi_get_tx_err_packets_per_association,
"get_assoc_tx_err_packets" },
{ e_qcsapi_wifi_get_bw_per_association, "get_assoc_bw" },
{ e_qcsapi_wifi_get_tx_phy_rate_per_association, "get_tx_phy_rate" },
{ e_qcsapi_wifi_get_rx_phy_rate_per_association, "get_rx_phy_rate" },
{ e_qcsapi_wifi_get_tx_mcs_per_association, "get_tx_mcs" },
{ e_qcsapi_wifi_get_rx_mcs_per_association, "get_rx_mcs" },
{ e_qcsapi_wifi_get_achievable_tx_phy_rate_per_association,
"get_achievable_tx_phy_rate" },
{ e_qcsapi_wifi_get_achievable_rx_phy_rate_per_association,
"get_achievable_rx_phy_rate" },
{ e_qcsapi_wifi_get_auth_enc_per_association, "get_auth_enc_per_assoc" },
{ e_qcsapi_wifi_get_tput_caps, "get_tput_caps" },
{ e_qcsapi_wifi_get_connection_mode, "get_connection_mode" },
{ e_qcsapi_wifi_get_vendor_per_association, "get_vendor" },
{ e_qcsapi_wifi_get_max_mimo, "get_max_mimo" },
{ e_qcsapi_wifi_get_node_counter, "get_node_counter" },
{ e_qcsapi_wifi_get_node_param, "get_node_param" },
{ e_qcsapi_wifi_get_node_stats, "get_node_stats" },
{ e_qcsapi_wifi_get_max_queued, "get_max_queued" },
{ e_qcsapi_wifi_disassociate, "disassociate" },
{ e_qcsapi_wifi_disassociate_sta, "disassociate_sta" },
{ e_qcsapi_wifi_reassociate, "reassociate" },
{ e_qcsapi_wifi_associate, "associate" },
{ e_qcsapi_wifi_get_mac_address_filtering, "get_macaddr_filter" },
{ e_qcsapi_wifi_set_mac_address_filtering, "set_macaddr_filter" },
{ e_qcsapi_wifi_is_mac_address_authorized, "is_mac_addr_authorized" },
{ e_qcsapi_wifi_is_mac_address_authorized, "is_macaddr_authorized" },
{ e_qcsapi_wifi_get_authorized_mac_addresses, "get_authorized_mac_addr" },
{ e_qcsapi_wifi_get_authorized_mac_addresses, "get_authorized_macaddr" },
{ e_qcsapi_wifi_get_denied_mac_addresses, "get_blocked_mac_addr" },
{ e_qcsapi_wifi_get_denied_mac_addresses, "get_blocked_macaddr" },
{ e_qcsapi_wifi_get_denied_mac_addresses, "get_denied_mac_addr" },
{ e_qcsapi_wifi_get_denied_mac_addresses, "get_denied_macaddr" },
{ e_qcsapi_wifi_authorize_mac_address, "authorize_mac_addr" },
{ e_qcsapi_wifi_authorize_mac_address, "authorize_macaddr" },
{ e_qcsapi_wifi_deny_mac_address, "block_macaddr" },
{ e_qcsapi_wifi_deny_mac_address, "block_mac_addr" },
{ e_qcsapi_wifi_deny_mac_address, "deny_macaddr" },
{ e_qcsapi_wifi_deny_mac_address, "deny_mac_addr" },
{ e_qcsapi_wifi_remove_mac_address, "remove_mac_addr" },
{ e_qcsapi_wifi_remove_mac_address, "remove_macaddr" },
{ e_qcsapi_wifi_clear_mac_address_filters, "clear_mac_filters" },
{ e_qcsapi_wifi_backoff_fail_max, "backoff_fail_max" },
{ e_qcsapi_wifi_backoff_timeout, "backoff_timeout" },
{ e_qcsapi_wifi_get_wpa_status, "get_wpa_status" },
{ e_qcsapi_wifi_get_auth_state, "get_auth_state" },
{ e_qcsapi_wifi_get_disconn_info, "get_disconn_info" },
{ e_qcsapi_wifi_reset_disconn_info, "reset_disconn_info" },
{ e_qcsapi_wifi_get_pairing_id, "get_pairing_id"},
{ e_qcsapi_wifi_set_pairing_id, "set_pairing_id"},
{ e_qcsapi_wifi_get_pairing_enable, "get_pairing_enable"},
{ e_qcsapi_wifi_set_pairing_enable, "set_pairing_enable"},
{ e_qcsapi_wifi_set_txqos_sched_tbl, "set_txqos_sched_tbl" },
{ e_qcsapi_wifi_get_txqos_sched_tbl, "get_txqos_sched_tbl" },
{ e_qcsapi_wps_registrar_report_button_press, "registrar_report_button_press" },
{ e_qcsapi_wps_registrar_report_button_press, "registrar_report_pbc" },
{ e_qcsapi_wps_registrar_report_pin, "registrar_report_pin" },
{ e_qcsapi_wps_registrar_get_pp_devname, "registrar_get_pp_devname" },
{ e_qcsapi_wps_registrar_set_pp_devname, "registrar_set_pp_devname" },
{ e_qcsapi_wps_enrollee_report_button_press, "enrollee_report_button_press" },
{ e_qcsapi_wps_enrollee_report_button_press, "enrollee_report_pbc" },
{ e_qcsapi_wps_enrollee_report_pin, "enrollee_report_pin" },
{ e_qcsapi_wps_enrollee_generate_pin, "enrollee_generate_pin" },
{ e_qcsapi_wps_get_ap_pin, "get_wps_ap_pin" },
{ e_qcsapi_wps_set_ap_pin, "set_wps_ap_pin" },
{ e_qcsapi_wps_save_ap_pin, "save_wps_ap_pin" },
{ e_qcsapi_wps_enable_ap_pin, "enable_wps_ap_pin" },
{ e_qcsapi_wps_get_sta_pin, "get_wps_sta_pin" },
{ e_qcsapi_wps_get_state, "get_wps_state" },
{ e_qcsapi_wps_get_configured_state, "get_wps_configured_state" },
{ e_qcsapi_wps_set_configured_state, "set_wps_configured_state" },
{ e_qcsapi_wps_get_runtime_state, "get_wps_runtime_state" },
{ e_qcsapi_wps_get_allow_pbc_overlap_status, "get_allow_pbc_overlap_status" },
{ e_qcsapi_wps_allow_pbc_overlap, "allow_pbc_overlap" },
{ e_qcsapi_wps_get_param, "get_wps_param" },
{ e_qcsapi_wps_set_param, "set_wps_param" },
{ e_qcsapi_wps_set_access_control, "set_wps_access_control" },
{ e_qcsapi_wps_get_access_control, "get_wps_access_control" },
{ e_qcsapi_non_wps_set_pp_enable, "set_non_wps_pp_enable" },
{ e_qcsapi_non_wps_get_pp_enable, "get_non_wps_pp_enable" },
{ e_qcsapi_wps_cancel, "wps_cancel" },
{ e_qcsapi_wps_set_pbc_in_srcm, "set_wps_pbc_in_srcm" },
{ e_qcsapi_wps_get_pbc_in_srcm, "get_wps_pbc_in_srcm" },
{ e_qcsapi_wps_timeout, "wps_set_timeout" },
{ e_qcsapi_wps_on_hidden_ssid, "wps_on_hidden_ssid" },
{ e_qcsapi_wps_on_hidden_ssid_status, "wps_on_hidden_ssid_status" },
{ e_qcsapi_wps_upnp_enable, "wps_upnp_enable" },
{ e_qcsapi_wps_upnp_status, "wps_upnp_status" },
{ e_qcsapi_wps_registrar_set_dfl_pbc_bss, "registrar_set_default_pbc_bss"},
{ e_qcsapi_wps_registrar_get_dfl_pbc_bss, "registrar_get_default_pbc_bss"},
{ e_qcsapi_wifi_set_dwell_times, "set_dwell_times" },
{ e_qcsapi_wifi_get_dwell_times, "get_dwell_times" },
{ e_qcsapi_wifi_set_bgscan_dwell_times, "set_bgscan_dwell_times" },
{ e_qcsapi_wifi_get_bgscan_dwell_times, "get_bgscan_dwell_times" },
{ e_qcsapi_wifi_start_scan, "start_scan" },
{ e_qcsapi_wifi_cancel_scan, "cancel_scan" },
{ e_qcsapi_wifi_get_scan_status, "get_scanstatus" },
{ e_qcsapi_wifi_get_cac_status, "get_cacstatus" },
{ e_qcsapi_wifi_wait_scan_completes, "wait_scan_completes" },
{ e_qcsapi_wifi_set_scan_chk_inv, "set_scan_chk_inv" },
{ e_qcsapi_wifi_get_scan_chk_inv, "get_scan_chk_inv" },
{ e_qcsapi_SSID_create_SSID, "SSID_create_SSID" },
{ e_qcsapi_SSID_create_SSID, "create_SSID" },
{ e_qcsapi_SSID_remove_SSID, "remove_SSID" },
{ e_qcsapi_SSID_verify_SSID, "SSID_verify_SSID" },
{ e_qcsapi_SSID_verify_SSID, "verify_SSID" },
{ e_qcsapi_SSID_rename_SSID, "SSID_rename_SSID" },
{ e_qcsapi_SSID_rename_SSID, "rename_SSID" },
{ e_qcsapi_SSID_get_SSID_list, "get_SSID_list" },
{ e_qcsapi_SSID_get_protocol, "get_SSID_proto" },
{ e_qcsapi_SSID_get_protocol, "SSID_get_proto" },
{ e_qcsapi_SSID_set_protocol, "set_SSID_proto" },
{ e_qcsapi_SSID_set_protocol, "SSID_set_proto" },
{ e_qcsapi_SSID_get_encryption_modes, "SSID_get_encryption_modes" },
{ e_qcsapi_SSID_set_encryption_modes, "SSID_set_encryption_modes" },
{ e_qcsapi_SSID_get_group_encryption, "SSID_get_group_encryption" },
{ e_qcsapi_SSID_set_group_encryption, "SSID_set_group_encryption" },
{ e_qcsapi_SSID_get_authentication_mode, "SSID_get_authentication_mode" },
{ e_qcsapi_SSID_set_authentication_mode, "SSID_set_authentication_mode" },
{ e_qcsapi_SSID_get_pre_shared_key, "SSID_get_pre_shared_key" },
{ e_qcsapi_SSID_set_pre_shared_key, "SSID_set_pre_shared_key" },
{ e_qcsapi_SSID_get_key_passphrase, "SSID_get_key_passphrase" },
{ e_qcsapi_SSID_get_key_passphrase, "SSID_get_passphrase" },
{ e_qcsapi_SSID_set_key_passphrase, "SSID_set_key_passphrase" },
{ e_qcsapi_SSID_set_key_passphrase, "SSID_set_passphrase" },
{ e_qcsapi_SSID_get_pmf, "SSID_get_pmf" },
{ e_qcsapi_SSID_set_pmf, "SSID_set_pmf" },
{ e_qcsapi_SSID_get_wps_SSID, "SSID_get_WPS_SSID" },
{ e_qcsapi_wifi_vlan_config, "vlan_config" },
{ e_qcsapi_wifi_show_vlan_config, "show_vlan_config" },
{ e_qcsapi_enable_vlan_pass_through, "enable_vlan_pass_through" },
{ e_qcsapi_wifi_start_cca, "start_cca" },
{ e_qcsapi_wifi_disable_wps, "disable_wps" },
{ e_qcsapi_wifi_get_results_AP_scan, "get_results_AP_scan" },
{ e_qcsapi_wifi_get_count_APs_scanned, "get_count_APs_scanned" },
{ e_qcsapi_wifi_get_properties_AP, "get_properties_AP" },
{e_qcsapi_wifi_get_time_associated_per_association, "get_time_associated" },
{ e_qcsapi_wifi_wds_add_peer, "wds_add_peer"},
{ e_qcsapi_wifi_wds_remove_peer, "wds_remove_peer"},
{ e_qcsapi_wifi_wds_get_peer_address, "wds_get_peer_address"},
{ e_qcsapi_wifi_wds_set_psk, "wds_set_psk"},
{ e_qcsapi_wifi_wds_set_mode, "wds_set_mode"},
{ e_qcsapi_wifi_wds_get_mode, "wds_get_mode"},
{ e_qcsapi_wifi_qos_get_param, "get_qos_param" },
{ e_qcsapi_wifi_qos_set_param, "set_qos_param" },
{ e_qcsapi_wifi_get_wmm_ac_map, "get_wmm_ac_map" },
{ e_qcsapi_wifi_set_wmm_ac_map, "set_wmm_ac_map" },
{ e_qcsapi_wifi_get_dscp_8021p_map, "get_dscp_8021p_map" },
{ e_qcsapi_wifi_set_dscp_8021p_map, "set_dscp_8021p_map" },
{ e_qcsapi_wifi_get_dscp_ac_map, "get_dscp_ac_map" },
{ e_qcsapi_wifi_set_dscp_ac_map, "set_dscp_ac_map" },
{ e_qcsapi_wifi_get_priority, "get_priority" },
{ e_qcsapi_wifi_set_priority, "set_priority" },
{ e_qcsapi_wifi_get_airfair, "get_airfair" },
{ e_qcsapi_wifi_set_airfair, "set_airfair" },
{ e_qcsapi_config_get_parameter, "get_config_param"},
{ e_qcsapi_config_get_parameter, "get_persistent_param"},
{ e_qcsapi_config_update_parameter, "update_config_param"},
{ e_qcsapi_config_update_parameter, "update_persistent_param"},
{ e_qcsapi_bootcfg_get_parameter, "get_bootcfg_param"},
{ e_qcsapi_bootcfg_update_parameter, "update_bootcfg_param"},
{ e_qcsapi_bootcfg_commit, "commit_bootcfg"},
{ e_qcsapi_wifi_get_mcs_rate, "get_mcs_rate" },
{ e_qcsapi_wifi_set_mcs_rate, "set_mcs_rate" },
{ e_qcsapi_config_get_ssid_parameter, "get_persistent_ssid_param"},
{ e_qcsapi_config_update_ssid_parameter, "update_persistent_ssid_param"},
{ e_qcsapi_wifi_enable_scs, "enable_scs" },
{ e_qcsapi_wifi_scs_switch_channel, "scs_switch_chan" },
{ e_qcsapi_wifi_set_scs_verbose, "set_scs_verbose" },
{ e_qcsapi_wifi_get_scs_status, "get_scs_status" },
{ e_qcsapi_wifi_set_scs_smpl_enable, "set_scs_smpl_enable" },
{ e_qcsapi_wifi_set_scs_smpl_dwell_time, "set_scs_smpl_dwell_time" },
{ e_qcsapi_wifi_set_scs_smpl_intv, "set_scs_smpl_intv" },
{ e_qcsapi_wifi_set_scs_intf_detect_intv, "set_scs_intf_detect_intv" },
{ e_qcsapi_wifi_set_scs_thrshld, "set_scs_thrshld" },
{ e_qcsapi_wifi_set_scs_report_only, "set_scs_report_only" },
{ e_qcsapi_wifi_get_scs_report_stat, "get_scs_report" },
{ e_qcsapi_wifi_set_scs_cca_intf_smth_fctr, "set_scs_cca_intf_smth_fctr" },
{ e_qcsapi_wifi_set_scs_chan_mtrc_mrgn, "set_scs_chan_mtrc_mrgn" },
{ e_qcsapi_wifi_get_scs_dfs_reentry_request, "get_scs_dfs_reentry_request" },
{ e_qcsapi_wifi_get_scs_cca_intf, "get_scs_cca_intf" },
{ e_qcsapi_wifi_get_scs_param, "get_scs_params" },
{ e_qcsapi_wifi_set_scs_stats, "set_scs_stats" },
{ e_qcsapi_wifi_start_ocac, "start_ocac" },
{ e_qcsapi_wifi_stop_ocac, "stop_ocac" },
{ e_qcsapi_wifi_get_ocac_status, "get_ocac_status" },
{ e_qcsapi_wifi_set_ocac_threshold, "set_ocac_thrshld" },
{ e_qcsapi_wifi_set_ocac_dwell_time, "set_ocac_dwell_time" },
{ e_qcsapi_wifi_set_ocac_duration, "set_ocac_duration" },
{ e_qcsapi_wifi_set_ocac_cac_time, "set_ocac_cac_time" },
{ e_qcsapi_wifi_set_ocac_report_only, "set_ocac_report_only" },
{ e_qcsapi_wifi_start_dfs_s_radio, "start_dfs_s_radio" },
{ e_qcsapi_wifi_stop_dfs_s_radio, "stop_dfs_s_radio" },
{ e_qcsapi_wifi_get_dfs_s_radio_status, "get_dfs_s_radio_status" },
{ e_qcsapi_wifi_get_dfs_s_radio_availability, "get_dfs_s_radio_availability" },
{ e_qcsapi_wifi_set_dfs_s_radio_threshold, "set_dfs_s_radio_thrshld" },
{ e_qcsapi_wifi_set_dfs_s_radio_dwell_time, "set_dfs_s_radio_dwell_time" },
{ e_qcsapi_wifi_set_dfs_s_radio_duration, "set_dfs_s_radio_duration" },
{ e_qcsapi_wifi_set_dfs_s_radio_cac_time, "set_dfs_s_radio_cac_time" },
{ e_qcsapi_wifi_set_dfs_s_radio_report_only, "set_dfs_s_radio_report_only" },
{ e_qcsapi_wifi_set_vendor_fix, "set_vendor_fix" },
{ e_qcsapi_wifi_get_rts_threshold, "get_rts_threshold" },
{ e_qcsapi_wifi_set_rts_threshold, "set_rts_threshold" },
{ e_qcsapi_set_soc_macaddr, "set_soc_macaddr" },
{ e_qcsapi_get_interface_stats, "get_interface_stats" },
{ e_qcsapi_get_phy_stats, "get_phy_stats" },
{ e_qcsapi_wifi_set_ap_isolate, "set_ap_isolate" },
{ e_qcsapi_wifi_get_ap_isolate, "get_ap_isolate" },
{ e_qcsapi_power_save, "pm" },
{ e_qcsapi_qpm_level, "qpm_level" },
{ e_qcsapi_reset_all_stats, "reset_all_stats" },
{ e_qcsapi_eth_phy_power_off, "eth_phy_power_off" },
{ e_qcsapi_aspm_l1, "set_aspm_l1"},
{ e_qcsapi_telnet_enable, "enable_telnet" },
{ e_qcsapi_restore_default_config, "restore_default_config" },
{ e_qcsapi_run_script, "run_script" },
{ e_qcsapi_vsp, "vsp" },
{ e_qcsapi_test_traffic, "test_traffic" },
{ e_qcsapi_get_temperature, "get_temperature" },
{ e_qcsapi_set_accept_oui_filter, "set_accept_oui_filter" },
{ e_qcsapi_get_accept_oui_filter, "get_accept_oui_filter" },
{ e_qcsapi_wifi_set_vht, "set_vht" },
{ e_qcsapi_wifi_get_vht, "get_vht" },
{ e_qcsapi_calcmd_set_test_mode, "set_test_mode" },
{ e_qcsapi_calcmd_show_test_packet, "show_test_packet" },
{ e_qcsapi_calcmd_send_test_packet, "send_test_packet" },
{ e_qcsapi_calcmd_stop_test_packet, "stop_test_packet" },
{ e_qcsapi_calcmd_send_dc_cw_signal, "send_dc_cw_signal" },
{ e_qcsapi_calcmd_stop_dc_cw_signal, "stop_dc_cw_signal" },
{ e_qcsapi_calcmd_get_test_mode_antenna_sel, "get_test_mode_antenna_sel" },
{ e_qcsapi_calcmd_get_test_mode_mcs, "get_test_mode_mcs" },
{ e_qcsapi_calcmd_get_test_mode_bw, "get_test_mode_bw" },
{ e_qcsapi_calcmd_get_tx_power, "get_test_mode_tx_power" },
{ e_qcsapi_calcmd_set_tx_power, "set_test_mode_tx_power" },
{ e_qcsapi_calcmd_get_test_mode_rssi, "get_test_mode_rssi" },
{ e_qcsapi_calcmd_set_mac_filter, "calcmd_set_mac_filter" },
{ e_qcsapi_calcmd_get_antenna_count, "get_test_mode_antenna_count" },
{ e_qcsapi_calcmd_clear_counter, "calcmd_clear_counter" },
{ e_qcsapi_calcmd_get_info, "get_info" },
{ e_qcsapi_wifi_disable_dfs_channels, "disable_dfs_channels" },
{ e_qcsapi_br_vlan_promisc, "enable_vlan_promisc" },
{ e_qcsapi_add_ipff, "add_ipff" },
{ e_qcsapi_del_ipff, "del_ipff" },
{ e_qcsapi_get_ipff, "get_ipff" },
{ e_qcsapi_get_carrier_id, "get_carrier_id" },
{ e_qcsapi_set_carrier_id, "set_carrier_id" },
{ e_qcsapi_get_spinor_jedecid, "get_spinor_jedecid" },
{ e_qcsapi_get_custom_value, "get_custom_value" },
{ e_qcsapi_wifi_get_mlme_stats_per_mac, "get_mlme_stats_per_mac" },
{ e_qcsapi_wifi_get_mlme_stats_per_association, "get_mlme_stats_per_association" },
{ e_qcsapi_wifi_get_mlme_stats_macs_list, "get_mlme_stats_macs_list" },
{ e_qcsapi_get_nss_cap, "get_nss_cap"},
{ e_qcsapi_set_nss_cap, "set_nss_cap"},
{ e_qcsapi_get_security_defer_mode, "get_security_defer_mode"},
{ e_qcsapi_set_security_defer_mode, "set_security_defer_mode"},
{ e_qcsapi_apply_security_config, "apply_security_config"},
{ e_qcsapi_get_board_parameter, "get_board_parameter" },
{ e_qcsapi_wifi_set_intra_bss_isolate, "set_intra_bss_isolate" },
{ e_qcsapi_wifi_get_intra_bss_isolate, "get_intra_bss_isolate" },
{ e_qcsapi_wifi_set_bss_isolate, "set_bss_isolate" },
{ e_qcsapi_wifi_get_bss_isolate, "get_bss_isolate" },
{ e_qcsapi_wowlan_host_state, "wowlan_host_state" },
{ e_qcsapi_wowlan_match_type, "wowlan_match_type" },
{ e_qcsapi_wowlan_L2_type, "wowlan_L2_type" },
{ e_qcsapi_wowlan_udp_port, "wowlan_udp_port" },
{ e_qcsapi_wowlan_pattern, "wowlan_pattern" },
{ e_qcsapi_wowlan_get_host_state, "wowlan_get_host_state" },
{ e_qcsapi_wowlan_get_match_type, "wowlan_get_match_type" },
{ e_qcsapi_wowlan_get_L2_type, "wowlan_get_L2_type" },
{ e_qcsapi_wowlan_get_udp_port, "wowlan_get_udp_port" },
{ e_qcsapi_wowlan_get_pattern, "wowlan_get_pattern" },
{ e_qcsapi_wifi_set_extender_params, "set_extender_params" },
{ e_qcsapi_wifi_get_extender_status, "get_extender_status" },
{ e_qcsapi_wifi_enable_bgscan, "enable_bgscan" },
{ e_qcsapi_wifi_get_bgscan_status, "get_bgscan_status" },
{ e_qcsapi_get_uboot_info, "get_uboot_info"},
{ e_qcsapi_wifi_get_disassoc_reason, "disassoc_reason"},
{ e_qcsapi_wifi_get_tx_amsdu, "get_tx_amsdu" },
{ e_qcsapi_wifi_set_tx_amsdu, "set_tx_amsdu" },
{ e_qcsapi_get_bb_param, "get_bb_param" },
{ e_qcsapi_set_bb_param, "set_bb_param" },
{ e_qcsapi_wifi_set_scan_buf_max_size, "set_scan_buf_max_size" },
{ e_qcsapi_wifi_get_scan_buf_max_size, "get_scan_buf_max_size" },
{ e_qcsapi_wifi_set_scan_table_max_len, "set_scan_table_max_len" },
{ e_qcsapi_wifi_get_scan_table_max_len, "get_scan_table_max_len" },
{ e_qcsapi_nosuch_api, NULL }
};
static const struct
{
qcsapi_counter_type counter_type;
const char *counter_name;
} qcsapi_counter_name[] =
{
{ qcsapi_total_bytes_sent, "tx_bytes" },
{ qcsapi_total_bytes_received, "rx_bytes" },
{ qcsapi_total_packets_sent, "tx_packets" },
{ qcsapi_total_packets_received, "rx_packets" },
{ qcsapi_discard_packets_sent, "tx_discard" },
{ qcsapi_discard_packets_received, "rx_discard" },
{ qcsapi_error_packets_sent, "tx_errors" },
{ qcsapi_error_packets_received, "rx_errors" },
{ qcsapi_vlan_frames_received, "rx_vlan_pkts" },
{ qcsapi_fragment_frames_received, "rx_fragment_pkts" },
{ qcsapi_nosuch_counter, NULL }
};
static const struct
{
qcsapi_option_type option_type;
const char *option_name;
} qcsapi_option_name[] =
{
{ qcsapi_channel_refresh, "channel_refresh" },
{ qcsapi_DFS, "DFS" },
{ qcsapi_wmm, "WiFi_MultiMedia" },
{ qcsapi_wmm, "WMM" },
{ qcsapi_beacon_advertise, "beacon_advertise" },
{ qcsapi_beacon_advertise, "beacon" },
{ qcsapi_wifi_radio, "radio" },
{ qcsapi_autorate_fallback, "autorate_fallback" },
{ qcsapi_autorate_fallback, "autorate" },
{ qcsapi_security, "security" },
{ qcsapi_SSID_broadcast, "broadcast_SSID" },
{ qcsapi_SSID_broadcast, "SSID_broadcast" },
{ qcsapi_short_GI, "shortGI" },
{ qcsapi_short_GI, "short_GI" },
{ qcsapi_802_11h, "802_11h" },
{ qcsapi_tpc_query, "tpc_query" },
{ qcsapi_dfs_fast_channel_switch, "dfs_fast_switch" },
{ qcsapi_dfs_avoid_dfs_scan, "avoid_dfs_scan" },
{ qcsapi_uapsd, "uapsd" },
{ qcsapi_sta_dfs, "sta_dfs" },
{ qcsapi_specific_scan, "specific_scan" },
{ qcsapi_GI_probing, "GI_probing" },
{ qcsapi_GI_fixed, "GI_fixed" },
{ qcsapi_stbc, "stbc" },
{ qcsapi_beamforming, "beamforming" },
{ qcsapi_nosuch_option, NULL }
};
static const struct
{
qcsapi_board_parameter_type board_param;
const char *board_param_name;
} qcsapi_board_parameter_name[] =
{
{ qcsapi_hw_revision, "hw_revision" },
{ qcsapi_rf_chipid, "rf_chipid" },
{ qcsapi_bond_opt, "bond_opt" },
{ qcsapi_vht, "vht_status" },
{ qcsapi_bandwidth, "bw_supported" },
{ qcsapi_spatial_stream, "spatial_stream" },
{ qcsapi_nosuch_parameter, NULL }
};
static const struct
{
qcsapi_rate_type rate_type;
const char *rate_name;
} qcsapi_rate_types_name[] =
{
{ qcsapi_basic_rates, "basic_rates" },
{ qcsapi_basic_rates, "basic" },
{ qcsapi_operational_rates, "operational_rates" },
{ qcsapi_operational_rates, "operational" },
{ qcsapi_possible_rates, "possible_rates" },
{ qcsapi_possible_rates, "possible" },
{ qcsapi_nosuch_rate, NULL }
};
static const struct {
qcsapi_mimo_type std_type;
const char *std_name;
} qcsapi_wifi_std_name[] = {
{qcsapi_mimo_ht, "ht"},
{qcsapi_mimo_vht, "vht"},
{qcsapi_nosuch_standard, NULL}
};
static const struct
{
qcsapi_flash_partiton_type partition_type;
const char *partition_name;
} qcsapi_partition_name[] =
{
{ qcsapi_live_image, "live" },
{ qcsapi_safety_image, "safety" },
{ qcsapi_nosuch_partition, NULL }
};
static const struct
{
int qos_queue_type;
const char *qos_queue_name;
} qcsapi_qos_queue_table[] =
{
{ WME_AC_BE, "BE" },
{ WME_AC_BK, "BK" },
{ WME_AC_VI, "VI" },
{ WME_AC_VO, "VO" },
{ WME_AC_BE, "besteffort" },
{ WME_AC_BK, "background" },
{ WME_AC_VI, "video" },
{ WME_AC_VO, "voice" }
};
static const struct
{
const char *fix_name;
unsigned fix_idx;
} qcsapi_vendor_fix_table[] =
{
{ "brcm_dhcp", VENDOR_FIX_IDX_BRCM_DHCP},
{ "brcm_igmp", VENDOR_FIX_IDX_BRCM_IGMP},
};
static const struct
{
int qos_param_type;
const char *qos_param_name;
} qcsapi_qos_param_table[] =
{
{ IEEE80211_WMMPARAMS_CWMIN, "cwmin" },
{ IEEE80211_WMMPARAMS_CWMAX, "cwmax" },
{ IEEE80211_WMMPARAMS_AIFS, "aifs" },
{ IEEE80211_WMMPARAMS_TXOPLIMIT, "tx_op" },
{ IEEE80211_WMMPARAMS_TXOPLIMIT, "txoplimit" },
{ IEEE80211_WMMPARAMS_ACM, "acm" },
{ IEEE80211_WMMPARAMS_NOACKPOLICY, "noackpolicy" }
};
static const struct {
qcsapi_per_assoc_param pa_param;
char *pa_name;
} qcsapi_pa_param_table[] = {
{QCSAPI_LINK_QUALITY, "link_quality"},
{QCSAPI_RSSI_DBM, "rssi_dbm"},
{QCSAPI_BANDWIDTH, "bw"},
{QCSAPI_SNR, "snr"},
{QCSAPI_TX_PHY_RATE, "tx_phy_rate"},
{QCSAPI_RX_PHY_RATE, "rx_phy_rate"},
{QCSAPI_STAD_CCA, "stand_cca_req"},
{QCSAPI_RSSI, "rssi"},
{QCSAPI_PHY_NOISE, "hw_noise"},
{QCSAPI_SOC_MAC_ADDR, "soc_macaddr"},
{QCSAPI_SOC_IP_ADDR, "soc_ipaddr"},
{QCSAPI_NODE_MEAS_BASIC,"basic"},
{QCSAPI_NODE_MEAS_CCA, "cca"},
{QCSAPI_NODE_MEAS_RPI, "rpi"},
{QCSAPI_NODE_MEAS_CHAN_LOAD, "channel_load"},
{QCSAPI_NODE_MEAS_NOISE_HIS, "noise_histogram"},
{QCSAPI_NODE_MEAS_BEACON, "beacon"},
{QCSAPI_NODE_MEAS_FRAME, "frame"},
{QCSAPI_NODE_MEAS_TRAN_STREAM_CAT, "tran_stream_cat"},
{QCSAPI_NODE_MEAS_MULTICAST_DIAG, "multicast_diag"},
{QCSAPI_NODE_TPC_REP, "tpc_report"},
{QCSAPI_NODE_LINK_MEASURE, "link_measure"},
{QCSAPI_NODE_NEIGHBOR_REP, "neighbor_report"},
};
char *support_script_table[] = {
"stop_test_packet",
"send_test_packet",
"set_test_mode",
"set_tx_pow",
"send_cw_signal",
"stop_cw_signal",
"send_cw_signal_4chain",
"show_test_packet",
"transmit_file",
"remote_command",
"router_command.sh"
};
static const struct{
qcsapi_system_status bit_id;
char *description;
} qcsapi_sys_status_table[] =
{
{qcsapi_sys_status_ethernet, "Ethernet interface"},
{qcsapi_sys_status_pcie_ep, "PCIE EP driver"},
{qcsapi_sys_status_pcie_rc, "PCIE RC driver"},
{qcsapi_sys_status_wifi, "WiFi driver"},
{qcsapi_sys_status_rpcd, "Rpcd server"},
{qcsapi_sys_status_cal_mode, "Calstate mode"},
{qcsapi_sys_status_completed, "System boot up completely"},
};
static const struct{
const char *name;
enum qscs_cfg_param_e index;
} qcsapi_scs_param_names_table[] =
{
{"scs_smpl_dwell_time", SCS_SMPL_DWELL_TIME},
{"scs_sample_intv", SCS_SAMPLE_INTV},
{"scs_thrshld_smpl_pktnum", SCS_THRSHLD_SMPL_PKTNUM},
{"scs_thrshld_smpl_airtime", SCS_THRSHLD_SMPL_AIRTIME},
{"scs_thrshld_atten_inc", SCS_THRSHLD_ATTEN_INC},
{"scs_thrshld_dfs_reentry", SCS_THRSHLD_DFS_REENTRY},
{"scs_thrshld_dfs_reentry_minrate", SCS_THRSHLD_DFS_REENTRY_MINRATE},
{"scs_thrshld_dfs_reentry_intf", SCS_THRSHLD_DFS_REENTRY_INTF},
{"scs_thrshld_loaded", SCS_THRSHLD_LOADED},
{"scs_thrshld_aging_nor", SCS_THRSHLD_AGING_NOR},
{"scs_thrshld_aging_dfsreent", SCS_THRSHLD_AGING_DFSREENT},
{"scs_enable", SCS_ENABLE},
{"scs_debug_enable", SCS_DEBUG_ENABLE},
{"scs_smpl_enable", SCS_SMPL_ENABLE},
{"scs_report_only", SCS_REPORT_ONLY},
{"scs_cca_idle_thrshld", SCS_CCA_IDLE_THRSHLD},
{"scs_cca_intf_hi_thrshld", SCS_CCA_INTF_HI_THRSHLD},
{"scs_cca_intf_lo_thrshld", SCS_CCA_INTF_LO_THRSHLD},
{"scs_cca_intf_ratio", SCS_CCA_INTF_RATIO},
{"scs_cca_sample_dur", SCS_CCA_SAMPLE_DUR},
{"scs_cca_intf_smth_fctr", SCS_CCA_INTF_SMTH_NOXP},
{"scs_cca_intf_smth_fctr", SCS_CCA_INTF_SMTH_XPED},
{"scs_rssi_smth_fctr", SCS_RSSI_SMTH_UP},
{"scs_rssi_smth_fctr", SCS_RSSI_SMTH_DOWN},
{"scs_chan_mtrc_mrgn", SCS_CHAN_MTRC_MRGN},
{"scs_atten_adjust", SCS_ATTEN_ADJUST},
{"scs_pmbl_err_smth_fctr", SCS_PMBL_ERR_SMTH_FCTR},
{"scs_pmbl_err_range", SCS_PMBL_ERR_RANGE},
{"scs_pmbl_err_mapped_intf_range", SCS_PMBL_ERR_MAPPED_INTF_RANGE},
{"scs_sp_wf", SCS_SP_WF},
{"scs_lp_wf", SCS_LP_WF},
{"scs_pmp_rpt_cca_smth_fctr", SCS_PMP_RPT_CCA_SMTH_FCTR},
{"scs_pmp_rx_time_smth_fctr", SCS_PMP_RX_TIME_SMTH_FCTR},
{"scs_pmp_tx_time_smth_fctr", SCS_PMP_TX_TIME_SMTH_FCTR},
{"scs_pmp_stats_stable_percent", SCS_PMP_STATS_STABLE_PERCENT},
{"scs_pmp_stats_stable_range", SCS_PMP_STATS_STABLE_RANGE},
{"scs_pmp_stats_clear_interval", SCS_PMP_STATS_CLEAR_INTERVAL},
{"scs_as_rx_time_smth_fctr", SCS_AS_RX_TIME_SMTH_FCTR},
{"scs_as_tx_time_smth_fctr", SCS_AS_TX_TIME_SMTH_FCTR},
{"scs_tx_time_compensation", SCS_TX_TIME_COMPENSTATION_START},
{"scs_rx_time_compensation", SCS_RX_TIME_COMPENSTATION_START}
};
static const struct
{
qcsapi_extender_type param_type;
const char *param_name;
} qcsapi_extender_param_table[] =
{
{qcsapi_extender_role, "role"},
{qcsapi_extender_mbs_best_rssi, "mbs_best_rssi"},
{qcsapi_extender_rbs_best_rssi, "rbs_best_rssi"},
{qcsapi_extender_mbs_wgt, "mbs_wgt"},
{qcsapi_extender_rbs_wgt, "rbs_wgt"},
{qcsapi_extender_nosuch_param, NULL},
};
static const struct
{
int reason_code;
const char *reason_string;
} qcsapi_disassoc_reason_list[] =
{
{ 0, "No disassoc reason reported" },
{ 1, "Unspecified reason" },
{ 2, "Previous authentication no longer valid" },
{ 3, "Deauthenticated because sending STA is leaving (or has left) IBSS or ESS" },
{ 4, "Disassociated due to inactivity" },
{ 5, "Disassociated because AP is unable to handle all currently associated STAs" },
{ 6, "Class 2 frame received from nonauthenticated STA" },
{ 7, "Class 3 frame received from nonassociated STA" },
{ 8, "Disassociated because sending STA is leaving (or has left) BSS" },
{ 9, "STA requesting (re)association is not authenticated with responding STA" },
{ 10, "Disassociated because the information in the Power Capability element is unacceptable" },
{ 11, "Disassociated because the information in the Supported Channels element is unacceptable" },
{ 12, "Reserved" },
{ 13, "Invalid information element, i.e., an information element defined in this standard for which the content does not meet the specifications in Clause 7" },
{ 14, "Message integrity code (MIC) failure" },
{ 15, "4-Way Handshake timeout" },
{ 16, "Group Key Handshake timeout" },
{ 17, "Information element in 4-Way Handshake different from (Re)Association Request/Probe Response/Beacon frame" },
{ 18, "Invalid group cipher" },
{ 19, "Invalid pairwise cipher" },
{ 20, "Invalid AKMP" },
{ 21, "Unsupported RSN information element version" },
{ 22, "Invalid RSN information element capabilities" },
{ 23, "IEEE 802.1X authentication failed" },
{ 24, "Cipher suite rejected because of the security policy" },
{ 25, "TDLS direct-link teardown due to TDLS peer STA unreachable via the TDLS direct link" },
{ 26, "TDLS direct-link teardown for unspecified reason" },
{ 27, "Disassociated because session terminated by SSP request" },
{ 28, "Disassociated because of lack of SSP roaming agreement" },
{ 29, "Requested service rejected because of SSP cipher suite or AKM requirement " },
{ 30, "Requested service not authorized in this location" },
{ 31, "TS deleted because QoS AP lacks sufficient bandwidth for this QoS STA due to a change in BSS service characteristics or operational mode" },
{ 32, "Disassociated for unspecified, QoS-related reason" },
{ 33, "Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA" },
{ 34, "Disassociated because excessive number of frames need to be acknowledged, but are not acknowledged due to AP transmissions and/or poor channel conditions" },
{ 35, "Disassociated because STA is transmitting outside the limits of its TXOPs" },
{ 36, "Requested from peer STA as the STA is leaving the BSS (or resetting)" },
{ 37, "Requested from peer STA as it does not want to use the mechanism" },
{ 38, "Requested from peer STA as the STA received frames using the mechanism for which a setup is required" },
{ 39, "Requested from peer STA due to timeout" },
{ 45, "Peer STA does not support the requested cipher suite" },
{ 46, "Disassociated because authorized access limit reached" },
{ 47, "Disassociated due to external service requirements" },
{ 48, "Invalid FT Action frame count" },
{ 49, "Invalid pairwise master key identifier (PMKI)" },
{ 50, "Invalid MDE" },
{ 51, "Invalid FTE" },
{ 52, "SME cancels the mesh peering instance with the reason other than reaching the maximum number of peer mesh STAs" },
{ 53, "The mesh STA has reached the supported maximum number of peer mesh STAs" },
{ 54, "The received information violates the Mesh Configuration policy configured in the mesh STA profile" },
{ 55, "The mesh STA has received a Mesh Peering Close message requesting to close the mesh peering" },
{ 56, "The mesh STA has re-sent dot11MeshMaxRetries Mesh Peering Open messages, without receiving a Mesh Peering Confirm message" },
{ 57, "The confirmTimer for the mesh peering instance times out" },
{ 58, "The mesh STA fails to unwrap the GTK or the values in the wrapped contents do not match" },
{ 59, "The mesh STA receives inconsistent information about the mesh parameters between Mesh Peering Management frames" },
{ 60, "The mesh STA fails the authenticated mesh peering exchange because due to failure in selecting either the pairwise ciphersuite or group ciphersuite" },
{ 61, "The mesh STA does not have proxy information for this external destination" },
{ 62, "The mesh STA does not have forwarding information for this destination" },
{ 63, "The mesh STA determines that the link to the next hop of an active path in its forwarding information is no longer usable" },
{ 64, "The Deauthentication frame was sent because the MAC address of the STA already exists in the mesh BSS. See 11.3.3 (Additional mechanisms for an AP collocated with a mesh STA)" },
{ 65, "The mesh STA performs channel switch to meet regulatory requirements" },
{ 66, "The mesh STA performs channel switch with unspecified reason" },
};
static const char *qcsapi_auth_algo_list[] = {
"OPEN",
"SHARED",
};
static const char *qcsapi_auth_keyproto_list[] = {
"NONE",
"WPA",
"WPA2",
};
static const char *qcsapi_auth_keymgmt_list[] = {
"NONE",
"WPA-EAP",
"WPA-PSK",
"WEP",
};
static const char *qcsapi_auth_cipher_list[] = {
"WEP",
"TKIP",
"OCB",
"CCMP",
"CMAC",
"CKIP",
};
static const char *qcsapi_wifi_modes_strings[] = WLAN_WIFI_MODES_STRINGS;
static int verbose_flag = 0;
static unsigned int call_count = 1;
static unsigned int delay_time = 0;
static unsigned int internal_flags = 0;
static unsigned int call_qcsapi_init_count = 1;
enum
{
m_force_NULL_address = 0x01
};
/* returns 1 if successful; 0 if failure */
static int
name_to_entry_point_enum( char *lookup_name, qcsapi_entry_point *p_entry_point )
{
int retval = 1;
int found_entry = 0, proposed_enum = (int) e_qcsapi_nosuch_api;
unsigned int iter;
/*
* Silently skip over "qscapi_" ...
*/
if (strncasecmp( lookup_name, "qscapi_", 7 ) == 0)
lookup_name += 7;
for (iter = 0; qcsapi_entry_name[ iter ].api_name != NULL && found_entry == 0; iter++)
{