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 CU_CMD_H 22 #define CU_CMD_H 23 24 #ifndef _WINDOWS 25 #include <unistd.h> 26 #include <sys/socket.h> 27 #include <linux/if.h> 28 #include <linux/wireless.h> 29 #endif /* __LINUX__ */ 30 31 #ifdef _WINDOWS 32 #endif 33 34 #include "paramOut.h" 35 #include "scanMngrTypes.h" 36 37 #ifdef EXC_MODULE_INCLUDED 38 #include "TI_AdapterEXC.h" 39 #endif /*EXC_MODULE_INCLUDED*/ 40 41 #include "TI_AdapterApiC.h" 42 43 #include "console.h" 44 45 #ifndef _WINDOWS 46 #define stricmp strcasecmp 47 #endif 48 49 #ifdef EXC_MODULE_INCLUDED 50 # include "cu_cmd_exc.h" 51 #else 52 # define INCLUDE_EXC_TYPE_NAMES 53 #endif 54 55 extern scan_Params_t appScanParams; 56 57 void init_scan_params(void); 58 59 void cmd_show_status(ConParm_t parm[], U16 nParms); 60 void cmd_show_site_table(ConParm_t parm[], U16 nParms); 61 void cmd_connect(ConParm_t parm[], U16 nParms); 62 void cmd_disassociate(ConParm_t parm[], U16 nParms); 63 void cmd_show_advanced_params(ConParm_t parm[], U16 nParms); 64 void cmd_show_statistics(ConParm_t parm[], U16 nParms); 65 void cmd_show_tx_statistics(ConParm_t parm[], U16 nParms); 66 void cmd_show_power_consumption_stats(ConParm_t parm[]); 67 void cmd_show_about(ConParm_t parm[], U16 nParms); 68 void cmd_modify_ssid(ConParm_t parm[], U16 nParms); 69 void cmd_bssid_list(ConParm_t parm[], U16 nParms); 70 void cmd_Full_bssid_list(ConParm_t parm[], U16 nParms); 71 void cmd_FullPrimaryBbssid(ConParm_t parm[], U16 nParms); 72 73 74 void cmd_Scan_Start(ConParm_t parm[], U16 nParms); 75 void cmd_Scan_Stop(ConParm_t parm[], U16 nParms); 76 void cmd_Scan_app_global_config(ConParm_t parm[], U16 nParms); 77 void cmd_Scan_app_channel_config(ConParm_t parm[], U16 nParms); 78 void cmd_Scan_app_clear(ConParm_t parm[], U16 nParms); 79 void cmd_Scan_app_display(ConParm_t parm[], U16 nParms); 80 81 void cmd_Scan_policy_global_config(ConParm_t parm[], U16 nParms); 82 void cmd_Scan_band_global_config(ConParm_t parm[], U16 nParms); 83 void cmd_Scan_band_channel_config(ConParm_t parm[], U16 nParms); 84 void cmd_Scan_band_track_config(ConParm_t parm[], U16 nParms); 85 void cmd_Scan_band_discover_config(ConParm_t parm[], U16 nParms); 86 void cmd_Scan_band_immed_config(ConParm_t parm[], U16 nParms); 87 void cmd_Scan_policy_display(ConParm_t parm[], U16 nParms); 88 void cmd_Scan_print_band( int i ); 89 void cmd_Scan_print_method( scan_Method_t* scanMethod ); 90 void cmd_Scan_print_basic_method( scan_basicMethodParams_t* basicMethodParams ); 91 void cmd_Scan_print_triggered_method( scan_TidTriggeredMethodParams_t* triggeredMethodParams ); 92 void cmd_Scan_print_sps_method( scan_SPSMethodParams_t* spsMethodParams ); 93 void cmd_Scan_policy_clear(ConParm_t parm[], U16 nParms); 94 void cmd_Scan_policy_store(ConParm_t parm[], U16 nParms); 95 void cmd_Scan_get_bss_list(ConParm_t parm[], U16 nParms); 96 97 void cmd_get_selected_bssid_info(ConParm_t parm[], U16 nParms); 98 void cmd_get_driver_state(ConParm_t parm[], U16 nParms); 99 100 void cmd_get_rsii_level(ConParm_t parm[], U16 nParms); 101 void cmd_get_snr_ratio(ConParm_t parm[], U16 nParms); 102 103 void cmd_set_clsfr_type (ConParm_t parm[], U16 nParms); 104 void cmd_insert_clsfr_entry (ConParm_t parm[], U16 uParms); 105 void cmd_remove_clsfr_entry (ConParm_t parm[], U16 uParms); 106 107 void cmd_set_qos_params(ConParm_t parm[], U16 nParms); 108 void cmd_set_dtag_to_ac_mapping_table(ConParm_t parm[], U16 nParms); 109 void cmd_set_vad(ConParm_t parm[], U16 nParms); 110 void cmd_config_tx_classifier(ConParm_t parm[], U16 nParms); 111 void cmd_poll_ap_packets(ConParm_t parm[], U16 nParms); 112 void cmd_set_rxTimeOut_params(ConParm_t parm[], U16 nParms); 113 void cmd_enable_rx_data_filters(ConParm_t parm[], U16 nParms); 114 void cmd_disable_rx_data_filters(ConParm_t parm[], U16 nParms); 115 void cmd_get_rx_data_filters_statistics(ConParm_t parm[], U16 nParms); 116 void cmd_add_rx_data_filter(ConParm_t parm[], U16 nParms); 117 void cmd_remove_rx_data_filter(ConParm_t parm[], U16 nParms); 118 void cmd_MaxRxLifetime_params(ConParm_t parm[], U16 nParms); 119 120 void cmd_add_tspec(ConParm_t parm[], U16 nParms); 121 void cmd_get_tspec_params(ConParm_t parm[], U16 nParms); 122 void cmd_delete_tspec(ConParm_t parm[], U16 nParms); 123 void cmd_get_ap_qos_params(ConParm_t parm[], U16 nParms); 124 void cmd_get_ap_qos_capabilities(ConParm_t parm[], U16 nParms); 125 void cmd_get_ac_status(ConParm_t parm[], U16 nParms); 126 int parseBssidIe(OS_802_11_BSSID_EX * bssid); 127 void cmd_get_desired_ps_mode(ConParm_t parm[], U16 nParms); 128 void cmd_medium_usage_threshold(ConParm_t parm[], U16 nParms); 129 void cmd_phy_rate_threshold(ConParm_t parm[], U16 nParms); 130 131 void cmd_traffic_intensity_threshold(ConParm_t parm[], U16 nParms); 132 void cmd_enable_traffic_events(ConParm_t parm[], U16 nParms); 133 void cmd_disable_traffic_events(ConParm_t parm[], U16 nParms); 134 135 void cmd_events_config(ConParm_t parm[], U16 nParms); 136 137 void cmd_show_regdomain_table(ConParm_t parm[], U16 nParms); 138 /*void cmd_net_network_in_use(ConParm_t parm[], U16 nParms); (not in use) */ 139 void cmd_net_current_regdomain(ConParm_t parm[], U16 nParms); 140 void cmd_enableDisable_802_11d(ConParm_t parm[], U16 nParms); 141 void cmd_enableDisable_802_11h(ConParm_t parm[], U16 nParms); 142 void cmd_d_Country_2_4Ie(ConParm_t parm[], U16 nParms); 143 void cmd_d_Country_5Ie(ConParm_t parm[], U16 nParms); 144 void cmd_DFS_range(ConParm_t parm[], U16 nParms); 145 146 147 148 void cmd_modify_channel(ConParm_t parm[], U16 nParms); 149 void cmd_modify_rate(ConParm_t parm[], U16 nParms); 150 void cmd_show_tx_power_level_table(ConParm_t parm[], U16 nParms); 151 void cmd_tx_power_dbm(ConParm_t parm[], U16 nParms); 152 void cmd_modify_frag_threshold(ConParm_t parm[], U16 nParms); 153 void cmd_modify_rts_threshold(ConParm_t parm[], U16 nParms); 154 void cmd_modify_preamble(ConParm_t parm[], U16 nParms); 155 void cmd_modify_short_retry(ConParm_t parm[], U16 nParms); 156 void cmd_modify_long_retry(ConParm_t parm[], U16 nParms); 157 void cmd_modify_short_slot(ConParm_t parm[], U16 nParms); 158 void cmd_modify_tx_antenna(ConParm_t parm[], U16 nParms); 159 void cmd_modify_rx_antenna(ConParm_t parm[], U16 nParms); 160 void cmd_modify_antenna_diversity(ConParm_t parm[], U16 nParms); 161 162 void cmd_modify_4x_state(ConParm_t parm[], U16 nParms); 163 void cmd_modify_ext_rates_ie(ConParm_t parm[], U16 nParms); 164 void cmd_modify_supported_rates(ConParm_t parm[], U16 nParms); 165 void cmd_modify_ctsToSelf(ConParm_t parm[], U16 nParms); 166 167 168 void cmd_debug_level(ConParm_t parm[], U16 nParms); 169 void cmd_hw_register(ConParm_t parm[], U16 nParms); 170 void cmd_debug_driver_print(ConParm_t parm[], U16 nParms); 171 void cmd_debug_buffer_put(ConParm_t parm[], U16 nParms); 172 #ifdef DRIVER_PROFILING 173 void cmd_profile_report(ConParm_t parm[], U16 nParms); 174 void cmd_profile_cpu_estimator_command(ConParm_t parm[], U16 nParms); 175 #endif 176 177 void cmd_report_set(ConParm_t parm[], U16 nParms); 178 void cmd_report_clear(ConParm_t parm[], U16 nParms); 179 void cmd_report_add(ConParm_t parm[], U16 nParms); 180 void cmd_report_severity_level(ConParm_t parm[], U16 nParms); 181 void cmd_report_severity_table(ConParm_t parm[], U16 nParms); 182 void cmd_report_os_dbg_state(ConParm_t parm[], U16 nParms); 183 184 void cmd_modify_bss_type(ConParm_t parm[], U16 nParms); 185 186 void cmd_init_driver(ConParm_t parm[], U16 nParms); 187 void cmd_start_driver(ConParm_t parm[], U16 nParms); 188 void cmd_stop_driver(ConParm_t parm[], U16 nParms); 189 190 void cmd_privacy_auth(ConParm_t parm[], U16 nParms); 191 void cmd_privacy_eap(ConParm_t parm[], U16 nParms); 192 void cmd_privacy_encrypt(ConParm_t parm[], U16 nParms); 193 void cmd_privacy_credent(ConParm_t parm[], U16 nParms); 194 void cmd_privacy_PSKPassphrase(ConParm_t parm[], U16 nParms); 195 void cmd_privacy_certificate(ConParm_t parm[], U16 nParms); 196 void cmd_privacy_addkey(ConParm_t parm[], U16 nParms); 197 void cmd_privacy_removekey(ConParm_t parm[], U16 nParms); 198 void cmd_privacy_cckm(ConParm_t parm[], U16 nParms); 199 void cmd_privacy_wpa_options(ConParm_t parm[], U16 nParms); 200 void cmd_privacy_getdefaultkey(ConParm_t parm[], U16 nParms); 201 202 void cmd_file_load(ConParm_t parm[], U16 nParms); 203 204 void cmd_set_power_mode(ConParm_t parm[], U16 nParms); 205 void cmd_set_PowerSave_PowerLevel(ConParm_t parm[], U16 nParms); 206 void cmd_set_Default_PowerLevel(ConParm_t parm[], U16 nParms); 207 void cmd_set_DozeModeInAutoPowerLevel(ConParm_t parm[], U16 nParms); 208 void cmd_set_min_power_level_boundary(ConParm_t parm[], U16 nParms); 209 210 void cmd_events_register(ConParm_t parm[], U16 nParms); 211 void cmd_events_unregister(ConParm_t parm[], U16 nParms); 212 213 void cmd_bt_coe_enable(ConParm_t parm[], U16 nParms); 214 void cmd_bt_coe_rate(ConParm_t parm[], U16 nParms); 215 void cmd_bt_coe_config(ConParm_t parm[], U16 nParms); 216 void cmd_bt_coe_get_status(ConParm_t parm[], U16 nParms); 217 218 void cmd_privacy_key_type(ConParm_t parm[], U16 nParms); 219 void cmd_privacy_mixed_mode(ConParm_t parm[], U16 nParms); 220 221 222 223 void cmd_Roaming_enable(ConParm_t parm[], U16 nParms); 224 void cmd_Roaming_disable(ConParm_t parm[], U16 nParms); 225 void cmd_Roaming_lowPassFilter(ConParm_t parm[], U16 nParms); 226 void cmd_Roaming_qualityIndicator(ConParm_t parm[], U16 nParms); 227 void cmd_Roaming_getConfParams(ConParm_t parm[], U16 nParms); 228 229 void cmd_Roaming_dataRetryThreshold(ConParm_t parm[], U16 nParms); 230 void cmd_Roaming_numExpectedTbttForBSSLoss(ConParm_t parm[], U16 nParms); 231 void cmd_Roaming_txRateThreshold(ConParm_t parm[], U16 nParms); 232 void cmd_Roaming_lowSnrThreshold(ConParm_t parm[], U16 nParms); 233 void cmd_Roaming_lowRssiThreshold(ConParm_t parm[], U16 nParms); 234 void cmd_Roaming_lowQualityForBackgroungScanCondition(ConParm_t parm[], U16 nParms); 235 void cmd_Roaming_normalQualityForBackgroungScanCondition(ConParm_t parm[], U16 nParms); 236 void cmd_Roaming_rssiFilterWeight(ConParm_t parm[], U16 nParms); 237 void cmd_Roaming_snrFilterWeight(ConParm_t parm[], U16 nParms); 238 239 void cmd_Beacon_Filter_Set_Desired_State(ConParm_t parm[], U16 nParms); 240 void cmd_Beacon_Filter_Get_Desired_State(ConParm_t parm[], U16 nParms); 241 242 void cmd_PLT_RegisterRead(ConParm_t parm[], U16 nParms); 243 void cmd_PLT_RegisterWrite(ConParm_t parm[], U16 nParms); 244 void cmd_PLT_RxPerStart(ConParm_t parm[], U16 nParms); 245 void cmd_PLT_RxPerStop(ConParm_t parm[], U16 nParms); 246 void cmd_PLT_RxPerClear(ConParm_t parm[], U16 nParms); 247 void cmd_PLT_RxPerGet(ConParm_t parm[], U16 nParms); 248 void cmd_PLT_TxCW(ConParm_t parm[], U16 nParms); 249 void cmd_PLT_TxContinues(ConParm_t parm[], U16 nParms); 250 void cmd_PLT_TxStop(ConParm_t parm[], U16 nParms); 251 void cmd_PLT_MIB_CounterTable(ConParm_t parm[], U16 nParms); 252 void cmd_PLT_MIB_StationID(ConParm_t parm[], U16 nParms); 253 void cmd_PLT_TxCalGainGet(ConParm_t parm[], U16 nParms); 254 void cmd_PLT_TxCalGainAdjust(ConParm_t parm[], U16 nParms); 255 void cmd_PLT_TxCalStart(ConParm_t parm[], U16 nParms); 256 void cmd_PLT_TxCalStop(ConParm_t parm[], U16 nParms); 257 void cmd_PLT_RxTxCalNVSUpdateBuffer(ConParm_t parm[], U16 nParms); 258 void cmd_PLT_RxCal(ConParm_t parm[], U16 nParms); 259 void cmd_PLT_RadioTune(ConParm_t parm[], U16 nParms); 260 void cmd_get_arpIpTable(ConParm_t parm[], U16 nParms); 261 void cmd_get_GroupAddressTable(ConParm_t parm[], U16 nParms); 262 263 #ifdef _WINDOWS 264 #endif /* ifdef _WINDOWS */ 265 266 U8* str2MACAddr(char *str, U8 *mac); 267 UINT8 Freq2Chan(UINT32 freq); 268 unsigned int char_2_hexa( char c ); 269 270 #ifdef DEBUG 271 # define CHK_NULL(p) ((p)) ? (void) 0 : fprintf(stderr, "\nfailed: '%s', file %s, line %d\n", #p, __FILE__, __LINE__); 272 # define CHK(p) ((!p)) ? (void) 0 : fprintf(stderr, "\nfailed: '%s', file %s, line %d\n", #p, __FILE__, __LINE__); 273 #else 274 # define CHK(p) (p) 275 # define CHK_NULL(p) (p) 276 #endif 277 278 #endif /* CU_CMD_H */ 279 280