Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #if !defined(__SME_API_H) |
| 20 | #define __SME_API_H |
| 21 | |
| 22 | /** |
| 23 | * file smeApi.h |
| 24 | * |
| 25 | * brief prototype for SME APIs |
| 26 | */ |
| 27 | |
| 28 | /*-------------------------------------------------------------------------- |
| 29 | Include Files |
| 30 | ------------------------------------------------------------------------*/ |
| 31 | #include "csr_api.h" |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 32 | #include "qdf_lock.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 33 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 34 | #include "sir_api.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | #include "cds_regdomain.h" |
| 36 | #include "sme_internal.h" |
Krishna Kumaar Natarajan | 052c6e6 | 2015-09-28 15:32:55 -0700 | [diff] [blame] | 37 | #include "wma_tgt_cfg.h" |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 38 | #include "wma_fips_public_structs.h" |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 39 | #include "wma_sar_public_structs.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 40 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | #include "sme_rrm_internal.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 42 | #include "sir_types.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 43 | #include "scheduler_api.h" |
Varun Reddy Yeturu | 35c07f9 | 2017-02-28 10:35:00 -0800 | [diff] [blame] | 44 | #include "wlan_serialization_legacy_api.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 45 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 46 | /*-------------------------------------------------------------------------- |
| 47 | Preprocessor definitions and constants |
| 48 | ------------------------------------------------------------------------*/ |
| 49 | |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 50 | #define SME_SUMMARY_STATS (1 << eCsrSummaryStats) |
| 51 | #define SME_GLOBAL_CLASSA_STATS (1 << eCsrGlobalClassAStats) |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 52 | #define SME_GLOBAL_CLASSD_STATS (1 << eCsrGlobalClassDStats) |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 53 | #define SME_PER_CHAIN_RSSI_STATS (1 << csr_per_chain_rssi_stats) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 54 | |
Sandeep Puligilla | aa26b65 | 2018-06-13 18:59:35 -0700 | [diff] [blame] | 55 | #define sme_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_SME, params) |
| 56 | #define sme_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_SME, params) |
| 57 | #define sme_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_SME, params) |
| 58 | #define sme_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_SME, params) |
| 59 | #define sme_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_SME, params) |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 60 | |
Nirav Shah | 790d943 | 2018-07-12 19:42:48 +0530 | [diff] [blame] | 61 | #define sme_nofl_alert(params...) \ |
| 62 | QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_SME, params) |
| 63 | #define sme_nofl_err(params...) \ |
| 64 | QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_SME, params) |
| 65 | #define sme_nofl_warn(params...) \ |
| 66 | QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_SME, params) |
| 67 | #define sme_nofl_info(params...) \ |
| 68 | QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_SME, params) |
| 69 | #define sme_nofl_debug(params...) \ |
| 70 | QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_SME, params) |
| 71 | |
Sandeep Puligilla | aa26b65 | 2018-06-13 18:59:35 -0700 | [diff] [blame] | 72 | #define sme_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_SME, params) |
| 73 | #define sme_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_SME, params) |
| 74 | #define sme_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_SME, params) |
| 75 | #define sme_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_SME, params) |
| 76 | #define sme_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_SME, params) |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 77 | |
Nirav Shah | d6fa0f8 | 2018-07-06 15:52:25 +0530 | [diff] [blame] | 78 | #define SME_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_SME, "enter") |
| 79 | #define SME_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_SME, "exit") |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 80 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | #define SME_SESSION_ID_ANY 50 |
Wu Gao | a0230a6 | 2018-01-04 20:56:57 +0800 | [diff] [blame] | 82 | #define SME_SESSION_ID_BROADCAST 0xFF |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 83 | |
| 84 | #define SME_INVALID_COUNTRY_CODE "XX" |
Krunal Soni | bfd0549 | 2017-10-03 15:48:37 -0700 | [diff] [blame] | 85 | #define INVALID_ROAM_ID 0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 86 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 87 | #define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \ |
| 88 | reg_info_1 &= 0xff00ffff; \ |
| 89 | reg_info_1 |= ((val & 0xff) << 16); \ |
| 90 | } while (0) |
| 91 | |
| 92 | #define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \ |
| 93 | reg_info_2 &= 0xffff00ff; \ |
| 94 | reg_info_2 |= ((val & 0xff) << 8); \ |
| 95 | } while (0) |
| 96 | |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 97 | #define SME_CONFIG_TO_ROAM_CONFIG 1 |
| 98 | #define ROAM_CONFIG_TO_SME_CONFIG 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 99 | |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 100 | #define NUM_OF_BANDS 2 |
Naveen Rawat | b56880c | 2016-12-13 17:56:03 -0800 | [diff] [blame] | 101 | |
| 102 | #define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000) |
| 103 | #define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 104 | /*-------------------------------------------------------------------------- |
| 105 | Type declarations |
| 106 | ------------------------------------------------------------------------*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 107 | typedef struct _smeConfigParams { |
| 108 | tCsrConfigParam csrConfig; |
Krishna Kumaar Natarajan | f599c6e | 2015-11-03 11:44:03 -0800 | [diff] [blame] | 109 | struct rrm_config_param rrmConfig; |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 110 | bool snr_monitor_enabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | } tSmeConfigParams, *tpSmeConfigParams; |
| 112 | |
| 113 | #ifdef FEATURE_WLAN_TDLS |
| 114 | #define SME_TDLS_MAX_SUPP_CHANNELS 128 |
| 115 | #define SME_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 116 | |
| 117 | typedef struct _smeTdlsPeerCapParams { |
| 118 | uint8_t isPeerResponder; |
| 119 | uint8_t peerUapsdQueue; |
| 120 | uint8_t peerMaxSp; |
| 121 | uint8_t peerBuffStaSupport; |
| 122 | uint8_t peerOffChanSupport; |
| 123 | uint8_t peerCurrOperClass; |
| 124 | uint8_t selfCurrOperClass; |
| 125 | uint8_t peerChanLen; |
| 126 | uint8_t peerChan[SME_TDLS_MAX_SUPP_CHANNELS]; |
| 127 | uint8_t peerOperClassLen; |
| 128 | uint8_t peerOperClass[SME_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 129 | uint8_t prefOffChanNum; |
| 130 | uint8_t prefOffChanBandwidth; |
| 131 | uint8_t opClassForPrefOffChan; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 132 | } tSmeTdlsPeerCapParams; |
| 133 | |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 134 | /** |
| 135 | * eSmeTdlsPeerState - tdls peer state |
| 136 | * @eSME_TDLS_PEER_STATE_PEERING: tdls connection in progress |
| 137 | * @eSME_TDLS_PEER_STATE_CONNECTED: tdls peer is connected |
| 138 | * @eSME_TDLS_PEER_STATE_TEARDOWN: tdls peer is tear down |
| 139 | * @eSME_TDLS_PEER_ADD_MAC_ADDR: add peer mac into connection table |
| 140 | * @eSME_TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table |
| 141 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | typedef enum { |
| 143 | eSME_TDLS_PEER_STATE_PEERING, |
| 144 | eSME_TDLS_PEER_STATE_CONNECTED, |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 145 | eSME_TDLS_PEER_STATE_TEARDOWN, |
| 146 | eSME_TDLS_PEER_ADD_MAC_ADDR, |
| 147 | eSME_TDLS_PEER_REMOVE_MAC_ADDR, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 148 | } eSmeTdlsPeerState; |
| 149 | |
| 150 | typedef struct _smeTdlsPeerStateParams { |
| 151 | uint32_t vdevId; |
| 152 | tSirMacAddr peerMacAddr; |
| 153 | uint32_t peerState; |
| 154 | tSmeTdlsPeerCapParams peerCap; |
| 155 | } tSmeTdlsPeerStateParams; |
| 156 | |
| 157 | #define ENABLE_CHANSWITCH 1 |
| 158 | #define DISABLE_CHANSWITCH 2 |
| 159 | #define BW_20_OFFSET_BIT 0 |
| 160 | #define BW_40_OFFSET_BIT 1 |
| 161 | #define BW_80_OFFSET_BIT 2 |
| 162 | #define BW_160_OFFSET_BIT 3 |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 163 | typedef struct sme_tdls_chan_switch_param_struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 164 | uint32_t vdev_id; |
| 165 | tSirMacAddr peer_mac_addr; |
| 166 | uint16_t tdls_off_ch_bw_offset;/* Target Off Channel Bandwidth offset */ |
| 167 | uint8_t tdls_off_channel; /* Target Off Channel */ |
| 168 | uint8_t tdls_off_ch_mode; /* TDLS Off Channel Mode */ |
| 169 | uint8_t is_responder; /* is peer responder or initiator */ |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 170 | uint8_t opclass; /* tdls operating class */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | } sme_tdls_chan_switch_params; |
| 172 | #endif /* FEATURE_WLAN_TDLS */ |
| 173 | |
| 174 | /* Thermal Mitigation*/ |
| 175 | typedef struct { |
| 176 | uint16_t smeMinTempThreshold; |
| 177 | uint16_t smeMaxTempThreshold; |
| 178 | } tSmeThermalLevelInfo; |
| 179 | |
| 180 | #define SME_MAX_THERMAL_LEVELS (4) |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 181 | #define SME_MAX_THROTTLE_LEVELS (4) |
| 182 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 183 | typedef struct { |
| 184 | /* Array of thermal levels */ |
| 185 | tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS]; |
| 186 | uint8_t smeThermalMgmtEnabled; |
| 187 | uint32_t smeThrottlePeriod; |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 188 | uint8_t sme_throttle_duty_cycle_tbl[SME_MAX_THROTTLE_LEVELS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 189 | } tSmeThermalParams; |
| 190 | |
| 191 | typedef enum { |
| 192 | SME_AC_BK = 0, |
| 193 | SME_AC_BE = 1, |
| 194 | SME_AC_VI = 2, |
| 195 | SME_AC_VO = 3 |
| 196 | } sme_ac_enum_type; |
| 197 | |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 198 | /* |
| 199 | * Enumeration of the various TSPEC directions |
| 200 | * From 802.11e/WMM specifications |
| 201 | */ |
| 202 | enum sme_qos_wmm_dir_type { |
Naveen Rawat | d9dd4b3 | 2017-07-05 14:32:54 -0700 | [diff] [blame] | 203 | SME_QOS_WMM_TS_DIR_UPLINK = 0, |
| 204 | SME_QOS_WMM_TS_DIR_DOWNLINK = 1, |
| 205 | SME_QOS_WMM_TS_DIR_RESV = 2, /* Reserved */ |
| 206 | SME_QOS_WMM_TS_DIR_BOTH = 3, |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 207 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 209 | /** |
| 210 | * struct sme_oem_capability - OEM capability to be exchanged between host |
| 211 | * and userspace |
| 212 | * @ftm_rr: FTM range report capability bit |
| 213 | * @lci_capability: LCI capability bit |
| 214 | * @reserved1: reserved |
| 215 | * @reserved2: reserved |
| 216 | */ |
| 217 | struct sme_oem_capability { |
| 218 | uint32_t ftm_rr:1; |
| 219 | uint32_t lci_capability:1; |
| 220 | uint32_t reserved1:30; |
| 221 | uint32_t reserved2; |
| 222 | }; |
| 223 | |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 224 | /** |
| 225 | * struct sme_5g_pref_params : 5G preference params to be read from ini |
| 226 | * @rssi_boost_threshold_5g: RSSI threshold above which 5 GHz is favored |
| 227 | * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted |
| 228 | * @max_rssi_boost_5g: Maximum boost that can be applied to 5GHz RSSI |
| 229 | * @rssi_penalize_threshold_5g: RSSI threshold below which 5G is not favored |
| 230 | * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalized |
| 231 | * @max_rssi_penalize_5g: Maximum penalty that can be applied to 5G RSSI |
| 232 | */ |
| 233 | struct sme_5g_band_pref_params { |
| 234 | int8_t rssi_boost_threshold_5g; |
| 235 | uint8_t rssi_boost_factor_5g; |
| 236 | uint8_t max_rssi_boost_5g; |
| 237 | int8_t rssi_penalize_threshold_5g; |
| 238 | uint8_t rssi_penalize_factor_5g; |
| 239 | uint8_t max_rssi_penalize_5g; |
| 240 | }; |
| 241 | |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 242 | /** |
| 243 | * struct sme_session_params: Session creation params passed by HDD layer |
| 244 | * @session_open_cb: callback to be registered with SME for opening the session |
| 245 | * @session_close_cb: callback to be registered with SME for closing the session |
Jeff Johnson | 6a18c96 | 2018-07-01 09:09:37 -0700 | [diff] [blame] | 246 | * @callback: callback to be invoked for roaming events |
| 247 | * @callback_ctx: user-supplied context to be passed back on roaming events |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 248 | * @self_mac_addr: Self mac address |
| 249 | * @sme_session_id: SME session id |
| 250 | * @type_of_persona: person type |
| 251 | * @subtype_of_persona: sub type of persona |
| 252 | */ |
| 253 | struct sme_session_params { |
| 254 | csr_session_open_cb session_open_cb; |
| 255 | csr_session_close_cb session_close_cb; |
Jeff Johnson | 6a18c96 | 2018-07-01 09:09:37 -0700 | [diff] [blame] | 256 | csr_roam_complete_cb callback; |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 257 | void *callback_ctx; |
| 258 | uint8_t *self_mac_addr; |
| 259 | uint8_t sme_session_id; |
| 260 | uint32_t type_of_persona; |
| 261 | uint32_t subtype_of_persona; |
| 262 | }; |
| 263 | |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 264 | #define MAX_CANDIDATE_INFO 10 |
| 265 | |
| 266 | /** |
| 267 | * struct bss_candidate_info - Candidate bss information |
| 268 | * |
| 269 | * @bssid : BSSID of candidate bss |
| 270 | * @status : status code for candidate bss |
| 271 | */ |
| 272 | struct bss_candidate_info { |
| 273 | struct qdf_mac_addr bssid; |
| 274 | uint32_t status; |
| 275 | }; |
| 276 | |
| 277 | /* |
| 278 | * MBO transition reason codes |
| 279 | */ |
| 280 | enum { |
| 281 | MBO_TRANSITION_REASON_UNSPECIFIED, |
| 282 | MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS_RATE, |
| 283 | MBO_TRANSITION_REASON_EXCESSIVE_DELAY_FOR_CURRENT_TRAFFIC, |
| 284 | MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH_FOR_CURRENT_TRAFFIC, |
| 285 | MBO_TRANSITION_REASON_LOAD_BALANCING, |
| 286 | MBO_TRANSITION_REASON_LOW_RSSI, |
| 287 | MBO_TRANSITION_REASON_RECEIVED_EXCESSIVE_RETRANSMISSIONS, |
| 288 | MBO_TRANSITION_REASON_HIGH_INTERFERENCE, |
| 289 | MBO_TRANSITION_REASON_GRAY_ZONE, |
| 290 | MBO_TRANSITION_REASON_TRANSITIONING_TO_PREMIUM_AP, |
| 291 | }; |
| 292 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 293 | /*------------------------------------------------------------------------- |
| 294 | Function declarations and documenation |
| 295 | ------------------------------------------------------------------------*/ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 296 | QDF_STATUS sme_open(tHalHandle hHal); |
| 297 | QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 298 | enum country_src cc_src); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 299 | QDF_STATUS sme_close(tHalHandle hHal); |
| 300 | QDF_STATUS sme_start(tHalHandle hHal); |
Jeff Johnson | 62cd680 | 2018-07-20 12:38:25 -0700 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * sme_stop() - Stop all SME modules and put them at idle state |
| 304 | * @mac_handle: Opaque handle to the MAC context |
| 305 | * |
| 306 | * The function stops each module in SME. Upon return, all modules are |
| 307 | * at idle state ready to start. |
| 308 | * |
| 309 | * This is a synchronous call |
| 310 | * |
| 311 | * Return: QDF_STATUS_SUCCESS if SME is stopped. Other status means |
| 312 | * SME failed to stop one or more modules but caller should |
| 313 | * still consider SME is stopped. |
| 314 | */ |
| 315 | QDF_STATUS sme_stop(mac_handle_t mac_handle); |
| 316 | |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 317 | /* |
| 318 | * sme_open_session() - Open a session for given persona |
| 319 | * |
| 320 | * This is a synchronous API. For any protocol stack related activity |
| 321 | * requires session to be opened. This API needs to be called to open |
| 322 | * the session in SME module. |
| 323 | * |
| 324 | * hal: The handle returned by mac_open. |
| 325 | * params: to initialize the session open params |
| 326 | * |
| 327 | * Return: |
| 328 | * QDF_STATUS_SUCCESS - session is opened. |
| 329 | * Other status means SME is failed to open the session. |
| 330 | */ |
| 331 | QDF_STATUS sme_open_session(tHalHandle hal, struct sme_session_params *params); |
| 332 | |
| 333 | /* |
| 334 | * sme_close_session() - Close a session for given persona |
| 335 | * |
| 336 | * This is a synchronous API. This API needs to be called to close the session |
| 337 | * in SME module before terminating the session completely. |
| 338 | * |
| 339 | * hal: The handle returned by mac_open. |
| 340 | * session_id: A previous opened session's ID. |
| 341 | * |
| 342 | * Return: |
| 343 | * QDF_STATUS_SUCCESS - session is closed. |
| 344 | * Other status means SME is failed to open the session. |
| 345 | */ |
| 346 | QDF_STATUS sme_close_session(tHalHandle hal, uint8_t sessionId); |
Peng Xu | f5d60c8 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 347 | void sme_set_curr_device_mode(tHalHandle hHal, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 348 | enum QDF_OPMODE currDeviceMode); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 349 | QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id, |
Srinivas Girigowda | 72f3039 | 2017-07-13 18:55:09 -0700 | [diff] [blame] | 350 | struct roam_ext_params *roam_params_src, int update_param); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 351 | QDF_STATUS sme_update_config(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 352 | tpSmeConfigParams pSmeConfigParams); |
| 353 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 354 | QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams); |
| 355 | QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | v_REGDOMAIN_t *domainIdSoftAp); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 357 | QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal); |
Krunal Soni | a8270f5 | 2017-02-23 19:51:25 -0800 | [diff] [blame] | 358 | /** |
| 359 | * sme_ser_cmd_callback() - callback from serialization module |
| 360 | * @buf: serialization command buffer |
| 361 | * @reason: reason why serialization module has given this callback |
| 362 | * |
| 363 | * Serialization module will give callback to SME for why it triggered |
| 364 | * the callback |
| 365 | * |
| 366 | * Return: QDF_STATUS_SUCCESS |
| 367 | */ |
| 368 | QDF_STATUS sme_ser_cmd_callback(void *buf, |
| 369 | enum wlan_serialization_cb_reason reason); |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 370 | |
| 371 | /* |
| 372 | * sme_process_msg() - The main message processor for SME. |
| 373 | * @mac: The global mac context |
| 374 | * @msg: The message to be processed. |
| 375 | * |
| 376 | * This function is called by a message dispatcher when to process a message |
| 377 | * targeted for SME. |
| 378 | * This is a synchronous call |
| 379 | * |
| 380 | * Return: QDF_STATUS_SUCCESS - SME successfully processed the message. |
| 381 | * Other status means SME failed to process the message to HAL. |
| 382 | */ |
| 383 | QDF_STATUS sme_process_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg); |
| 384 | |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 385 | QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 386 | QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | tCsrScanResultFilter *pFilter, |
| 388 | tScanResultHandle *phResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 389 | QDF_STATUS sme_get_ap_channel_from_scan_cache( |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 390 | struct csr_roam_profile *profile, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 391 | tScanResultHandle *scan_cache, |
| 392 | uint8_t *ap_chnl_id); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 393 | QDF_STATUS sme_get_ap_channel_from_scan(void *profile, |
| 394 | tScanResultHandle *scan_cache, |
| 395 | uint8_t *ap_chnl_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 396 | bool sme_store_joinreq_param(tHalHandle hal_handle, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 397 | struct csr_roam_profile *profile, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 398 | tScanResultHandle scan_cache, |
| 399 | uint32_t *roam_id, |
| 400 | uint32_t session_id); |
| 401 | bool sme_clear_joinreq_param(tHalHandle hal_handle, |
| 402 | uint32_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 403 | QDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 404 | uint32_t *roam_id, |
| 405 | uint32_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 406 | QDF_STATUS sme_scan_flush_result(tHalHandle hHal); |
| 407 | QDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId); |
| 408 | QDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 409 | tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle, |
| 410 | tScanResultHandle hScanResult); |
| 411 | tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle, |
| 412 | tScanResultHandle hScanResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 413 | QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 414 | QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 415 | struct csr_roam_profile *pProfile, uint32_t *pRoamId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 416 | QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 417 | struct csr_roam_profile *pProfile, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 418 | tCsrRoamModifyProfileFields modProfileFields, |
| 419 | uint32_t *pRoamId, bool fForce); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 420 | QDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId); |
Varun Reddy Yeturu | 363809c | 2018-06-27 14:12:52 -0700 | [diff] [blame] | 421 | |
| 422 | /** |
| 423 | * sme_roam_disconnect() - API to request CSR to disconnect |
| 424 | * @hal: HAL context |
| 425 | * @session: SME session identifier |
| 426 | * @reason: Reason to disconnect |
| 427 | * |
| 428 | * Return: QDF Status success or failure |
| 429 | */ |
| 430 | QDF_STATUS sme_roam_disconnect(tHalHandle hal, uint8_t session, |
| 431 | eCsrRoamDisconnectReason reason); |
| 432 | |
Abhishek Singh | ca40803 | 2016-09-13 15:26:12 +0530 | [diff] [blame] | 433 | void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 434 | QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId); |
| 435 | QDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 436 | QDF_MODULE_ID modId, void *pUsrContext, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 437 | void *pfnSapEventCallback, |
| 438 | uint8_t *pAssocStasBuf); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 439 | QDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 440 | struct csr_del_sta_params *p_del_sta_params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 441 | QDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 442 | struct csr_del_sta_params *pDelStaParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 443 | QDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 444 | eCsrConnectState *pState); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 445 | QDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 446 | tCsrRoamConnectedProfile *pProfile); |
Naveen Rawat | df0a7e7 | 2016-01-06 18:35:53 -0800 | [diff] [blame] | 447 | void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 448 | QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 449 | tPmkidCacheInfo *pPMKIDCache, |
| 450 | uint32_t numItems, |
| 451 | bool update_entire_cache); |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 452 | |
Abhinav Kumar | 7830d9c | 2018-06-27 17:57:48 +0530 | [diff] [blame] | 453 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 454 | /** |
| 455 | * sme_get_pmk_info(): A wrapper function to request CSR to save PMK |
| 456 | * @hal: Global structure |
| 457 | * @session_id: SME session_id |
| 458 | * @pmk_cache: pointer to a structure of pmk |
| 459 | * |
| 460 | * Return: none |
| 461 | */ |
| 462 | void sme_get_pmk_info(tHalHandle hal, uint8_t session_id, |
| 463 | tPmkidCacheInfo *pmk_cache); |
| 464 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 465 | QDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 466 | uint8_t *pPSK_PMK, size_t pmk_len); |
| 467 | #endif |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 468 | |
| 469 | /** |
| 470 | * sme_roam_get_wpa_rsn_req_ie() - Retrieve WPA/RSN Request IE |
| 471 | * @hal: HAL handle |
| 472 | * @session_id: ID of the specific session |
| 473 | * @len: Caller allocated memory that has the length of @buf as input. |
| 474 | * Upon returned, @len has the length of the IE store in @buf |
| 475 | * @buf: Caller allocated memory that contain the IE field, if any, |
| 476 | * upon return |
| 477 | * |
| 478 | * A wrapper function to request CSR to return the WPA or RSN IE CSR |
| 479 | * passes to PE to JOIN request or START_BSS request |
| 480 | * This is a synchronous call. |
| 481 | * |
| 482 | * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not |
| 483 | * big enough |
| 484 | */ |
| 485 | QDF_STATUS sme_roam_get_wpa_rsn_req_ie(tHalHandle hal, uint8_t session_id, |
| 486 | uint32_t *len, uint8_t *buf); |
| 487 | |
| 488 | /** |
| 489 | * sme_roam_get_wpa_rsn_rsp_ie() - Retrieve WPA/RSN Response IE |
| 490 | * @hal: HAL handle |
| 491 | * @session_id: ID of the specific session |
| 492 | * @len: Caller allocated memory that has the length of @buf as input. |
| 493 | * Upon returned, @len has the length of the IE store in @buf |
| 494 | * @buf: Caller allocated memory that contain the IE field, if any, |
| 495 | * upon return |
| 496 | * |
| 497 | * A wrapper function to request CSR to return the WPA or RSN IE CSR |
| 498 | * passes to PE to JOIN request or START_BSS request |
| 499 | * This is a synchronous call. |
| 500 | * |
| 501 | * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not |
| 502 | * big enough |
| 503 | */ |
| 504 | QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(tHalHandle hal, uint8_t session_id, |
| 505 | uint32_t *len, uint8_t *buf); |
| 506 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 507 | uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 508 | QDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 509 | uint32_t *pNum, |
| 510 | tPmkidCacheInfo *pPmkidCache); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 511 | QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam); |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 512 | #ifndef QCA_SUPPORT_CP_STATS |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 513 | QDF_STATUS sme_get_statistics(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 514 | eCsrStatsRequesterType requesterId, |
| 515 | uint32_t statsMask, tCsrStatsCallback callback, |
Naveen Rawat | d0ca441 | 2017-06-16 14:19:19 -0700 | [diff] [blame] | 516 | uint8_t staId, void *pContext, uint8_t sessionId); |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 517 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 518 | QDF_STATUS sme_get_rssi(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | tCsrRssiCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 520 | uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI, |
Jeff Johnson | 8bd2335 | 2017-09-26 11:39:24 -0700 | [diff] [blame] | 521 | void *pContext); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 522 | QDF_STATUS sme_get_snr(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 523 | tCsrSnrCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 524 | uint8_t staId, struct qdf_mac_addr bssId, void *pContext); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 525 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 526 | QDF_STATUS sme_get_tsm_stats(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 527 | tCsrTsmStatsCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 528 | uint8_t staId, struct qdf_mac_addr bssId, |
Jeff Johnson | 30f8455 | 2017-09-13 14:55:25 -0700 | [diff] [blame] | 529 | void *pContext, uint8_t tid); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 530 | QDF_STATUS sme_set_cckm_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 531 | uint8_t sessionId, |
| 532 | uint8_t *pCckmIe, uint8_t cckmIeLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 533 | QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 534 | const tCsrEseBeaconReq *pEseBcnReq); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 535 | QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm); |
| 536 | #endif /*FEATURE_WLAN_ESE */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 537 | QDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value); |
| 538 | QDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 539 | uint32_t length); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 540 | QDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 541 | uint32_t *cfg_value); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 542 | QDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 543 | uint32_t *length); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 544 | QDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 545 | tCsrRoamModifyProfileFields * |
| 546 | pModifyProfileFields); |
| 547 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 548 | extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 549 | |
| 550 | void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 551 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 552 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 553 | extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 554 | sme_send_oem_data_rsp_msg callback); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 555 | void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal); |
| 556 | |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 557 | #else |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 558 | static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle hal, |
| 559 | void *callback) |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 560 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 561 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 562 | } |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 563 | static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal) |
| 564 | { |
| 565 | } |
| 566 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 567 | #endif |
| 568 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 569 | QDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 570 | tCsrRoamSetKey *pSetKey, uint32_t *pRoamId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 571 | QDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 572 | |
| 573 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 574 | /* some support functions */ |
| 575 | bool sme_is11d_supported(tHalHandle hHal); |
| 576 | bool sme_is11h_supported(tHalHandle hHal); |
| 577 | bool sme_is_wmm_supported(tHalHandle hHal); |
| 578 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 579 | QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, |
Amar Singhal | 7f1f3ec | 2015-10-13 17:14:08 -0700 | [diff] [blame] | 580 | uint8_t *pCountry); |
Mukul Sharma | ecf8e09 | 2017-12-19 22:36:31 +0530 | [diff] [blame] | 581 | |
| 582 | |
Jeff Johnson | 330c0bf | 2018-06-01 15:13:12 -0700 | [diff] [blame] | 583 | /** |
| 584 | * sme_update_channel_list() - Update configured channel list to fwr |
| 585 | * This is a synchronous API. |
| 586 | * @hal: HAL handle returned by mac_open. |
| 587 | * |
| 588 | * Return: QDF_STATUS SUCCESS. |
| 589 | * FAILURE or RESOURCES The API finished and failed. |
| 590 | */ |
| 591 | QDF_STATUS sme_update_channel_list(tHalHandle hal); |
Mukul Sharma | ecf8e09 | 2017-12-19 22:36:31 +0530 | [diff] [blame] | 592 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 593 | QDF_STATUS sme_tx_fail_monitor_start_stop_ind(tHalHandle hHal, |
| 594 | uint8_t tx_fail_count, |
| 595 | void *txFailIndCallback); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 596 | QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 597 | uint8_t device_mode, |
| 598 | uint8_t *macAddr, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 599 | QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 600 | uint8_t device_mode, |
| 601 | uint8_t *macAddr, uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 602 | void sme_get_recovery_stats(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 603 | QDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 604 | tpRrmNeighborReq pRrmNeighborReq, |
| 605 | tpRrmNeighborRspCallbackInfo callbackInfo); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 606 | QDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 607 | tSirVersionType * pVersion); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 608 | QDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 609 | tSirVersionType *pVersion); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 610 | QDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 611 | uint8_t *pVersion, uint32_t versionBufferSize); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 612 | QDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 613 | uint8_t *pVersion, uint32_t versionBufferSize); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 614 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 615 | QDF_STATUS sme_oem_data_req(tHalHandle hHal, struct oem_data_req *); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 616 | QDF_STATUS sme_oem_update_capability(tHalHandle hHal, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 617 | struct sme_oem_capability *cap); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 618 | QDF_STATUS sme_oem_get_capability(tHalHandle hHal, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 619 | struct sme_oem_capability *cap); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 620 | #endif /*FEATURE_OEM_DATA_SUPPORT */ |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 621 | QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 622 | QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 623 | tpSirHostOffloadReq pRequest); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 624 | QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 625 | tpSirKeepAliveReq pRequest); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 626 | QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 627 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 628 | QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 629 | uint16_t frameType, uint8_t *matchData, |
| 630 | uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 631 | QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 632 | uint16_t frameType, uint8_t *matchData, |
| 633 | uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 634 | QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 635 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 636 | QDF_STATUS sme_configure_ext_wow(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 637 | tpSirExtWoWParams wlanExtParams, |
| 638 | csr_readyToSuspendCallback callback, |
| 639 | void *callbackContext); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 640 | QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 641 | tpSirAppType1Params wlanAppType1Params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 642 | QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 643 | tpSirAppType2Params wlanAppType2Params); |
| 644 | #endif |
| 645 | int8_t sme_get_infra_session_id(tHalHandle hHal); |
| 646 | uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId); |
| 647 | uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal); |
| 648 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 649 | uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch, |
| 650 | eCsrPhyMode sapPhyMode, |
| 651 | uint8_t cc_switch_mode); |
| 652 | #endif |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 653 | QDF_STATUS sme_get_cfg_valid_channels(uint8_t *aValidChannels, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 654 | uint32_t *len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 655 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 656 | QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 657 | tpSirRcvFltMcAddrList pMulticastAddrs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 658 | #endif /* WLAN_FEATURE_PACKET_FILTERING */ |
| 659 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 660 | QDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId, |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 661 | enum band_info eBand); |
| 662 | QDF_STATUS sme_get_freq_band(tHalHandle hHal, enum band_info *pBand); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 663 | uint16_t sme_chn_to_freq(uint8_t chanNum); |
| 664 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 665 | QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid, |
| 666 | struct qdf_mac_addr pSelfMacAddress, int8_t dB); |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 667 | QDF_STATUS sme_set_max_tx_power_per_band(enum band_info band, int8_t db); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 668 | QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 669 | struct qdf_mac_addr bssid, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 670 | enum QDF_OPMODE dev_mode, int power); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 671 | QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr); |
| 672 | QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 673 | uint8_t ssidHidden); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 674 | QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 675 | uint16_t tmMode); |
| 676 | void sme_feature_caps_exchange(tHalHandle hHal); |
| 677 | void sme_disable_feature_capablity(uint8_t feature_index); |
| 678 | void sme_reset_power_values_for5_g(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 679 | QDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz); |
| 680 | QDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand); |
| 681 | QDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 682 | const uint8_t nProbes); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 683 | QDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 684 | uint8_t sessionId, |
| 685 | const uint16_t nRoamScanHomeAwayTime, |
| 686 | const bool bSendOffloadCmd); |
| 687 | |
| 688 | bool sme_get_roam_intra_band(tHalHandle hHal); |
| 689 | uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal); |
| 690 | uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 691 | QDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 692 | uint8_t RoamRssiDiff); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 693 | QDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 694 | bool isFastTransitionEnabled); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 695 | QDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 696 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 697 | QDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 698 | bool roamScanControl); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 699 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 700 | QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 701 | uint8_t sessionId, |
| 702 | const bool |
| 703 | isFastRoamIniFeatureEnabled); |
Mukul Sharma | 69c44cd | 2016-09-12 18:33:57 +0530 | [diff] [blame] | 704 | |
| 705 | QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, |
| 706 | const bool is_fast_roam_enabled); |
| 707 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 708 | QDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 709 | const bool MAWCEnabled); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 710 | QDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason); |
Abhishek Singh | d568647 | 2017-09-20 15:18:50 +0530 | [diff] [blame] | 711 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 712 | QDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 713 | uint8_t reason); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 714 | QDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 715 | bool bFastRoamInConIniFeatureEnabled); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 716 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 717 | QDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 718 | const bool isEseIniFeatureEnabled); |
| 719 | #endif /* FEATURE_WLAN_ESE */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 720 | QDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 721 | uint8_t sessionId, |
| 722 | const uint8_t nRoamRescanRssiDiff); |
| 723 | uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal); |
| 724 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 725 | QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 726 | uint8_t sessionId, |
| 727 | const uint8_t nOpportunisticThresholdDiff); |
| 728 | uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 729 | QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 730 | uint8_t sessionId, uint8_t neighborLookupRssiThreshold); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 731 | QDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 732 | uint8_t sessionId, uint8_t delay_before_vdev_stop); |
| 733 | uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 734 | QDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 735 | uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod); |
| 736 | uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal); |
| 737 | uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 738 | QDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 739 | uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 740 | QDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 741 | const uint16_t nNeighborScanMinChanTime, |
| 742 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 743 | QDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 744 | uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime); |
| 745 | uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal, |
| 746 | uint8_t sessionId); |
| 747 | uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 748 | uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 749 | uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId); |
| 750 | uint32_t sme_get_lim_sme_state(tHalHandle hHal); |
| 751 | uint32_t sme_get_lim_mlm_state(tHalHandle hHal); |
| 752 | bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId); |
| 753 | uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId); |
| 754 | uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId); |
| 755 | uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal, |
| 756 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 757 | QDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 758 | const uint16_t nNeighborScanPeriod); |
| 759 | uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId); |
Sridhar Selvaraj | 1b2330c | 2017-07-21 15:16:42 +0530 | [diff] [blame] | 760 | QDF_STATUS sme_set_neighbor_scan_min_period(tHalHandle h_hal, |
| 761 | uint8_t session_id, const uint16_t neighbor_scan_min_period); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 762 | QDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 763 | uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt); |
| 764 | uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 765 | QDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 766 | const uint8_t nRoamBmissFinalBcnt); |
| 767 | uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 768 | QDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 769 | const uint8_t nRoamBeaconRssiWeight); |
| 770 | uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 771 | uint8_t sme_get_roam_rssi_diff(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 772 | QDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 773 | uint8_t *pChannelList, |
| 774 | uint8_t numChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 775 | QDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 776 | uint8_t sessionId, uint8_t *pChannelList, |
| 777 | uint8_t numChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 778 | QDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 779 | uint8_t *pChannelList, uint8_t *pNumChannels, |
| 780 | uint8_t sessionId); |
| 781 | bool sme_get_is_ese_feature_enabled(tHalHandle hHal); |
| 782 | bool sme_get_wes_mode(tHalHandle hHal); |
| 783 | bool sme_get_roam_scan_control(tHalHandle hHal); |
| 784 | bool sme_get_is_lfr_feature_enabled(tHalHandle hHal); |
| 785 | bool sme_get_is_ft_feature_enabled(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 786 | QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 787 | bool nRoamScanOffloadEnabled); |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 788 | bool sme_is_feature_supported_by_fw(enum cap_bitmap feature); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 789 | |
| 790 | /* |
| 791 | * SME API to enable/disable WLAN driver initiated SSR |
| 792 | */ |
| 793 | void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 794 | QDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 795 | eCsrPhyMode sme_get_phy_mode(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 796 | QDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 797 | tCsrHandoffRequest *pHandoffInfo); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 798 | QDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 799 | QDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 800 | *addPeriodicTxPtrnParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 801 | QDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 802 | *delPeriodicTxPtrnParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 803 | QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 804 | tSirRateUpdateInd *rateUpdateParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 805 | QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, |
Sridhar Selvaraj | c3684c7 | 2017-08-21 14:32:47 +0530 | [diff] [blame] | 806 | tPmkidCacheInfo *pmksa, bool flush_cache); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 807 | void sme_get_command_q_status(tHalHandle hHal); |
| 808 | |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 809 | #ifdef FEATURE_WLAN_RMC |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 810 | QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId); |
| 811 | QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId); |
| 812 | QDF_STATUS sme_send_rmc_action_period(tHalHandle hHal, uint32_t sessionId); |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 813 | #endif |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 814 | QDF_STATUS sme_request_ibss_peer_info(tHalHandle hHal, void *pUserData, |
| 815 | pIbssPeerInfoCb peerInfoCbk, bool allPeerInfoReqd, uint8_t staIdx); |
| 816 | QDF_STATUS sme_send_cesium_enable_ind(tHalHandle hHal, uint32_t sessionId); |
| 817 | |
Paul Zhang | 99fe884 | 2017-12-08 14:43:46 +0800 | [diff] [blame] | 818 | /** |
| 819 | * sme_set_wlm_latency_level_ind() - Used to set the latency level to fw |
| 820 | * @hal |
| 821 | * @session_id |
| 822 | * @latency_level |
| 823 | * |
| 824 | * Return QDF_STATUS |
| 825 | */ |
| 826 | QDF_STATUS sme_set_wlm_latency_level(tHalHandle hal, |
| 827 | uint16_t session_id, |
| 828 | uint16_t latency_level); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 829 | /* |
| 830 | * SME API to enable/disable idle mode powersave |
| 831 | * This should be called only if powersave offload |
| 832 | * is enabled |
| 833 | */ |
Arunk Khandavalli | 847969d | 2017-09-25 15:15:36 +0530 | [diff] [blame] | 834 | QDF_STATUS sme_set_idle_powersave_config(bool value); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 835 | QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 836 | |
| 837 | /*SME API to convert convert the ini value to the ENUM used in csr and MAC*/ |
| 838 | ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value); |
| 839 | int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab, |
| 840 | int value); |
| 841 | int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id, |
| 842 | uint16_t ht_capab); |
| 843 | #ifdef QCA_HT_2040_COEX |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 844 | QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 845 | struct qdf_mac_addr macAddrSTA, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 846 | uint8_t sessionId, |
| 847 | uint8_t channel_type); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 848 | QDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 849 | uint8_t channel_type, bool obssEnabled); |
| 850 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 851 | QDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 852 | uint32_t *regInfo1, uint32_t *regInfo2); |
| 853 | #ifdef FEATURE_WLAN_TDLS |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 854 | QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 855 | bool useSmeLock); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 856 | #endif /* FEATURE_WLAN_TDLS */ |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 857 | |
| 858 | #ifdef FEATURE_WLAN_CH_AVOID |
| 859 | QDF_STATUS sme_ch_avoid_update_req(tHalHandle hal_handle); |
| 860 | #else |
| 861 | static inline |
| 862 | QDF_STATUS sme_ch_avoid_update_req(tHalHandle hal_handle) |
| 863 | { |
| 864 | return QDF_STATUS_SUCCESS; |
| 865 | } |
| 866 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 867 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 868 | QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void)); |
| 869 | QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 870 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 871 | QDF_STATUS sme_roam_channel_change_req(tHalHandle hHal, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 872 | struct qdf_mac_addr bssid, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 873 | struct ch_params *ch_params, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 874 | struct csr_roam_profile *profile); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 875 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 876 | QDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 877 | struct qdf_mac_addr bssid, uint8_t dfsCacWaitStatus); |
| 878 | QDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct qdf_mac_addr bssid, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 879 | uint8_t targetChannel, uint8_t csaIeReqd, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 880 | struct ch_params *ch_params); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 881 | |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 882 | /** |
| 883 | * sme_set_addba_accept() - Allow/Reject the ADDBA req session |
| 884 | * @hal: handle returned by mac_open |
| 885 | * @session_id: sme session id |
| 886 | * @value: Allow/Reject AddBA session |
| 887 | * |
| 888 | * Allows/Rejects the ADDBA req session |
| 889 | * |
| 890 | * Return: 0 on success else errno |
| 891 | */ |
| 892 | int sme_set_addba_accept(tHalHandle hal, uint8_t session_id, int value); |
| 893 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 894 | QDF_STATUS sme_init_thermal_info(tHalHandle hHal, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 895 | tSmeThermalParams thermalParam); |
| 896 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 897 | QDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level); |
| 898 | QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx); |
| 899 | QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 900 | void *plsContext, |
| 901 | void (*pCallbackfn)(tSirLinkSpeedInfo *indParam, |
| 902 | void *pContext)); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 903 | QDF_STATUS sme_modify_add_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 904 | tSirModifyIE *pModifyIE, eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 905 | QDF_STATUS sme_update_add_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 906 | tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 907 | QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value); |
Rajeev Kumar | 43e25b1 | 2016-04-15 16:26:36 -0700 | [diff] [blame] | 908 | const char *sme_bss_type_to_string(const uint8_t bss_type); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 909 | QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 910 | bool disablefwd); |
jiad | bdefb25 | 2018-01-03 14:27:06 +0800 | [diff] [blame] | 911 | QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode); |
| 912 | QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode); |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 913 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 914 | /** |
| 915 | * sme_send_unit_test_cmd() - send unit test command to lower layer |
| 916 | * @session_id: sme session id to be filled while forming the command |
| 917 | * @module_id: module id given by user to be filled in the command |
| 918 | * @arg_count: number of argument count |
| 919 | * @arg: pointer to argument list |
| 920 | * |
| 921 | * This API exposed to HDD layer which takes the argument from user and sends |
| 922 | * down to lower layer for further processing |
| 923 | * |
| 924 | * Return: QDF_STATUS based on overall success |
| 925 | */ |
| 926 | QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id, |
| 927 | uint32_t arg_count, uint32_t *arg); |
| 928 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 929 | typedef struct sStatsExtRequestReq { |
| 930 | uint32_t request_data_len; |
| 931 | uint8_t *request_data; |
| 932 | } tStatsExtRequestReq, *tpStatsExtRequestReq; |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 933 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 934 | #ifdef WLAN_FEATURE_STATS_EXT |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 935 | /** |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 936 | * sme_stats_ext_register_callback() - Register stats ext callback |
| 937 | * @mac_handle: Opaque handle to the MAC context |
| 938 | * @callback: Function to be invoked for stats ext events |
| 939 | * |
| 940 | * This function is called to register the callback that send vendor |
| 941 | * event for stats ext |
| 942 | */ |
| 943 | void sme_stats_ext_register_callback(mac_handle_t mac_handle, |
| 944 | stats_ext_cb callback); |
| 945 | |
| 946 | /** |
| 947 | * sme_stats_ext_deregister_callback() - Deregister stats ext callback |
| 948 | * @mac_handle: Opaque handle to the MAC context |
| 949 | * |
| 950 | * This function is called to deregister the callback that send vendor |
| 951 | * event for stats ext |
| 952 | */ |
| 953 | void sme_stats_ext_deregister_callback(mac_handle_t mac_handle); |
| 954 | |
| 955 | /** |
| 956 | * sme_stats_ext2_register_callback() - Register stats ext2 callback |
| 957 | * @mac_handle: Opaque handle to the MAC context |
| 958 | * @callback: Function to be invoked for stats ext2 events |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 959 | * |
| 960 | * This function will register a callback for frame aggregation failure |
| 961 | * indications processing. |
| 962 | * |
| 963 | * Return: void |
| 964 | */ |
| 965 | void sme_stats_ext2_register_callback(tHalHandle hal_handle, |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 966 | stats_ext2_cb callback); |
| 967 | |
| 968 | QDF_STATUS sme_stats_ext_request(uint8_t session_id, |
| 969 | tpStatsExtRequestReq input); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 970 | #else |
| 971 | static inline void |
| 972 | sme_stats_ext_register_callback(mac_handle_t mac_handle, |
| 973 | stats_ext_cb callback) |
| 974 | { |
| 975 | } |
| 976 | |
| 977 | static inline void |
| 978 | sme_stats_ext2_register_callback(tHalHandle hal_handle, |
| 979 | stats_ext2_cb callback) |
| 980 | { |
| 981 | } |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 982 | #endif /* WLAN_FEATURE_STATS_EXT */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 983 | QDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 984 | uint8_t sessionId, |
| 985 | uint8_t allowDFSChannelRoam); |
| 986 | uint8_t sme_get_dfs_scan_mode(tHalHandle hHal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 987 | |
| 988 | #ifdef FEATURE_WLAN_EXTSCAN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 989 | QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 990 | uint32_t *aValidChannels, |
| 991 | uint8_t *pNumChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 992 | QDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 993 | tSirGetExtScanCapabilitiesReqParams *pReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 994 | QDF_STATUS sme_ext_scan_start(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 995 | tSirWifiScanCmdReqParams *pStartCmd); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 996 | QDF_STATUS sme_ext_scan_stop(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 997 | tSirExtScanStopReqParams *pStopReq); |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 998 | |
| 999 | /** |
| 1000 | * sme_set_bss_hotlist() - SME API to set BSSID hotlist |
| 1001 | * @mac_handle: Opaque handle to the MAC context |
| 1002 | * @params: extscan set hotlist structure |
| 1003 | * |
| 1004 | * Handles the request to set the BSSID hotlist in firmware. |
| 1005 | * |
| 1006 | * Return: QDF_STATUS |
| 1007 | */ |
| 1008 | QDF_STATUS |
| 1009 | sme_set_bss_hotlist(mac_handle_t mac_handle, |
| 1010 | struct extscan_bssid_hotlist_set_params *params); |
| 1011 | |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 1012 | /** |
| 1013 | * sme_reset_bss_hotlist() - SME API to reset BSSID hotlist |
| 1014 | * @mac_handle: Opaque handle to the MAC context |
| 1015 | * @params: extscan reset hotlist structure |
| 1016 | * |
| 1017 | * Handles the request to reset the BSSID hotlist in firmware. |
| 1018 | * |
| 1019 | * Return: QDF_STATUS |
| 1020 | */ |
| 1021 | QDF_STATUS |
| 1022 | sme_reset_bss_hotlist(mac_handle_t mac_handle, |
| 1023 | struct extscan_bssid_hotlist_reset_params *params); |
| 1024 | |
Jeff Johnson | b43ed03 | 2018-07-16 06:59:21 -0700 | [diff] [blame] | 1025 | /** |
| 1026 | * sme_set_significant_change() - SME API to set significant change |
| 1027 | * @mac_handle: Opaque handle to the MAC context |
| 1028 | * @params: extscan set significant change structure |
| 1029 | * |
| 1030 | * Return: QDF_STATUS |
| 1031 | */ |
| 1032 | QDF_STATUS |
| 1033 | sme_set_significant_change(mac_handle_t mac_handle, |
| 1034 | struct extscan_set_sig_changereq_params *params); |
| 1035 | |
Jeff Johnson | 0c8dbc3 | 2018-07-16 22:10:48 -0700 | [diff] [blame] | 1036 | /** |
| 1037 | * sme_reset_significant_change() - SME API to reset significant change |
| 1038 | * @mac_handle: Opaque handle to the MAC context |
| 1039 | * @params: extscan reset significant change structure |
| 1040 | * |
| 1041 | * Return: QDF_STATUS |
| 1042 | */ |
| 1043 | QDF_STATUS |
| 1044 | sme_reset_significant_change(mac_handle_t mac_handle, |
| 1045 | struct extscan_capabilities_reset_params *params); |
| 1046 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1047 | QDF_STATUS sme_get_cached_results(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1048 | tSirExtScanGetCachedResultsReqParams * |
| 1049 | pCachedResultsReq); |
| 1050 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1051 | QDF_STATUS sme_set_epno_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1052 | struct wifi_epno_params *req_msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1053 | QDF_STATUS sme_set_passpoint_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1054 | struct wifi_passpoint_req *req_msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1055 | QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1056 | struct wifi_passpoint_req *req_msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1057 | |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 1058 | QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle, |
| 1059 | ext_scan_ind_cb ext_scan_ind_cb); |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1060 | #else |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 1061 | static inline |
| 1062 | QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle, |
| 1063 | ext_scan_ind_cb ext_scan_ind_cb) |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1064 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1065 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1066 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1067 | #endif /* FEATURE_WLAN_EXTSCAN */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1068 | QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1069 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1070 | QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1071 | tSirLLStatsClearReq * pclearStatsReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1072 | QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1073 | tSirLLStatsSetReq *psetStatsReq); |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 1074 | |
| 1075 | /** |
| 1076 | * sme_ll_stats_get_req() - SME API to get the Link Layer Statistics |
| 1077 | * @mac_handle: Global MAC handle |
| 1078 | * @get_stats_req: Link Layer get stats request params structure |
| 1079 | * @context: Callback context |
| 1080 | * |
| 1081 | * Return: QDF_STATUS |
| 1082 | */ |
| 1083 | QDF_STATUS sme_ll_stats_get_req(mac_handle_t mac_handle, |
| 1084 | tSirLLStatsGetReq *get_stats_req, |
| 1085 | void *context); |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1086 | |
| 1087 | /** |
| 1088 | * sme_set_link_layer_stats_ind_cb() - |
| 1089 | * SME API to trigger the stats are available after get request |
| 1090 | * @mac_handle: MAC handle |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 1091 | * @callback: HDD callback which needs to be invoked after |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1092 | * getting status notification from FW |
| 1093 | * |
| 1094 | * Return: QDF_STATUS |
| 1095 | */ |
| 1096 | QDF_STATUS sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle, |
| 1097 | link_layer_stats_cb callback); |
| 1098 | |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 1099 | QDF_STATUS sme_set_link_layer_ext_cb(tHalHandle hal, |
Jeff Johnson | 2d29212 | 2018-06-02 21:02:02 -0700 | [diff] [blame] | 1100 | void (*ll_stats_ext_cb)(hdd_handle_t callback_ctx, |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 1101 | tSirLLStatsResults * rsp)); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1102 | QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal); |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 1103 | QDF_STATUS sme_ll_stats_set_thresh(tHalHandle hal, |
| 1104 | struct sir_ll_ext_stats_threshold *threshold); |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1105 | #else /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 1106 | static inline QDF_STATUS |
| 1107 | sme_set_link_layer_ext_cb(tHalHandle hal, void (*ll_stats_ext_cb) |
| 1108 | (hdd_handle_t callback_ctx, tSirLLStatsResults |
| 1109 | *rsp)) |
| 1110 | { |
| 1111 | return QDF_STATUS_SUCCESS; |
| 1112 | } |
| 1113 | |
| 1114 | static inline QDF_STATUS |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1115 | sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle, |
| 1116 | link_layer_stats_cb callback) |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1117 | { |
| 1118 | return QDF_STATUS_SUCCESS; |
| 1119 | } |
| 1120 | |
| 1121 | static inline QDF_STATUS |
| 1122 | sme_reset_link_layer_stats_ind_cb(tHalHandle hhal) |
| 1123 | { |
| 1124 | return QDF_STATUS_SUCCESS; |
| 1125 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1126 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 1127 | |
Manikandan Mohan | 80dea79 | 2016-04-28 16:36:48 -0700 | [diff] [blame] | 1128 | QDF_STATUS sme_set_wisa_params(tHalHandle hal, |
| 1129 | struct sir_wisa_params *wisa_params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1130 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1131 | QDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1132 | bool nRoamOffloadEnabled); |
Deepak Dhamdhere | f2a7d8b | 2016-08-19 16:17:38 -0700 | [diff] [blame] | 1133 | QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hal_ctx, |
| 1134 | uint8_t session_id, |
| 1135 | bool key_mgmt_offload_enabled, |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 1136 | struct pmkid_mode_bits *pmkid_modes); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1137 | #endif |
| 1138 | #ifdef WLAN_FEATURE_NAN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1139 | QDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1140 | #endif /* WLAN_FEATURE_NAN */ |
Jeff Johnson | ca7a716 | 2018-07-07 12:56:54 -0700 | [diff] [blame] | 1141 | QDF_STATUS sme_get_link_status(mac_handle_t mac_handle, |
| 1142 | csr_link_status_callback callback, |
| 1143 | void *context, uint8_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1144 | QDF_STATUS sme_get_temperature(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1145 | void *tempContext, |
| 1146 | void (*pCallbackfn)(int temperature, |
| 1147 | void *pContext)); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1148 | QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1149 | tSirScanMacOui *pScanMacOui); |
| 1150 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1151 | #ifdef DHCP_SERVER_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1152 | QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1153 | tSirDhcpSrvOffloadInfo * pDhcpSrvInfo); |
| 1154 | #endif /* DHCP_SERVER_OFFLOAD */ |
| 1155 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1156 | QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1157 | uint32_t x0, uint32_t x1); |
| 1158 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1159 | QDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag); |
Min Liu | 5eaf724 | 2018-03-13 17:32:15 +0800 | [diff] [blame] | 1160 | QDF_STATUS sme_enable_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1161 | QDF_STATUS sme_set_mas(uint32_t val); |
| 1162 | QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type); |
| 1163 | QDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 1164 | uint8_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1165 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1166 | QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1167 | uint16_t stats_avg_factor); |
| 1168 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1169 | QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1170 | uint32_t guard_time); |
| 1171 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1172 | QDF_STATUS sme_wifi_start_logger(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1173 | struct sir_wifi_start_log start_log); |
| 1174 | |
| 1175 | bool sme_neighbor_middle_of_roaming(tHalHandle hHal, |
| 1176 | uint8_t sessionId); |
| 1177 | |
Padma, Santhosh Kumar | 86747ec | 2018-05-29 18:28:29 +0530 | [diff] [blame] | 1178 | /* |
| 1179 | * sme_is_any_session_in_middle_of_roaming() - check if roaming is in progress |
| 1180 | * @hal: MAC Handle |
| 1181 | * |
| 1182 | * Checks if any SME session is in middle of roaming |
| 1183 | * |
| 1184 | * Return : true if roaming is in progress else false |
| 1185 | */ |
| 1186 | bool sme_is_any_session_in_middle_of_roaming(mac_handle_t hal); |
| 1187 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1188 | /** |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1189 | * sme_enable_uapsd_for_ac() - enable uapsd for access category request to WMA |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1190 | * @sta_id: station id |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1191 | * @ac: access category |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1192 | * @tid: tid value |
| 1193 | * @pri: user priority |
| 1194 | * @srvc_int: service interval |
| 1195 | * @sus_int: suspend interval |
| 1196 | * @dir: tspec direction |
| 1197 | * @psb: PSB value |
| 1198 | * @sessionId: session id |
| 1199 | * @delay_interval: delay interval |
| 1200 | * |
| 1201 | * Return: QDF status |
| 1202 | */ |
| 1203 | QDF_STATUS sme_enable_uapsd_for_ac(uint8_t sta_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1204 | sme_ac_enum_type ac, uint8_t tid, |
| 1205 | uint8_t pri, uint32_t srvc_int, |
| 1206 | uint32_t sus_int, |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 1207 | enum sme_qos_wmm_dir_type dir, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1208 | uint8_t psb, uint32_t sessionId, |
| 1209 | uint32_t delay_interval); |
| 1210 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1211 | /** |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1212 | * sme_disable_uapsd_for_ac() - disable uapsd access category request to WMA |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1213 | * @sta_id: station id |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1214 | * @ac: access category |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1215 | * @sessionId: session id |
| 1216 | * |
| 1217 | * Return: QDF status |
| 1218 | */ |
| 1219 | QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1220 | sme_ac_enum_type ac, |
| 1221 | uint32_t sessionId); |
| 1222 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1223 | #ifdef FEATURE_RSSI_MONITOR |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1224 | QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1225 | struct rssi_monitor_req *input); |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 1226 | |
| 1227 | /** |
| 1228 | * sme_set_rssi_threshold_breached_cb() - Set RSSI threshold breached callback |
| 1229 | * @mac_handle: global MAC handle |
| 1230 | * @cb: callback function pointer |
| 1231 | * |
| 1232 | * This function registers the RSSI threshold breached callback function. |
| 1233 | * |
| 1234 | * Return: QDF_STATUS enumeration. |
| 1235 | */ |
| 1236 | QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle, |
| 1237 | rssi_threshold_breached_cb cb); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1238 | #else /* FEATURE_RSSI_MONITOR */ |
| 1239 | static inline |
| 1240 | QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle, |
| 1241 | rssi_threshold_breached_cb cb) |
| 1242 | { |
| 1243 | return QDF_STATUS_SUCCESS; |
| 1244 | } |
| 1245 | #endif |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 1246 | /** |
| 1247 | * sme_reset_rssi_threshold_breached_cb() - Reset RSSI threshold breached |
| 1248 | * callback |
| 1249 | * @mac_handle: global MAC handle |
| 1250 | * |
| 1251 | * This function de-registers the RSSI threshold breached callback function. |
| 1252 | * |
| 1253 | * Return: QDF_STATUS enumeration. |
| 1254 | */ |
| 1255 | QDF_STATUS sme_reset_rssi_threshold_breached_cb(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1256 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1257 | QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal, |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 1258 | sir_mgmt_frame_ind_callback callback); |
| 1259 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1260 | QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss); |
Archana Ramachandran | 5041b25 | 2016-04-25 14:29:25 -0700 | [diff] [blame] | 1261 | void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1262 | |
| 1263 | bool sme_is_any_session_in_connected_state(tHalHandle h_hal); |
| 1264 | |
Krunal Soni | 8a090df | 2018-05-03 15:02:54 -0700 | [diff] [blame] | 1265 | QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list *msg); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1266 | QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1267 | void sme_register_hw_mode_trans_cb(tHalHandle hal, |
| 1268 | hw_mode_transition_cb callback); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1269 | QDF_STATUS sme_nss_update_request(uint32_t vdev_id, |
| 1270 | uint8_t new_nss, policy_mgr_nss_update_cback cback, |
| 1271 | uint8_t next_action, struct wlan_objmgr_psoc *psoc, |
| 1272 | enum policy_mgr_conn_update_reason reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1273 | |
| 1274 | typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1275 | QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1276 | sme_peer_authorized_fp auth_fp, |
| 1277 | uint32_t vdev_id); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1278 | QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg); |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 1279 | QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal, |
| 1280 | struct sir_antenna_mode_param *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1281 | |
| 1282 | void sme_set_scan_disable(tHalHandle h_hal, int value); |
| 1283 | void sme_setdef_dot11mode(tHalHandle hal); |
| 1284 | |
Amar Singhal | 7c1e898 | 2016-05-19 15:08:09 -0700 | [diff] [blame] | 1285 | QDF_STATUS sme_handle_set_fcc_channel(tHalHandle hHal, |
Amar Singhal | 83a047a | 2016-05-19 15:56:11 -0700 | [diff] [blame] | 1286 | bool fcc_constraint, |
| 1287 | bool scan_pending); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1288 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1289 | QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1290 | uint8_t session_id, |
| 1291 | uint32_t notify_id, |
| 1292 | int32_t val); |
| 1293 | |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 1294 | /** |
| 1295 | * sme_update_tx_bfee_supp() - sets the Tx Bfee support |
| 1296 | * @hal: Pointer to HAL |
| 1297 | * @session_id: SME session id |
| 1298 | * @cfg_val: Tx Bfee config value |
| 1299 | * |
| 1300 | * Return: 0 on success else err code |
| 1301 | */ |
| 1302 | int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id, |
| 1303 | uint8_t cfg_val); |
| 1304 | |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 1305 | /** |
| 1306 | * sme_update_tx_bfee_nsts() - sets the Tx Bfee nsts |
| 1307 | * @hal: MAC handle |
| 1308 | * @session_id: SME session id |
| 1309 | * @usr_cfg_val: user config value |
| 1310 | * @nsts_val: Tx Bfee nsts config value |
| 1311 | * |
| 1312 | * Return: 0 on success else err code |
| 1313 | */ |
| 1314 | int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id, |
| 1315 | uint8_t usr_cfg_val, uint8_t nsts_val); |
| 1316 | |
bings | 10f2645 | 2018-01-21 15:37:46 +0800 | [diff] [blame] | 1317 | void wlan_sap_enable_phy_error_logs(tHalHandle hal, uint32_t enable_log); |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1318 | #ifdef WLAN_FEATURE_DSRC |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1319 | void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p); |
| 1320 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1321 | QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1322 | ocb_callback callback, |
| 1323 | struct sir_ocb_config *config); |
| 1324 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1325 | QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1326 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1327 | QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1328 | struct sir_ocb_timing_advert *timing_advert); |
| 1329 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1330 | QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1331 | struct sir_ocb_timing_advert *timing_advert); |
| 1332 | |
Naveen Rawat | b4d3762 | 2015-11-13 16:15:25 -0800 | [diff] [blame] | 1333 | int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr, |
| 1334 | uint8_t **buf, uint32_t *timestamp_offset, |
| 1335 | uint32_t *time_value_offset); |
| 1336 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1337 | QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1338 | ocb_callback callback, |
| 1339 | struct sir_ocb_get_tsf_timer *request); |
| 1340 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1341 | QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1342 | ocb_callback callback, |
| 1343 | struct sir_dcc_get_stats *request); |
| 1344 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1345 | QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1346 | uint32_t dcc_stats_bitmap); |
| 1347 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1348 | QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1349 | ocb_callback callback, |
| 1350 | struct sir_dcc_update_ndl *request); |
| 1351 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1352 | QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1353 | ocb_callback callback); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1354 | QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal); |
| 1355 | |
Kiran Kumar Lokere | 1a43bcf | 2018-05-15 15:51:58 -0700 | [diff] [blame] | 1356 | static inline void |
| 1357 | sme_set_etsi13_srd_ch_in_master_mode(tHalHandle hal, |
| 1358 | bool etsi13_srd_chan_support) |
| 1359 | { |
| 1360 | } |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1361 | #else |
| 1362 | static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p) |
| 1363 | { |
| 1364 | return; |
| 1365 | } |
| 1366 | |
| 1367 | static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, |
| 1368 | ocb_callback callback, |
| 1369 | struct sir_ocb_config *config) |
| 1370 | { |
| 1371 | return QDF_STATUS_SUCCESS; |
| 1372 | } |
| 1373 | |
| 1374 | static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc) |
| 1375 | { |
| 1376 | return QDF_STATUS_SUCCESS; |
| 1377 | } |
| 1378 | |
| 1379 | static inline QDF_STATUS sme_ocb_start_timing_advert( |
| 1380 | struct sir_ocb_timing_advert *timing_advert) |
| 1381 | { |
| 1382 | return QDF_STATUS_SUCCESS; |
| 1383 | } |
| 1384 | |
| 1385 | static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert |
| 1386 | *timing_advert) |
| 1387 | { |
| 1388 | return QDF_STATUS_SUCCESS; |
| 1389 | } |
| 1390 | |
| 1391 | static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, |
| 1392 | tSirMacAddr self_addr, uint8_t **buf, |
| 1393 | uint32_t *timestamp_offset, |
| 1394 | uint32_t *time_value_offset) |
| 1395 | { |
| 1396 | return 0; |
| 1397 | } |
| 1398 | |
| 1399 | static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, |
| 1400 | ocb_callback callback, |
| 1401 | struct sir_ocb_get_tsf_timer *request) |
| 1402 | { |
| 1403 | return QDF_STATUS_SUCCESS; |
| 1404 | } |
| 1405 | |
| 1406 | static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, |
| 1407 | ocb_callback callback, |
| 1408 | struct sir_dcc_get_stats *request) |
| 1409 | { |
| 1410 | return QDF_STATUS_SUCCESS; |
| 1411 | } |
| 1412 | |
| 1413 | static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id, |
| 1414 | uint32_t dcc_stats_bitmap) |
| 1415 | { |
| 1416 | return QDF_STATUS_SUCCESS; |
| 1417 | } |
| 1418 | |
| 1419 | static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, |
| 1420 | ocb_callback callback, |
| 1421 | struct sir_dcc_update_ndl *request) |
| 1422 | { |
| 1423 | return QDF_STATUS_SUCCESS; |
| 1424 | } |
| 1425 | |
| 1426 | static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, |
| 1427 | void *context, ocb_callback callback) |
| 1428 | { |
| 1429 | return QDF_STATUS_SUCCESS; |
| 1430 | } |
| 1431 | static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal) |
| 1432 | { |
| 1433 | return QDF_STATUS_SUCCESS; |
| 1434 | } |
Kiran Kumar Lokere | 1a43bcf | 2018-05-15 15:51:58 -0700 | [diff] [blame] | 1435 | |
| 1436 | /** |
| 1437 | * sme_set_etsi13_srd_ch_in_master_mode() - master mode UNI-III band ch support |
| 1438 | * @hal: HAL pointer |
| 1439 | * @srd_chan_support: ETSI SRD channel support |
| 1440 | * |
| 1441 | * This function set master ETSI SRD channel support |
| 1442 | * |
| 1443 | * Return: None |
| 1444 | */ |
| 1445 | void sme_set_etsi13_srd_ch_in_master_mode(tHalHandle hal, |
| 1446 | bool etsi13_srd_chan_support); |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1447 | #endif |
Kiran Kumar Lokere | 1a43bcf | 2018-05-15 15:51:58 -0700 | [diff] [blame] | 1448 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1449 | void sme_add_set_thermal_level_callback(tHalHandle hal, |
| 1450 | sme_set_thermal_level_callback callback); |
| 1451 | |
Krishna Kumaar Natarajan | 052c6e6 | 2015-09-28 15:32:55 -0700 | [diff] [blame] | 1452 | void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg); |
Edhar, Mahesh Kumar | df2ec12 | 2015-11-16 11:33:16 +0530 | [diff] [blame] | 1453 | bool sme_validate_sap_channel_switch(tHalHandle hal, |
| 1454 | uint16_t sap_ch, eCsrPhyMode sap_phy_mode, |
| 1455 | uint8_t cc_switch_mode, uint8_t session_id); |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1456 | |
Chandrasekaran, Manishekar | 2859de4 | 2016-02-11 16:17:38 +0530 | [diff] [blame] | 1457 | bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id); |
| 1458 | |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1459 | #ifdef FEATURE_WLAN_TDLS |
| 1460 | void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset, |
| 1461 | uint8_t *opclass); |
| 1462 | #else |
| 1463 | static inline void |
| 1464 | sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset, |
| 1465 | uint8_t *opclass) |
| 1466 | { |
| 1467 | } |
| 1468 | #endif |
| 1469 | |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1470 | #ifdef FEATURE_LFR_SUBNET_DETECTION |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1471 | QDF_STATUS sme_gateway_param_update(tHalHandle hHal, |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1472 | struct gateway_param_update_req *request); |
| 1473 | #endif |
| 1474 | |
Selvaraj, Sridhar | 57bb4d0 | 2016-08-31 16:14:15 +0530 | [diff] [blame] | 1475 | void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id, |
| 1476 | uint32_t val); |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 1477 | QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id); |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 1478 | QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test); |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1479 | QDF_STATUS sme_set_tsfcb(tHalHandle hHal, |
| 1480 | int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx); |
Krunal Soni | e353194 | 2016-04-12 17:43:53 -0700 | [diff] [blame] | 1481 | |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1482 | QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal); |
| 1483 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1484 | #ifdef WLAN_FEATURE_TSF |
| 1485 | QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue); |
| 1486 | #else |
| 1487 | static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue) |
| 1488 | { |
| 1489 | return QDF_STATUS_E_FAILURE; |
| 1490 | } |
| 1491 | #endif |
| 1492 | |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1493 | QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal, |
| 1494 | uint8_t is_ht_smps_enabled, |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 1495 | uint8_t ht_smps_mode, |
| 1496 | bool send_smps_action); |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1497 | |
| 1498 | bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id); |
Gupta, Kapil | 4cb1d7d | 2016-04-16 18:16:25 -0700 | [diff] [blame] | 1499 | QDF_STATUS sme_add_beacon_filter(tHalHandle hal, |
| 1500 | uint32_t session_id, uint32_t *ie_map); |
| 1501 | QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id); |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 1502 | |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1503 | #ifdef FEATURE_WLAN_APF |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1504 | /** |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1505 | * sme_get_apf_capabilities() - Get APF capabilities |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1506 | * @hal: Global HAL handle |
| 1507 | * @callback: Callback function to be called with the result |
| 1508 | * @context: Opaque context to be used by the caller to associate the |
| 1509 | * request with the response |
| 1510 | * |
| 1511 | * This function constructs the cds message and fill in message type, |
| 1512 | * post the same to WDA. |
| 1513 | * |
| 1514 | * Return: QDF_STATUS enumeration |
| 1515 | */ |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1516 | QDF_STATUS sme_get_apf_capabilities(tHalHandle hal, |
| 1517 | apf_get_offload_cb callback, |
| 1518 | void *context); |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1519 | |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1520 | /** |
| 1521 | * sme_set_apf_instructions() - Set APF apf filter instructions. |
| 1522 | * @hal: HAL handle |
| 1523 | * @apf_set_offload: struct to set apf filter instructions. |
| 1524 | * |
| 1525 | * APFv2 (Legacy APF) API to set the APF packet filter. |
| 1526 | * |
| 1527 | * Return: QDF_STATUS enumeration. |
| 1528 | */ |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 1529 | QDF_STATUS sme_set_apf_instructions(tHalHandle hal, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1530 | struct sir_apf_set_offload |
| 1531 | *apf_set_offload); |
| 1532 | |
| 1533 | /** |
| 1534 | * sme_set_apf_enable_disable - Send apf enable/disable cmd |
| 1535 | * @hal: global hal handle |
| 1536 | * @vdev_id: vdev id |
| 1537 | * @apf_enable: true: Enable APF Int., false: Disable APF Int. |
| 1538 | * |
| 1539 | * API to either enable or disable the APF interpreter. |
| 1540 | * |
| 1541 | * Return: QDF_STATUS enumeration. |
| 1542 | */ |
| 1543 | QDF_STATUS sme_set_apf_enable_disable(tHalHandle hal, uint8_t vdev_id, |
| 1544 | bool apf_enable); |
| 1545 | |
| 1546 | /** |
| 1547 | * sme_apf_write_work_memory - Write into the apf work memory |
| 1548 | * @hal: global hal handle |
| 1549 | * @write_params: APF parameters for the write operation |
| 1550 | * |
| 1551 | * API for writing into the APF work memory. |
| 1552 | * |
| 1553 | * Return: QDF_STATUS enumeration. |
| 1554 | */ |
| 1555 | QDF_STATUS sme_apf_write_work_memory(tHalHandle hal, |
| 1556 | struct wmi_apf_write_memory_params |
| 1557 | *write_params); |
| 1558 | |
| 1559 | /** |
| 1560 | * sme_apf_read_work_memory - Read part of apf work memory |
| 1561 | * @hal: global hal handle |
| 1562 | * @read_params: APF parameters for the get operation |
| 1563 | * @callback: callback to handle the the read response |
| 1564 | * |
| 1565 | * API for issuing a APF read memory request. |
| 1566 | * |
| 1567 | * Return: QDF_STATUS enumeration. |
| 1568 | */ |
| 1569 | QDF_STATUS |
| 1570 | sme_apf_read_work_memory(tHalHandle hal, |
| 1571 | struct wmi_apf_read_memory_params *read_params, |
| 1572 | apf_read_mem_cb callback); |
| 1573 | |
| 1574 | #endif /* FEATURE_WLAN_APF */ |
| 1575 | |
Abhishek Singh | 1c67622 | 2016-05-09 14:20:28 +0530 | [diff] [blame] | 1576 | uint32_t sme_get_wni_dot11_mode(tHalHandle hal); |
Rajeev Kumar Sirasanagandla | e3b5991 | 2018-08-24 15:53:31 +0530 | [diff] [blame] | 1577 | QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid, |
| 1578 | uint8_t vdev_id); |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 1579 | QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal, |
| 1580 | struct adaptive_dwelltime_params *dwelltime_params); |
Naveen Rawat | a410c5a | 2016-09-19 14:22:33 -0700 | [diff] [blame] | 1581 | |
| 1582 | void sme_set_vdev_ies_per_band(tHalHandle hal, uint8_t vdev_id); |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 1583 | void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2); |
| 1584 | |
| 1585 | void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss, |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 1586 | uint32_t vdev_type_nss, enum band_info band); |
Nitesh Shah | db5ea0d | 2017-03-22 15:17:47 +0530 | [diff] [blame] | 1587 | void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable); |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 1588 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 1589 | void sme_register_p2p_lo_event(tHalHandle hHal, void *context, |
| 1590 | p2p_lo_callback callback); |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 1591 | #else |
| 1592 | static inline void sme_register_p2p_lo_event(tHalHandle hHal, |
| 1593 | void *context, |
| 1594 | p2p_lo_callback callback) |
| 1595 | { |
| 1596 | } |
| 1597 | #endif |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1598 | |
Abhishek Singh | c994160 | 2016-08-09 16:06:22 +0530 | [diff] [blame] | 1599 | QDF_STATUS sme_remove_bssid_from_scan_list(tHalHandle hal, |
| 1600 | tSirMacAddr bssid); |
| 1601 | |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1602 | QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id, |
| 1603 | struct sir_mac_pwr_dbg_cmd* |
| 1604 | dbg_args); |
| 1605 | |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 1606 | void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode, |
| 1607 | uint8_t *nss_2g, uint8_t *nss_5g); |
Masti, Narayanraddi | ab712a7 | 2016-08-04 11:59:11 +0530 | [diff] [blame] | 1608 | QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id, |
| 1609 | uint8_t default_idx); |
Kondabattini, Ganesh | 3f2d02c | 2016-09-13 12:23:47 +0530 | [diff] [blame] | 1610 | void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t |
| 1611 | *peer_mac, uint16_t reason, uint8_t |
| 1612 | wait_for_ack); |
Kondabattini, Ganesh | e4f18e0 | 2016-09-13 13:01:22 +0530 | [diff] [blame] | 1613 | QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal, |
| 1614 | uint8_t session_id, uint8_t *vendor_ie, |
| 1615 | int access_policy); |
| 1616 | |
Krishna Kumaar Natarajan | f1581df | 2017-02-21 13:42:08 -0800 | [diff] [blame] | 1617 | /** |
| 1618 | * sme_set_peer_param() - set peer param |
| 1619 | * @vdev_id: vdev ID |
| 1620 | * @peer_addr: peer MAC address |
| 1621 | * @param_id: param ID to be updated |
| 1622 | * @param_Value: paraam value |
| 1623 | * |
| 1624 | * This SME API is used to send the peer param to WMA to be sent to FW. |
| 1625 | * |
| 1626 | * Return: QDF_STATUS |
| 1627 | */ |
| 1628 | QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id, |
| 1629 | uint32_t param_value, uint32_t vdev_id); |
| 1630 | |
Agrawal Ashish | 21ba257 | 2016-09-03 16:40:10 +0530 | [diff] [blame] | 1631 | QDF_STATUS sme_update_sta_roam_policy(tHalHandle hal, |
| 1632 | enum sta_roam_policy_dfs_mode dfs_mode, |
| 1633 | bool skip_unsafe_channels, |
Agrawal, Ashish | 9f84c40 | 2016-11-30 16:19:44 +0530 | [diff] [blame] | 1634 | uint8_t session_id, uint8_t sap_operating_band); |
Selvaraj, Sridhar | ebda0f2 | 2016-08-29 16:05:23 +0530 | [diff] [blame] | 1635 | QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal, |
| 1636 | uint8_t set_value); |
Deepak Dhamdhere | b106ae5 | 2016-08-10 20:55:30 +0530 | [diff] [blame] | 1637 | QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id, |
| 1638 | uint8_t *ie_data, uint16_t ie_len); |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 1639 | /** |
| 1640 | * sme_update_session_param() - API to update PE session param |
| 1641 | * @hal: HAL handle for device |
| 1642 | * @session_id: Session ID |
| 1643 | * @param_type: Param type to be updated |
| 1644 | * @param_val: Param value to be update |
| 1645 | * |
| 1646 | * Note: this setting will not persist over reboots. |
| 1647 | * |
| 1648 | * Return: QDF_STATUS |
| 1649 | */ |
| 1650 | QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id, |
| 1651 | uint32_t param_type, uint32_t param_val); |
Padma, Santhosh Kumar | d7cc079 | 2016-06-28 18:54:12 +0530 | [diff] [blame] | 1652 | |
Vignesh Viswanathan | 32761e4 | 2017-09-25 17:10:54 +0530 | [diff] [blame] | 1653 | /** |
| 1654 | * sme_update_fils_setting() - API to update PE FILS setting |
| 1655 | * @hal: HAL handle for device |
| 1656 | * @session_id: Session ID |
| 1657 | * @param_val: Param value to be update |
| 1658 | * |
| 1659 | * Return: QDF_STATUS |
| 1660 | */ |
| 1661 | QDF_STATUS sme_update_fils_setting(tHalHandle hal, uint8_t session_id, |
| 1662 | uint8_t param_val); |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 1663 | #ifdef WLAN_FEATURE_FIPS |
| 1664 | /** |
| 1665 | * sme_fips_request() - Perform a FIPS certification operation |
| 1666 | * @hal: Hal handle for the object being certified |
| 1667 | * @param: The FIPS certification parameters |
| 1668 | * @callback: Callback function to invoke with the results |
| 1669 | * @context: Opaque context to pass back to caller in the callback |
| 1670 | * |
| 1671 | * Return: QDF_STATUS_SUCCESS if the request is successfully sent |
| 1672 | * to firmware for processing, otherwise an error status. |
| 1673 | */ |
| 1674 | QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param, |
| 1675 | wma_fips_cb callback, void *context); |
| 1676 | #else |
| 1677 | static inline |
| 1678 | QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param, |
| 1679 | wma_fips_cb callback, void *context) |
| 1680 | { |
| 1681 | return QDF_STATUS_E_NOSUPPORT; |
| 1682 | } |
| 1683 | #endif /* WLAN_FEATURE_FIPS */ |
| 1684 | |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 1685 | /** |
| 1686 | * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW. |
| 1687 | * @hal: reference to the HAL |
| 1688 | * |
| 1689 | * Return: QDF_STATUS |
| 1690 | */ |
| 1691 | QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal); |
Kiran Kumar Lokere | 1aa9c9a | 2016-10-05 18:50:59 -0700 | [diff] [blame] | 1692 | void sme_set_prefer_80MHz_over_160MHz(tHalHandle hal, |
| 1693 | bool sta_prefer_80MHz_over_160MHz); |
Agrawal, Ashish | 35b251d | 2016-09-08 19:21:03 +0530 | [diff] [blame] | 1694 | QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, |
| 1695 | uint8_t session_id, uint32_t tx_fail_count); |
Agrawal Ashish | da3e950 | 2016-09-21 17:43:51 +0530 | [diff] [blame] | 1696 | QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, |
| 1697 | struct sme_short_retry_limit *short_retry_limit_th); |
| 1698 | QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle, |
| 1699 | struct sme_long_retry_limit *long_retry_limit_th); |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1700 | /** |
| 1701 | * sme_roam_is_ese_assoc() - Check if association type is ESE |
| 1702 | * @roam_info: Pointer to roam info |
| 1703 | * |
| 1704 | * Return: true if ESE Association, false otherwise. |
| 1705 | */ |
| 1706 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1707 | bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info); |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1708 | #else |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1709 | static inline bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info) |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1710 | { |
| 1711 | return false; |
| 1712 | } |
| 1713 | #endif |
| 1714 | /** |
| 1715 | * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R |
| 1716 | * @hal_ctx: HAL handle |
| 1717 | * @session_id: session id |
| 1718 | * |
| 1719 | * Return: true if 11r Association, false otherwise. |
| 1720 | */ |
| 1721 | bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id); |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 1722 | |
| 1723 | /** |
| 1724 | * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW |
| 1725 | * @hal: Handle returned by mac_open |
| 1726 | * @sta_inactivity_timer: struct for sta inactivity timer |
| 1727 | * |
| 1728 | * If a station does not send anything in sta_inactivity_timeout seconds, an |
| 1729 | * empty data frame is sent to it in order to verify whether it is |
| 1730 | * still in range. If this frame is not ACKed, the station will be |
| 1731 | * disassociated and then deauthenticated. |
| 1732 | * |
| 1733 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1734 | */ |
| 1735 | QDF_STATUS sme_update_sta_inactivity_timeout(tHalHandle hal_handle, |
| 1736 | struct sme_sta_inactivity_timeout *sta_inactivity_timer); |
| 1737 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1738 | /** |
| 1739 | * sme_set_lost_link_info_cb() - plug in callback function for receiving |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 1740 | * @mac_handle: Opaque handle to the MAC context |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1741 | * @cb: callback function |
| 1742 | * |
| 1743 | * Return: HAL status |
| 1744 | */ |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 1745 | QDF_STATUS sme_set_lost_link_info_cb(mac_handle_t mac_handle, |
| 1746 | lost_link_info_cb cb); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 1747 | |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 1748 | /** |
| 1749 | * sme_update_new_channel_event() - update new channel event for sapFsm |
| 1750 | * @hal: HAL handle |
| 1751 | * @session_id: session id |
| 1752 | * |
| 1753 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1754 | */ |
| 1755 | QDF_STATUS sme_update_new_channel_event(tHalHandle hal, uint8_t session_id); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 1756 | #ifdef WLAN_POWER_DEBUGFS |
| 1757 | QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn) |
| 1758 | (struct power_stats_response *response, |
| 1759 | void *context), void *power_stats_context); |
| 1760 | #endif |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 1761 | |
| 1762 | /** |
| 1763 | * sme_get_sar_power_limits() - get SAR limits |
| 1764 | * @hal: HAL handle |
| 1765 | * @callback: Callback function to invoke with the results |
| 1766 | * @context: Opaque context to pass back to caller in the callback |
| 1767 | * |
| 1768 | * Return: QDF_STATUS_SUCCESS if the request is successfully sent |
| 1769 | * to firmware for processing, otherwise an error status. |
| 1770 | */ |
| 1771 | QDF_STATUS sme_get_sar_power_limits(tHalHandle hal, |
| 1772 | wma_sar_cb callback, void *context); |
| 1773 | |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 1774 | /** |
| 1775 | * sme_set_sar_power_limits() - set sar limits |
| 1776 | * @hal: HAL handle |
| 1777 | * @sar_limit_cmd: struct to send sar limit cmd. |
| 1778 | * |
| 1779 | * Return: QDF_STATUS enumeration. |
| 1780 | */ |
| 1781 | QDF_STATUS sme_set_sar_power_limits(tHalHandle hal, |
| 1782 | struct sar_limit_cmd_params *sar_limit_cmd); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 1783 | |
Amar Singhal | 6edf973 | 2016-11-20 21:43:40 -0800 | [diff] [blame] | 1784 | void sme_set_cc_src(tHalHandle hal_handle, enum country_src); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 1785 | |
| 1786 | |
| 1787 | #ifdef WLAN_FEATURE_WOW_PULSE |
| 1788 | QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info); |
| 1789 | #endif |
| 1790 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1791 | /* ARP DEBUG STATS */ |
| 1792 | QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal, |
| 1793 | struct set_arp_stats_params |
| 1794 | *set_stats_param); |
| 1795 | QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal, |
| 1796 | struct get_arp_stats_params |
| 1797 | *get_stats_param); |
| 1798 | QDF_STATUS sme_set_nud_debug_stats_cb(tHalHandle hal, |
Dundi Raviteja | 3bcf3a8 | 2018-05-22 13:24:18 +0530 | [diff] [blame] | 1799 | void (*cb)(void *, struct rsp_stats *, void *context), |
| 1800 | void *context); |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1801 | |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 1802 | /** |
| 1803 | * sme_set_chan_info_callback() - Register chan info callback |
| 1804 | * @hal - MAC global handle |
| 1805 | * @callback_routine - callback routine from HDD |
| 1806 | * |
| 1807 | * This API is invoked by HDD to register its callback to mac |
| 1808 | * |
| 1809 | * Return: QDF_STATUS |
| 1810 | */ |
| 1811 | void sme_set_chan_info_callback(tHalHandle hal_handle, |
| 1812 | void (*callback)(struct scan_chan_info *chan_info)); |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1813 | |
| 1814 | /** |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 1815 | * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache |
| 1816 | * @hal: handle returned by mac_open |
| 1817 | * @profile: current connected profile |
| 1818 | * @bssid: bssid to look for in scan cache |
| 1819 | * @rssi: rssi value found |
| 1820 | * @snr: snr value found |
| 1821 | * |
| 1822 | * Return: QDF_STATUS |
| 1823 | */ |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 1824 | QDF_STATUS sme_get_rssi_snr_by_bssid(tHalHandle hal, |
| 1825 | struct csr_roam_profile *profile, |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 1826 | const uint8_t *bssid, int8_t *rssi, |
| 1827 | int8_t *snr); |
| 1828 | |
| 1829 | /** |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1830 | * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares |
| 1831 | * beacon frame |
| 1832 | * @hal: handle returned by mac_open |
| 1833 | * @profile: current connected profile |
| 1834 | * @bssid: bssid to look for in scan cache |
| 1835 | * @frame_buf: frame buffer to populate |
| 1836 | * @frame_len: length of constructed frame |
Selvaraj, Sridhar | 64b0a9c | 2017-05-11 16:50:15 +0530 | [diff] [blame] | 1837 | * @channel: Pointer to channel info to be filled |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1838 | * |
| 1839 | * Return: QDF_STATUS |
| 1840 | */ |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 1841 | QDF_STATUS sme_get_beacon_frm(tHalHandle hal, struct csr_roam_profile *profile, |
| 1842 | const tSirMacAddr bssid, |
| 1843 | uint8_t **frame_buf, uint32_t *frame_len, |
| 1844 | int *channel); |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 1845 | |
| 1846 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 1847 | /** |
| 1848 | * sme_fast_reassoc() - invokes FAST REASSOC command |
| 1849 | * @hal: handle returned by mac_open |
| 1850 | * @profile: current connected profile |
| 1851 | * @bssid: bssid to look for in scan cache |
| 1852 | * @channel: channel on which reassoc should be send |
| 1853 | * @vdev_id: vdev id |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 1854 | * @connected_bssid: bssid of currently connected profile |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 1855 | * |
| 1856 | * Return: QDF_STATUS |
| 1857 | */ |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 1858 | QDF_STATUS sme_fast_reassoc(tHalHandle hal, struct csr_roam_profile *profile, |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 1859 | const tSirMacAddr bssid, int channel, |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 1860 | uint8_t vdev_id, const tSirMacAddr connected_bssid); |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 1861 | #endif |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 1862 | /** |
Jeff Johnson | f6182e4 | 2018-07-03 14:46:17 -0700 | [diff] [blame] | 1863 | * sme_congestion_register_callback() - registers congestion callback |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 1864 | * @hal: handler for HAL |
| 1865 | * @congestion_cb: congestion callback |
| 1866 | * |
| 1867 | * Return: QDF_STATUS |
| 1868 | */ |
| 1869 | QDF_STATUS sme_congestion_register_callback(tHalHandle hal, |
Jeff Johnson | f6182e4 | 2018-07-03 14:46:17 -0700 | [diff] [blame] | 1870 | congestion_cb congestion_cb); |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 1871 | |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1872 | /** |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 1873 | * sme_register_tx_queue_cb(): Register tx queue callback |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 1874 | * @mac_handle: Opaque handle for MAC context |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 1875 | * @tx_queue_cb: Transmit Queues callback |
| 1876 | * |
| 1877 | * Return: QDF_STATUS |
| 1878 | */ |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 1879 | QDF_STATUS sme_register_tx_queue_cb(mac_handle_t mac_handle, |
| 1880 | tx_queue_cb tx_queue_cb); |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 1881 | |
| 1882 | /** |
| 1883 | * sme_deregister_tx_queue_cb() - Deregister the tx queue callback |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 1884 | * @mac_handle: Opaque handle for MAC context |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 1885 | * |
| 1886 | * Return: QDF status |
| 1887 | */ |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 1888 | QDF_STATUS sme_deregister_tx_queue_cb(mac_handle_t mac_handle); |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 1889 | |
| 1890 | /** |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 1891 | * sme_rso_cmd_status_cb() - Set RSO cmd status callback |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 1892 | * @mac_handle: Opaque handle for the MAC context |
| 1893 | * @cb: HDD Callback to rso command status read |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 1894 | * |
| 1895 | * This function is used to save HDD RSO Command status callback in MAC |
| 1896 | * |
| 1897 | * Return: QDF_STATUS |
| 1898 | */ |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 1899 | QDF_STATUS sme_rso_cmd_status_cb(mac_handle_t mac_handle, |
| 1900 | rso_cmd_status_cb cb); |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 1901 | |
| 1902 | /** |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1903 | * sme_register_set_connection_info_cb() - Register connection |
| 1904 | * info callback |
| 1905 | * @hal - MAC global handle |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1906 | * @set_connection_info_cb - callback routine from HDD to set |
| 1907 | * connection info flag |
| 1908 | * @get_connection_info_cb - callback routine from HDD to get |
| 1909 | * connection info |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1910 | * |
| 1911 | * This API is invoked by HDD to register its callback to mac |
| 1912 | * |
| 1913 | * Return: QDF_STATUS |
| 1914 | */ |
| 1915 | QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal, |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1916 | bool (*set_connection_info_cb)(bool), |
| 1917 | bool (*get_connection_info_cb)(uint8_t *session_id, |
| 1918 | enum scan_reject_states *reason)); |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1919 | |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1920 | /** |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 1921 | * sme_set_dbs_scan_selection_config() - Update DBS scan selection |
| 1922 | * configuration |
| 1923 | * @hal: The handle returned by macOpen |
| 1924 | * @params: wmi_dbs_scan_sel_params config |
| 1925 | * |
| 1926 | * Return: QDF_STATUS if DBS scan selection update |
| 1927 | * configuration success else failure status |
| 1928 | */ |
| 1929 | QDF_STATUS sme_set_dbs_scan_selection_config(tHalHandle hal, |
| 1930 | struct wmi_dbs_scan_sel_params *params); |
| 1931 | |
| 1932 | /** |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1933 | * sme_store_pdev() - store pdev |
| 1934 | * @hal - MAC global handle |
| 1935 | * @pdev - pdev ptr |
| 1936 | * |
| 1937 | * Return: QDF_STATUS |
| 1938 | */ |
| 1939 | void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev); |
| 1940 | |
Sandeep Puligilla | f587adf | 2017-04-27 19:53:21 -0700 | [diff] [blame] | 1941 | /** |
| 1942 | * sme_ipa_uc_stat_request() - set ipa config parameters |
| 1943 | * @vdev_id: virtual device for the command |
| 1944 | * @param_id: parameter id |
| 1945 | * @param_val: parameter value |
| 1946 | * @req_cat: parameter category |
| 1947 | * |
| 1948 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1949 | */ |
| 1950 | QDF_STATUS sme_ipa_uc_stat_request(tHalHandle hal, |
| 1951 | uint32_t vdev_id, uint32_t param_id, |
| 1952 | uint32_t param_val, uint32_t req_cat); |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1953 | |
| 1954 | /** |
| 1955 | * sme_set_reorder_timeout() - set reorder timeout value |
| 1956 | * including Voice,Video,Besteffort,Background parameters |
| 1957 | * @hal: hal handle for getting global mac struct |
| 1958 | * @reg: struct sir_set_rx_reorder_timeout_val |
| 1959 | * |
| 1960 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1961 | */ |
| 1962 | QDF_STATUS sme_set_reorder_timeout(tHalHandle hal, |
| 1963 | struct sir_set_rx_reorder_timeout_val *req); |
| 1964 | |
| 1965 | /** |
| 1966 | * sme_set_rx_set_blocksize() - set blocksize value |
| 1967 | * including mac_addr and win_limit parameters |
| 1968 | * @hal: hal handle for getting global mac struct |
| 1969 | * @reg: struct sir_peer_set_rx_blocksize |
| 1970 | * |
| 1971 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1972 | */ |
| 1973 | |
| 1974 | QDF_STATUS sme_set_rx_set_blocksize(tHalHandle hal, |
| 1975 | struct sir_peer_set_rx_blocksize *req); |
| 1976 | |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 1977 | /** |
| 1978 | * sme_get_rcpi() - gets the rcpi value for peer mac addr |
| 1979 | * @hal: handle returned by mac_open |
| 1980 | * @rcpi: rcpi request containing peer mac addr, callback and related info |
| 1981 | * |
| 1982 | * This function posts the rcpi measurement request message to wma queue |
| 1983 | * |
| 1984 | * Return: QDF_STATUS |
| 1985 | */ |
| 1986 | QDF_STATUS sme_get_rcpi(tHalHandle hal, struct sme_rcpi_req *rcpi); |
| 1987 | |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 1988 | /** |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 1989 | * sme_set_chip_pwr_save_fail_cb() - set chip power save failure callback |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 1990 | * @mac_handle: opaque handle to the MAC context |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 1991 | * @cb: callback function pointer |
| 1992 | * |
| 1993 | * This function stores the chip power save failure callback function. |
| 1994 | * |
| 1995 | * Return: QDF_STATUS enumeration. |
| 1996 | */ |
| 1997 | |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 1998 | QDF_STATUS sme_set_chip_pwr_save_fail_cb(mac_handle_t mac_handle, |
| 1999 | pwr_save_fail_cb cb); |
Naveen Rawat | 247a868 | 2017-06-05 15:00:31 -0700 | [diff] [blame] | 2000 | /** |
| 2001 | * sme_cli_set_command() - SME wrapper API over WMA "set" command |
| 2002 | * processor cmd |
| 2003 | * @vdev_id: virtual device for the command |
| 2004 | * @param_id: parameter id |
| 2005 | * @sval: parameter value |
| 2006 | * @vpdev: parameter category |
| 2007 | * |
| 2008 | * Command handler for set operations |
| 2009 | * |
| 2010 | * Return: 0 on success, errno on failure |
| 2011 | */ |
| 2012 | int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev); |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 2013 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2014 | /** |
| 2015 | * sme_set_bt_activity_info_cb - set the callback handler for bt events |
Jeff Johnson | d0b6c7e | 2018-07-04 14:53:06 -0700 | [diff] [blame] | 2016 | * @mac_handle: handle returned by mac_open |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2017 | * @cb: callback handler |
| 2018 | * |
| 2019 | * Return: QDF_STATUS |
| 2020 | */ |
Jeff Johnson | d0b6c7e | 2018-07-04 14:53:06 -0700 | [diff] [blame] | 2021 | QDF_STATUS sme_set_bt_activity_info_cb(mac_handle_t mac_handle, |
| 2022 | bt_activity_info_cb cb); |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2023 | |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2024 | /** |
Ashish Kumar Dhanotiya | b28338c | 2017-07-21 20:12:34 +0530 | [diff] [blame] | 2025 | * sme_set_smps_cfg() - set SMPS config params |
| 2026 | * @vdev_id: virtual device for the command |
| 2027 | * @param_id: parameter id |
| 2028 | * @param_val: parameter value |
| 2029 | * |
| 2030 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2031 | */ |
| 2032 | |
| 2033 | QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id, |
| 2034 | uint32_t param_val); |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2035 | |
| 2036 | /** |
| 2037 | * sme_get_peer_stats() - sme api to post peer info request |
| 2038 | * @mac: mac handle |
| 2039 | * @req: peer info request struct send to wma |
| 2040 | * |
| 2041 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2042 | */ |
| 2043 | |
| 2044 | QDF_STATUS sme_get_peer_stats(tpAniSirGlobal mac, |
| 2045 | struct sir_peer_info_req req); |
| 2046 | |
Ashish Kumar Dhanotiya | b28338c | 2017-07-21 20:12:34 +0530 | [diff] [blame] | 2047 | /** |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2048 | * sme_get_peer_info() - sme api to get peer info |
| 2049 | * @hal: hal handle for getting global mac struct |
| 2050 | * @req: peer info request struct send to wma |
| 2051 | * @context: context of callback function |
| 2052 | * @callbackfn: hdd callback function when receive response |
| 2053 | * |
| 2054 | * This function will send WMA_GET_PEER_INFO to WMA |
| 2055 | * |
| 2056 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2057 | */ |
| 2058 | QDF_STATUS sme_get_peer_info(tHalHandle hal, |
| 2059 | struct sir_peer_info_req req, |
| 2060 | void *context, |
| 2061 | void (*callbackfn)(struct sir_peer_info_resp *param, |
| 2062 | void *pcontext)); |
| 2063 | |
| 2064 | /** |
| 2065 | * sme_get_peer_info_ext() - sme api to get peer ext info |
| 2066 | * @hal: hal handle for getting global mac struct |
| 2067 | * @req: peer ext info request struct send to wma |
| 2068 | * @context: context of callback function |
| 2069 | * @callbackfn: hdd callback function when receive response |
| 2070 | * |
| 2071 | * This function will send WMA_GET_PEER_INFO_EXT to WMA |
| 2072 | * |
| 2073 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2074 | */ |
| 2075 | QDF_STATUS sme_get_peer_info_ext(tHalHandle hal, |
| 2076 | struct sir_peer_info_ext_req *req, |
| 2077 | void *context, |
| 2078 | void (*callbackfn)(struct sir_peer_info_ext_resp *param, |
| 2079 | void *pcontext)); |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 2080 | |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 2081 | /** |
| 2082 | * sme_set_5g_band_pref() - sme api to set 5Ghz preference |
| 2083 | * @hal: hal handle for getting global mac struct |
| 2084 | * @pref_params: preference info request struct |
| 2085 | * |
| 2086 | * This function will set 5Ghz preference for STA connection |
| 2087 | * |
| 2088 | * Return: None |
| 2089 | */ |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 2090 | void sme_set_5g_band_pref(tHalHandle hal_handle, |
| 2091 | struct sme_5g_band_pref_params *pref_params); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 2092 | /** |
| 2093 | * sme_get_chain_rssi() - Get chain rssi |
| 2094 | * @hal: Global HAL handle |
| 2095 | * @input: get chain rssi req params |
| 2096 | * @callback: Callback function to be called with the result |
| 2097 | * @context: Opaque context to be used by the caller to associate the |
| 2098 | * request with the response |
| 2099 | * |
| 2100 | * This function constructs the cds message and fill in message type, |
| 2101 | * post the same to WDA. |
| 2102 | * |
| 2103 | * Return: QDF_STATUS enumeration |
| 2104 | */ |
| 2105 | QDF_STATUS sme_get_chain_rssi(tHalHandle hal, |
| 2106 | struct get_chain_rssi_req_params *input, |
| 2107 | get_chain_rssi_callback callback, |
| 2108 | void *context); |
Tushnim Bhattacharyya | c3c375e | 2017-08-04 23:39:55 -0700 | [diff] [blame] | 2109 | |
| 2110 | /** |
| 2111 | * sme_get_valid_channels() - sme api to get valid channels for |
| 2112 | * current regulatory domain |
| 2113 | * @chan_list: list of the valid channels |
| 2114 | * @list_len: length of the channel list |
| 2115 | * |
| 2116 | * This function will get valid channels for current regulatory |
| 2117 | * domain |
| 2118 | * |
| 2119 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2120 | */ |
| 2121 | QDF_STATUS sme_get_valid_channels(uint8_t *chan_list, uint32_t *list_len); |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 2122 | |
| 2123 | /** |
| 2124 | * sme_get_mac_context() - sme api to get the pmac context |
| 2125 | * |
| 2126 | * This function will return the pmac context |
| 2127 | * |
| 2128 | * Return: pointer to pmac context |
| 2129 | */ |
| 2130 | tpAniSirGlobal sme_get_mac_context(void); |
Vignesh Viswanathan | 66c951d | 2017-09-06 12:23:42 +0530 | [diff] [blame] | 2131 | |
| 2132 | /** |
| 2133 | * sme_display_disconnect_stats() - Display per session Disconnect stats |
| 2134 | * @hal: hal global context |
| 2135 | * session_id: SME session id |
| 2136 | * |
| 2137 | * Return: None |
| 2138 | */ |
| 2139 | void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id); |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 2140 | |
| 2141 | /** |
| 2142 | * sme_process_msg_callback() - process callback message from LIM |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 2143 | * @mac: global mac context |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 2144 | * @msg: scheduler message |
| 2145 | * |
| 2146 | * This function process the callback messages from LIM. |
| 2147 | * |
| 2148 | * Return: QDF_STATUS enumeration. |
| 2149 | */ |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 2150 | QDF_STATUS sme_process_msg_callback(tpAniSirGlobal mac, |
| 2151 | struct scheduler_msg *msg); |
Nachiket Kukade | aaf8a71 | 2017-07-27 19:15:36 +0530 | [diff] [blame] | 2152 | |
| 2153 | /** |
| 2154 | * sme_set_bmiss_bcnt() - set bmiss config parameters |
| 2155 | * @vdev_id: virtual device for the command |
| 2156 | * @first_cnt: bmiss first value |
| 2157 | * @final_cnt: bmiss final value |
| 2158 | * |
| 2159 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2160 | */ |
| 2161 | QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt, |
| 2162 | uint32_t final_cnt); |
| 2163 | |
Ganesh Kondabattini | 479a8ae | 2017-10-03 16:49:24 +0530 | [diff] [blame] | 2164 | /** |
| 2165 | * sme_send_limit_off_channel_params() - send limit off channel parameters |
| 2166 | * @hal: global hal handle |
| 2167 | * @vdev_id: vdev id |
| 2168 | * @is_tos_active: tos active or inactive |
| 2169 | * @max_off_chan_time: max off channel time |
| 2170 | * @rest_time: rest time |
| 2171 | * @skip_dfs_chan: skip dfs channel |
| 2172 | * |
| 2173 | * This function sends command to WMA for setting limit off channel command |
| 2174 | * parameters. |
| 2175 | * |
| 2176 | * Return: QDF_STATUS enumeration. |
| 2177 | */ |
| 2178 | QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id, |
| 2179 | bool is_tos_active, uint32_t max_off_chan_time, |
| 2180 | uint32_t rest_time, bool skip_dfs_chan); |
| 2181 | |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 2182 | #ifdef FEATURE_WLAN_DYNAMIC_CVM |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 2183 | /** |
| 2184 | * sme_set_vc_mode_config() - Set voltage corner config to FW. |
| 2185 | * @bitmap: Bitmap that refers to voltage corner config with |
| 2186 | * different phymode and bw configuration |
| 2187 | * |
| 2188 | * Return: QDF_STATUS |
| 2189 | */ |
| 2190 | QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap); |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 2191 | #endif |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 2192 | |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2193 | /** |
| 2194 | * sme_set_del_pmkid_cache() - API to update PMKID cache |
| 2195 | * @hal: HAL handle for device |
| 2196 | * @session_id: Session id |
| 2197 | * @pmk_cache_info: Pointer to PMK cache info |
| 2198 | * @is_add: boolean that implies whether to add or delete PMKID entry |
| 2199 | * |
| 2200 | * Return: QDF_STATUS |
| 2201 | */ |
| 2202 | QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id, |
| 2203 | tPmkidCacheInfo *pmk_cache_info, |
| 2204 | bool is_add); |
| 2205 | |
| 2206 | /** |
| 2207 | * sme_send_hlp_ie_info() - API to send HLP IE info to fw |
| 2208 | * @hal: HAL handle for device |
| 2209 | * @session_id: Session id |
| 2210 | * @profile: CSR Roam profile |
| 2211 | * @if_addr: IP address |
| 2212 | * |
| 2213 | * This API is used to send HLP IE info along with IP address |
| 2214 | * to fw if LFR3 is enabled. |
| 2215 | * |
| 2216 | * Return: QDF_STATUS |
| 2217 | */ |
| 2218 | void sme_send_hlp_ie_info(tHalHandle hal, uint8_t session_id, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2219 | struct csr_roam_profile *profile, uint32_t if_addr); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2220 | |
| 2221 | #if defined(WLAN_FEATURE_FILS_SK) |
| 2222 | /** |
| 2223 | * sme_update_fils_config - Update FILS config to CSR roam session |
| 2224 | * @hal: HAL handle for device |
| 2225 | * @session_id: session id |
| 2226 | * @src_profile: Source profile having latest FILS config |
| 2227 | * |
| 2228 | * API to update FILS config to roam csr session and update the same |
| 2229 | * to fw if LFR3 is enabled. |
| 2230 | * |
| 2231 | * Return: QDF_STATUS |
| 2232 | */ |
| 2233 | QDF_STATUS sme_update_fils_config(tHalHandle hal, uint8_t session_id, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2234 | struct csr_roam_profile *src_profile); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2235 | |
| 2236 | /** |
| 2237 | * sme_free_join_rsp_fils_params - free fils params |
| 2238 | * @roam_info: roam info |
| 2239 | * |
| 2240 | * Return: void |
| 2241 | */ |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2242 | void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2243 | #else |
| 2244 | static inline QDF_STATUS sme_update_fils_config(tHalHandle hal, |
| 2245 | uint8_t session_id, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2246 | struct csr_roam_profile *src_profile) |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2247 | { |
| 2248 | return QDF_STATUS_SUCCESS; |
| 2249 | } |
| 2250 | |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2251 | static inline |
| 2252 | void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info) |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2253 | {} |
| 2254 | |
| 2255 | #endif |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 2256 | |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2257 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 2258 | /** |
| 2259 | * sme_set_he_bss_color() - Sets the HE BSS color |
| 2260 | * |
| 2261 | * @hal: The handle returned by mac_open |
| 2262 | * @session_id: session_id of the request |
| 2263 | * @bss_color: HE BSS color value to set |
| 2264 | * |
| 2265 | * Return: QDF_STATUS |
| 2266 | */ |
| 2267 | QDF_STATUS sme_set_he_bss_color(tHalHandle hal, uint8_t session_id, |
| 2268 | uint8_t bss_color); |
| 2269 | #else |
| 2270 | static inline QDF_STATUS sme_set_he_bss_color(tHalHandle hal, |
| 2271 | uint8_t session_id, uint8_t bss_color) |
| 2272 | { |
| 2273 | return QDF_STATUS_SUCCESS; |
| 2274 | } |
| 2275 | #endif |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2276 | |
| 2277 | /** |
| 2278 | * sme_scan_get_result_for_bssid - gets the scan result from scan cache for the |
| 2279 | * bssid specified |
| 2280 | * @hal: handle returned by mac_open |
| 2281 | * @bssid: bssid to get the scan result for |
| 2282 | * @res: pointer to tCsrScanResultInfo allocated from caller |
| 2283 | * |
| 2284 | * Return: QDF_STATUS |
| 2285 | */ |
| 2286 | QDF_STATUS sme_scan_get_result_for_bssid(tHalHandle hal_handle, |
| 2287 | struct qdf_mac_addr *bssid, |
| 2288 | tCsrScanResultInfo *res); |
| 2289 | |
| 2290 | /** |
| 2291 | * sme_get_bss_transition_status() - get bss transition status all cadidates |
| 2292 | * @hal: handle returned by mac_open |
| 2293 | * @transition_reason : Transition reason |
| 2294 | * @bssid: bssid to get BSS transition status |
| 2295 | * @info : bss candidate information |
| 2296 | * @n_candidates : number of candidates |
| 2297 | * @is_bt_in_progress: bt activity indicator |
| 2298 | * |
| 2299 | * Return : 0 on success otherwise errno |
| 2300 | */ |
| 2301 | int sme_get_bss_transition_status(tHalHandle hal, |
| 2302 | uint8_t transition_reason, |
| 2303 | struct qdf_mac_addr *bssid, |
| 2304 | struct bss_candidate_info *info, |
| 2305 | uint16_t n_candidates, |
| 2306 | bool is_bt_in_progress); |
| 2307 | |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2308 | /** |
| 2309 | * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params |
| 2310 | * if optional fields are not present. |
| 2311 | * @hal: handle returned by mac_open |
| 2312 | * @buf: rsn ie buffer pointer |
| 2313 | * @buf_len: rsn ie buffer length |
| 2314 | * @rsn_ie: outframe rsn ie structure |
| 2315 | * @append_ie: flag to indicate if the rsn_ie need to be appended from buf |
| 2316 | * |
| 2317 | * Return: parse status |
| 2318 | */ |
| 2319 | uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf, |
| 2320 | uint8_t buf_len, tDot11fIERSN *rsn_ie, |
| 2321 | bool append_ie); |
Sandeep Puligilla | 063a434 | 2018-01-10 02:50:14 -0800 | [diff] [blame] | 2322 | /** |
| 2323 | * sme_get_oper_chan_freq - gets the operating channel freq |
| 2324 | * @vdev: vdev handle |
| 2325 | * |
| 2326 | * Return: operating channel frequency |
| 2327 | */ |
| 2328 | int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev); |
| 2329 | |
| 2330 | /** |
| 2331 | * sme_get_oper_ch_width - gets the operating channel width |
| 2332 | * @vdev: vdev handle |
| 2333 | * |
| 2334 | * Return: operating channel width |
| 2335 | */ |
| 2336 | enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev); |
| 2337 | |
| 2338 | /** |
| 2339 | * sme_get_oper_ch_width - gets the secondary channel frequency |
| 2340 | * @vdev: vdev handle |
| 2341 | * @sec20chan_freq: secondary channel frequency |
| 2342 | * |
| 2343 | * Return: secondary channel frequency |
| 2344 | */ |
| 2345 | int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev, |
| 2346 | uint16_t *sec20chan_freq); |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2347 | |
Abhishek Singh | 1f217ec | 2017-12-22 11:48:27 +0530 | [diff] [blame] | 2348 | /** |
| 2349 | * sme_enable_roaming_on_connected_sta() - Enable roaming on an connected sta |
| 2350 | * @hal: handle returned by mac_open |
| 2351 | * |
| 2352 | * The function check if any connected STA is present on which roaming is not |
| 2353 | * enabled and if present enabled roaming on that STA. |
| 2354 | * |
| 2355 | * Return: none |
| 2356 | */ |
| 2357 | void sme_enable_roaming_on_connected_sta(tHalHandle hal); |
| 2358 | |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 2359 | /** |
| 2360 | * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM |
| 2361 | * @hal: The handle returned by mac_open |
| 2362 | * @session_id: session id |
| 2363 | * @buf: pointer to frame |
| 2364 | * @len: frame length |
| 2365 | * |
| 2366 | * Return: QDF_STATUS |
| 2367 | */ |
| 2368 | QDF_STATUS sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id, |
| 2369 | const uint8_t *buf, uint32_t len); |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2370 | |
| 2371 | #ifdef WLAN_FEATURE_SAE |
| 2372 | /** |
| 2373 | * sme_handle_sae_msg() - Sends SAE message received from supplicant |
| 2374 | * @hal: The handle returned by mac_open |
| 2375 | * @session_id: session id |
| 2376 | * @sae_status: status of SAE authentication |
| 2377 | * |
| 2378 | * Return: QDF_STATUS |
| 2379 | */ |
| 2380 | QDF_STATUS sme_handle_sae_msg(tHalHandle hal, uint8_t session_id, |
| 2381 | uint8_t sae_status); |
| 2382 | #else |
| 2383 | static inline QDF_STATUS sme_handle_sae_msg(tHalHandle hal, uint8_t session_id, |
| 2384 | uint8_t sae_status) |
| 2385 | { |
| 2386 | return QDF_STATUS_SUCCESS; |
| 2387 | } |
| 2388 | #endif |
| 2389 | |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2390 | /** |
| 2391 | * sme_set_ba_buff_size() - sets BA buffer size |
| 2392 | * @hal: Pointer to HAL |
| 2393 | * @session_id: SME session id |
| 2394 | * @buff_size: BA buffer size |
| 2395 | * |
| 2396 | * Return: 0 on success else err code |
| 2397 | */ |
| 2398 | int sme_set_ba_buff_size(tHalHandle hal, uint8_t session_id, |
| 2399 | uint16_t buff_size); |
| 2400 | |
| 2401 | /** |
| 2402 | * sme_send_addba_req() - send ADDBA request with user config |
| 2403 | * @hal: Pointer to HAL |
| 2404 | * @session_id: SME session id |
| 2405 | * @tid: tid val for BA session |
| 2406 | * @buff_size: BA buffer size |
| 2407 | * |
| 2408 | * Return: 0 on success else err code |
| 2409 | */ |
| 2410 | int sme_send_addba_req(tHalHandle hal, uint8_t session_id, uint8_t tid, |
| 2411 | uint16_t buff_size); |
| 2412 | |
Kiran Kumar Lokere | 3324f63 | 2018-03-01 21:43:21 -0800 | [diff] [blame] | 2413 | /** |
| 2414 | * sme_set_no_ack_policy() - Sets no ack policy for AC |
| 2415 | * @hal: Pointer to HAL |
| 2416 | * @session_id: SME session id |
| 2417 | * @val: no ack policy value |
| 2418 | * @ac: access category |
| 2419 | * |
| 2420 | * Return: 0 on success else err code |
| 2421 | */ |
| 2422 | int sme_set_no_ack_policy(tHalHandle hal, uint8_t session_id, |
| 2423 | uint8_t val, uint8_t ac); |
| 2424 | |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 2425 | /** |
| 2426 | * sme_set_auto_rate_he_sgi() - Sets SGI for auto rate |
| 2427 | * @hal: Pointer to HAL |
| 2428 | * @session_id: SME session id |
| 2429 | * @cfg_val: SGI configuration value |
| 2430 | * |
| 2431 | * Return: 0 on success else err code |
| 2432 | */ |
| 2433 | int sme_set_auto_rate_he_sgi(tHalHandle hal, uint8_t session_id, |
| 2434 | uint8_t cfg_val); |
| 2435 | |
| 2436 | /** |
| 2437 | * sme_set_auto_rate_he_ltf() - Sets HE LTF for auto rate |
| 2438 | * @hal: Pointer to HAL |
| 2439 | * @session_id: SME session id |
| 2440 | * @cfg_val: LTF configuration value |
| 2441 | * |
| 2442 | * Return: 0 on success else err code |
| 2443 | */ |
| 2444 | int sme_set_auto_rate_he_ltf(tHalHandle hal, uint8_t session_id, |
| 2445 | uint8_t cfg_val); |
| 2446 | |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 2447 | #ifdef WLAN_FEATURE_11AX |
| 2448 | /** |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 2449 | * sme_update_tgt_he_cap() - sets the HE caps to pmac |
Jinwei Chen | ef742dc | 2018-06-27 12:57:50 +0800 | [diff] [blame] | 2450 | * @mac_handle: Pointer to MAC handle |
| 2451 | * @cfg: Pointer to WMA target CFG |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 2452 | * |
| 2453 | * Return: None |
| 2454 | */ |
Jinwei Chen | ef742dc | 2018-06-27 12:57:50 +0800 | [diff] [blame] | 2455 | void sme_update_tgt_he_cap(mac_handle_t mac_handle, struct wma_tgt_cfg *cfg); |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 2456 | |
| 2457 | /** |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 2458 | * sme_update_he_cap_nss() - sets the nss based on user request |
| 2459 | * @hal: Pointer to HAL |
| 2460 | * @session_id: SME session id |
| 2461 | * @nss: no.of spatial streams value |
| 2462 | * |
| 2463 | * Return: None |
| 2464 | */ |
| 2465 | void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id, |
| 2466 | uint8_t nss); |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 2467 | |
| 2468 | /** |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 2469 | * sme_update_he_tx_bfee_supp() - sets the HE Tx Bfee support |
| 2470 | * @hal: Pointer to HAL |
| 2471 | * @session_id: SME session id |
| 2472 | * @cfg_val: Tx Bfee config value |
| 2473 | * |
| 2474 | * Return: 0 on success else err code |
| 2475 | */ |
| 2476 | int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id, |
| 2477 | uint8_t cfg_val); |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 2478 | |
| 2479 | /** |
| 2480 | * sme_update_he_tx_bfee_nsts() - sets the HE Tx Bfee NSTS |
| 2481 | * @hal: MAC handle |
| 2482 | * @session_id: SME session id |
| 2483 | * @cfg_val: Tx Bfee NSTS value |
| 2484 | * |
| 2485 | * Return: 0 on success else err code |
| 2486 | */ |
| 2487 | int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id, |
| 2488 | uint8_t cfg_val); |
Kiran Kumar Lokere | 86e8559 | 2018-07-18 15:34:24 -0700 | [diff] [blame] | 2489 | |
| 2490 | /** |
| 2491 | * sme_set_he_tx_bf_cbf_rates() - sets the HE Tx Bfee CBF frame rates to FW |
| 2492 | * @session_id: SME session id |
| 2493 | * |
| 2494 | * Return: None |
| 2495 | */ |
| 2496 | void sme_set_he_tx_bf_cbf_rates(uint8_t session_id); |
| 2497 | |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 2498 | /** |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 2499 | * sme_update_he_mcs() - sets the HE MCS based on user request |
| 2500 | * @hal: Pointer to HAL |
| 2501 | * @session_id: SME session id |
| 2502 | * @he_mcs: HE MCS value |
| 2503 | * |
| 2504 | * Return: 0 on success else err code |
| 2505 | */ |
| 2506 | int sme_update_he_mcs(tHalHandle hal, uint8_t session_id, uint16_t he_mcs); |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 2507 | |
| 2508 | /** |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 2509 | * sme_update_he_trigger_frm_mac_pad() - sets the HE MAC padding capability |
| 2510 | * @hal: Pointer to HAL |
| 2511 | * @session_id: SME session id |
| 2512 | * @cfg_val: HE MAC padding duration value |
| 2513 | * |
| 2514 | * Return: 0 on success else err code |
| 2515 | */ |
| 2516 | int sme_update_he_trigger_frm_mac_pad(mac_handle_t hal, uint8_t session_id, |
| 2517 | uint8_t cfg_val); |
| 2518 | /** |
| 2519 | * sme_set_usr_cfg_mu_edca() - sets the user cfg MU EDCA params flag |
| 2520 | * @hal: Pointer to HAL |
| 2521 | * @val: value to be set |
| 2522 | * |
| 2523 | * Return: none |
| 2524 | */ |
| 2525 | void sme_set_usr_cfg_mu_edca(mac_handle_t hal, bool val); |
| 2526 | |
| 2527 | /** |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 2528 | * sme_set_he_mu_edca_def_cfg() - sets the default MU EDCA params values |
| 2529 | * @hal: Pointer to HAL |
| 2530 | * |
| 2531 | * Return: none |
| 2532 | */ |
| 2533 | void sme_set_he_mu_edca_def_cfg(mac_handle_t hal); |
| 2534 | |
| 2535 | /** |
| 2536 | * sme_update_mu_edca_params() - updates MU EDCA params values |
| 2537 | * @hal: Pointer to HAL |
| 2538 | * @session_id: SME session id |
| 2539 | * |
| 2540 | * Return: 0 on success else err code |
| 2541 | */ |
| 2542 | int sme_update_mu_edca_params(mac_handle_t hal, uint8_t session_id); |
| 2543 | |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 2544 | /** |
| 2545 | * sme_update_he_tx_stbc_cap() - Sets the HE Tx STBC capability |
| 2546 | * @hal: Pointer to HAL |
| 2547 | * @session_id: SME session id |
| 2548 | * @value: set value |
| 2549 | * |
| 2550 | * Return: 0 on success else err code |
| 2551 | */ |
| 2552 | int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id, int value); |
| 2553 | |
| 2554 | /** |
| 2555 | * sme_update_he_rx_stbc_cap() - Sets the HE Rx STBC capability |
| 2556 | * @hal: Pointer to HAL |
| 2557 | * @session_id: SME session id |
| 2558 | * @value: set value |
| 2559 | * |
| 2560 | * Return: 0 on success else err code |
| 2561 | */ |
| 2562 | int sme_update_he_rx_stbc_cap(tHalHandle hal, uint8_t session_id, int value); |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 2563 | |
| 2564 | /** |
| 2565 | * sme_update_he_frag_supp() - sets the HE fragmentation support |
| 2566 | * @hal: Pointer to HAL |
| 2567 | * @session_id: SME session id |
| 2568 | * @he_frag: HE fragmention support value |
| 2569 | * |
| 2570 | * Return: 0 on success else err code |
| 2571 | */ |
| 2572 | int sme_update_he_frag_supp(tHalHandle hal, uint8_t session_id, |
| 2573 | uint16_t he_frag); |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 2574 | |
| 2575 | /** |
| 2576 | * sme_update_he_ldpc_supp() - sets the HE LDPC support |
| 2577 | * @hal: Pointer to HAL |
| 2578 | * @session_id: SME session id |
| 2579 | * @he_ldpc: HE LDPC support value |
| 2580 | * |
| 2581 | * Return: 0 on success else err code |
| 2582 | */ |
| 2583 | int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id, |
| 2584 | uint16_t he_ldpc); |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 2585 | #else |
Jinwei Chen | ef742dc | 2018-06-27 12:57:50 +0800 | [diff] [blame] | 2586 | static inline void sme_update_tgt_he_cap(mac_handle_t mac_handle, |
| 2587 | struct wma_tgt_cfg *cfg) |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 2588 | {} |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 2589 | static inline void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id, |
| 2590 | uint8_t nss) |
| 2591 | {} |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 2592 | static inline int sme_update_he_mcs(tHalHandle hal, uint8_t session_id, |
| 2593 | uint16_t he_mcs) |
| 2594 | { |
| 2595 | return 0; |
| 2596 | } |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 2597 | |
| 2598 | static inline void sme_set_he_mu_edca_def_cfg(mac_handle_t hal) |
| 2599 | { |
| 2600 | } |
| 2601 | |
| 2602 | static inline int sme_update_mu_edca_params(mac_handle_t hal, |
| 2603 | uint8_t session_id) |
| 2604 | { |
| 2605 | return 0; |
| 2606 | } |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 2607 | static inline int sme_update_he_trigger_frm_mac_pad(mac_handle_t hal, |
| 2608 | uint8_t session_id, |
| 2609 | uint8_t cfg_val) |
| 2610 | { |
| 2611 | return 0; |
| 2612 | } |
| 2613 | |
| 2614 | static inline void sme_set_usr_cfg_mu_edca(mac_handle_t hal, bool val) |
| 2615 | { |
| 2616 | } |
| 2617 | |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 2618 | static inline int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id, |
| 2619 | int value) |
| 2620 | { |
| 2621 | return 0; |
| 2622 | } |
| 2623 | |
| 2624 | static inline int sme_update_he_rx_stbc_cap(tHalHandle hal, uint8_t session_id, |
| 2625 | int value) |
| 2626 | { |
| 2627 | return 0; |
| 2628 | } |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 2629 | |
| 2630 | static inline int sme_update_he_frag_supp(tHalHandle hal, uint8_t session_id, |
| 2631 | uint16_t he_frag) |
| 2632 | { |
| 2633 | return 0; |
| 2634 | } |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 2635 | |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 2636 | static inline int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id, |
| 2637 | uint16_t he_ldpc) |
| 2638 | { |
| 2639 | return 0; |
| 2640 | } |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 2641 | |
| 2642 | static inline int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id, |
| 2643 | uint8_t cfg_val) |
| 2644 | { |
| 2645 | return 0; |
| 2646 | } |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 2647 | static inline int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id, |
| 2648 | uint8_t cfg_val) |
| 2649 | { |
| 2650 | return 0; |
| 2651 | } |
Kiran Kumar Lokere | 86e8559 | 2018-07-18 15:34:24 -0700 | [diff] [blame] | 2652 | |
| 2653 | static inline void sme_set_he_tx_bf_cbf_rates(uint8_t session_id) |
| 2654 | { |
| 2655 | } |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 2656 | #endif |
| 2657 | |
Vignesh Viswanathan | 0a56929 | 2018-02-14 15:34:47 +0530 | [diff] [blame] | 2658 | /** |
| 2659 | * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client |
| 2660 | * session has key exchange in progress |
| 2661 | * |
| 2662 | * @hal: global hal handle |
| 2663 | * @session_id: session id |
| 2664 | * |
| 2665 | * Return: true - if key exchange in progress |
| 2666 | * false - if not in progress |
| 2667 | */ |
| 2668 | bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id); |
| 2669 | |
Vignesh Viswanathan | a2f5ce58 | 2018-05-09 20:38:39 +0530 | [diff] [blame] | 2670 | /* |
| 2671 | * sme_validate_channel_list() - Validate the given channel list |
| 2672 | * @hal: handle to global hal context |
| 2673 | * @chan_list: Pointer to the channel list |
| 2674 | * @num_channels: number of channels present in the chan_list |
| 2675 | * |
| 2676 | * Validates the given channel list with base channels in mac context |
| 2677 | * |
| 2678 | * Return: True if all channels in the list are valid, false otherwise |
| 2679 | */ |
| 2680 | bool sme_validate_channel_list(tHalHandle hal, |
| 2681 | uint8_t *chan_list, |
| 2682 | uint8_t num_channels); |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 2683 | /** |
| 2684 | * sme_set_amsdu() - set amsdu enable/disable based on user cfg |
| 2685 | * @hal: Pointer to HAL |
| 2686 | * @enable: enable or disable |
| 2687 | * |
| 2688 | * Return: None |
| 2689 | */ |
| 2690 | void sme_set_amsdu(tHalHandle hal, bool enable); |
Vignesh Viswanathan | a2f5ce58 | 2018-05-09 20:38:39 +0530 | [diff] [blame] | 2691 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 2692 | /** |
| 2693 | * sme_get_mcs_idx() - gets mcs index |
| 2694 | * @max_rate: max rate |
| 2695 | * @rate_flags: rate flags |
| 2696 | * @nss: number of nss |
| 2697 | * @mcs_rate_flags: mcs rate flag |
| 2698 | * |
| 2699 | * Return: return mcs index |
| 2700 | */ |
| 2701 | uint8_t sme_get_mcs_idx(uint16_t max_rate, uint8_t rate_flags, |
Hanumanth Reddy Pothula | 834f943 | 2018-05-30 14:20:32 +0530 | [diff] [blame] | 2702 | uint8_t *nss, uint8_t *mcs_rate_flags); |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 2703 | |
Varun Reddy Yeturu | d33033f | 2018-06-11 10:58:30 -0700 | [diff] [blame] | 2704 | #ifdef WLAN_SUPPORT_TWT |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2705 | /** |
| 2706 | * sme_register_twt_enable_complete_cb() - TWT enable registrar |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2707 | * @mac_handle: MAC handle |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2708 | * @twt_enable_cb: Function callback to handle enable event |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2709 | * |
| 2710 | * Return: QDF Status |
| 2711 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2712 | QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle, |
| 2713 | twt_enable_cb twt_enable_cb); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2714 | |
| 2715 | /** |
| 2716 | * sme_register_twt_disable_complete_cb - TWT disable registrar |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2717 | * @mac_handle: MAC handle |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2718 | * @twt_disable_cb: Function callback to handle disable event |
| 2719 | * |
| 2720 | * Return: QDF Status |
| 2721 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2722 | QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle, |
| 2723 | twt_disable_cb twt_disable_cb); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2724 | |
| 2725 | /** |
| 2726 | * sme_deregister_twt_enable_complete_cb() - TWT enable deregistrar |
| 2727 | * @hal: HAL handle |
| 2728 | * |
| 2729 | * Return: QDF Status |
| 2730 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2731 | QDF_STATUS sme_deregister_twt_enable_complete_cb(mac_handle_t mac_handle); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2732 | |
| 2733 | /** |
| 2734 | * sme_deregister_twt_disable_complete_cb - TWT disable deregistrar |
| 2735 | * @hal: HAL handle |
| 2736 | * |
| 2737 | * Return: QDF Status |
| 2738 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2739 | QDF_STATUS sme_deregister_twt_disable_complete_cb(mac_handle_t mac_handle); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2740 | |
| 2741 | #else |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2742 | static inline |
| 2743 | QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle, |
| 2744 | twt_enable_cb twt_enable_cb) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2745 | { |
| 2746 | return QDF_STATUS_SUCCESS; |
| 2747 | } |
| 2748 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2749 | static inline |
| 2750 | QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle, |
| 2751 | twt_disable_cb twt_disable_cb) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2752 | { |
| 2753 | return QDF_STATUS_SUCCESS; |
| 2754 | } |
| 2755 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2756 | static inline |
| 2757 | QDF_STATUS sme_deregister_twt_enable_complete_cb(mac_handle_t mac_handle) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2758 | { |
| 2759 | return QDF_STATUS_SUCCESS; |
| 2760 | } |
| 2761 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 2762 | static inline |
| 2763 | QDF_STATUS sme_deregister_twt_disable_complete_cb(mac_handle_t mac_handle) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 2764 | { |
| 2765 | return QDF_STATUS_SUCCESS; |
| 2766 | } |
| 2767 | #endif |
| 2768 | |
Chaoli Zhou | 75b062f | 2018-06-11 12:36:54 +0800 | [diff] [blame] | 2769 | /** |
| 2770 | * sme_find_session_by_bssid() - checks whether has session |
| 2771 | * with given bssid |
| 2772 | * @hal: global hal handle |
| 2773 | * @bssid: bssid |
| 2774 | * Return: true - if has the session |
| 2775 | * false - if not has the session |
| 2776 | */ |
| 2777 | bool sme_find_session_by_bssid(tHalHandle hal, uint8_t *bssid); |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame^] | 2778 | |
| 2779 | /** |
| 2780 | * sme_get_roam_scan_stats() - Send roam scan stats cmd to wma |
| 2781 | * @hal: handle returned by mac_open |
| 2782 | * @cb: call-back invoked for roam scan stats response |
| 2783 | * @context: context of callback |
| 2784 | * @vdev_id: vdev id |
| 2785 | * |
| 2786 | * Return: QDF_STATUS |
| 2787 | */ |
| 2788 | QDF_STATUS |
| 2789 | sme_get_roam_scan_stats(tHalHandle hal, roam_scan_stats_cb cb, void *context, |
| 2790 | uint32_t vdev_id); |
| 2791 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2792 | #endif /* #if !defined( __SME_API_H ) */ |