Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | #if !defined(__SME_API_H) |
| 29 | #define __SME_API_H |
| 30 | |
| 31 | /** |
| 32 | * file smeApi.h |
| 33 | * |
| 34 | * brief prototype for SME APIs |
| 35 | */ |
| 36 | |
| 37 | /*-------------------------------------------------------------------------- |
| 38 | Include Files |
| 39 | ------------------------------------------------------------------------*/ |
| 40 | #include "csr_api.h" |
| 41 | #include "cds_mq.h" |
| 42 | #include "cdf_lock.h" |
| 43 | #include "cdf_types.h" |
| 44 | #include "sir_api.h" |
| 45 | #include "cds_reg_service.h" |
| 46 | #include "p2p_api.h" |
| 47 | #include "cds_regdomain.h" |
| 48 | #include "sme_internal.h" |
| 49 | |
| 50 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 51 | #include "oem_data_api.h" |
| 52 | #endif |
| 53 | |
| 54 | #if defined WLAN_FEATURE_VOWIFI |
| 55 | #include "sme_rrm_internal.h" |
| 56 | #endif |
| 57 | #include "sir_types.h" |
| 58 | /*-------------------------------------------------------------------------- |
| 59 | Preprocessor definitions and constants |
| 60 | ------------------------------------------------------------------------*/ |
| 61 | |
| 62 | #define SME_SUMMARY_STATS 1 |
| 63 | #define SME_GLOBAL_CLASSA_STATS 2 |
| 64 | #define SME_GLOBAL_CLASSB_STATS 4 |
| 65 | #define SME_GLOBAL_CLASSC_STATS 8 |
| 66 | #define SME_GLOBAL_CLASSD_STATS 16 |
| 67 | #define SME_PER_STA_STATS 32 |
| 68 | |
| 69 | #define SME_SESSION_ID_ANY 50 |
| 70 | |
| 71 | #define SME_INVALID_COUNTRY_CODE "XX" |
| 72 | |
| 73 | #define SME_2_4_GHZ_MAX_FREQ 3000 |
| 74 | |
| 75 | #define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \ |
| 76 | reg_info_1 &= 0xff00ffff; \ |
| 77 | reg_info_1 |= ((val & 0xff) << 16); \ |
| 78 | } while (0) |
| 79 | |
| 80 | #define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \ |
| 81 | reg_info_2 &= 0xffff00ff; \ |
| 82 | reg_info_2 |= ((val & 0xff) << 8); \ |
| 83 | } while (0) |
| 84 | |
| 85 | /* Macro to indicate invalid no of tspecs */ |
| 86 | #define INVALID_TSPEC 100 |
| 87 | |
| 88 | /*-------------------------------------------------------------------------- |
| 89 | Type declarations |
| 90 | ------------------------------------------------------------------------*/ |
| 91 | typedef void (*hdd_ftm_msg_processor)(void *); |
| 92 | typedef struct _smeConfigParams { |
| 93 | tCsrConfigParam csrConfig; |
| 94 | #if defined WLAN_FEATURE_VOWIFI |
| 95 | tRrmConfigParam rrmConfig; |
| 96 | #endif |
| 97 | #if defined FEATURE_WLAN_LFR |
| 98 | uint8_t isFastRoamIniFeatureEnabled; |
| 99 | uint8_t MAWCEnabled; |
| 100 | #endif |
| 101 | #if defined FEATURE_WLAN_ESE |
| 102 | uint8_t isEseIniFeatureEnabled; |
| 103 | #endif |
| 104 | #if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \ |
| 105 | defined(FEATURE_WLAN_LFR) |
| 106 | uint8_t isFastTransitionEnabled; |
| 107 | uint8_t RoamRssiDiff; |
| 108 | bool isWESModeEnabled; |
| 109 | #endif |
| 110 | uint8_t isAmsduSupportInAMPDU; |
| 111 | bool pnoOffload; |
| 112 | uint8_t fEnableDebugLog; |
| 113 | uint8_t max_intf_count; |
| 114 | bool enable5gEBT; |
| 115 | bool enableSelfRecovery; |
| 116 | uint32_t f_sta_miracast_mcc_rest_time_val; |
| 117 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 118 | bool sap_channel_avoidance; |
| 119 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 120 | uint8_t f_prefer_non_dfs_on_radar; |
| 121 | bool is_ps_enabled; |
| 122 | bool policy_manager_enabled; |
| 123 | uint32_t fine_time_meas_cap; |
| 124 | uint32_t dual_mac_feature_disable; |
| 125 | } tSmeConfigParams, *tpSmeConfigParams; |
| 126 | |
| 127 | #ifdef FEATURE_WLAN_TDLS |
| 128 | #define SME_TDLS_MAX_SUPP_CHANNELS 128 |
| 129 | #define SME_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 130 | |
| 131 | typedef struct _smeTdlsPeerCapParams { |
| 132 | uint8_t isPeerResponder; |
| 133 | uint8_t peerUapsdQueue; |
| 134 | uint8_t peerMaxSp; |
| 135 | uint8_t peerBuffStaSupport; |
| 136 | uint8_t peerOffChanSupport; |
| 137 | uint8_t peerCurrOperClass; |
| 138 | uint8_t selfCurrOperClass; |
| 139 | uint8_t peerChanLen; |
| 140 | uint8_t peerChan[SME_TDLS_MAX_SUPP_CHANNELS]; |
| 141 | uint8_t peerOperClassLen; |
| 142 | uint8_t peerOperClass[SME_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 143 | uint8_t prefOffChanNum; |
| 144 | uint8_t prefOffChanBandwidth; |
| 145 | uint8_t opClassForPrefOffChan; |
| 146 | uint8_t opClassForPrefOffChanIsSet; |
| 147 | } tSmeTdlsPeerCapParams; |
| 148 | |
| 149 | typedef enum { |
| 150 | eSME_TDLS_PEER_STATE_PEERING, |
| 151 | eSME_TDLS_PEER_STATE_CONNECTED, |
| 152 | eSME_TDLS_PEER_STATE_TEARDOWN |
| 153 | } eSmeTdlsPeerState; |
| 154 | |
| 155 | typedef struct _smeTdlsPeerStateParams { |
| 156 | uint32_t vdevId; |
| 157 | tSirMacAddr peerMacAddr; |
| 158 | uint32_t peerState; |
| 159 | tSmeTdlsPeerCapParams peerCap; |
| 160 | } tSmeTdlsPeerStateParams; |
| 161 | |
| 162 | #define ENABLE_CHANSWITCH 1 |
| 163 | #define DISABLE_CHANSWITCH 2 |
| 164 | #define BW_20_OFFSET_BIT 0 |
| 165 | #define BW_40_OFFSET_BIT 1 |
| 166 | #define BW_80_OFFSET_BIT 2 |
| 167 | #define BW_160_OFFSET_BIT 3 |
| 168 | typedef struct sme_tdls_chan_switch_params_struct { |
| 169 | uint32_t vdev_id; |
| 170 | tSirMacAddr peer_mac_addr; |
| 171 | uint16_t tdls_off_ch_bw_offset;/* Target Off Channel Bandwidth offset */ |
| 172 | uint8_t tdls_off_channel; /* Target Off Channel */ |
| 173 | uint8_t tdls_off_ch_mode; /* TDLS Off Channel Mode */ |
| 174 | uint8_t is_responder; /* is peer responder or initiator */ |
| 175 | } sme_tdls_chan_switch_params; |
| 176 | #endif /* FEATURE_WLAN_TDLS */ |
| 177 | |
| 178 | /* Thermal Mitigation*/ |
| 179 | typedef struct { |
| 180 | uint16_t smeMinTempThreshold; |
| 181 | uint16_t smeMaxTempThreshold; |
| 182 | } tSmeThermalLevelInfo; |
| 183 | |
| 184 | #define SME_MAX_THERMAL_LEVELS (4) |
| 185 | typedef struct { |
| 186 | /* Array of thermal levels */ |
| 187 | tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS]; |
| 188 | uint8_t smeThermalMgmtEnabled; |
| 189 | uint32_t smeThrottlePeriod; |
| 190 | } tSmeThermalParams; |
| 191 | |
| 192 | typedef enum { |
| 193 | SME_AC_BK = 0, |
| 194 | SME_AC_BE = 1, |
| 195 | SME_AC_VI = 2, |
| 196 | SME_AC_VO = 3 |
| 197 | } sme_ac_enum_type; |
| 198 | |
| 199 | /* TSPEC Direction Enum Type */ |
| 200 | typedef enum { |
| 201 | /* uplink */ |
| 202 | SME_TX_DIR = 0, |
| 203 | /* downlink */ |
| 204 | SME_RX_DIR = 1, |
| 205 | /* bidirectional */ |
| 206 | SME_BI_DIR = 2, |
| 207 | } sme_tspec_dir_type; |
| 208 | |
| 209 | /*------------------------------------------------------------------------- |
| 210 | Function declarations and documenation |
| 211 | ------------------------------------------------------------------------*/ |
| 212 | CDF_STATUS sme_open(tHalHandle hHal); |
| 213 | CDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, |
| 214 | COUNTRY_CODE_SOURCE cc_src); |
| 215 | CDF_STATUS sme_close(tHalHandle hHal); |
| 216 | CDF_STATUS sme_start(tHalHandle hHal); |
| 217 | CDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType); |
| 218 | CDF_STATUS sme_open_session(tHalHandle hHal, csr_roam_completeCallback callback, |
| 219 | void *pContext, uint8_t *pSelfMacAddr, |
| 220 | uint8_t *pbSessionId, uint32_t type, |
| 221 | uint32_t subType); |
| 222 | void sme_set_curr_device_mode(tHalHandle hHal, tCDF_CON_MODE currDeviceMode); |
| 223 | CDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId, |
| 224 | csr_roamSessionCloseCallback callback, |
| 225 | void *pContext); |
| 226 | CDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id, |
| 227 | struct roam_ext_params roam_params_src, int update_param); |
| 228 | CDF_STATUS sme_update_config(tHalHandle hHal, |
| 229 | tpSmeConfigParams pSmeConfigParams); |
| 230 | |
| 231 | #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) |
| 232 | CDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm); |
| 233 | #endif |
| 234 | |
| 235 | CDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams); |
| 236 | CDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal, |
| 237 | v_REGDOMAIN_t *domainIdSoftAp); |
| 238 | CDF_STATUS sme_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode); |
| 239 | CDF_STATUS sme_change_config_params(tHalHandle hHal, |
| 240 | tCsrUpdateConfigParam *pUpdateConfigParam); |
| 241 | CDF_STATUS sme_hdd_ready_ind(tHalHandle hHal); |
| 242 | CDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg); |
| 243 | void sme_free_msg(tHalHandle hHal, cds_msg_t *pMsg); |
| 244 | CDF_STATUS sme_scan_request(tHalHandle hHal, uint8_t sessionId, |
| 245 | tCsrScanRequest *, csr_scan_completeCallback callback, |
| 246 | void *pContext); |
| 247 | CDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId, |
| 248 | tCsrScanResultFilter *pFilter, |
| 249 | tScanResultHandle *phResult); |
| 250 | CDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal, |
| 251 | tCsrRoamProfile *profile, |
| 252 | tScanResultHandle *scan_cache, |
| 253 | uint8_t *ap_chnl_id); |
| 254 | bool sme_store_joinreq_param(tHalHandle hal_handle, |
| 255 | tCsrRoamProfile *profile, |
| 256 | tScanResultHandle scan_cache, |
| 257 | uint32_t *roam_id, |
| 258 | uint32_t session_id); |
| 259 | bool sme_clear_joinreq_param(tHalHandle hal_handle, |
| 260 | uint32_t session_id); |
| 261 | CDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle, |
| 262 | uint32_t *roam_id, |
| 263 | uint32_t session_id); |
| 264 | CDF_STATUS sme_scan_flush_result(tHalHandle hHal); |
| 265 | CDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId); |
| 266 | CDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId); |
| 267 | tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle, |
| 268 | tScanResultHandle hScanResult); |
| 269 | tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle, |
| 270 | tScanResultHandle hScanResult); |
| 271 | CDF_STATUS sme_scan_result_purge(tHalHandle hHal, |
| 272 | tScanResultHandle hScanResult); |
| 273 | CDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId, |
| 274 | tPmkidCandidateInfo *pPmkidList, |
| 275 | uint32_t *pNumItems); |
| 276 | CDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId, |
| 277 | tCsrRoamProfile *pProfile, uint32_t *pRoamId); |
| 278 | CDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId, |
| 279 | tCsrRoamProfile *pProfile, |
| 280 | tCsrRoamModifyProfileFields modProfileFields, |
| 281 | uint32_t *pRoamId, bool fForce); |
| 282 | CDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId); |
| 283 | CDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId, |
| 284 | eCsrRoamDisconnectReason reason); |
| 285 | CDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId); |
| 286 | CDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId, |
| 287 | CDF_MODULE_ID modId, void *pUsrContext, |
| 288 | void *pfnSapEventCallback, |
| 289 | uint8_t *pAssocStasBuf); |
| 290 | CDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId, |
| 291 | const uint8_t *pPeerMacAddr); |
| 292 | CDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId, |
| 293 | struct tagCsrDelStaParams *pDelStaParams); |
| 294 | CDF_STATUS sme_roam_tkip_counter_measures(tHalHandle hHal, uint8_t sessionId, |
| 295 | bool bEnable); |
| 296 | CDF_STATUS sme_roam_get_wps_session_overlap(tHalHandle hHal, uint8_t sessionId, |
| 297 | void *pUsrContext, |
| 298 | void *pfnSapEventCallback, |
| 299 | struct cdf_mac_addr pRemoveMac); |
| 300 | CDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId, |
| 301 | eCsrConnectState *pState); |
| 302 | CDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId, |
| 303 | tCsrRoamConnectedProfile *pProfile); |
| 304 | CDF_STATUS sme_roam_free_connect_profile(tHalHandle hHal, |
| 305 | tCsrRoamConnectedProfile *pProfile); |
| 306 | CDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
| 307 | tPmkidCacheInfo *pPMKIDCache, |
| 308 | uint32_t numItems, |
| 309 | bool update_entire_cache); |
| 310 | |
| 311 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 312 | CDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId, |
| 313 | uint8_t *pPSK_PMK, size_t pmk_len); |
| 314 | #endif |
| 315 | CDF_STATUS sme_roam_get_security_req_ie(tHalHandle hHal, uint8_t sessionId, |
| 316 | uint32_t *pLen, uint8_t *pBuf, |
| 317 | eCsrSecurityType secType); |
| 318 | CDF_STATUS sme_roam_get_security_rsp_ie(tHalHandle hHal, uint8_t sessionId, |
| 319 | uint32_t *pLen, uint8_t *pBuf, |
| 320 | eCsrSecurityType secType); |
| 321 | uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId); |
| 322 | CDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
| 323 | uint32_t *pNum, |
| 324 | tPmkidCacheInfo *pPmkidCache); |
| 325 | CDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam); |
| 326 | CDF_STATUS sme_get_statistics(tHalHandle hHal, |
| 327 | eCsrStatsRequesterType requesterId, |
| 328 | uint32_t statsMask, tCsrStatsCallback callback, |
| 329 | uint32_t periodicity, bool cache, uint8_t staId, |
| 330 | void *pContext, uint8_t sessionId); |
| 331 | CDF_STATUS sme_get_rssi(tHalHandle hHal, |
| 332 | tCsrRssiCallback callback, |
| 333 | uint8_t staId, struct cdf_mac_addr bssId, int8_t lastRSSI, |
| 334 | void *pContext, void *p_cds_context); |
| 335 | CDF_STATUS sme_get_snr(tHalHandle hHal, |
| 336 | tCsrSnrCallback callback, |
| 337 | uint8_t staId, struct cdf_mac_addr bssId, void *pContext); |
| 338 | #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) |
| 339 | CDF_STATUS sme_get_tsm_stats(tHalHandle hHal, |
| 340 | tCsrTsmStatsCallback callback, |
| 341 | uint8_t staId, struct cdf_mac_addr bssId, |
| 342 | void *pContext, void *p_cds_context, uint8_t tid); |
| 343 | CDF_STATUS sme_set_cckm_ie(tHalHandle hHal, |
| 344 | uint8_t sessionId, |
| 345 | uint8_t *pCckmIe, uint8_t cckmIeLen); |
| 346 | CDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, |
| 347 | const tCsrEseBeaconReq *pEseBcnReq); |
| 348 | #endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ |
| 349 | CDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value); |
| 350 | CDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
| 351 | uint32_t length); |
| 352 | CDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id, |
| 353 | uint32_t *cfg_value); |
| 354 | CDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
| 355 | uint32_t *length); |
| 356 | CDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId, |
| 357 | tCsrRoamModifyProfileFields * |
| 358 | pModifyProfileFields); |
| 359 | |
| 360 | extern CDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode); |
| 361 | |
| 362 | void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag); |
| 363 | extern CDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal, |
| 364 | csr_scan_completeCallback); |
| 365 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 366 | extern CDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal, |
| 367 | sme_send_oem_data_rsp_msg callback); |
| 368 | #endif |
| 369 | |
| 370 | extern CDF_STATUS sme_wow_add_pattern(tHalHandle hHal, |
| 371 | struct wow_add_pattern *pattern, uint8_t sessionId); |
| 372 | extern CDF_STATUS sme_wow_delete_pattern(tHalHandle hHal, |
| 373 | struct wow_delete_pattern *pattern, uint8_t sessionId); |
| 374 | |
| 375 | void sme_register_ftm_msg_processor(tHalHandle hal, |
| 376 | hdd_ftm_msg_processor callback); |
| 377 | |
| 378 | extern CDF_STATUS sme_enter_wowl(tHalHandle hHal, |
| 379 | void (*enter_wowl_callback_routine)(void |
| 380 | *callbackContext, |
| 381 | CDF_STATUS status), |
| 382 | void *enter_wowl_callback_context, |
| 383 | #ifdef WLAN_WAKEUP_EVENTS |
| 384 | void (*wake_reason_ind_cb)(void *callbackContext, |
| 385 | tpSirWakeReasonInd |
| 386 | wake_reason_ind), |
| 387 | void *wake_reason_ind_cb_ctx, |
| 388 | #endif /* WLAN_WAKEUP_EVENTS */ |
| 389 | tpSirSmeWowlEnterParams wowl_enter_params, |
| 390 | uint8_t sessionId); |
| 391 | |
| 392 | extern CDF_STATUS sme_exit_wowl(tHalHandle hHal, |
| 393 | tpSirSmeWowlExitParams wowl_exit_params); |
| 394 | CDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId, |
| 395 | tCsrRoamSetKey *pSetKey, uint32_t *pRoamId); |
| 396 | CDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen); |
| 397 | |
| 398 | |
| 399 | void sme_apply_channel_power_info_to_fw(tHalHandle hHal); |
| 400 | |
| 401 | /* some support functions */ |
| 402 | bool sme_is11d_supported(tHalHandle hHal); |
| 403 | bool sme_is11h_supported(tHalHandle hHal); |
| 404 | bool sme_is_wmm_supported(tHalHandle hHal); |
| 405 | |
| 406 | typedef void (*tSmeChangeCountryCallback)(void *pContext); |
| 407 | CDF_STATUS sme_change_country_code(tHalHandle hHal, |
| 408 | tSmeChangeCountryCallback callback, |
| 409 | uint8_t *pCountry, |
| 410 | void *pContext, |
| 411 | void *p_cds_context, |
| 412 | tAniBool countryFromUserSpace, |
| 413 | tAniBool sendRegHint); |
| 414 | CDF_STATUS sme_generic_change_country_code(tHalHandle hHal, |
| 415 | uint8_t *pCountry, |
| 416 | v_REGDOMAIN_t reg_domain); |
| 417 | |
| 418 | CDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, |
| 419 | uint8_t device_mode, |
| 420 | uint8_t *macAddr, uint8_t sessionId); |
| 421 | CDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, |
| 422 | uint8_t device_mode, |
| 423 | uint8_t *macAddr, uint8_t sessionId); |
| 424 | void sme_set_cfg_privacy(tHalHandle hHal, tCsrRoamProfile *pProfile, |
| 425 | bool fPrivacy); |
| 426 | void sme_get_recovery_stats(tHalHandle hHal); |
| 427 | #if defined WLAN_FEATURE_VOWIFI |
| 428 | CDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId, |
| 429 | tpRrmNeighborReq pRrmNeighborReq, |
| 430 | tpRrmNeighborRspCallbackInfo callbackInfo); |
| 431 | #endif |
| 432 | CDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal, |
| 433 | tSirVersionType * pVersion); |
| 434 | CDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal, |
| 435 | tSirVersionType *pVersion); |
| 436 | CDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal, |
| 437 | uint8_t *pVersion, uint32_t versionBufferSize); |
| 438 | CDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal, |
| 439 | uint8_t *pVersion, uint32_t versionBufferSize); |
| 440 | #ifdef FEATURE_WLAN_WAPI |
| 441 | CDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId, |
| 442 | tBkidCandidateInfo * pBkidList, |
| 443 | uint32_t *pNumItems); |
| 444 | #endif /* FEATURE_WLAN_WAPI */ |
| 445 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 446 | CDF_STATUS sme_oem_data_req(tHalHandle hHal, |
| 447 | uint8_t sessionId, |
| 448 | tOemDataReqConfig *, |
| 449 | uint32_t *pOemDataReqID, |
| 450 | oem_data_oem_data_reqCompleteCallback callback, |
| 451 | void *pContext); |
| 452 | #endif /*FEATURE_OEM_DATA_SUPPORT */ |
| 453 | CDF_STATUS sme_roam_update_apwpsie(tHalHandle, uint8_t sessionId, |
| 454 | tSirAPWPSIEs * pAPWPSIES); |
| 455 | CDF_STATUS sme_roam_update_apwparsni_es(tHalHandle hHal, uint8_t sessionId, |
| 456 | tSirRSNie *pAPSirRSNie); |
| 457 | CDF_STATUS sme_change_mcc_beacon_interval(tHalHandle hHal, uint8_t sessionId); |
| 458 | CDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId, |
| 459 | tpSirHostOffloadReq pRequest); |
| 460 | CDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId, |
| 461 | tpSirKeepAliveReq pRequest); |
| 462 | CDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel, |
| 463 | uint8_t sessionId); |
| 464 | CDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
| 465 | uint16_t frameType, uint8_t *matchData, |
| 466 | uint16_t matchLen); |
| 467 | CDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
| 468 | uint16_t frameType, uint8_t *matchData, |
| 469 | uint16_t matchLen); |
| 470 | CDF_STATUS sme_configure_rxp_filter(tHalHandle hHal, |
| 471 | tpSirWlanSetRxpFilters wlanRxpFilterParam); |
| 472 | CDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake); |
| 473 | CDF_STATUS sme_configure_suspend_ind(tHalHandle hHal, |
| 474 | tpSirWlanSuspendParam wlanSuspendParam, |
| 475 | csr_readyToSuspendCallback, |
| 476 | void *callbackContext); |
| 477 | CDF_STATUS sme_configure_resume_req(tHalHandle hHal, |
| 478 | tpSirWlanResumeParam wlanResumeParam); |
| 479 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
| 480 | CDF_STATUS sme_configure_ext_wo_w(tHalHandle hHal, |
| 481 | tpSirExtWoWParams wlanExtParams, |
| 482 | csr_readyToSuspendCallback callback, |
| 483 | void *callbackContext); |
| 484 | CDF_STATUS sme_configure_app_type1_params(tHalHandle hHal, |
| 485 | tpSirAppType1Params wlanAppType1Params); |
| 486 | CDF_STATUS sme_configure_app_type2_params(tHalHandle hHal, |
| 487 | tpSirAppType2Params wlanAppType2Params); |
| 488 | #endif |
| 489 | int8_t sme_get_infra_session_id(tHalHandle hHal); |
| 490 | uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId); |
| 491 | uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal); |
| 492 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 493 | uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch, |
| 494 | eCsrPhyMode sapPhyMode, |
| 495 | uint8_t cc_switch_mode); |
| 496 | #endif |
| 497 | CDF_STATUS sme_abort_mac_scan(tHalHandle hHal, uint8_t sessionId, |
| 498 | eCsrAbortReason reason); |
| 499 | CDF_STATUS sme_get_cfg_valid_channels(tHalHandle hHal, uint8_t *aValidChannels, |
| 500 | uint32_t *len); |
| 501 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 502 | CDF_STATUS sme_set_preferred_network_list(tHalHandle hHal, |
| 503 | tpSirPNOScanReq pRequest, |
| 504 | uint8_t sessionId, |
| 505 | preferred_network_found_ind_cb |
| 506 | callbackRoutine, void *callbackContext); |
| 507 | |
| 508 | CDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg); |
| 509 | #endif /* FEATURE_WLAN_SCAN_PNO */ |
| 510 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 511 | CDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, |
| 512 | tpSirRcvFltMcAddrList pMulticastAddrs); |
| 513 | CDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal, |
| 514 | tpSirRcvPktFilterCfgType pRcvPktFilterCfg, |
| 515 | uint8_t sessionId); |
| 516 | CDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal, |
| 517 | tpSirRcvFltPktClearParam pRcvFltPktClearParam, |
| 518 | uint8_t sessionId); |
| 519 | #endif /* WLAN_FEATURE_PACKET_FILTERING */ |
| 520 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
| 521 | CDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId, |
| 522 | eCsrBand eBand); |
| 523 | CDF_STATUS sme_get_freq_band(tHalHandle hHal, eCsrBand *pBand); |
| 524 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
| 525 | CDF_STATUS sme_set_gtk_offload(tHalHandle hal_ctx, |
| 526 | tpSirGtkOffloadParams request, |
| 527 | uint8_t session_id); |
| 528 | CDF_STATUS sme_get_gtk_offload(tHalHandle hal_ctx, |
| 529 | gtk_offload_get_info_callback callback_routine, |
| 530 | void *callback_context, uint8_t session_id); |
| 531 | #endif /* WLAN_FEATURE_GTK_OFFLOAD */ |
| 532 | uint16_t sme_chn_to_freq(uint8_t chanNum); |
| 533 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
| 534 | CDF_STATUS sme_set_max_tx_power(tHalHandle hHal, tSirMacAddr pBssid, |
| 535 | tSirMacAddr pSelfMacAddress, int8_t dB); |
| 536 | CDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t db); |
| 537 | CDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId, |
| 538 | tSirMacAddr pBSSId, |
| 539 | tCDF_CON_MODE dev_mode, int power); |
| 540 | CDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr); |
| 541 | CDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId, |
| 542 | uint8_t ssidHidden); |
| 543 | CDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel, |
| 544 | uint16_t tmMode); |
| 545 | void sme_feature_caps_exchange(tHalHandle hHal); |
| 546 | void sme_disable_feature_capablity(uint8_t feature_index); |
| 547 | void sme_reset_power_values_for5_g(tHalHandle hHal); |
| 548 | #if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \ |
| 549 | defined(FEATURE_WLAN_LFR) |
| 550 | CDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz); |
| 551 | CDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand); |
| 552 | CDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId, |
| 553 | const uint8_t nProbes); |
| 554 | CDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal, |
| 555 | uint8_t sessionId, |
| 556 | const uint16_t nRoamScanHomeAwayTime, |
| 557 | const bool bSendOffloadCmd); |
| 558 | |
| 559 | bool sme_get_roam_intra_band(tHalHandle hHal); |
| 560 | uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal); |
| 561 | uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal); |
| 562 | CDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId, |
| 563 | uint8_t RoamRssiDiff); |
| 564 | CDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal, |
| 565 | bool isFastTransitionEnabled); |
| 566 | CDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled, |
| 567 | uint8_t sessionId); |
| 568 | CDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId, |
| 569 | bool roamScanControl); |
| 570 | #endif /* (WLAN_FEATURE_VOWIFI_11R)||(FEATURE_WLAN_ESE)||(FEATURE_WLAN_LFR) */ |
| 571 | |
| 572 | #ifdef FEATURE_WLAN_LFR |
| 573 | CDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal, |
| 574 | uint8_t sessionId, |
| 575 | const bool |
| 576 | isFastRoamIniFeatureEnabled); |
| 577 | CDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal, |
| 578 | const bool MAWCEnabled); |
| 579 | CDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason); |
| 580 | CDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId, |
| 581 | uint8_t reason); |
| 582 | CDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal, |
| 583 | bool bFastRoamInConIniFeatureEnabled); |
| 584 | #endif /* FEATURE_WLAN_LFR */ |
| 585 | #ifdef FEATURE_WLAN_ESE |
| 586 | CDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId, |
| 587 | const bool isEseIniFeatureEnabled); |
| 588 | #endif /* FEATURE_WLAN_ESE */ |
| 589 | CDF_STATUS sme_update_config_fw_rssi_monitoring(tHalHandle hHal, |
| 590 | bool fEnableFwRssiMonitoring); |
| 591 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 592 | CDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal, |
| 593 | uint8_t sessionId, |
| 594 | const uint8_t nRoamRescanRssiDiff); |
| 595 | uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal); |
| 596 | |
| 597 | CDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal, |
| 598 | uint8_t sessionId, |
| 599 | const uint8_t nOpportunisticThresholdDiff); |
| 600 | uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal); |
| 601 | CDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal, |
| 602 | uint8_t sessionId, uint8_t neighborLookupRssiThreshold); |
| 603 | CDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal, |
| 604 | uint8_t sessionId, uint8_t delay_before_vdev_stop); |
| 605 | uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal); |
| 606 | CDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal, |
| 607 | uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod); |
| 608 | uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal); |
| 609 | uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal); |
| 610 | CDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal, |
| 611 | uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod); |
| 612 | CDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal, |
| 613 | const uint16_t nNeighborScanMinChanTime, |
| 614 | uint8_t sessionId); |
| 615 | CDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal, |
| 616 | uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime); |
| 617 | uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal, |
| 618 | uint8_t sessionId); |
| 619 | uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 620 | uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 621 | uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId); |
| 622 | uint32_t sme_get_lim_sme_state(tHalHandle hHal); |
| 623 | uint32_t sme_get_lim_mlm_state(tHalHandle hHal); |
| 624 | bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId); |
| 625 | uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId); |
| 626 | uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId); |
| 627 | uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal, |
| 628 | uint8_t sessionId); |
| 629 | CDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId, |
| 630 | const uint16_t nNeighborScanPeriod); |
| 631 | uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId); |
| 632 | CDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal, |
| 633 | uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt); |
| 634 | uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal); |
| 635 | CDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId, |
| 636 | const uint8_t nRoamBmissFinalBcnt); |
| 637 | uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal); |
| 638 | CDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId, |
| 639 | const uint8_t nRoamBeaconRssiWeight); |
| 640 | uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal); |
| 641 | #endif |
| 642 | #if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \ |
| 643 | defined(FEATURE_WLAN_LFR) |
| 644 | uint8_t sme_get_roam_rssi_diff(tHalHandle hHal); |
| 645 | CDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId, |
| 646 | uint8_t *pChannelList, |
| 647 | uint8_t numChannels); |
| 648 | #ifdef FEATURE_WLAN_ESE_UPLOAD |
| 649 | CDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal, |
| 650 | uint8_t sessionId, uint8_t *pChannelList, |
| 651 | uint8_t numChannels); |
| 652 | #endif |
| 653 | CDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal, |
| 654 | uint8_t *pChannelList, uint8_t *pNumChannels, |
| 655 | uint8_t sessionId); |
| 656 | bool sme_get_is_ese_feature_enabled(tHalHandle hHal); |
| 657 | bool sme_get_wes_mode(tHalHandle hHal); |
| 658 | bool sme_get_roam_scan_control(tHalHandle hHal); |
| 659 | bool sme_get_is_lfr_feature_enabled(tHalHandle hHal); |
| 660 | bool sme_get_is_ft_feature_enabled(tHalHandle hHal); |
| 661 | #endif |
| 662 | CDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal, |
| 663 | bool nRoamScanOffloadEnabled); |
| 664 | uint8_t sme_is_feature_supported_by_fw(uint8_t featEnumValue); |
| 665 | #ifdef FEATURE_WLAN_TDLS |
| 666 | CDF_STATUS sme_send_tdls_link_establish_params(tHalHandle hHal, |
| 667 | uint8_t sessionId, |
| 668 | const tSirMacAddr peerMac, |
| 669 | tCsrTdlsLinkEstablishParams * |
| 670 | tdlsLinkEstablishParams); |
| 671 | CDF_STATUS sme_send_tdls_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
| 672 | const tSirMacAddr peerMac, uint8_t frame_type, |
| 673 | uint8_t dialog, uint16_t status, |
| 674 | uint32_t peerCapability, uint8_t *buf, |
| 675 | uint8_t len, uint8_t responder); |
| 676 | CDF_STATUS sme_change_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId, |
| 677 | const tSirMacAddr peerMac, |
| 678 | tCsrStaParams *pstaParams); |
| 679 | CDF_STATUS sme_add_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId, |
| 680 | const tSirMacAddr peerMac); |
| 681 | CDF_STATUS sme_delete_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId, |
| 682 | const tSirMacAddr peerMac); |
| 683 | void sme_set_tdls_power_save_prohibited(tHalHandle hHal, uint32_t sessionId, |
| 684 | bool val); |
| 685 | CDF_STATUS sme_send_tdls_chan_switch_req( |
| 686 | tHalHandle hal, |
| 687 | sme_tdls_chan_switch_params *ch_switch_params); |
| 688 | #endif |
| 689 | |
| 690 | /* |
| 691 | * SME API to enable/disable WLAN driver initiated SSR |
| 692 | */ |
| 693 | void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR); |
| 694 | CDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode); |
| 695 | eCsrPhyMode sme_get_phy_mode(tHalHandle hHal); |
| 696 | /* |
| 697 | * SME API to determine the channel bonding mode |
| 698 | */ |
| 699 | CDF_STATUS sme_set_ch_params(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, |
| 700 | uint8_t channel, uint8_t ht_sec_ch, chan_params_t *ch_params); |
| 701 | CDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId, |
| 702 | tCsrHandoffRequest *pHandoffInfo); |
| 703 | CDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal); |
| 704 | #ifdef FEATURE_WLAN_LPHB |
| 705 | CDF_STATUS sme_lphb_config_req(tHalHandle hHal, |
| 706 | tSirLPHBReq * lphdReq, |
| 707 | void (*pCallbackfn)(void *pHddCtx, |
| 708 | tSirLPHBInd * indParam)); |
| 709 | #endif /* FEATURE_WLAN_LPHB */ |
| 710 | CDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn |
| 711 | *addPeriodicTxPtrnParams); |
| 712 | CDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn |
| 713 | *delPeriodicTxPtrnParams); |
| 714 | void sme_enable_disable_split_scan(tHalHandle hHal, uint8_t nNumStaChan, |
| 715 | uint8_t nNumP2PChan); |
| 716 | CDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, |
| 717 | tSirRateUpdateInd *rateUpdateParams); |
| 718 | CDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, |
| 719 | const uint8_t *pBSSId, bool flush_cache); |
| 720 | void sme_get_command_q_status(tHalHandle hHal); |
| 721 | |
| 722 | /* |
| 723 | * SME API to enable/disable idle mode powersave |
| 724 | * This should be called only if powersave offload |
| 725 | * is enabled |
| 726 | */ |
| 727 | CDF_STATUS sme_set_idle_powersave_config(void *cds_context, |
| 728 | tHalHandle hHal, uint32_t value); |
| 729 | CDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value); |
| 730 | |
| 731 | /*SME API to convert convert the ini value to the ENUM used in csr and MAC*/ |
| 732 | ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value); |
| 733 | int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab, |
| 734 | int value); |
| 735 | int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id, |
| 736 | uint16_t ht_capab); |
| 737 | #ifdef QCA_HT_2040_COEX |
| 738 | CDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, |
| 739 | struct cdf_mac_addr macAddrSTA, |
| 740 | uint8_t sessionId, |
| 741 | uint8_t channel_type); |
| 742 | CDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId, |
| 743 | uint8_t channel_type, bool obssEnabled); |
| 744 | #endif |
| 745 | CDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId, |
| 746 | uint32_t *regInfo1, uint32_t *regInfo2); |
| 747 | #ifdef FEATURE_WLAN_TDLS |
| 748 | CDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams, |
| 749 | bool useSmeLock); |
| 750 | CDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal, |
| 751 | tSmeTdlsPeerStateParams *pPeerStateParams); |
| 752 | #endif /* FEATURE_WLAN_TDLS */ |
| 753 | #ifdef FEATURE_WLAN_CH_AVOID |
| 754 | CDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal, |
| 755 | void (*pCallbackfn)(void *hdd_context, void *indi_param)); |
| 756 | CDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal); |
| 757 | #else |
| 758 | static inline |
| 759 | CDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal, |
| 760 | void (*pCallbackfn)(void *hdd_context, void *indi_param)) |
| 761 | { |
| 762 | return CDF_STATUS_E_NOSUPPORT; |
| 763 | } |
| 764 | |
| 765 | static inline |
| 766 | CDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal) |
| 767 | { |
| 768 | return CDF_STATUS_E_NOSUPPORT; |
| 769 | } |
| 770 | #endif /* FEATURE_WLAN_CH_AVOID */ |
| 771 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 772 | CDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void)); |
| 773 | CDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value); |
| 774 | #endif |
| 775 | CDF_STATUS sme_roam_channel_change_req(tHalHandle hHal, |
| 776 | struct cdf_mac_addr bssid, uint32_t cb_mode, |
| 777 | tCsrRoamProfile *profile); |
| 778 | CDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal, |
| 779 | struct cdf_mac_addr bssid, uint8_t dfsCacWaitStatus); |
| 780 | CDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct cdf_mac_addr bssid, |
| 781 | uint8_t targetChannel, uint8_t csaIeReqd, uint8_t ch_bandwidth); |
| 782 | CDF_STATUS sme_init_thermal_info(tHalHandle hHal, |
| 783 | tSmeThermalParams thermalParam); |
| 784 | CDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level); |
| 785 | CDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx); |
| 786 | CDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq, |
| 787 | void *plsContext, |
| 788 | void (*pCallbackfn)(tSirLinkSpeedInfo *indParam, |
| 789 | void *pContext)); |
| 790 | CDF_STATUS sme_modify_add_ie(tHalHandle hHal, |
| 791 | tSirModifyIE *pModifyIE, eUpdateIEsType updateType); |
| 792 | CDF_STATUS sme_update_add_ie(tHalHandle hHal, |
| 793 | tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType); |
| 794 | CDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value); |
| 795 | CDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, |
| 796 | bool disablefwd); |
| 797 | uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal); |
| 798 | uint32_t sme_get_channel_bonding_mode24_g(tHalHandle hHal); |
| 799 | #ifdef WLAN_FEATURE_STATS_EXT |
| 800 | typedef struct sStatsExtRequestReq { |
| 801 | uint32_t request_data_len; |
| 802 | uint8_t *request_data; |
| 803 | } tStatsExtRequestReq, *tpStatsExtRequestReq; |
| 804 | typedef void (*StatsExtCallback)(void *, tStatsExtEvent *); |
| 805 | void sme_stats_ext_register_callback(tHalHandle hHal, |
| 806 | StatsExtCallback callback); |
| 807 | CDF_STATUS sme_stats_ext_request(uint8_t session_id, |
| 808 | tpStatsExtRequestReq input); |
| 809 | CDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg); |
| 810 | #endif |
| 811 | CDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal, |
| 812 | uint8_t sessionId, |
| 813 | uint8_t allowDFSChannelRoam); |
| 814 | uint8_t sme_get_dfs_scan_mode(tHalHandle hHal); |
| 815 | bool sme_sta_in_middle_of_roaming(tHalHandle hHal, uint8_t sessionId); |
| 816 | |
| 817 | #ifdef FEATURE_WLAN_EXTSCAN |
| 818 | CDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand, |
| 819 | uint32_t *aValidChannels, |
| 820 | uint8_t *pNumChannels); |
| 821 | CDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal, |
| 822 | tSirGetExtScanCapabilitiesReqParams *pReq); |
| 823 | CDF_STATUS sme_ext_scan_start(tHalHandle hHal, |
| 824 | tSirWifiScanCmdReqParams *pStartCmd); |
| 825 | CDF_STATUS sme_ext_scan_stop(tHalHandle hHal, |
| 826 | tSirExtScanStopReqParams *pStopReq); |
| 827 | CDF_STATUS sme_set_bss_hotlist(tHalHandle hHal, |
| 828 | tSirExtScanSetBssidHotListReqParams * |
| 829 | pSetHotListReq); |
| 830 | CDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal, |
| 831 | tSirExtScanResetBssidHotlistReqParams * |
| 832 | pResetReq); |
| 833 | CDF_STATUS sme_set_significant_change(tHalHandle hHal, |
| 834 | tSirExtScanSetSigChangeReqParams * |
| 835 | pSetSignificantChangeReq); |
| 836 | CDF_STATUS sme_reset_significant_change(tHalHandle hHal, |
| 837 | tSirExtScanResetSignificantChangeReqParams |
| 838 | *pResetReq); |
| 839 | CDF_STATUS sme_get_cached_results(tHalHandle hHal, |
| 840 | tSirExtScanGetCachedResultsReqParams * |
| 841 | pCachedResultsReq); |
| 842 | |
| 843 | CDF_STATUS sme_set_epno_list(tHalHandle hal, |
| 844 | struct wifi_epno_params *req_msg); |
| 845 | CDF_STATUS sme_set_passpoint_list(tHalHandle hal, |
| 846 | struct wifi_passpoint_req *req_msg); |
| 847 | CDF_STATUS sme_reset_passpoint_list(tHalHandle hal, |
| 848 | struct wifi_passpoint_req *req_msg); |
| 849 | CDF_STATUS |
| 850 | sme_set_ssid_hotlist(tHalHandle hal, |
| 851 | struct sir_set_ssid_hotlist_request *request); |
| 852 | |
| 853 | CDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal, |
| 854 | void (*pExtScanIndCb)(void *, const uint16_t, void *)); |
| 855 | #endif /* FEATURE_WLAN_EXTSCAN */ |
| 856 | CDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId); |
| 857 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
| 858 | CDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal, |
| 859 | tSirLLStatsClearReq * pclearStatsReq); |
| 860 | CDF_STATUS sme_ll_stats_set_req(tHalHandle hHal, |
| 861 | tSirLLStatsSetReq *psetStatsReq); |
| 862 | CDF_STATUS sme_ll_stats_get_req(tHalHandle hHal, |
| 863 | tSirLLStatsGetReq *pgetStatsReq); |
| 864 | CDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal, |
| 865 | void (*callbackRoutine)(void *callbackCtx, |
| 866 | int indType, void *pRsp)); |
| 867 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 868 | |
| 869 | CDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req); |
| 870 | CDF_STATUS sme_fw_mem_dump_register_cb(tHalHandle hHal, |
| 871 | void (*callback_routine)(void *cb_context, |
| 872 | struct fw_dump_rsp *rsp)); |
| 873 | CDF_STATUS sme_fw_mem_dump_unregister_cb(tHalHandle hHal); |
| 874 | |
| 875 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 876 | CDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal, |
| 877 | bool nRoamOffloadEnabled); |
| 878 | CDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hHal, |
| 879 | uint8_t sessionId, |
| 880 | bool nRoamKeyMgmtOffloadEnabled); |
| 881 | #endif |
| 882 | #ifdef WLAN_FEATURE_NAN |
| 883 | CDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg); |
| 884 | #endif /* WLAN_FEATURE_NAN */ |
| 885 | CDF_STATUS sme_get_link_status(tHalHandle hHal, |
| 886 | tCsrLinkStatusCallback callback, |
| 887 | void *pContext, uint8_t sessionId); |
| 888 | CDF_STATUS sme_get_temperature(tHalHandle hHal, |
| 889 | void *tempContext, |
| 890 | void (*pCallbackfn)(int temperature, |
| 891 | void *pContext)); |
| 892 | CDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal, |
| 893 | tSirScanMacOui *pScanMacOui); |
| 894 | |
| 895 | #ifdef IPA_OFFLOAD |
| 896 | /* --------------------------------------------------------------------------- |
| 897 | \fn sme_ipa_offload_enable_disable |
| 898 | \brief API to enable/disable IPA offload |
| 899 | \param hHal - The handle returned by macOpen. |
| 900 | \param sessionId - Session Identifier |
| 901 | \param pRequest - Pointer to the offload request. |
| 902 | \return eHalStatus |
| 903 | ---------------------------------------------------------------------------*/ |
| 904 | CDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, |
| 905 | uint8_t session_id, |
| 906 | struct sir_ipa_offload_enable_disable *request); |
| 907 | #else |
| 908 | static inline CDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, |
| 909 | uint8_t session_id, |
| 910 | struct sir_ipa_offload_enable_disable *request) |
| 911 | { |
| 912 | return CDF_STATUS_SUCCESS; |
| 913 | } |
| 914 | #endif /* IPA_OFFLOAD */ |
| 915 | |
| 916 | #ifdef DHCP_SERVER_OFFLOAD |
| 917 | CDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal, |
| 918 | tSirDhcpSrvOffloadInfo * pDhcpSrvInfo); |
| 919 | #endif /* DHCP_SERVER_OFFLOAD */ |
| 920 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
| 921 | CDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type, |
| 922 | uint32_t x0, uint32_t x1); |
| 923 | #endif |
| 924 | CDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag); |
| 925 | CDF_STATUS sme_set_mas(uint32_t val); |
| 926 | CDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type); |
| 927 | |
| 928 | CDF_STATUS sme_configure_modulated_dtim(tHalHandle hal, uint8_t session_id, |
| 929 | uint32_t modulated_dtim); |
| 930 | |
| 931 | CDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, |
| 932 | uint16_t stats_avg_factor); |
| 933 | |
| 934 | CDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, |
| 935 | uint32_t guard_time); |
| 936 | |
| 937 | CDF_STATUS sme_wifi_start_logger(tHalHandle hal, |
| 938 | struct sir_wifi_start_log start_log); |
| 939 | |
| 940 | bool sme_neighbor_middle_of_roaming(tHalHandle hHal, |
| 941 | uint8_t sessionId); |
| 942 | |
| 943 | CDF_STATUS sme_enable_uapsd_for_ac(void *cds_ctx, uint8_t sta_id, |
| 944 | sme_ac_enum_type ac, uint8_t tid, |
| 945 | uint8_t pri, uint32_t srvc_int, |
| 946 | uint32_t sus_int, |
| 947 | sme_tspec_dir_type dir, |
| 948 | uint8_t psb, uint32_t sessionId, |
| 949 | uint32_t delay_interval); |
| 950 | |
| 951 | CDF_STATUS sme_disable_uapsd_for_ac(void *cds_ctx, uint8_t sta_id, |
| 952 | sme_ac_enum_type ac, |
| 953 | uint32_t sessionId); |
| 954 | |
| 955 | CDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, |
| 956 | struct rssi_monitor_req *input); |
| 957 | CDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal, |
| 958 | void (*cb)(void *, struct rssi_breach_event *)); |
| 959 | |
| 960 | CDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss); |
| 961 | |
| 962 | bool sme_is_any_session_in_connected_state(tHalHandle h_hal); |
| 963 | |
| 964 | CDF_STATUS sme_soc_set_pcl(tHalHandle hal, |
| 965 | struct sir_pcl_list msg); |
| 966 | CDF_STATUS sme_soc_set_hw_mode(tHalHandle hal, |
| 967 | struct sir_hw_mode msg); |
| 968 | void sme_register_hw_mode_trans_cb(tHalHandle hal, |
| 969 | hw_mode_transition_cb callback); |
| 970 | CDF_STATUS sme_nss_update_request(tHalHandle hHal, uint32_t vdev_id, |
| 971 | uint8_t new_nss, void *cback, |
| 972 | uint8_t next_action, void *hdd_context); |
| 973 | |
| 974 | typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id); |
| 975 | CDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr, |
| 976 | sme_peer_authorized_fp auth_fp, |
| 977 | uint32_t vdev_id); |
| 978 | CDF_STATUS sme_soc_set_dual_mac_config(tHalHandle hal, |
| 979 | struct sir_dual_mac_config msg); |
| 980 | |
| 981 | void sme_set_scan_disable(tHalHandle h_hal, int value); |
| 982 | void sme_setdef_dot11mode(tHalHandle hal); |
| 983 | |
| 984 | CDF_STATUS sme_disable_non_fcc_channel(tHalHandle hHal, |
| 985 | bool fcc_constraint); |
| 986 | |
| 987 | CDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle, |
| 988 | uint8_t session_id, |
| 989 | uint32_t notify_id, |
| 990 | int32_t val); |
| 991 | |
| 992 | void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log); |
| 993 | void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p); |
| 994 | |
| 995 | CDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, |
| 996 | ocb_callback callback, |
| 997 | struct sir_ocb_config *config); |
| 998 | |
| 999 | CDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc); |
| 1000 | |
| 1001 | CDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal, |
| 1002 | struct sir_ocb_timing_advert *timing_advert); |
| 1003 | |
| 1004 | CDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal, |
| 1005 | struct sir_ocb_timing_advert *timing_advert); |
| 1006 | |
| 1007 | CDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, |
| 1008 | ocb_callback callback, |
| 1009 | struct sir_ocb_get_tsf_timer *request); |
| 1010 | |
| 1011 | CDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, |
| 1012 | ocb_callback callback, |
| 1013 | struct sir_dcc_get_stats *request); |
| 1014 | |
| 1015 | CDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, |
| 1016 | uint32_t dcc_stats_bitmap); |
| 1017 | |
| 1018 | CDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, |
| 1019 | ocb_callback callback, |
| 1020 | struct sir_dcc_update_ndl *request); |
| 1021 | |
| 1022 | CDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context, |
| 1023 | ocb_callback callback); |
| 1024 | void sme_add_set_thermal_level_callback(tHalHandle hal, |
| 1025 | sme_set_thermal_level_callback callback); |
| 1026 | |
| 1027 | #endif /* #if !defined( __SME_API_H ) */ |