-
Notifications
You must be signed in to change notification settings - Fork 5
/
qcsapi.h
13725 lines (13056 loc) · 449 KB
/
qcsapi.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
/*SH1
*******************************************************************************
** **
** Copyright (c) 2009 - 2013 Quantenna Communications Inc **
** **
** File : qcsapi.h **
** 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. **
** **
*******************************************************************************
EH1*/
/**
* \file qcsapi.h
*
* The main QCSAPI header file containing function prototypes, data types etc.
*/
#ifndef _QCSAPI_H
#define _QCSAPI_H
#include <string.h>
#include <stdint.h>
#include <sys/types.h>
#ifndef _NET_ETHERNET_H_
#include <net/ethernet.h>
#endif
#include <qtn/shared_defs.h>
#include <qtn/qvsp_data.h>
#include <qtn/wlan_ioctl.h>
#include <common/ruby_pm.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Following #defines come from the TR-098 standard.
* They are conditional in case another include file has already defined them.
*/
#ifndef IEEE80211_CHAN_MAX
#define IEEE80211_CHAN_MAX 255
#endif
#ifndef IW_ESSID_MAX_SIZE
#define IW_ESSID_MAX_SIZE 32
#endif
/* Begin QCSAPI definitions */
#define QCSAPI_WPS_SHORT_PIN_LEN 4
#define QCSAPI_WPS_MAX_PIN_LEN 8
#define QCSAPI_MAX_PARAMETER_NAME_LEN 24
#define QCSAPI_MAX_PARAMETER_VALUE_LEN 200
#define QCSAPI_MIN_LENGTH_REGULATORY_REGION 10
#define QCSAPI_MAX_BITRATE_STR_MIN_LEN 4
#define QCSAPI_QDRV_NUM_RF_STREAMS 4
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#endif
#define REGULATORY_DB_BIN_NOT_SUPPORT -255
#define GET_PAIRING_ID 0
#define SET_PAIRING_ID 1
#define QCSAPI_SCRIPT_LOG "/tmp/run_script.log"
#define QCSAPI_CMD_BUFSIZE 128
#define QCSAPI_MSG_BUFSIZE 1024
#define QCSAPI_SYSTEM_STATUS_FILE "/tmp/qtn_sys_status"
#define QCSAPI_PRIMARY_WIFI_IFNAME "wifi0"
#define QCSAPI_CUSTOM_DIR "/etc/custom/"
#define QCSAPI_FILESYSTEM_SP ".."
#define QCSAPI_CUSTOM_VALUE_MAX_LEN 128
#define QCSAPI_RESTORE_FG_IP 0x00000001
#define QCSAPI_RESTORE_FG_NOREBOOT 0x00000002
#define QCSAPI_RESTORE_FG_AP 0x00000004
#define QCSAPI_RESTORE_FG_STA 0x00000008
#define LOCAL_GET_CONFIG_SCRIPT "/scripts/get_wifi_config"
#define LOCAL_GET_PER_SSID_CONFIG_SCRIPT "/scripts/get_per_ssid_config"
#define LOCAL_UPDATE_PER_SSID_CONFIG_SCRIPT "/scripts/update_per_ssid_config"
/**
* @defgroup APIOverview Overview and conventions
*
* \brief This chapter gives an overview of how the data structures and APIs
* are documented. An example function prototype is shown directly below.
*
* This chapter details the data structures (structs, enums, types etc.) used
* by the QCSAPI, as well as the detailed information on the APIs.
*
* APIs are documented fully with details of what the functional call does,
* the parameters accepted (input/outputs) and the return values.
*
* Each API also has a brief detail of if and how the function can be called
* using the <c>call_qcsapi</c> command line utility. Some APIs are not able
* to be called using <c>call_qcsapi</c> through the nature of the API.
*
* This chapter is divided into the data structure detailed documentation,
* followed by subsections detailing rough functional API areas.
*
* The following section gives an example of how an API call is documented.
*/
#if QTN_DUAL_BAND_RF
int local_wifi_get_rf_chipid(int *chipid);
#endif
int local_get_parameter(const char *ifname,
const char *param_name,
char *param_value,
const size_t max_param_len,
const char *script_path);
/*!
* \ingroup APIOverview
*/
/* @{ */
/**
* \fn int call_qcsapi_example(const char *ifname, int example_input,
* int *example_output);
*
* \brief A brief description of the function call is provided inline with
* the function listing for each section.
*
* In the Function Documentation section, for each API call, there is a
* detailed definition of the function call, with extra information, side
* effects, pre-requisites etc. This appears in the section which documents
* the individual API call.
*
* After the detailed documentation the list of input/output parameters is
* given.
*
* \param ifname Details of the parameter 'ifname'
* \param example_input Details of the input parameter 'example_input'
* \param example_output Details of the output parameter 'example_output'.
* Output parameters are generally seen as pointers to variables.
*
* After the parameter list, the return values are documented.
*
* \return Details of the return value (generally >= 0 indicates, success,
* < 0 indicates failure). See the section @ref mysection4_1_4 "QCSAPI return values"
* for details of the different return values.
*
* In addition to this, there may be extra documentation and references to
* other function calls.
*
* \note Something noteworthy about the API may be documented in one of these
* blocks.
*
* \warning Something that the reader <b>must</b> read and take into account
* may be documented in one of these blocks.
*
* \callqcsapi
*
* This is where the command line <c>call_qcsapi</c> interface is detailed.
* Input parameters, and expected output will be given.
*
* \note Not all QCSAPI C API calls have equivalent <c>call_qcsapi</c> command
* line calls.
*/
/* NOTE: present to show up example documentation for QCSAPI doco. */
extern int call_qcsapi_example(const char *ifname, int example_input,
int *example_output);
/* @} */
/**
* @defgroup DetailedDataTypes Detailed data type and enumeration documentation
*
* \brief This section contains detailed documentation on the data types and enumerations
* used in the QCSAPI.
*/
/**
* \ingroup DetailedDataTypes
*/
/* @{ */
/**
* \anchor QCSAPI_ERRNO
*
* \brief This enumeration represents the internal QCSAPI error return values that
* may be returned by various QCSAPIs.
*
* This enumeration represents the internal QCSAPI error return values that
* may be returned by various QCSAPIs. Some errors may be returned from many different
* APIs, whereas other errors are for only one API call.
*
* Each error code indicates the area of the QCSAPI the code is relevant to.
*
* To get an error string associated with the error message, use the API call
* qcsapi_errno_get_message.
*
* In addition to the error codes listed in the following sections (which start at
* error number 1000 - <c>qcsapi_errno_base</c>), the following POSIX defined errors
* are used in the QCSAPI:
*
* <TABLE>
* <TR><TD>ERRNO value</TD><TD>QCSAPI Error</TD><TD>Description</TD></TR>
* <TR><TD><c>-EFAULT</c></TD><TD>QCS API error 14: Bad address</TD>
* <TD>The QCSAPI found a problem with an argument passed by reference;
* most likely the address was the NULL address.</TD></TR>
* <TR><TD><c>-EINVAL</c></TD><TD>QCS API error 22: Invalid argument</TD>
* <TD>The QCSAPI found the value of an argument is not valid. Examples are
* numeric value out of range (eg, WiFi channel larger than 255), or a parameter
* value not allowed by the WiFi standard.</TD></TR>
* <TR><TD><c>-ENODEV</c></TD><TD>QCS API error 19: No such device</TD>
* <TD>No such device. An operation was attempted using a device that does not
* exist.</TD></TR>
* <TR><TD><c>-EOPNOTSUPP</c></TD><TD>QCS API error 95: Operation not supported</TD>
* <TD>Operation not supported. For example, an operation limited to a WiFi device
* such as get 802.11 standard or get beacon type was attempted using an interface
* that is not a WiFi device.</TD></TR>
* <TR><TD><c>-ERANGE</c></TD><TD>QCS API error 34: Parameter value out of range</TD>
* <TD>This error occurs when the API accesses an element in an array using an index
* parameter, and the index is too large or out of range. An example is the per-association
* APIs.</TD></TR>
* </TABLE>
*
* \sa qcsapi_errno_get_message
*/
enum qcsapi_errno
{
qcsapi_errno_base = 1000,
/**
* This error code is returned when attempts are made to apply changes when
* the wireless system is not started. The most typical situation this error
* message is returned is when the Quantenna kernel modules have not been loaded.
*
* Many different QCSAPI function calls attempt to apply changes, and the
* majority of QCSAPI calls dealing with the wireless driver may return this
* value.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1000: System not started</c>
*/
qcsapi_system_not_started = qcsapi_errno_base,
/**
* This error code is returned when an attempt to read in an unknown parameter
* via the qcsapi_config_get_parameter.
*
* \sa qcsapi_config_get_parameter
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1001: Parameter not found</c>
*/
qcsapi_parameter_not_found = qcsapi_errno_base + 1,
/**
* This error code is returned when an SSID API call is made, but the SSID referred
* to does not exist.
*
* The SSID may not exist due to the config file being missing, or due to the config
* file not containing the passed in SSID. See \ref SSIDAPIs "SSID APIs".
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1002: SSID not found</c>
*/
qcsapi_SSID_not_found = qcsapi_errno_base + 2,
/**
* This error code is returned when a QCSAPI call is attempted on an STA device, but
* the call only applies to the AP.
*
* This return value is used in many different QCSAPIs, across all functional areas.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1003: Operation only available on an AP</c>
*/
qcsapi_only_on_AP = qcsapi_errno_base + 3,
/**
* This error code is returned when a QCSAPI call is attempted on an AP device, but
* the call only applies to the STA.
*
* This return value is used in many different QCSAPIs, across all functional areas.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1004: Operation only available on a STA</c>
*/
qcsapi_only_on_STA = qcsapi_errno_base + 4,
/**
* This error code is returned when the action implied by the API conflicts with the
* current configuration.
*
* An example is getting a list of authorized MAC addresses when MAC address filtering
* is not enabled.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1005: Configuration error</c>
*/
qcsapi_configuration_error = qcsapi_errno_base + 5,
/**
* This error code is returned when a variable length input buffer is too small for
* the QCSAPI result. For example, when retrieving error messages.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1006: Insufficient space in the string to receive results</c>
*/
qcsapi_buffer_overflow = qcsapi_errno_base + 6,
/**
* This error code is returned when an internal error is detected when parsing config
* files or other data sets.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1007: Internal formatting error</c>
*/
qcsapi_internal_format_error = qcsapi_errno_base + 7,
/**
* This error code is returned when a system call is made in the code and it fails for
* some reason.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1008: Internal API programming error</c>
*/
qcsapi_programming_error = qcsapi_errno_base + 8,
/**
* This error code is returned when a QCSAPI call is made that is only supported in
* bringup mode.
*
* See @ref mysection4_1_5 "Production Mode vs Bringup Mode"
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1009: Operation only available in bringup mode</c>
*/
qcsapi_bringup_mode_only = qcsapi_errno_base + 9,
/**
* This error code is returned when a socket connection to the security daemon (opened
* to send a command to the running daemon) fails for whatever reason.
*
* If this error is returned, one or more of the sequence of events in the QCSAPI call
* has failed, and the system may be in an inconsistent state.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1010: Cannot contact security manager</c>
*/
qcsapi_daemon_socket_error = qcsapi_errno_base + 10,
/**
* This error code is deprecated and not returned by any current API.
*/
qcsapi_conflicting_options = qcsapi_errno_base + 11,
/**
* This error code is returned when the SSID cannot be found (when searching to see if
* an SSID is present).
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1012: Required parameter not found in the SSID configuration block</c>
*/
qcsapi_SSID_parameter_not_found = qcsapi_errno_base + 12,
/**
* This error code is returned when qcsapi_init has not been called prior to invoking
* certain APIs (that require qcsapi_init to be called).
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1013: Initialization API qcsapi_init has not been called</c>
*/
qcsapi_not_initialized = qcsapi_errno_base + 13,
/**
* This error code is returned when the flash upgrade image is not a regular file on
* the filesystem (eg, is a directory or device special file).
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1014: Invalid file type for a flash image update file</c>
*/
qcsapi_invalid_type_image_file = qcsapi_errno_base + 14,
/**
* This error code is returned when the flash upgrade image fails verification checks.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1015: chkimage utility failed for the flash image update file</c>
*/
qcsapi_image_file_failed_chkimage = qcsapi_errno_base + 15,
/**
* This error code is returned when the flash upgrade partition is not found or is
* invalid.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1016: flash partition not found</c>
*/
qcsapi_flash_partition_not_found = qcsapi_errno_base + 16,
/**
* This error code is returned when the command to erase the flash partition failed.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1017: failed to erase the flash memory partition</c>
*/
qcsapi_erase_flash_failed = qcsapi_errno_base + 17,
/**
* This error code is returned when the copy of the flash image into the flag part
* failed.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1018: failed to copy the new image to the flash memory partition</c>
*/
qcsapi_copy_image_flash_failed = qcsapi_errno_base + 18,
/**
* This error code is returned when a call is made into an API where the operational
* state of the system is not known. This is an internal error, and should never be
* seen in ordinary circumstances.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1019: invalid WiFi mode</c>
*/
qcsapi_invalid_wifi_mode = qcsapi_errno_base + 19,
/**
* This error code is returned when the call to qcsapi_console_disconnect fails due
* to not enough system resources.
*
* <c>call_qcsapi</c> printed error message:
* <c>QCS API error 1020: Process table is full</c>
*/
qcsapi_process_table_full = qcsapi_errno_base + 20,
/**
* This error code is deprecated and not returned by any current API.
*/
qcsapi_measurement_not_available = qcsapi_errno_base + 21,
/**
* This error code is returned when trying to create a new BSS, but the maximum number of
* BSSes are already created.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1022: Maximum number of BSSIDs / VAPs exceeded</c>
*/
qcsapi_too_many_bssids = qcsapi_errno_base + 22,
/**
* This error code is returned when an operation is attempted on a non-primary interface
* (wifi0). This can happen for certain security settings and when performing WDS functions.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1023: Operation only available on the primary WiFi interface</c>
*/
qcsapi_only_on_primary_interface = qcsapi_errno_base + 23,
/**
* This error code is returned when trying to create a new WDS link, but the maximum
* number of WDS links are already created.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1024: Maximum number of WDS links exceeded</c>
*/
qcsapi_too_many_wds_links = qcsapi_errno_base + 24,
/**
* This error code is returned when an attempt to update a config file (persistent file)
* fails.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1025: Failed to update persistent configuration</c>
*/
qcsapi_config_update_failed = qcsapi_errno_base + 25,
/**
* This error code is returned when the /proc/net/dev or /proc/net/packets device files
* are not present on the filesystem.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1026: Cannot access network counters</c>
*/
qcsapi_no_network_counters = qcsapi_errno_base + 26,
/**
* This error code is returned when the PM interval passed in is invalid.
* That is, it is not one of the supported interval device files.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1027: Invalid performance monitoring interval</c>
*/
qcsapi_invalid_pm_interval = qcsapi_errno_base + 27,
/**
* This error code is returned when an operation relevant only to WDS mode is attempted on
* a non-WDS operational mode device.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1028: Operation only available on a WDS device</c>
*/
qcsapi_only_on_wds = qcsapi_errno_base + 28,
/**
* This error code is returned when an multicast or broadcast MAC
* is used where only unicast MAC is allowed.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1029: Only unicast MAC address is allowed</c>
*/
qcsapi_only_unicast_mac = qcsapi_errno_base + 29,
/**
* This error code is returned when performing an invalid operation.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1030: Operation is not available on the primary interface</c>
*/
qcsapi_primary_iface_forbidden = qcsapi_errno_base + 30,
/**
* This error code is returned when a BSS is created, but the interface name is incorrect.The BSS prefix name must be the string 'wifi'.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1031: Invalid BSS name</c>
*/
qcsapi_invalid_ifname = qcsapi_errno_base + 31,
/**
* This error code is returned when an error happens on interface.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1032: An error happened on interface</c>
*/
qcsapi_iface_error = qcsapi_errno_base + 32,
/**
* This error code is returned when a semaphore takes too long to initialize.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1033: Semaphore initialization error</c>
*/
qcsapi_sem_error = qcsapi_errno_base + 33,
/**
* This error code is returned when a command is issued for a feature that is not
* supported in this image.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1034: Feature is not supported</c>
*/
qcsapi_not_supported = qcsapi_errno_base + 34,
/**
* This error code is returned when a channel as input is not a dfs channel
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1035: API requires a dfs channel</c>
*/
qcsapi_invalid_dfs_channel = qcsapi_errno_base + 35,
/**
* This error code is returned when a file can not be found.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1036: Script failed</c>
*/
qcsapi_script_error = qcsapi_errno_base + 36,
/**
* This error code is returned when set mac address of wds peer is local address.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1037: Local Mac address can't be used as wds peer address</c>
*/
qcsapi_invalid_wds_peer_addr = qcsapi_errno_base + 37,
/**
* This error code is returned when band is not supported.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1038: Band is not supported</c>
*/
qcsapi_band_not_supported = qcsapi_errno_base + 38,
/**
* This error code is returned when region is not supported.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1039: Region is not supported</c>
*/
qcsapi_region_not_supported = qcsapi_errno_base + 39,
/**
* This error code is returned when region database is not found.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1040: Region database is not found</c>
*/
qcsapi_region_database_not_found = qcsapi_errno_base + 40,
/**
* This error code is returned when a parameter name is not supported
* by wireless_conf.txt.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1041: Parameter name is not supported</c>
*/
qcsapi_param_name_not_supported = qcsapi_errno_base + 41,
/**
* This error code is returned when parameter value is invalid
* in wireless_conf.txt.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1042: Parameter value is invalid</c>
*/
qcsapi_param_value_invalid = qcsapi_errno_base + 42,
/**
* This error code is returned when an input MAC address is invalid
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1043: Invalid MAC address</c>
*/
qcsapi_invalid_mac_addr = qcsapi_errno_base + 43,
/**
* This error code is returned when an option is not supported.
*
* <c>call_qcsapi</c> printed error message:
*
* <QCS API error 1044: Option is not supported>
*/
qcsapi_option_not_supported = qcsapi_errno_base + 44,
/**
* This error code is returned when a wps overlap detected
*
* <c>call_qcsapi</c> printed error message:
*
* <QCS API error 1045: WPS Overlap detected>
*/
qcsapi_wps_overlap_detected = qcsapi_errno_base + 45,
/**
* This error code is returned when a statistics module is not supported
*
* <c>call_qcsapi</c> printed error message:
*
* <QCS API error 1046: MLME statistics is not supported>
*/
qcsapi_mlme_stats_not_supported = qcsapi_errno_base + 46,
/**
* This error code is returned when a board parameter requested for is not supported.
*
* <c>call_qcsapi</c> printed error message:
*
* <QCS API error 1047: Board parameter is not supported>
*/
qcsapi_board_parameter_not_supported = qcsapi_errno_base + 47,
/*
* This error code is returned when a WDS peer cannot be added
* because the peer is currently associated as a station.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1048: WDS peer is associated</c>
*/
qcsapi_peer_in_assoc_table = qcsapi_errno_base + 48,
/*
* This error code is returned when an operation is attempted on a mac address
* that is not in the association table, for example, because the station has
* disassociated.
*
* <c>call_qcsapi</c> printed error message:
*
* <c>QCS API error 1049: MAC address is not in association list</c>
*/
qcsapi_mac_not_in_assoc_list = qcsapi_errno_base + 49,
};
/*
* GPIO / LED PIN numbers
*
* LEDs are a subset of GPIO PINs
*/
/**
* \brief This enumeration represents an abstract LED value.
*
* This enumeration represents an abstract LED value.
*/
enum qcsapi_led
{
qcsapi_AGPIO1_LED = 1,
qcsapi_AGPIO2_LED = 2,
qcsapi_AGPIO3_LED = 3,
qcsapi_AGPIO4_LED = 4,
qcsapi_AGPIO5_LED = 5,
qcsapi_AGPIO7_LED = 7,
qcsapi_AGPIO11_LED = 11,
qcsapi_AGPIO12_LED = 12,
qcsapi_AGPIO27_LED = 27,
qcsapi_nosuch_GPIO = 255,
QCSAPI_MAX_LED = 31
};
/**
* \brief This enumeration represents a set of security and authentication
* modes.
*
* This enumeration represents a set of security and authentication modes.
*
* The security mode consists of an authentication method (eg, WPA, WPA2,
* EAP, etc.) and an encryption method (eg, WEP, TKIP, CCMP). These are
* represented in this enumeration.
*
* See @ref APSTADualFunctions "Authentication protocols and encrypyion" for
* details of the difference between authentication and encryption.
*/
enum qcsapi_auth_crypto
{
/**
* This value represents WPA v1 authentication mode.
*/
qcsapi_protocol_WPA_mask = 1,
/**
* This value represents WPA v2 authentication mode.
*/
qcsapi_protocol_11i_mask = 2,
/**
* This value represents preshared key authentication.
*/
qcsapi_ap_PSK_authentication = 1,
/**
* This value represents EAP authentication.
*/
qcsapi_ap_EAP_authentication = 2,
/**
* Thie value represents use of the TKIP cipher for encryption.
*/
qcsapi_ap_TKIP_encryption_mask = 0x01,
/**
* Thie value represents use of the CCMP cipher for encryption.
*/
qcsapi_ap_CCMP_encryption_mask = 0x02,
/**
* This value represents security is enabled on the interface.
*/
qcsapi_ap_security_enabled = 0x01,
};
/**
* \brief This enumeration is used to represent GPIO state.
*
* This enumeration is used to represent GPIO state.
*/
typedef enum
{
/**
* This value indicates that the GPIO isn't available for some reason.
*/
qcsapi_gpio_not_available = 0,
/**
* Thie value indicates that the GPIO is set to input only mode.
*/
qcsapi_gpio_input_only,
/**
* Thie value indicates that the GPIO is set to output only.
*/
qcsapi_gpio_output,
/**
* This is the invalid value - representing that a GPIO is not present
* on the platform.
*/
qcsapi_nosuch_gpio_config = -1
} qcsapi_gpio_config;
/**
* \brief This enumeration is used to abstract configuration file paths.
*
* This enumeration is used to abstract configuration file paths.
*/
typedef enum
{
/**
* This value is used to represent the security config file path.
*/
qcsapi_security_configuration_path = 0,
/**
* Placeholder - invalid value.
*/
qcsapi_nosuch_file_path = -1
} qcsapi_file_path_config;
/**
* \brief This enumeration represents the operational mode of the device.
*
* This enumeration represents the operational mode of the device.
*/
typedef enum {
/**
* This value is a valid, and indicates that programs have not configured the
* WiFi mode.
*/
qcsapi_mode_not_defined = 1,
/**
* The device is operating as an AP.
*/
qcsapi_access_point,
/**
* The device is operating as a STA.
*/
qcsapi_station,
/**
* The device is operating in WDS mode - wireless distribution mode, or bridged
* mode.
*/
qcsapi_wds,
/**
* Invalid mode. Placeholder.
*/
qcsapi_nosuch_mode = 0
} qcsapi_wifi_mode;
/**
* \brief Enumeration to represent rate sets.
*
* Enumeration to represent different rate sets as used in the system.
*/
typedef enum {
/**
* The set of basic rates which must be supported by all clients.
*/
qcsapi_basic_rates = 1,
/**
* The set of actual rates in use.
*/
qcsapi_operational_rates,
/**
* The set of all supported rates on the device.
*/
qcsapi_possible_rates,
/**
* Placeholder - invalid.
*/
qcsapi_nosuch_rate = 0
} qcsapi_rate_type;
/**
* \brief Enumeration to represent 802.11 standards
*/
typedef enum {
/**
* 11n
*/
qcsapi_mimo_ht = 1,
/**
* 11ac
*/
qcsapi_mimo_vht,
/**
* Placeholder - invalid.
*/
qcsapi_nosuch_standard = 0
} qcsapi_mimo_type;
/**
* \brief Enumeration used to represent different interface counters.
*
* \sa qcsapi_interface_get_counter
* \sa qcsapi_pm_get_counter
* \sa qcsapi_wifi_get_node_counter
*/
typedef enum {
qcsapi_nosuch_counter = 0,
QCSAPI_NOSUCH_COUNTER = qcsapi_nosuch_counter,
qcsapi_total_bytes_sent = 1,
QCSAPI_TOTAL_BYTES_SENT = qcsapi_total_bytes_sent,
qcsapi_total_bytes_received,
QCSAPI_TOTAL_BYTES_RECEIVED = qcsapi_total_bytes_received,
qcsapi_total_packets_sent,
QCSAPI_TOTAL_PACKETS_SENT = qcsapi_total_packets_sent,
qcsapi_total_packets_received,
QCSAPI_TOTAL_PACKETS_RECEIVED = qcsapi_total_packets_received,
qcsapi_discard_packets_sent,
QCSAPI_DISCARD_PACKETS_SENT = qcsapi_discard_packets_sent,
qcsapi_discard_packets_received,
QCSAPI_DISCARD_PACKETS_RECEIVED = qcsapi_discard_packets_received,
qcsapi_error_packets_sent,
QCSAPI_ERROR_PACKETS_SENT = qcsapi_error_packets_sent,
qcsapi_error_packets_received,
QCSAPI_ERROR_PACKETS_RECEIVED = qcsapi_error_packets_received,
qcsapi_fragment_frames_received,
QCSAPI_FRAGMENT_FRAMES_RECEIVED = qcsapi_fragment_frames_received,
qcsapi_vlan_frames_received,
QCSAPI_VLAN_FRAMES_RECEIVED = qcsapi_vlan_frames_received,
} qcsapi_counter_type;
/**
* \brief Enumeration for parameters as read in via qcsapi_wifi_get_node_param.
*
* \sa qcsapi_wifi_get_node_param
*/
typedef enum {
QCSAPI_NO_SUCH_PER_ASSOC_PARAM = 0,
QCSAPI_LINK_QUALITY = 1,
QCSAPI_RSSI_DBM,
QCSAPI_BANDWIDTH,
QCSAPI_SNR,
QCSAPI_TX_PHY_RATE,
QCSAPI_RX_PHY_RATE,
QCSAPI_STAD_CCA,
QCSAPI_HW_NOISE,
QCSAPI_STA_IP,
QCSAPI_RSSI,
QCSAPI_PHY_NOISE,
QCSAPI_SOC_MAC_ADDR,
QCSAPI_SOC_IP_ADDR,
QCSAPI_NODE_MEAS_BASIC,
QCSAPI_NODE_MEAS_CCA,
QCSAPI_NODE_MEAS_RPI,
QCSAPI_NODE_MEAS_CHAN_LOAD,
QCSAPI_NODE_MEAS_NOISE_HIS,
QCSAPI_NODE_MEAS_BEACON,
QCSAPI_NODE_MEAS_FRAME,
QCSAPI_NODE_MEAS_TRAN_STREAM_CAT,
QCSAPI_NODE_MEAS_MULTICAST_DIAG,
QCSAPI_NODE_TPC_REP,
QCSAPI_NODE_LINK_MEASURE,
QCSAPI_NODE_NEIGHBOR_REP,
} qcsapi_per_assoc_param;
#define QCSAPI_LOCAL_NODE 0
#define QCSAPI_REMOTE_NODE 1
/* This enum lists booleans (yes / no ) */
#define QCSAPI_TRUE 1
#define QCSAPI_FALSE 0
/**
* \brief Enumeration used in the option set/get API.
*
* \sa qcsapi_wifi_get_option
* \sa qcsapi_wifi_set_option
*/
typedef enum {
qcsapi_channel_refresh = 1, /* 2.4 GHz only */
qcsapi_DFS, /* 5 GHz only */
qcsapi_wmm, /* wireless multimedia extensions */
qcsapi_mac_address_control,
qcsapi_beacon_advertise,
qcsapi_wifi_radio,
qcsapi_autorate_fallback,
qcsapi_security,
qcsapi_SSID_broadcast,
qcsapi_802_11d,
qcsapi_wireless_isolation,
qcsapi_short_GI,
qcsapi_802_11h,
qcsapi_dfs_fast_channel_switch,
qcsapi_dfs_avoid_dfs_scan,