Home | History | Annotate | Download | only in CLI
      1 /*******************************************************************************
      2 **+--------------------------------------------------------------------------+**
      3 **|                                                                          |**
      4 **| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/         |**
      5 **|                                                                          |**
      6 **| Licensed under the Apache License, Version 2.0 (the "License");          |**
      7 **| you may not use this file except in compliance with the License.         |**
      8 **| You may obtain a copy of the License at                                  |**
      9 **|                                                                          |**
     10 **|     http://www.apache.org/licenses/LICENSE-2.0                           |**
     11 **|                                                                          |**
     12 **| Unless required by applicable law or agreed to in writing, software      |**
     13 **| distributed under the License is distributed on an "AS IS" BASIS,        |**
     14 **| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |**
     15 **| See the License for the specific language governing permissions and      |**
     16 **| limitations under the License.                                           |**
     17 **|                                                                          |**
     18 **+--------------------------------------------------------------------------+**
     19 *******************************************************************************/
     20 
     21 #ifndef G_TESTER_H
     22 #define G_TESTER_H
     23 
     24 #define G_TESTER_CMD_GROUP_CLI			(0x1000)
     25 #define G_TESTER_CMD_GROUP_GWSI			(0x2000)
     26 #define G_TESTER_CMD_GROUP_GENERAL		(0x4000)
     27 
     28 
     29 #define G_TESTER_IS_CLI_GROUP_CMD(_op)	((_op & G_TESTER_CMD_GROUP_CLI) != 0)
     30 #define G_TESTER_IS_GWSI_GROUP_CMD(_op)	((_op & G_TESTER_CMD_GROUP_GWSI) != 0)
     31 #define G_TESTER_IS_GENERAL_GROUP_CMD(_op)	((_op & G_TESTER_CMD_GROUP_GENERAL) != 0)
     32 
     33 #define G_TESTER_GENERAL_CMD_RUN_CMD	(G_TESTER_CMD_GROUP_GENERAL | 0x0001)
     34 #define G_TESTER_GENERAL_CMD_GET_INIT_T	(G_TESTER_CMD_GROUP_GENERAL | 0x0002)
     35 
     36 #define G_TESTER_GWSI_CMD_INITIALIZE	(G_TESTER_CMD_GROUP_GWSI | 0x0060)
     37 #define G_TESTER_GWSI_CMD_CONFIG	    (G_TESTER_CMD_GROUP_GWSI | 0x0061)
     38 #define G_TESTER_GWSI_CMD_PLT		    (G_TESTER_CMD_GROUP_GWSI | 0x0062)
     39 #define G_TESTER_GWSI_CMD_RELEASE		(G_TESTER_CMD_GROUP_GWSI | 0x0063)
     40 
     41 
     42 #define G_TESTER_CLI_CMD_DRIVER__START                            (G_TESTER_CMD_GROUP_CLI | 0x0001)
     43 #define G_TESTER_CLI_CMD_DRIVER__STOP                             (G_TESTER_CMD_GROUP_CLI | 0x0002)
     44 #define G_TESTER_CLI_CMD_DRIVER__STATUS                           (G_TESTER_CMD_GROUP_CLI | 0x0003)
     45 #define G_TESTER_CLI_CMD_ROOT__ABOUT                              (G_TESTER_CMD_GROUP_CLI | 0x0004)
     46 #define G_TESTER_CLI_CMD_CONNECTION__BSSID_LIST                   (G_TESTER_CMD_GROUP_CLI | 0x0010)
     47 #define G_TESTER_CLI_CMD_CONNECTION__CONNECT                      (G_TESTER_CMD_GROUP_CLI | 0x0013)
     48 #define G_TESTER_CLI_CMD_CONNECTION__DISASSOCIATE                 (G_TESTER_CMD_GROUP_CLI | 0x0014)
     49 #define G_TESTER_CLI_CMD_PRIVACY__AUTHENTICATION                  (G_TESTER_CMD_GROUP_CLI | 0x0030)
     50 #define G_TESTER_CLI_CMD_PRIVACY__EXC__NETWORKEAP                 (G_TESTER_CMD_GROUP_CLI | 0x0031)
     51 #define G_TESTER_CLI_CMD_PRIVACY__ENCRYPTION                      (G_TESTER_CMD_GROUP_CLI | 0x0032)
     52 #define G_TESTER_CLI_CMD_PRIVACY__KEYTYPE                         (G_TESTER_CMD_GROUP_CLI | 0x0033)
     53 #define G_TESTER_CLI_CMD_PRIVACY__MIXEDMODE                       (G_TESTER_CMD_GROUP_CLI | 0x0034)
     54 #define G_TESTER_CLI_CMD_PRIVACY__CREDENTIALS                     (G_TESTER_CMD_GROUP_CLI | 0x0035)
     55 #define G_TESTER_CLI_CMD_PRIVACY__WEP__ADD                        (G_TESTER_CMD_GROUP_CLI | 0x0036)
     56 #define G_TESTER_CLI_CMD_PRIVACY__WEP__REMOVE                     (G_TESTER_CMD_GROUP_CLI | 0x0037)
     57 #define G_TESTER_CLI_CMD_SCAN__START                              (G_TESTER_CMD_GROUP_CLI | 0x0040)
     58 #define G_TESTER_CLI_CMD_SCAN__STOP                               (G_TESTER_CMD_GROUP_CLI | 0x0041)
     59 #define G_TESTER_CLI_CMD_SCAN__CONFIGAPP__GLOBAL                  (G_TESTER_CMD_GROUP_CLI | 0x0042)
     60 #define G_TESTER_CLI_CMD_SCAN__CONFIGAPP__CHANNEL                 (G_TESTER_CMD_GROUP_CLI | 0x0043)
     61 #define G_TESTER_CLI_CMD_SCAN__CONFIGAPP__CLEAR                   (G_TESTER_CMD_GROUP_CLI | 0x0044)
     62 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__GLOABAL              (G_TESTER_CMD_GROUP_CLI | 0x0045)
     63 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BAND__MISC           (G_TESTER_CMD_GROUP_CLI | 0x0046)
     64 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BAND__CHANNEL        (G_TESTER_CMD_GROUP_CLI | 0x0047)
     65 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BAND__TRACK          (G_TESTER_CMD_GROUP_CLI | 0x0048)
     66 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BAND__DISCOVERY      (G_TESTER_CMD_GROUP_CLI | 0x0049)
     67 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BAND__IMMEDIATE      (G_TESTER_CMD_GROUP_CLI | 0x004a)
     68 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__CLEAR                (G_TESTER_CMD_GROUP_CLI | 0x004b)
     69 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__STORE                (G_TESTER_CMD_GROUP_CLI | 0x004c)
     70 #define G_TESTER_CLI_CMD_EVENTS__REGISTER                         (G_TESTER_CMD_GROUP_CLI | 0x0050)
     71 #define G_TESTER_CLI_CMD_EVENTS__UNREGISTER                       (G_TESTER_CMD_GROUP_CLI | 0x0051)
     72 #define G_TESTER_CLI_CMD_REPORT__LEVEL                            (G_TESTER_CMD_GROUP_CLI | 0x0060)
     73 #define G_TESTER_CLI_CMD_REPORT__SET                              (G_TESTER_CMD_GROUP_CLI | 0x0061)
     74 #define G_TESTER_CLI_CMD_DEBUG__PRINT                             (G_TESTER_CMD_GROUP_CLI | 0x0062)
     75 #define G_TESTER_CLI_CMD_MANAGEMENT__RATE                         (G_TESTER_CMD_GROUP_CLI | 0x0070)
     76 #define G_TESTER_CLI_CMD_MANAGEMENT__MODE                         (G_TESTER_CMD_GROUP_CLI | 0x0071)
     77 #define G_TESTER_CLI_CMD_MANAGEMENT__PREAMBLE                     (G_TESTER_CMD_GROUP_CLI | 0x0072)
     78 #define G_TESTER_CLI_CMD_MANAGEMENT__CHANNEL                      (G_TESTER_CMD_GROUP_CLI | 0x0073)
     79 #define G_TESTER_CLI_CMD_MANAGEMENT__FRAG                         (G_TESTER_CMD_GROUP_CLI | 0x0074)
     80 #define G_TESTER_CLI_CMD_MANAGEMENT__RTS                          (G_TESTER_CMD_GROUP_CLI | 0x0075)
     81 #define G_TESTER_CLI_CMD_MANAGEMENT__SLOT                         (G_TESTER_CMD_GROUP_CLI | 0x0076)
     82 #define G_TESTER_CLI_CMD_MANAGEMENT__SIGNAL                       (G_TESTER_CMD_GROUP_CLI | 0x0077)
     83 #define G_TESTER_CLI_CMD_MANAGEMENT__TX_POWER_LEVEL               (G_TESTER_CMD_GROUP_CLI | 0x0078)
     84 #define G_TESTER_CLI_CMD_MANAGEMENT__SSID                         (G_TESTER_CMD_GROUP_CLI | 0x007c)
     85 #define G_TESTER_CLI_CMD_POWER__SET_POWER_MODE                    (G_TESTER_CMD_GROUP_CLI | 0x0090)
     86 #define G_TESTER_CLI_CMD_ROAMING__ENABLE                          (G_TESTER_CMD_GROUP_CLI | 0x00a0)
     87 #define G_TESTER_CLI_CMD_ROAMING__LOW_PASS_FILTER                 (G_TESTER_CMD_GROUP_CLI | 0x00a1)
     88 #define G_TESTER_CLI_CMD_ROAMING__QUALITY_THRESHOLD               (G_TESTER_CMD_GROUP_CLI | 0x00a2)
     89 #define G_TESTER_CLI_CMD_ROAMING__SET                             (G_TESTER_CMD_GROUP_CLI | 0x00a3)
     90 
     91 #define G_TESTER_CLI_CMD_CONNECTION__STATUS                       (G_TESTER_CMD_GROUP_CLI | 0x0106)
     92 #define G_TESTER_CLI_CMD_CONNECTION__FULL_BSSID_LIST              (G_TESTER_CMD_GROUP_CLI | 0x0107)
     93 #define G_TESTER_CLI_CMD_MANAGEMENT__INFO                         (G_TESTER_CMD_GROUP_CLI | 0x0110)
     94 #define G_TESTER_CLI_CMD_MANAGEMENT__DRIVERSTATE                  (G_TESTER_CMD_GROUP_CLI | 0x0111)
     95 #define G_TESTER_CLI_CMD_MANAGEMENT__TX_POWER_DBM                 (G_TESTER_CMD_GROUP_CLI | 0x0114)
     96 #define G_TESTER_CLI_CMD_MANAGEMENT__802_11D_H__D_ENABLEDISABLE   (G_TESTER_CMD_GROUP_CLI | 0x0115)
     97 #define G_TESTER_CLI_CMD_MANAGEMENT__802_11D_H__H_ENABLEDISABLE   (G_TESTER_CMD_GROUP_CLI | 0x0116)
     98 #define G_TESTER_CLI_CMD_MANAGEMENT__802_11D_H__D_COUNTRY_2_4IE   (G_TESTER_CMD_GROUP_CLI | 0x0117)
     99 #define G_TESTER_CLI_CMD_MANAGEMENT__802_11D_H__D_COUNTRY_5IE     (G_TESTER_CMD_GROUP_CLI | 0x0118)
    100 #define G_TESTER_CLI_CMD_MANAGEMENT__ANTENNA__DIVERSITYPARAMS     (G_TESTER_CMD_GROUP_CLI | 0x0119)
    101 #define G_TESTER_CLI_CMD_MANAGEMENT__BEACON__SET_BEACON_FILTER_MODE (G_TESTER_CMD_GROUP_CLI | 0x011a)
    102 #define G_TESTER_CLI_CMD_MANAGEMENT__ADVANCED__DRAFT              (G_TESTER_CMD_GROUP_CLI | 0x011b)
    103 #define G_TESTER_CLI_CMD_MANAGEMENT__ADVANCED__SUPPORTED_RATES    (G_TESTER_CMD_GROUP_CLI | 0x011c)
    104 #define G_TESTER_CLI_CMD_SHOW__STATISTICS                         (G_TESTER_CMD_GROUP_CLI | 0x011d)
    105 #define G_TESTER_CLI_CMD_SHOW__TX_STATISTICS                      (G_TESTER_CMD_GROUP_CLI | 0x011e)
    106 #define G_TESTER_CLI_CMD_SHOW__ADVANCED                           (G_TESTER_CMD_GROUP_CLI | 0x011f)
    107 #define G_TESTER_CLI_CMD_PRIVACY__EAP                             (G_TESTER_CMD_GROUP_CLI | 0x0121)
    108 #define G_TESTER_CLI_CMD_PRIVACY__PSKPASSPHRASE                   (G_TESTER_CMD_GROUP_CLI | 0x0126)
    109 #define G_TESTER_CLI_CMD_PRIVACY__CERTIFICATE                     (G_TESTER_CMD_GROUP_CLI | 0x0127)
    110 #define G_TESTER_CLI_CMD_PRIVACY__WPA_OPTIONS                     (G_TESTER_CMD_GROUP_CLI | 0x0128)
    111 #define G_TESTER_CLI_CMD_PRIVACY__EXC__CONFIGURE                  (G_TESTER_CMD_GROUP_CLI | 0x012b)
    112 #define G_TESTER_CLI_CMD_SCAN__CONFIGAPP__DISPLAY                 (G_TESTER_CMD_GROUP_CLI | 0x0132)
    113 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__DISPLAY              (G_TESTER_CMD_GROUP_CLI | 0x0139)
    114 #define G_TESTER_CLI_CMD_SCAN__CONFIGPOLICY__BSSLIST              (G_TESTER_CMD_GROUP_CLI | 0x013c)
    115 #define G_TESTER_CLI_CMD_ROAMING__GET                             (G_TESTER_CMD_GROUP_CLI | 0x0141)
    116 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__TX_RETRY            (G_TESTER_CMD_GROUP_CLI | 0x0143)
    117 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__BSS_LOSS            (G_TESTER_CMD_GROUP_CLI | 0x0144)
    118 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__TX_RATE_THRESHOLD   (G_TESTER_CMD_GROUP_CLI | 0x0145)
    119 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__LOW_RSSI_THRESHOLD  (G_TESTER_CMD_GROUP_CLI | 0x0146)
    120 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__LOW_SNR_THRESHOLD   (G_TESTER_CMD_GROUP_CLI | 0x0147)
    121 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__LOW_QUALITY_FOR_SCAN (G_TESTER_CMD_GROUP_CLI | 0x0148)
    122 #define G_TESTER_CLI_CMD_ROAMING__THRESHOLDS__NORMAL_QUALITY_FOR_SCAN (G_TESTER_CMD_GROUP_CLI | 0x0149)
    123 #define G_TESTER_CLI_CMD_QOS__UPSD__ADD                           (G_TESTER_CMD_GROUP_CLI | 0x014a)
    124 #define G_TESTER_CLI_CMD_QOS__UPSD__GET                           (G_TESTER_CMD_GROUP_CLI | 0x014b)
    125 #define G_TESTER_CLI_CMD_QOS__UPSD__DELETE                        (G_TESTER_CMD_GROUP_CLI | 0x014c)
    126 #define G_TESTER_CLI_CMD_QOS__UPSD__AP_PARAMS                     (G_TESTER_CMD_GROUP_CLI | 0x014d)
    127 #define G_TESTER_CLI_CMD_QOS__UPSD__AP_CAPABILITIES               (G_TESTER_CMD_GROUP_CLI | 0x014e)
    128 #define G_TESTER_CLI_CMD_QOS__UPSD__AC_STATUS                     (G_TESTER_CMD_GROUP_CLI | 0x014f)
    129 #define G_TESTER_CLI_CMD_QOS__UPSD__MEDIUM_USAGE                  (G_TESTER_CMD_GROUP_CLI | 0x0150)
    130 #define G_TESTER_CLI_CMD_QOS__UPSD__PHY_RATE                      (G_TESTER_CMD_GROUP_CLI | 0x0151)
    131 #define G_TESTER_CLI_CMD_QOS__UPSD__DESIRED_PS_MODE               (G_TESTER_CMD_GROUP_CLI | 0x0152)
    132 #define G_TESTER_CLI_CMD_QOS__CLASSIFIER__TXCLASSIFIER            (G_TESTER_CMD_GROUP_CLI | 0x0153)
    133 #define G_TESTER_CLI_CMD_QOS__CLASSIFIER__INSERT                  (G_TESTER_CMD_GROUP_CLI | 0x0154)
    134 #define G_TESTER_CLI_CMD_QOS__CLASSIFIER__REMOVE                  (G_TESTER_CMD_GROUP_CLI | 0x0155)
    135 #define G_TESTER_CLI_CMD_QOS__QOSPARAMS                           (G_TESTER_CMD_GROUP_CLI | 0x0156)
    136 #define G_TESTER_CLI_CMD_QOS__POLL_AP_PACKETS                     (G_TESTER_CMD_GROUP_CLI | 0x0157)
    137 #define G_TESTER_CLI_CMD_QOS__RX_TIMEOUT                          (G_TESTER_CMD_GROUP_CLI | 0x0158)
    138 #define G_TESTER_CLI_CMD_POWER__SET_POWERSAVE_POWERLEVEL          (G_TESTER_CMD_GROUP_CLI | 0x015a)
    139 #define G_TESTER_CLI_CMD_POWER__TRAFFIC_THRESHOLDS                (G_TESTER_CMD_GROUP_CLI | 0x015b)
    140 #define G_TESTER_CLI_CMD_POWER__ENABLE                            (G_TESTER_CMD_GROUP_CLI | 0x015c)
    141 #define G_TESTER_CLI_CMD_POWER__DISABLE                           (G_TESTER_CMD_GROUP_CLI | 0x015d)
    142 #define G_TESTER_CLI_CMD_FILE__LOAD                               (G_TESTER_CMD_GROUP_CLI | 0x0162)
    143 #define G_TESTER_CLI_CMD_BT_COEXSISTANCE__ENABLE                  (G_TESTER_CMD_GROUP_CLI | 0x0163)
    144 #define G_TESTER_CLI_CMD_BT_COEXSISTANCE__RATE                    (G_TESTER_CMD_GROUP_CLI | 0x0164)
    145 #define G_TESTER_CLI_CMD_BT_COEXSISTANCE__CONFIG                  (G_TESTER_CMD_GROUP_CLI | 0x0165)
    146 #define G_TESTER_CLI_CMD_BT_COEXSISTANCE__STATUS                  (G_TESTER_CMD_GROUP_CLI | 0x0166)
    147 #define G_TESTER_CLI_CMD_MEASUREMENT__ENABLE                      (G_TESTER_CMD_GROUP_CLI | 0x0167)
    148 #define G_TESTER_CLI_CMD_MEASUREMENT__DISABLE                     (G_TESTER_CMD_GROUP_CLI | 0x0168)
    149 #define G_TESTER_CLI_CMD_MEASUREMENT__MAX_DURATION                (G_TESTER_CMD_GROUP_CLI | 0x0169)
    150 #define G_TESTER_CLI_CMD_REPORT__ADD                              (G_TESTER_CMD_GROUP_CLI | 0x016b)
    151 #define G_TESTER_CLI_CMD_REPORT__CLEAR                            (G_TESTER_CMD_GROUP_CLI | 0x016c)
    152 #define G_TESTER_CLI_CMD_DEBUG__REGISTER                          (G_TESTER_CMD_GROUP_CLI | 0x016e)
    153 #define G_TESTER_CLI_CMD_DEBUG__BUFFER                            (G_TESTER_CMD_GROUP_CLI | 0x0170)
    154 #define G_TESTER_CLI_CMD_ROOT__QUIT                               (G_TESTER_CMD_GROUP_CLI | 0x0172)
    155 
    156 #define G_TESTER_CLI_CMD_PLT__REGISTER__READ                      (G_TESTER_CMD_GROUP_CLI | 0x0173)
    157 #define G_TESTER_CLI_CMD_PLT__REGISTER__WRITE                     (G_TESTER_CMD_GROUP_CLI | 0x0174)
    158 #define G_TESTER_CLI_CMD_PLT__RX_PER__START                       (G_TESTER_CMD_GROUP_CLI | 0x0175)
    159 #define G_TESTER_CLI_CMD_PLT__RX_PER__STOP                        (G_TESTER_CMD_GROUP_CLI | 0x0176)
    160 #define G_TESTER_CLI_CMD_PLT__RX_PER__CLEAR                       (G_TESTER_CMD_GROUP_CLI | 0x0177)
    161 #define G_TESTER_CLI_CMD_PLT__RX_PER__GET_RESULTS                 (G_TESTER_CMD_GROUP_CLI | 0x0178)
    162 #define G_TESTER_CLI_CMD_PLT__TX__CW                              (G_TESTER_CMD_GROUP_CLI | 0x0179)
    163 #define G_TESTER_CLI_CMD_PLT__TX__CONTINUES                       (G_TESTER_CMD_GROUP_CLI | 0x017a)
    164 #define G_TESTER_CLI_CMD_PLT__TX__STOP                            (G_TESTER_CMD_GROUP_CLI | 0x017b)
    165 #define G_TESTER_CLI_CMD_PLT__MIB__READ                           (G_TESTER_CMD_GROUP_CLI | 0x017c)
    166 #define G_TESTER_CLI_CMD_PLT__MIB__WRITE                          (G_TESTER_CMD_GROUP_CLI | 0x017d)
    167 
    168 #define G_TESTER_CLI_CMD_PRIVACY__WEP__GET                        (G_TESTER_CMD_GROUP_CLI | 0x017e)
    169 
    170 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__RX                     (G_TESTER_CMD_GROUP_CLI | 0x017f)
    171 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__TX__START              (G_TESTER_CMD_GROUP_CLI | 0x0180)
    172 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__TX__STOP               (G_TESTER_CMD_GROUP_CLI | 0x0181)
    173 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__TX__GAIN_GET           (G_TESTER_CMD_GROUP_CLI | 0x0182)
    174 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__TX__GAIN_ADJUST        (G_TESTER_CMD_GROUP_CLI | 0x0183)
    175 #define G_TESTER_CLI_CMD_PLT__CALIBRATION__GET_NVS_BUFFER         (G_TESTER_CMD_GROUP_CLI | 0x0184)
    176 #define G_TESTER_CLI_CMD_PLT_RADIO_TUNE                           (G_TESTER_CMD_GROUP_CLI | 0x0185)
    177 
    178 void g_tester_init(void);
    179 void g_tester_deinit(void);
    180 
    181 void g_tester_receive_event(unsigned char event_index);
    182 unsigned char g_tester_check_command(unsigned char *input_string);
    183 
    184 #endif /* G_TESTER_H */
    185 
    186