Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Yue Ma | d03d10b | 2019-12-23 15:09:53 -0800 | [diff] [blame^] | 2 | * Copyright (c) 2012-2020 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" |
gaurank kathpalia | 78af193 | 2018-10-27 20:33:10 +0530 | [diff] [blame] | 40 | #include "wlan_mlme_public_struct.h" |
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" |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 45 | #include <qca_vendor.h> |
Arun Kumar Khandavalli | deda5a8 | 2019-03-11 15:32:19 +0530 | [diff] [blame] | 46 | #include "wmi_unified.h" |
Paul Zhang | da2970b | 2019-06-23 18:16:38 +0800 | [diff] [blame] | 47 | #include "wmi_unified_param.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 48 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | /*-------------------------------------------------------------------------- |
| 50 | Preprocessor definitions and constants |
| 51 | ------------------------------------------------------------------------*/ |
| 52 | |
Sandeep Puligilla | aa26b65 | 2018-06-13 18:59:35 -0700 | [diff] [blame] | 53 | #define sme_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_SME, params) |
| 54 | #define sme_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_SME, params) |
| 55 | #define sme_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_SME, params) |
| 56 | #define sme_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_SME, params) |
| 57 | #define sme_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_SME, params) |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 58 | |
Nirav Shah | 790d943 | 2018-07-12 19:42:48 +0530 | [diff] [blame] | 59 | #define sme_nofl_alert(params...) \ |
| 60 | QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_SME, params) |
| 61 | #define sme_nofl_err(params...) \ |
| 62 | QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_SME, params) |
| 63 | #define sme_nofl_warn(params...) \ |
| 64 | QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_SME, params) |
| 65 | #define sme_nofl_info(params...) \ |
| 66 | QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_SME, params) |
| 67 | #define sme_nofl_debug(params...) \ |
| 68 | QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_SME, params) |
| 69 | |
Sandeep Puligilla | aa26b65 | 2018-06-13 18:59:35 -0700 | [diff] [blame] | 70 | #define sme_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_SME, params) |
| 71 | #define sme_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_SME, params) |
| 72 | #define sme_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_SME, params) |
| 73 | #define sme_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_SME, params) |
| 74 | #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] | 75 | |
Nirav Shah | d6fa0f8 | 2018-07-06 15:52:25 +0530 | [diff] [blame] | 76 | #define SME_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_SME, "enter") |
| 77 | #define SME_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_SME, "exit") |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 78 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 79 | #define SME_SESSION_ID_ANY 50 |
Wu Gao | a0230a6 | 2018-01-04 20:56:57 +0800 | [diff] [blame] | 80 | #define SME_SESSION_ID_BROADCAST 0xFF |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | |
| 82 | #define SME_INVALID_COUNTRY_CODE "XX" |
Krunal Soni | bfd0549 | 2017-10-03 15:48:37 -0700 | [diff] [blame] | 83 | #define INVALID_ROAM_ID 0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 84 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 85 | #define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \ |
| 86 | reg_info_1 &= 0xff00ffff; \ |
| 87 | reg_info_1 |= ((val & 0xff) << 16); \ |
| 88 | } while (0) |
| 89 | |
| 90 | #define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \ |
| 91 | reg_info_2 &= 0xffff00ff; \ |
| 92 | reg_info_2 |= ((val & 0xff) << 8); \ |
| 93 | } while (0) |
| 94 | |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 95 | #define SME_CONFIG_TO_ROAM_CONFIG 1 |
| 96 | #define ROAM_CONFIG_TO_SME_CONFIG 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 97 | |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 98 | #define NUM_OF_BANDS 2 |
Naveen Rawat | b56880c | 2016-12-13 17:56:03 -0800 | [diff] [blame] | 99 | |
Arif Hussain | f8f6b3b | 2019-01-10 19:42:09 -0800 | [diff] [blame] | 100 | #define SUPPORTED_CRYPTO_CAPS 0x3FFFF |
Kiran Kumar Lokere | 4ce4048 | 2018-08-30 16:31:00 -0700 | [diff] [blame] | 101 | |
Naveen Rawat | b56880c | 2016-12-13 17:56:03 -0800 | [diff] [blame] | 102 | #define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000) |
| 103 | #define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000) |
Vignesh Viswanathan | 865daaa | 2018-10-11 19:30:44 +0530 | [diff] [blame] | 104 | |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 105 | /* Disconnect timeout = vdev stop + bss peer delete + 1 sec */ |
Abhishek Singh | 5606ee0 | 2019-08-19 13:18:01 +0530 | [diff] [blame] | 106 | #define SME_CMD_VDEV_DISCONNECT_TIMEOUT (STOP_RESPONSE_TIMER + \ |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 107 | SIR_DELETE_STA_TIMEOUT + 1000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 108 | #define SME_DISCONNECT_TIMEOUT (SME_CMD_VDEV_DISCONNECT_TIMEOUT + 1000) |
Abhishek Singh | 13bf0ce | 2018-10-24 14:26:14 +0530 | [diff] [blame] | 109 | |
Abhishek Singh | 682cf6f | 2019-08-19 11:45:00 +0530 | [diff] [blame] | 110 | /* AP start timeout = vdev start + 2 sec */ |
Abhishek Singh | 5606ee0 | 2019-08-19 13:18:01 +0530 | [diff] [blame] | 111 | #define SME_CMD_VDEV_START_BSS_TIMEOUT (START_RESPONSE_TIMER + 2000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 112 | #define SME_CMD_START_BSS_TIMEOUT (SME_CMD_VDEV_START_BSS_TIMEOUT + 1000) |
| 113 | |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 114 | /* AP stop timeout = vdev stop + self peer delete + 1 sec */ |
Abhishek Singh | 5606ee0 | 2019-08-19 13:18:01 +0530 | [diff] [blame] | 115 | #define SME_CMD_STOP_BSS_CMD_TIMEOUT (STOP_RESPONSE_TIMER + \ |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 116 | SIR_DELETE_STA_TIMEOUT + 1000) |
| 117 | #define SME_CMD_STOP_BSS_TIMEOUT (SME_CMD_STOP_BSS_CMD_TIMEOUT + 1000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 118 | |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 119 | /* Peer disconenct timeout = peer delete + 1 sec */ |
| 120 | #define SME_CMD_PEER_DISCONNECT_TIMEOUT (SIR_DELETE_STA_TIMEOUT + 1000) |
| 121 | #define SME_PEER_DISCONNECT_TIMEOUT (SME_CMD_PEER_DISCONNECT_TIMEOUT + 1000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 122 | |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 123 | /* Roam cmds timeout = vdev start + peer assoc + 1 sec */ |
Abhishek Singh | 5606ee0 | 2019-08-19 13:18:01 +0530 | [diff] [blame] | 124 | #define SME_CMD_ROAM_CMD_TIMEOUT (START_RESPONSE_TIMER + \ |
Abhishek Singh | fc0c424 | 2019-06-17 10:45:43 +0530 | [diff] [blame] | 125 | SIR_PEER_ASSOC_TIMEOUT + 1000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 126 | #define SME_CMD_ADD_DEL_TS_TIMEOUT (4 * 1000) |
| 127 | |
Abhishek Singh | bb9deb4 | 2019-05-24 10:11:24 +0530 | [diff] [blame] | 128 | /* |
| 129 | * POLICY_MGR_SER_CMD_TIMEOUT should be same as SME_CMD_POLICY_MGR_CMD_TIMEOUT |
| 130 | * if SME_CMD_POLICY_MGR_CMD_TIMEOUT is changed change |
| 131 | * POLICY_MGR_SER_CMD_TIMEOUT as well. |
| 132 | */ |
Abhishek Singh | 682cf6f | 2019-08-19 11:45:00 +0530 | [diff] [blame] | 133 | #define SME_CMD_POLICY_MGR_CMD_TIMEOUT (SIR_VDEV_PLCY_MGR_TIMEOUT + 1000) |
Abhishek Singh | d1f21c7 | 2019-01-21 15:16:34 +0530 | [diff] [blame] | 134 | #define SME_POLICY_MGR_CMD_TIMEOUT (SME_CMD_POLICY_MGR_CMD_TIMEOUT + 1000) |
| 135 | |
Abhishek Singh | 5606ee0 | 2019-08-19 13:18:01 +0530 | [diff] [blame] | 136 | #define SME_VDEV_DELETE_CMD_TIMEOUT (DELETE_RESPONSE_TIMER + 2000) |
Abhishek Singh | 682cf6f | 2019-08-19 11:45:00 +0530 | [diff] [blame] | 137 | #define SME_CMD_VDEV_CREATE_DELETE_TIMEOUT QDF_MAX(13000, \ |
| 138 | SME_VDEV_DELETE_CMD_TIMEOUT + 1) |
Abhishek Singh | 13bf0ce | 2018-10-24 14:26:14 +0530 | [diff] [blame] | 139 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 140 | /*-------------------------------------------------------------------------- |
| 141 | Type declarations |
| 142 | ------------------------------------------------------------------------*/ |
Jeff Johnson | 46b4f0e | 2019-03-08 10:48:35 -0800 | [diff] [blame] | 143 | struct sme_config_params { |
Jeff Johnson | e94ccd0 | 2019-04-02 15:02:56 -0700 | [diff] [blame] | 144 | struct csr_config_params csr_config; |
Jeff Johnson | 46b4f0e | 2019-03-08 10:48:35 -0800 | [diff] [blame] | 145 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 146 | |
| 147 | #ifdef FEATURE_WLAN_TDLS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 148 | #define BW_20_OFFSET_BIT 0 |
| 149 | #define BW_40_OFFSET_BIT 1 |
| 150 | #define BW_80_OFFSET_BIT 2 |
| 151 | #define BW_160_OFFSET_BIT 3 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 152 | #endif /* FEATURE_WLAN_TDLS */ |
| 153 | |
| 154 | /* Thermal Mitigation*/ |
| 155 | typedef struct { |
| 156 | uint16_t smeMinTempThreshold; |
| 157 | uint16_t smeMaxTempThreshold; |
| 158 | } tSmeThermalLevelInfo; |
| 159 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 160 | typedef enum { |
| 161 | SME_AC_BK = 0, |
| 162 | SME_AC_BE = 1, |
| 163 | SME_AC_VI = 2, |
| 164 | SME_AC_VO = 3 |
| 165 | } sme_ac_enum_type; |
| 166 | |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 167 | /* |
| 168 | * Enumeration of the various TSPEC directions |
| 169 | * From 802.11e/WMM specifications |
| 170 | */ |
| 171 | enum sme_qos_wmm_dir_type { |
Naveen Rawat | d9dd4b3 | 2017-07-05 14:32:54 -0700 | [diff] [blame] | 172 | SME_QOS_WMM_TS_DIR_UPLINK = 0, |
| 173 | SME_QOS_WMM_TS_DIR_DOWNLINK = 1, |
| 174 | SME_QOS_WMM_TS_DIR_RESV = 2, /* Reserved */ |
| 175 | SME_QOS_WMM_TS_DIR_BOTH = 3, |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 176 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 177 | |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 178 | /** |
| 179 | * struct sme_oem_capability - OEM capability to be exchanged between host |
| 180 | * and userspace |
| 181 | * @ftm_rr: FTM range report capability bit |
| 182 | * @lci_capability: LCI capability bit |
| 183 | * @reserved1: reserved |
| 184 | * @reserved2: reserved |
| 185 | */ |
| 186 | struct sme_oem_capability { |
| 187 | uint32_t ftm_rr:1; |
| 188 | uint32_t lci_capability:1; |
| 189 | uint32_t reserved1:30; |
| 190 | uint32_t reserved2; |
| 191 | }; |
| 192 | |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 193 | /** |
| 194 | * struct sme_5g_pref_params : 5G preference params to be read from ini |
| 195 | * @rssi_boost_threshold_5g: RSSI threshold above which 5 GHz is favored |
| 196 | * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted |
| 197 | * @max_rssi_boost_5g: Maximum boost that can be applied to 5GHz RSSI |
| 198 | * @rssi_penalize_threshold_5g: RSSI threshold below which 5G is not favored |
| 199 | * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalized |
| 200 | * @max_rssi_penalize_5g: Maximum penalty that can be applied to 5G RSSI |
| 201 | */ |
| 202 | struct sme_5g_band_pref_params { |
| 203 | int8_t rssi_boost_threshold_5g; |
| 204 | uint8_t rssi_boost_factor_5g; |
| 205 | uint8_t max_rssi_boost_5g; |
| 206 | int8_t rssi_penalize_threshold_5g; |
| 207 | uint8_t rssi_penalize_factor_5g; |
| 208 | uint8_t max_rssi_penalize_5g; |
| 209 | }; |
| 210 | |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 211 | /** |
| 212 | * struct sme_session_params: Session creation params passed by HDD layer |
Abhishek Ambure | 7470976 | 2019-05-27 19:43:26 +0530 | [diff] [blame] | 213 | * @vdev: pointer to vdev object |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 214 | */ |
| 215 | struct sme_session_params { |
Abhishek Ambure | 7470976 | 2019-05-27 19:43:26 +0530 | [diff] [blame] | 216 | struct wlan_objmgr_vdev *vdev; |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 217 | }; |
| 218 | |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 219 | #define MAX_CANDIDATE_INFO 10 |
| 220 | |
| 221 | /** |
| 222 | * struct bss_candidate_info - Candidate bss information |
| 223 | * |
| 224 | * @bssid : BSSID of candidate bss |
| 225 | * @status : status code for candidate bss |
| 226 | */ |
| 227 | struct bss_candidate_info { |
| 228 | struct qdf_mac_addr bssid; |
| 229 | uint32_t status; |
| 230 | }; |
| 231 | |
| 232 | /* |
| 233 | * MBO transition reason codes |
| 234 | */ |
| 235 | enum { |
| 236 | MBO_TRANSITION_REASON_UNSPECIFIED, |
| 237 | MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS_RATE, |
| 238 | MBO_TRANSITION_REASON_EXCESSIVE_DELAY_FOR_CURRENT_TRAFFIC, |
| 239 | MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH_FOR_CURRENT_TRAFFIC, |
| 240 | MBO_TRANSITION_REASON_LOAD_BALANCING, |
| 241 | MBO_TRANSITION_REASON_LOW_RSSI, |
| 242 | MBO_TRANSITION_REASON_RECEIVED_EXCESSIVE_RETRANSMISSIONS, |
| 243 | MBO_TRANSITION_REASON_HIGH_INTERFERENCE, |
| 244 | MBO_TRANSITION_REASON_GRAY_ZONE, |
| 245 | MBO_TRANSITION_REASON_TRANSITIONING_TO_PREMIUM_AP, |
| 246 | }; |
| 247 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 248 | /*------------------------------------------------------------------------- |
| 249 | Function declarations and documenation |
| 250 | ------------------------------------------------------------------------*/ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 251 | QDF_STATUS sme_open(mac_handle_t mac_handle); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 252 | QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2, |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 253 | enum country_src cc_src); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 254 | QDF_STATUS sme_close(mac_handle_t mac_handle); |
| 255 | QDF_STATUS sme_start(mac_handle_t mac_handle); |
Jeff Johnson | 62cd680 | 2018-07-20 12:38:25 -0700 | [diff] [blame] | 256 | |
| 257 | /** |
| 258 | * sme_stop() - Stop all SME modules and put them at idle state |
| 259 | * @mac_handle: Opaque handle to the MAC context |
| 260 | * |
| 261 | * The function stops each module in SME. Upon return, all modules are |
| 262 | * at idle state ready to start. |
| 263 | * |
| 264 | * This is a synchronous call |
| 265 | * |
| 266 | * Return: QDF_STATUS_SUCCESS if SME is stopped. Other status means |
| 267 | * SME failed to stop one or more modules but caller should |
| 268 | * still consider SME is stopped. |
| 269 | */ |
| 270 | QDF_STATUS sme_stop(mac_handle_t mac_handle); |
| 271 | |
gaurank kathpalia | 78af193 | 2018-10-27 20:33:10 +0530 | [diff] [blame] | 272 | /** |
| 273 | * sme_populate_nss_chain_params() - fill vdev nss chain params from ini |
| 274 | * @mac_handle: The handle returned by mac_open. |
| 275 | * @vdev_ini_cfg: pointer to the structure to be filled |
| 276 | * @device_mode: device mode (eg STA, SAP etc.) |
| 277 | * @rf_chains_supported: number of chains supported by fw(updated during |
| 278 | * service ready event) |
| 279 | * |
gaurank kathpalia | b414bce | 2018-11-09 18:44:46 +0530 | [diff] [blame] | 280 | * This API will fill the nss chain params for the particular vdev from ini |
gaurank kathpalia | 78af193 | 2018-10-27 20:33:10 +0530 | [diff] [blame] | 281 | * configuration for the respective vdev. |
| 282 | * |
| 283 | * Return: none |
| 284 | */ |
| 285 | void sme_populate_nss_chain_params(mac_handle_t mac_handle, |
| 286 | struct wlan_mlme_nss_chains *vdev_ini_cfg, |
| 287 | enum QDF_OPMODE device_mode, |
| 288 | uint8_t rf_chains_supported); |
| 289 | |
| 290 | /** |
gaurank kathpalia | b414bce | 2018-11-09 18:44:46 +0530 | [diff] [blame] | 291 | * sme_store_nss_chains_cfg_in_vdev() - fill vdev nss chain params from ini |
| 292 | * @vdev: Pointer to vdev obj |
| 293 | * @vdev_ini_cfg: pointer to the structure the values are to be filled from |
| 294 | * |
| 295 | * This API will copy the nss chain params for the particular vdev from ini |
| 296 | * configuration to the respective vdev's dynamic, and ini config. |
| 297 | * |
| 298 | * Return: none |
| 299 | */ |
| 300 | void |
| 301 | sme_store_nss_chains_cfg_in_vdev(struct wlan_objmgr_vdev *vdev, |
| 302 | struct wlan_mlme_nss_chains *vdev_ini_cfg); |
| 303 | |
| 304 | /** |
gaurank kathpalia | fa7ad0a | 2019-03-12 19:17:56 +0530 | [diff] [blame] | 305 | * sme_modify_nss_chains_tgt_cfg() - Change the nss in ini for |
| 306 | * particular opmode, and band, according to the chain config supported by FW. |
| 307 | * @mac_handle: The handle returned by mac_open. |
| 308 | * @vdev_op_mode: vdev operation mode. |
| 309 | * @band:- band for which user wants to change nss. |
| 310 | * |
| 311 | * This API will change the nss in ini (for eg. rx_nss_2g) in the mlme cfg i.e |
| 312 | * the global config structure kept in mac context, according to the max |
| 313 | * supported chains per band which is got as part of ext service ready event. |
| 314 | * |
| 315 | * Return: none |
| 316 | */ |
| 317 | void |
| 318 | sme_modify_nss_chains_tgt_cfg(mac_handle_t mac_handle, |
| 319 | enum QDF_OPMODE vdev_op_mode, |
| 320 | enum nss_chains_band_info band); |
| 321 | |
| 322 | /** |
| 323 | * sme_update_nss_in_mlme_cfg() - Change the nss in ini(rx_nss_(band)) for |
gaurank kathpalia | 6c4b50c | 2019-02-28 14:07:48 +0530 | [diff] [blame] | 324 | * particular opmode, and band. |
| 325 | * @mac_handle: The handle returned by mac_open. |
| 326 | * @rx_nss: new value of rx nss that user wants to change. |
| 327 | * @tx_nss: new value of tx nss that user wants to change. |
| 328 | * @vdev_op_mode: vdev operation mode. |
| 329 | * @band:- band for which user wants to change nss. |
| 330 | * |
| 331 | * This API will change the nss in ini (for eg. rx_nss_2g) in the mlme cfg i.e |
| 332 | * the global config structure kept in mac context. |
| 333 | * |
| 334 | * Return: none |
| 335 | */ |
| 336 | void |
gaurank kathpalia | fa7ad0a | 2019-03-12 19:17:56 +0530 | [diff] [blame] | 337 | sme_update_nss_in_mlme_cfg(mac_handle_t mac_handle, |
| 338 | uint8_t rx_nss, uint8_t tx_nss, |
| 339 | enum QDF_OPMODE vdev_op_mode, |
| 340 | enum nss_chains_band_info band); |
gaurank kathpalia | 6c4b50c | 2019-02-28 14:07:48 +0530 | [diff] [blame] | 341 | |
| 342 | /** |
gaurank kathpalia | 2b32de0 | 2018-10-24 18:31:14 +0530 | [diff] [blame] | 343 | * sme_nss_chains_update() - validate and send the user params to fw |
| 344 | * @mac_handle: The handle returned by mac_open. |
| 345 | * @user_cfg: pointer to the structure to be validated and sent to fw |
| 346 | * @vdev_id: vdev id |
| 347 | * |
| 348 | * |
| 349 | * This API will validate the config, and if found correct will update the |
| 350 | * config in dynamic config, and send to the fw. |
| 351 | * |
| 352 | * Return: QDF_STATUS |
| 353 | */ |
| 354 | QDF_STATUS |
| 355 | sme_nss_chains_update(mac_handle_t mac_handle, |
| 356 | struct wlan_mlme_nss_chains *user_cfg, |
| 357 | uint8_t vdev_id); |
| 358 | |
| 359 | /** |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 360 | * sme_vdev_create() - Create vdev for given persona |
Abhishek Ambure | 7470976 | 2019-05-27 19:43:26 +0530 | [diff] [blame] | 361 | * @mac_handle: The handle returned by mac_open |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 362 | * @vdev_params: params required for vdev creation |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 363 | * |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 364 | * This API will create the object manager vdev and in the same |
| 365 | * context vdev mlme object manager notification is invoked, which |
| 366 | * will send the vdev create to the firmware. |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 367 | * |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 368 | * If the vdev creation is successful the following object is referenced |
| 369 | * by below modules: |
| 370 | * 1) WLAN_OBJMGR_ID |
| 371 | * 2) WLAN_LEGACY_SME_ID |
| 372 | * 3) WLAN_LEGACY_WMA_ID |
| 373 | * |
| 374 | * Return: Newly created Vdev object or NULL incase in any error |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 375 | */ |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 376 | struct wlan_objmgr_vdev *sme_vdev_create(mac_handle_t mac_handle, |
| 377 | struct wlan_vdev_create_params *vdev_params); |
| 378 | |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 379 | |
gaurank kathpalia | 78af193 | 2018-10-27 20:33:10 +0530 | [diff] [blame] | 380 | /** |
Abhishek Ambure | cbef144 | 2019-06-10 17:15:00 +0530 | [diff] [blame] | 381 | * sme_vdev_delete() - Delete vdev for given id |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 382 | * @mac_handle: The handle returned by mac_open. |
| 383 | * @vdev: VDEV Object |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 384 | * |
Abhishek Ambure | cbef144 | 2019-06-10 17:15:00 +0530 | [diff] [blame] | 385 | * This is a synchronous API. This API needs to be called to delete vdev |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 386 | * in SME module before terminating the session completely. |
| 387 | * |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 388 | * The following modules releases their reference to the vdev object: |
| 389 | * 1) WLAN_LEGACY_WMA_ID |
| 390 | * 2) WLAN_LEGACY_SME_ID |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 391 | * |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 392 | * Return: QDF_STATUS_SUCCESS - vdev is deleted. |
| 393 | * QDF_STATUS_E_INVAL when failed to delete vdev. |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 394 | */ |
Arun Kumar Khandavalli | 4f6a5bd | 2019-10-23 16:01:15 +0530 | [diff] [blame] | 395 | QDF_STATUS sme_vdev_delete(mac_handle_t mac_handle, |
| 396 | struct wlan_objmgr_vdev *vdev); |
Jeff Johnson | 5a6a0c9 | 2019-02-17 16:12:02 -0800 | [diff] [blame] | 397 | |
| 398 | /** |
Jianmin Zhu | 387e65c | 2019-10-18 20:21:57 +0800 | [diff] [blame] | 399 | * sme_cleanup_session() - clean up sme session info for vdev |
| 400 | * @mac_handle: mac handle |
| 401 | * @vdev_id: vdev id |
| 402 | * |
| 403 | * Return: none |
| 404 | */ |
| 405 | void sme_cleanup_session(mac_handle_t mac_handle, uint8_t vdev_id); |
| 406 | |
| 407 | /** |
Jeff Johnson | 5a6a0c9 | 2019-02-17 16:12:02 -0800 | [diff] [blame] | 408 | * sme_set_curr_device_mode() - Sets the current operating device mode. |
| 409 | * @mac_handle: The handle returned by mac_open. |
| 410 | * @curr_device_mode: Current operating device mode. |
| 411 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 412 | void sme_set_curr_device_mode(mac_handle_t mac_handle, |
Jeff Johnson | 5a6a0c9 | 2019-02-17 16:12:02 -0800 | [diff] [blame] | 413 | enum QDF_OPMODE curr_device_mode); |
| 414 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 415 | QDF_STATUS sme_update_roam_params(mac_handle_t mac_handle, |
| 416 | uint8_t session_id, |
| 417 | struct roam_ext_params *roam_params_src, |
| 418 | int update_param); |
| 419 | QDF_STATUS sme_update_config(mac_handle_t mac_handle, |
Jeff Johnson | 46b4f0e | 2019-03-08 10:48:35 -0800 | [diff] [blame] | 420 | struct sme_config_params *pSmeConfigParams); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 421 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 422 | QDF_STATUS sme_set11dinfo(mac_handle_t mac_handle, |
Jeff Johnson | 46b4f0e | 2019-03-08 10:48:35 -0800 | [diff] [blame] | 423 | struct sme_config_params *pSmeConfigParams); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 424 | QDF_STATUS sme_hdd_ready_ind(mac_handle_t mac_handle); |
Abhinav Kumar | 4d1f9f4 | 2019-05-07 13:14:49 +0530 | [diff] [blame] | 425 | |
| 426 | #ifdef WLAN_BCN_RECV_FEATURE |
| 427 | /* |
| 428 | * sme_register_bcn_report_pe_cb() - Register SME callback |
| 429 | * @mac_handle: The handle returned by mac_open. |
| 430 | * @cb: cb of type beacon_report_cb |
| 431 | * |
| 432 | * This function Register SME callback in order to send |
| 433 | * beacon report to upper layer |
| 434 | * |
| 435 | * Return QDF_STATUS_SUCCESS - |
| 436 | */ |
| 437 | QDF_STATUS |
| 438 | sme_register_bcn_report_pe_cb(mac_handle_t mac_handle, beacon_report_cb cb); |
| 439 | #else |
| 440 | static inline QDF_STATUS |
| 441 | sme_register_bcn_report_pe_cb(mac_handle_t mac_handle, beacon_report_cb cb) |
| 442 | { |
| 443 | return QDF_STATUS_SUCCESS; |
| 444 | } |
| 445 | #endif |
| 446 | |
Krunal Soni | a8270f5 | 2017-02-23 19:51:25 -0800 | [diff] [blame] | 447 | /** |
| 448 | * sme_ser_cmd_callback() - callback from serialization module |
Rajeev Kumar Sirasanagandla | 4477e7e | 2019-01-29 14:05:44 -0800 | [diff] [blame] | 449 | * @cmd: serialization command |
Krunal Soni | a8270f5 | 2017-02-23 19:51:25 -0800 | [diff] [blame] | 450 | * @reason: reason why serialization module has given this callback |
| 451 | * |
| 452 | * Serialization module will give callback to SME for why it triggered |
| 453 | * the callback |
| 454 | * |
| 455 | * Return: QDF_STATUS_SUCCESS |
| 456 | */ |
Rajeev Kumar Sirasanagandla | 4477e7e | 2019-01-29 14:05:44 -0800 | [diff] [blame] | 457 | QDF_STATUS sme_ser_cmd_callback(struct wlan_serialization_command *cmd, |
Krunal Soni | a8270f5 | 2017-02-23 19:51:25 -0800 | [diff] [blame] | 458 | enum wlan_serialization_cb_reason reason); |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 459 | |
Abhishek Singh | 0d0568a | 2018-11-22 15:01:51 +0530 | [diff] [blame] | 460 | /** |
| 461 | * sme_purge_pdev_all_ser_cmd_list() - purge all scan and non-scan |
| 462 | * active and pending cmds for pdev |
| 463 | * @mac_handle: pointer to global MAC context |
| 464 | * |
| 465 | * Return : none |
| 466 | */ |
| 467 | void sme_purge_pdev_all_ser_cmd_list(mac_handle_t mac_handle); |
| 468 | |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 469 | /* |
| 470 | * sme_process_msg() - The main message processor for SME. |
| 471 | * @mac: The global mac context |
| 472 | * @msg: The message to be processed. |
| 473 | * |
| 474 | * This function is called by a message dispatcher when to process a message |
| 475 | * targeted for SME. |
| 476 | * This is a synchronous call |
| 477 | * |
| 478 | * Return: QDF_STATUS_SUCCESS - SME successfully processed the message. |
| 479 | * Other status means SME failed to process the message to HAL. |
| 480 | */ |
Jeff Johnson | 0a8786a | 2018-12-02 10:49:01 -0800 | [diff] [blame] | 481 | QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg); |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 482 | |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 483 | QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg); |
Abhishek Ambure | c515139 | 2019-10-14 12:15:24 +0530 | [diff] [blame] | 484 | /* |
| 485 | * sme_scan_get_result() - Return scan results based on filter |
| 486 | * @mac: Pointer to Global MAC structure |
| 487 | * @vdev_id: vdev_id |
| 488 | * @filter: If pFilter is NULL, all cached results are returned |
| 489 | * @phResult: an object for the result. |
| 490 | * |
| 491 | * Return QDF_STATUS |
| 492 | */ |
| 493 | QDF_STATUS sme_scan_get_result(mac_handle_t mac_handle, uint8_t vdev_id, |
| 494 | struct scan_filter *filter, |
| 495 | tScanResultHandle *phResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 496 | QDF_STATUS sme_get_ap_channel_from_scan_cache( |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 497 | struct csr_roam_profile *profile, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 498 | tScanResultHandle *scan_cache, |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 499 | uint32_t *ap_ch_freq); |
Manikandan Mohan | 932c11e | 2019-08-14 14:09:08 -0700 | [diff] [blame] | 500 | /** |
| 501 | * sme_get_ap_channel_from_scan() - a wrapper function to get |
| 502 | * AP's channel id from |
| 503 | * CSR by filtering the |
| 504 | * result which matches |
| 505 | * our roam profile. |
| 506 | * @profile: SAP profile |
| 507 | * @ap_ch_freq: pointer to channel id of SAP. Fill the value after finding the |
| 508 | * best ap from scan cache. |
| 509 | * |
| 510 | * This function is written to get AP's channel id from CSR by filtering |
| 511 | * the result which matches our roam profile. This is a synchronous call. |
| 512 | * |
| 513 | * Return: QDF_STATUS. |
| 514 | */ |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 515 | QDF_STATUS sme_get_ap_channel_from_scan(void *profile, |
Manikandan Mohan | 932c11e | 2019-08-14 14:09:08 -0700 | [diff] [blame] | 516 | tScanResultHandle *scan_cache, |
| 517 | uint32_t *ap_ch_freq); |
| 518 | |
Jeff Johnson | 1f2dabc | 2018-11-07 15:33:01 -0800 | [diff] [blame] | 519 | tCsrScanResultInfo *sme_scan_result_get_first(mac_handle_t, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 520 | tScanResultHandle hScanResult); |
Jeff Johnson | 1f2dabc | 2018-11-07 15:33:01 -0800 | [diff] [blame] | 521 | tCsrScanResultInfo *sme_scan_result_get_next(mac_handle_t, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 522 | tScanResultHandle hScanResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 523 | QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 524 | QDF_STATUS sme_roam_connect(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 525 | struct csr_roam_profile *pProfile, uint32_t *pRoamId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 526 | QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 527 | struct csr_roam_profile *pProfile, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 528 | tCsrRoamModifyProfileFields modProfileFields, |
| 529 | uint32_t *pRoamId, bool fForce); |
Varun Reddy Yeturu | 363809c | 2018-06-27 14:12:52 -0700 | [diff] [blame] | 530 | |
| 531 | /** |
| 532 | * sme_roam_disconnect() - API to request CSR to disconnect |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 533 | * @mac_handle: Opaque handle to the global MAC context |
Varun Reddy Yeturu | 363809c | 2018-06-27 14:12:52 -0700 | [diff] [blame] | 534 | * @session: SME session identifier |
| 535 | * @reason: Reason to disconnect |
| 536 | * |
| 537 | * Return: QDF Status success or failure |
| 538 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 539 | QDF_STATUS sme_roam_disconnect(mac_handle_t mac_handle, uint8_t session, |
Varun Reddy Yeturu | 363809c | 2018-06-27 14:12:52 -0700 | [diff] [blame] | 540 | eCsrRoamDisconnectReason reason); |
| 541 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 542 | void sme_dhcp_done_ind(mac_handle_t mac_handle, uint8_t session_id); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 543 | QDF_STATUS sme_roam_stop_bss(mac_handle_t mac_handle, uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 544 | QDF_STATUS sme_roam_disconnect_sta(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 545 | struct csr_del_sta_params *p_del_sta_params); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 546 | QDF_STATUS sme_roam_deauth_sta(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 547 | struct csr_del_sta_params *pDelStaParams); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 548 | QDF_STATUS sme_roam_get_connect_profile(mac_handle_t mac_handle, |
| 549 | uint8_t sessionId, |
| 550 | tCsrRoamConnectedProfile *pProfile); |
Naveen Rawat | df0a7e7 | 2016-01-06 18:35:53 -0800 | [diff] [blame] | 551 | void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile); |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 552 | |
Abhinav Kumar | 7830d9c | 2018-06-27 17:57:48 +0530 | [diff] [blame] | 553 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 554 | /** |
| 555 | * sme_get_pmk_info(): A wrapper function to request CSR to save PMK |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 556 | * @mac_handle: Global structure |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 557 | * @session_id: SME session_id |
| 558 | * @pmk_cache: pointer to a structure of pmk |
| 559 | * |
| 560 | * Return: none |
| 561 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 562 | void sme_get_pmk_info(mac_handle_t mac_handle, uint8_t session_id, |
gaurank kathpalia | 99d06c1 | 2018-05-16 16:28:35 +0530 | [diff] [blame] | 563 | tPmkidCacheInfo *pmk_cache); |
| 564 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 565 | QDF_STATUS sme_roam_set_psk_pmk(mac_handle_t mac_handle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 566 | uint8_t *pPSK_PMK, size_t pmk_len); |
Karthik Kantamneni | 2054829 | 2019-01-25 11:56:58 +0530 | [diff] [blame] | 567 | #else |
| 568 | static inline |
| 569 | void sme_get_pmk_info(mac_handle_t mac_handle, uint8_t session_id, |
| 570 | tPmkidCacheInfo *pmk_cache) |
| 571 | {} |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 572 | #endif |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 573 | |
| 574 | /** |
| 575 | * sme_roam_get_wpa_rsn_req_ie() - Retrieve WPA/RSN Request IE |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 576 | * @mac_handle: Opaque handle to the global MAC context |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 577 | * @session_id: ID of the specific session |
| 578 | * @len: Caller allocated memory that has the length of @buf as input. |
| 579 | * Upon returned, @len has the length of the IE store in @buf |
| 580 | * @buf: Caller allocated memory that contain the IE field, if any, |
| 581 | * upon return |
| 582 | * |
| 583 | * A wrapper function to request CSR to return the WPA or RSN IE CSR |
| 584 | * passes to PE to JOIN request or START_BSS request |
| 585 | * This is a synchronous call. |
| 586 | * |
| 587 | * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not |
| 588 | * big enough |
| 589 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 590 | QDF_STATUS sme_roam_get_wpa_rsn_req_ie(mac_handle_t mac_handle, |
| 591 | uint8_t session_id, |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 592 | uint32_t *len, uint8_t *buf); |
| 593 | |
| 594 | /** |
| 595 | * sme_roam_get_wpa_rsn_rsp_ie() - Retrieve WPA/RSN Response IE |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 596 | * @mac_handle: Opaque handle to the global MAC context |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 597 | * @session_id: ID of the specific session |
| 598 | * @len: Caller allocated memory that has the length of @buf as input. |
| 599 | * Upon returned, @len has the length of the IE store in @buf |
| 600 | * @buf: Caller allocated memory that contain the IE field, if any, |
| 601 | * upon return |
| 602 | * |
| 603 | * A wrapper function to request CSR to return the WPA or RSN IE CSR |
| 604 | * passes to PE to JOIN request or START_BSS request |
| 605 | * This is a synchronous call. |
| 606 | * |
| 607 | * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not |
| 608 | * big enough |
| 609 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 610 | QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(mac_handle_t mac_handle, |
| 611 | uint8_t session_id, |
Jeff Johnson | 0a078b5 | 2018-06-01 16:15:54 -0700 | [diff] [blame] | 612 | uint32_t *len, uint8_t *buf); |
| 613 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 614 | QDF_STATUS sme_get_config_param(mac_handle_t mac_handle, |
Jeff Johnson | 46b4f0e | 2019-03-08 10:48:35 -0800 | [diff] [blame] | 615 | struct sme_config_params *pParam); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 616 | QDF_STATUS sme_get_snr(mac_handle_t mac_handle, |
Sourav Mohapatra | 05a52ed | 2019-08-06 16:07:05 +0530 | [diff] [blame] | 617 | tCsrSnrCallback callback, |
| 618 | struct qdf_mac_addr bssId, void *pContext); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 619 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 620 | QDF_STATUS sme_get_tsm_stats(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 621 | tCsrTsmStatsCallback callback, |
Sourav Mohapatra | dcd8f8d | 2019-07-03 15:43:15 +0530 | [diff] [blame] | 622 | struct qdf_mac_addr bssId, |
Jeff Johnson | 30f8455 | 2017-09-13 14:55:25 -0700 | [diff] [blame] | 623 | void *pContext, uint8_t tid); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 624 | QDF_STATUS sme_set_cckm_ie(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 625 | uint8_t sessionId, |
| 626 | uint8_t *pCckmIe, uint8_t cckmIeLen); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 627 | QDF_STATUS sme_set_ese_beacon_request(mac_handle_t mac_handle, |
| 628 | const uint8_t sessionId, |
Jeff Johnson | b2c3d04 | 2019-02-26 12:23:26 -0800 | [diff] [blame] | 629 | const tCsrEseBeaconReq *in_req); |
Jeff Johnson | 218f9be | 2019-03-01 22:18:48 -0800 | [diff] [blame] | 630 | |
| 631 | /** |
| 632 | * sme_set_plm_request() - set plm request |
| 633 | * @mac_handle: Opaque handle to the global MAC context |
| 634 | * @req: Pointer to input plm request |
| 635 | * |
| 636 | * Return: QDF_STATUS enumeration |
| 637 | */ |
Jeff Johnson | 36583f0 | 2019-02-26 08:02:11 -0800 | [diff] [blame] | 638 | QDF_STATUS sme_set_plm_request(mac_handle_t mac_handle, |
| 639 | struct plm_req_params *req); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 640 | #endif /*FEATURE_WLAN_ESE */ |
Jeff Johnson | 36583f0 | 2019-02-26 08:02:11 -0800 | [diff] [blame] | 641 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 642 | QDF_STATUS sme_get_modify_profile_fields(mac_handle_t mac_handle, |
| 643 | uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 644 | tCsrRoamModifyProfileFields * |
| 645 | pModifyProfileFields); |
| 646 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 647 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 648 | QDF_STATUS sme_register_oem_data_rsp_callback(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 649 | sme_send_oem_data_rsp_msg callback); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 650 | void sme_deregister_oem_data_rsp_callback(mac_handle_t mac_handle); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 651 | |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 652 | #else |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 653 | static inline |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 654 | QDF_STATUS sme_register_oem_data_rsp_callback(mac_handle_t mac_handle, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 655 | void *callback) |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 656 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 657 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 658 | } |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 659 | |
| 660 | static inline |
| 661 | void sme_deregister_oem_data_rsp_callback(mac_handle_t mac_handle) |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 662 | { |
| 663 | } |
| 664 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 665 | #endif |
| 666 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 667 | QDF_STATUS sme_roam_set_key(mac_handle_t mac_handle, uint8_t sessionId, |
| 668 | tCsrRoamSetKey *pSetKey, uint32_t *pRoamId); |
| 669 | QDF_STATUS sme_get_country_code(mac_handle_t mac_handle, uint8_t *pBuf, |
| 670 | uint8_t *pbLen); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 671 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 672 | QDF_STATUS sme_generic_change_country_code(mac_handle_t mac_handle, |
Amar Singhal | 7f1f3ec | 2015-10-13 17:14:08 -0700 | [diff] [blame] | 673 | uint8_t *pCountry); |
Mukul Sharma | ecf8e09 | 2017-12-19 22:36:31 +0530 | [diff] [blame] | 674 | |
| 675 | |
Jeff Johnson | 330c0bf | 2018-06-01 15:13:12 -0700 | [diff] [blame] | 676 | /** |
| 677 | * sme_update_channel_list() - Update configured channel list to fwr |
| 678 | * This is a synchronous API. |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 679 | * @mac_handle: Opaque handle to the global MAC context. |
Jeff Johnson | 330c0bf | 2018-06-01 15:13:12 -0700 | [diff] [blame] | 680 | * |
| 681 | * Return: QDF_STATUS SUCCESS. |
| 682 | * FAILURE or RESOURCES The API finished and failed. |
| 683 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 684 | QDF_STATUS sme_update_channel_list(mac_handle_t mac_handle); |
Mukul Sharma | ecf8e09 | 2017-12-19 22:36:31 +0530 | [diff] [blame] | 685 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 686 | QDF_STATUS sme_tx_fail_monitor_start_stop_ind(mac_handle_t mac_handle, |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 687 | uint8_t tx_fail_count, |
| 688 | void *txFailIndCallback); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 689 | QDF_STATUS sme_dhcp_start_ind(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 690 | uint8_t device_mode, |
| 691 | uint8_t *macAddr, uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 692 | QDF_STATUS sme_dhcp_stop_ind(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 693 | uint8_t device_mode, |
| 694 | uint8_t *macAddr, uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 695 | QDF_STATUS sme_neighbor_report_request(mac_handle_t mac_handle, |
| 696 | uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 697 | tpRrmNeighborReq pRrmNeighborReq, |
| 698 | tpRrmNeighborRspCallbackInfo callbackInfo); |
Paul Zhang | da2970b | 2019-06-23 18:16:38 +0800 | [diff] [blame] | 699 | |
| 700 | #ifdef FEATURE_OEM_DATA |
| 701 | /** |
| 702 | * sme_oem_data_cmd() - the wrapper to send oem data cmd to wma |
| 703 | * @mac_handle: Opaque handle to the global MAC context. |
| 704 | * @oem_data: the pointer of oem data |
| 705 | * |
| 706 | * Return: QDF_STATUS |
| 707 | */ |
| 708 | QDF_STATUS sme_oem_data_cmd(mac_handle_t mac_handle, |
| 709 | struct oem_data *oem_data); |
| 710 | #endif |
| 711 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 712 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Paul Zhang | da2970b | 2019-06-23 18:16:38 +0800 | [diff] [blame] | 713 | /** |
| 714 | * sme_oem_req_cmd() - send oem request cmd to WMA |
| 715 | * @mac_handle: Opaque handle to the global MAC context |
| 716 | * @oem_req: OEM data request |
| 717 | * |
| 718 | * Return: QDF_STATUS |
| 719 | */ |
| 720 | QDF_STATUS sme_oem_req_cmd(mac_handle_t mac_handle, |
| 721 | struct oem_data_req *oem_req); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 722 | QDF_STATUS sme_oem_update_capability(mac_handle_t mac_handle, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 723 | struct sme_oem_capability *cap); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 724 | QDF_STATUS sme_oem_get_capability(mac_handle_t mac_handle, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 725 | struct sme_oem_capability *cap); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 726 | #endif /*FEATURE_OEM_DATA_SUPPORT */ |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 727 | QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 728 | QDF_STATUS sme_set_host_offload(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | d6fda81 | 2019-02-06 21:54:23 -0800 | [diff] [blame] | 729 | struct sir_host_offload_req *pRequest); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 730 | QDF_STATUS sme_set_keep_alive(mac_handle_t mac_handle, uint8_t sessionId, |
Jeff Johnson | 562ccad | 2019-02-06 22:10:24 -0800 | [diff] [blame] | 731 | struct keep_alive_req *pRequest); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 732 | QDF_STATUS sme_get_operation_channel(mac_handle_t mac_handle, |
Jianmin Zhu | bc84105 | 2019-10-28 17:24:39 +0800 | [diff] [blame] | 733 | uint32_t *chan_freq, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 734 | uint8_t sessionId); |
| 735 | QDF_STATUS sme_register_mgmt_frame(mac_handle_t mac_handle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 736 | uint16_t frameType, uint8_t *matchData, |
| 737 | uint16_t matchLen); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 738 | QDF_STATUS sme_deregister_mgmt_frame(mac_handle_t mac_handle, |
| 739 | uint8_t sessionId, |
| 740 | uint16_t frameType, uint8_t *matchData, |
| 741 | uint16_t matchLen); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 742 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 743 | QDF_STATUS sme_configure_ext_wow(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 744 | tpSirExtWoWParams wlanExtParams, |
| 745 | csr_readyToSuspendCallback callback, |
| 746 | void *callbackContext); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 747 | QDF_STATUS sme_configure_app_type1_params(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 748 | tpSirAppType1Params wlanAppType1Params); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 749 | QDF_STATUS sme_configure_app_type2_params(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 750 | tpSirAppType2Params wlanAppType2Params); |
| 751 | #endif |
Abhishek Singh | b1954c6 | 2019-02-14 10:18:28 +0530 | [diff] [blame] | 752 | /** |
| 753 | * sme_get_beaconing_concurrent_operation_channel() - To get concurrent |
Kiran Kumar Lokere | 229212a | 2019-08-20 19:03:30 -0700 | [diff] [blame] | 754 | * operating channel frequency of beaconing interface |
Abhishek Singh | b1954c6 | 2019-02-14 10:18:28 +0530 | [diff] [blame] | 755 | * @mac_handle: Pointer to mac context |
| 756 | * @vdev_id_to_skip: channel of which vdev id to skip |
| 757 | * |
| 758 | * This routine will return operating channel of active AP/GO channel |
| 759 | * and will skip the channel of vdev_id_to_skip. |
| 760 | * If other no reqested mode is active it will return 0 |
| 761 | * |
Kiran Kumar Lokere | 229212a | 2019-08-20 19:03:30 -0700 | [diff] [blame] | 762 | * Return: uint32_t |
Abhishek Singh | b1954c6 | 2019-02-14 10:18:28 +0530 | [diff] [blame] | 763 | */ |
Kiran Kumar Lokere | 229212a | 2019-08-20 19:03:30 -0700 | [diff] [blame] | 764 | uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle, |
Abhishek Singh | b1954c6 | 2019-02-14 10:18:28 +0530 | [diff] [blame] | 765 | uint8_t vdev_id_to_skip); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 766 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
Liangwei Dong | 10054b9 | 2019-11-29 18:44:14 +0800 | [diff] [blame] | 767 | /** |
| 768 | * sme_check_concurrent_channel_overlap() - Get interfering concurrent channel |
| 769 | * @mac_handle: SAP context pointer |
| 770 | * @sap_ch_freq: SAP home channel frequency |
| 771 | * @sapPhyMode: sap phymode |
| 772 | * @cc_switch_mode: force scc channel switch mode |
| 773 | * |
| 774 | * Determine if a concurrent channel is interfering. |
| 775 | * |
| 776 | * Return: Channel freq (Mhz) of the interfering channel, or 0 if none. |
| 777 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 778 | uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle, |
Kiran Kumar Lokere | 229212a | 2019-08-20 19:03:30 -0700 | [diff] [blame] | 779 | uint16_t sap_ch_freq, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 780 | eCsrPhyMode sapPhyMode, |
| 781 | uint8_t cc_switch_mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 782 | #endif |
Will Huang | a6af7e1 | 2019-10-31 17:40:06 +0800 | [diff] [blame] | 783 | |
| 784 | /** |
| 785 | * sme_get_cfg_valid_channels() - To get valid channel list |
| 786 | * @valid_ch_freq: pointer to array which save the valid channel list |
| 787 | * @len: the length of the valid channel list |
| 788 | * |
| 789 | * Return: QDF status |
| 790 | */ |
| 791 | QDF_STATUS sme_get_cfg_valid_channels(uint32_t *valid_ch_freq, uint32_t *len); |
| 792 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 793 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 794 | QDF_STATUS sme_8023_multicast_list(mac_handle_t mac_handle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 795 | tpSirRcvFltMcAddrList pMulticastAddrs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 796 | #endif /* WLAN_FEATURE_PACKET_FILTERING */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 797 | uint16_t sme_chn_to_freq(uint8_t chanNum); |
wadesong | a8940a2 | 2019-11-11 16:58:16 +0800 | [diff] [blame] | 798 | |
| 799 | /* |
| 800 | * sme_is_channel_valid() - validate a channel against current regdmn |
| 801 | * To check if the channel is valid for currently established domain |
| 802 | * This is a synchronous API. |
| 803 | * |
| 804 | * mac_handle - The handle returned by mac_open. |
| 805 | * chan_freq - channel to verify |
| 806 | * |
| 807 | * Return: true/false, true if channel is valid |
| 808 | */ |
| 809 | bool sme_is_channel_valid(mac_handle_t mac_handle, uint32_t chan_freq); |
| 810 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 811 | QDF_STATUS sme_set_max_tx_power(mac_handle_t mac_handle, |
| 812 | struct qdf_mac_addr pBssid, |
| 813 | struct qdf_mac_addr pSelfMacAddress, int8_t dB); |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 814 | QDF_STATUS sme_set_max_tx_power_per_band(enum band_info band, int8_t db); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 815 | QDF_STATUS sme_set_tx_power(mac_handle_t mac_handle, uint8_t sessionId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 816 | struct qdf_mac_addr bssid, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 817 | enum QDF_OPMODE dev_mode, int power); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 818 | QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 819 | QDF_STATUS sme_hide_ssid(mac_handle_t mac_handle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 820 | uint8_t ssidHidden); |
Jeff Johnson | ce85b5a | 2018-12-19 13:00:29 -0800 | [diff] [blame] | 821 | |
Srinivas Dasari | a5a42fa | 2019-09-20 12:47:15 +0530 | [diff] [blame] | 822 | /** |
| 823 | * sme_update_roam_scan_n_probes() - Update no.of roam scan probes |
| 824 | * @mac_handle: The handle returned by mac_open |
| 825 | * @vdev_id: vdev identifier |
| 826 | * @probes: number of probe requests to be sent out |
| 827 | * |
| 828 | * Return: QDF_STATUS |
| 829 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 830 | QDF_STATUS sme_update_roam_scan_n_probes(mac_handle_t mac_handle, |
Srinivas Dasari | a5a42fa | 2019-09-20 12:47:15 +0530 | [diff] [blame] | 831 | uint8_t vdev_id, |
| 832 | const uint8_t probes); |
Srinivas Dasari | 7bedcd1 | 2019-09-20 12:43:11 +0530 | [diff] [blame] | 833 | |
| 834 | /** |
| 835 | * sme_update_roam_scan_home_away_time() - Update roam scan Home away time |
| 836 | * @mac_handle: Opaque handle to the global MAC context |
| 837 | * @vdev_id: vdev identifier |
| 838 | * @roam_scan_home_away_time: Scan home away time |
| 839 | * @send_offload_cmd: If it's true, the command is sent to firmware, |
| 840 | * otherwise the command is not sent to firmware |
| 841 | * |
| 842 | * Return: QDF_STATUS |
| 843 | */ |
| 844 | QDF_STATUS |
| 845 | sme_update_roam_scan_home_away_time(mac_handle_t mac_handle, uint8_t vdev_id, |
| 846 | const uint16_t roam_scan_home_away_time, |
| 847 | const bool send_offload_cmd); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 848 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 849 | bool sme_get_roam_intra_band(mac_handle_t mac_handle); |
Srinivas Dasari | a5a42fa | 2019-09-20 12:47:15 +0530 | [diff] [blame] | 850 | |
| 851 | /** |
| 852 | * sme_get_roam_scan_n_probes() - get Roam scan number of probes |
| 853 | * @mac_handle: The handle returned by mac_open |
| 854 | * @vdev_id: vdev identifier |
| 855 | * @roam_scan_n_probes: Buffer to fill the number of probes. |
| 856 | * Valid only if the return status is success. |
| 857 | * |
| 858 | * Return: QDF_STATUS |
| 859 | */ |
| 860 | QDF_STATUS sme_get_roam_scan_n_probes(mac_handle_t mac_handle, uint8_t vdev_id, |
| 861 | uint8_t *roam_scan_n_probes); |
Srinivas Dasari | 7f48ac0 | 2019-09-16 17:44:43 +0530 | [diff] [blame] | 862 | |
| 863 | /** |
| 864 | * sme_update_roam_rssi_diff() - Update RoamRssiDiff |
| 865 | * @mac_handle: Opaque handle to the global MAC context |
| 866 | * @vdev_id: vdev identifier |
| 867 | * @roam_rssi_diff: Minimum rssi difference between potential candidate and |
| 868 | * current AP. |
| 869 | * |
| 870 | * Return: QDF_STATUS |
| 871 | */ |
| 872 | QDF_STATUS sme_update_roam_rssi_diff(mac_handle_t mac_handle, uint8_t vdev_id, |
| 873 | uint8_t roam_rssi_diff); |
Srinivas Dasari | 7bedcd1 | 2019-09-20 12:43:11 +0530 | [diff] [blame] | 874 | |
| 875 | /** |
| 876 | * sme_get_roam_scan_home_away_time() - get Roam scan home away time |
| 877 | * @mac_handle: The handle returned by mac_open |
| 878 | * @vdev_id: vdev identifier |
| 879 | * @roam_scan_home_away_time: Buffer to fill the roam scan home away time. |
| 880 | * Valid only if the return status is success. |
| 881 | * |
| 882 | * Return: QDF_STATUS |
| 883 | */ |
| 884 | QDF_STATUS sme_get_roam_scan_home_away_time(mac_handle_t mac_handle, |
| 885 | uint8_t vdev_id, |
| 886 | uint16_t *roam_scan_home_away_time); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 887 | QDF_STATUS sme_update_wes_mode(mac_handle_t mac_handle, bool isWESModeEnabled, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 888 | uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 889 | QDF_STATUS sme_set_roam_scan_control(mac_handle_t mac_handle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 890 | bool roamScanControl); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 891 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 892 | QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 893 | uint8_t sessionId, |
| 894 | const bool |
| 895 | isFastRoamIniFeatureEnabled); |
Mukul Sharma | 69c44cd | 2016-09-12 18:33:57 +0530 | [diff] [blame] | 896 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 897 | QDF_STATUS sme_config_fast_roaming(mac_handle_t mac_handle, uint8_t session_id, |
| 898 | const bool is_fast_roam_enabled); |
Mukul Sharma | 69c44cd | 2016-09-12 18:33:57 +0530 | [diff] [blame] | 899 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 900 | QDF_STATUS sme_stop_roaming(mac_handle_t mac_handle, uint8_t sessionId, |
Abhinav Kumar | 523ca37 | 2019-08-30 16:28:19 +0530 | [diff] [blame] | 901 | uint8_t reason, uint32_t requestor); |
Abhishek Singh | d568647 | 2017-09-20 15:18:50 +0530 | [diff] [blame] | 902 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 903 | QDF_STATUS sme_start_roaming(mac_handle_t mac_handle, uint8_t sessionId, |
Abhinav Kumar | 523ca37 | 2019-08-30 16:28:19 +0530 | [diff] [blame] | 904 | uint8_t reason, uint32_t requestor); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 905 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 906 | QDF_STATUS sme_update_is_ese_feature_enabled(mac_handle_t mac_handle, |
| 907 | uint8_t sessionId, |
| 908 | const bool isEseIniFeatureEnabled); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 909 | #endif /* FEATURE_WLAN_ESE */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 910 | QDF_STATUS sme_set_roam_rescan_rssi_diff(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 911 | uint8_t sessionId, |
| 912 | const uint8_t nRoamRescanRssiDiff); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 913 | uint8_t sme_get_roam_rescan_rssi_diff(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 914 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 915 | QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff( |
| 916 | mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 917 | uint8_t sessionId, |
| 918 | const uint8_t nOpportunisticThresholdDiff); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 919 | uint8_t sme_get_roam_opportunistic_scan_threshold_diff(mac_handle_t mac_handle); |
Srinivas Dasari | 9249a98 | 2019-09-16 14:56:27 +0530 | [diff] [blame] | 920 | |
| 921 | /** |
| 922 | * sme_set_neighbor_lookup_rssi_threshold() - update neighbor lookup rssi thr |
| 923 | * @mac_handle: The handle returned by mac_open |
| 924 | * @vdev_id: vdev identifier |
| 925 | * @neighbor_lookup_rssi_threshold: Neighbor lookup rssi threshold |
| 926 | * |
| 927 | * Return: QDF_STATUS |
| 928 | */ |
| 929 | QDF_STATUS |
| 930 | sme_set_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle, |
| 931 | uint8_t vdev_id, |
| 932 | uint8_t neighbor_lookup_rssi_threshold); |
| 933 | |
| 934 | /** |
| 935 | * sme_get_neighbor_lookup_rssi_threshold() - get neighbor lookup rssi threshold |
| 936 | * @mac_handle: The handle returned by mac_open |
| 937 | * @vdev_id: vdev identifier |
| 938 | * @lookup_threshold: Buffer to fill the neighbor lookup threshold. |
| 939 | * Valid only if the return status is success. |
| 940 | * |
| 941 | * Return: QDF_STATUS |
| 942 | */ |
| 943 | QDF_STATUS sme_get_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle, |
| 944 | uint8_t vdev_id, |
| 945 | uint8_t *lookup_threshold); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 946 | QDF_STATUS sme_set_neighbor_scan_refresh_period(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 947 | uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 948 | uint16_t sme_get_neighbor_scan_refresh_period(mac_handle_t mac_handle); |
Srinivas Dasari | 456aa70 | 2019-09-17 14:19:50 +0530 | [diff] [blame] | 949 | |
| 950 | /** |
Srinivas Dasari | 240d327 | 2019-09-20 12:00:57 +0530 | [diff] [blame] | 951 | * sme_get_empty_scan_refresh_period_global() - get global scan refresh period |
| 952 | * @mac_handle: The handle returned by mac_open |
| 953 | * |
| 954 | * Return: Empty scan refresh period configured through ini |
| 955 | */ |
| 956 | uint16_t sme_get_empty_scan_refresh_period_global(mac_handle_t mac_handle); |
| 957 | |
| 958 | /** |
Srinivas Dasari | 456aa70 | 2019-09-17 14:19:50 +0530 | [diff] [blame] | 959 | * sme_get_empty_scan_refresh_period() - get empty scan refresh period |
| 960 | * @mac_handle: The handle returned by mac_open. |
| 961 | * @vdev_id: vdev identifier |
| 962 | * @refresh_threshold: Buffer to fill the empty scan refresh period. |
| 963 | * Valid only if the return status is success. |
| 964 | * |
| 965 | * Return: QDF_STATUS |
| 966 | */ |
| 967 | QDF_STATUS sme_get_empty_scan_refresh_period(mac_handle_t mac_handle, |
| 968 | uint8_t vdev_id, |
| 969 | uint16_t *refresh_threshold); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 970 | QDF_STATUS sme_update_empty_scan_refresh_period(mac_handle_t mac_handle, |
Jeff Johnson | 9625945 | 2019-02-26 20:38:17 -0800 | [diff] [blame] | 971 | uint8_t sessionId, uint16_t empty_scan_refresh_period); |
Srinivas Dasari | 0628e84 | 2019-08-22 01:17:38 +0530 | [diff] [blame] | 972 | /** |
| 973 | * sme_update_full_roam_scan_period() - Send full roam scan period to SME |
| 974 | * @mac_handle: Opaque handle to the MAC context |
| 975 | * @vdev_id: vdev id |
| 976 | * @full_roam_scan_period: Idle period in seconds between two successive |
| 977 | * full channel roam scans |
| 978 | * |
| 979 | * Updated full scan period in roam info and a roam_offload_scan request. |
| 980 | * |
| 981 | * Return: QDF_STATUS |
| 982 | */ |
| 983 | QDF_STATUS sme_update_full_roam_scan_period(mac_handle_t mac_handle, |
| 984 | uint8_t vdev_id, |
| 985 | uint32_t full_roam_scan_period); |
Srinivas Dasari | 5fb8190 | 2019-08-22 01:39:42 +0530 | [diff] [blame] | 986 | |
| 987 | /** |
| 988 | * sme_modify_roam_cand_sel_criteria() - Modify candidate selection criteria |
| 989 | * @mac_handle: Opaque handle to the global MAC context |
| 990 | * @vdev_id: vdev Identifier |
| 991 | * @enable_scoring_for_roam: Carries enable/disable indication |
| 992 | * |
| 993 | * Enable/disable scoring for roam candidate selection based on the value of |
| 994 | * enable_scoring_for_roam. Below is the description of enable/disable, |
| 995 | * Disable-0: Disable scoring for roam candidate selection. Roaming |
| 996 | * shall fallback to legacy selection criteria, only RSSI. |
| 997 | * Enable-1 : Enable scoring for roam candidate selection. |
| 998 | * |
| 999 | * Return: Success or failure |
| 1000 | */ |
| 1001 | QDF_STATUS |
| 1002 | sme_modify_roam_cand_sel_criteria(mac_handle_t mac_handle, |
| 1003 | uint8_t vdev_id, |
| 1004 | bool enable_scoring_for_roam); |
Srinivas Dasari | b6798ec | 2019-08-21 12:07:22 +0530 | [diff] [blame] | 1005 | |
| 1006 | /** |
| 1007 | * sme_roam_control_restore_default_config - Restore roam config to default |
| 1008 | * @mac_handle: Opaque handle to the global MAC context |
| 1009 | * @vdev_id: vdev Identifier |
| 1010 | * |
| 1011 | * Restore enable_scoring_for_roam, emptyScanRefreshPeriod, |
| 1012 | * full_roam_scan_period to their default values and send RSO command to |
| 1013 | * firmware with the updated values. |
| 1014 | * |
| 1015 | * Return: Success or failure |
| 1016 | */ |
| 1017 | QDF_STATUS sme_roam_control_restore_default_config(mac_handle_t mac_handle, |
| 1018 | uint8_t vdev_id); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1019 | QDF_STATUS sme_set_neighbor_scan_min_chan_time(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1020 | const uint16_t nNeighborScanMinChanTime, |
| 1021 | uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1022 | QDF_STATUS sme_set_neighbor_scan_max_chan_time(mac_handle_t mac_handle, |
| 1023 | uint8_t sessionId, |
| 1024 | const uint16_t nNeighborScanMaxChanTime); |
| 1025 | uint16_t sme_get_neighbor_scan_min_chan_time(mac_handle_t mac_handle, |
| 1026 | uint8_t sessionId); |
| 1027 | uint32_t sme_get_neighbor_roam_state(mac_handle_t mac_handle, |
| 1028 | uint8_t sessionId); |
| 1029 | uint32_t sme_get_current_roam_state(mac_handle_t mac_handle, uint8_t sessionId); |
| 1030 | uint32_t sme_get_current_roam_sub_state(mac_handle_t mac_handle, |
| 1031 | uint8_t sessionId); |
| 1032 | uint32_t sme_get_lim_sme_state(mac_handle_t mac_handle); |
| 1033 | uint32_t sme_get_lim_mlm_state(mac_handle_t mac_handle); |
| 1034 | bool sme_is_lim_session_valid(mac_handle_t mac_handle, uint8_t sessionId); |
| 1035 | uint32_t sme_get_lim_sme_session_state(mac_handle_t mac_handle, |
| 1036 | uint8_t sessionId); |
| 1037 | uint32_t sme_get_lim_mlm_session_state(mac_handle_t mac_handle, |
| 1038 | uint8_t sessionId); |
| 1039 | uint16_t sme_get_neighbor_scan_max_chan_time(mac_handle_t mac_handle, |
| 1040 | uint8_t sessionId); |
| 1041 | QDF_STATUS sme_set_neighbor_scan_period(mac_handle_t mac_handle, |
| 1042 | uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1043 | const uint16_t nNeighborScanPeriod); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1044 | uint16_t sme_get_neighbor_scan_period(mac_handle_t mac_handle, |
| 1045 | uint8_t sessionId); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1046 | QDF_STATUS sme_set_roam_bmiss_first_bcnt(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1047 | uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1048 | QDF_STATUS sme_set_roam_bmiss_final_bcnt(mac_handle_t mac_handle, |
| 1049 | uint8_t sessionId, |
| 1050 | const uint8_t nRoamBmissFinalBcnt); |
Srinivas Dasari | 7f48ac0 | 2019-09-16 17:44:43 +0530 | [diff] [blame] | 1051 | /** |
| 1052 | * sme_get_roam_rssi_diff() - get Roam rssi diff |
| 1053 | * @mac_handle: The handle returned by mac_open |
| 1054 | * @vdev_id: vdev identifier |
| 1055 | * @rssi_diff: Buffer to fill the roam RSSI diff. |
| 1056 | * Valid only if the return status is success. |
| 1057 | * |
| 1058 | * Return: QDF_STATUS |
| 1059 | */ |
| 1060 | QDF_STATUS sme_get_roam_rssi_diff(mac_handle_t mac_handle, uint8_t vdev_id, |
| 1061 | uint8_t *rssi_diff); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1062 | QDF_STATUS sme_change_roam_scan_channel_list(mac_handle_t mac_handle, |
| 1063 | uint8_t sessionId, |
Liangwei Dong | 075afa7 | 2019-10-30 12:58:22 +0800 | [diff] [blame] | 1064 | uint32_t *channel_freq_list, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1065 | uint8_t numChannels); |
Srinivas Dasari | 25d77b2 | 2019-08-07 16:21:48 +0530 | [diff] [blame] | 1066 | |
| 1067 | /** |
| 1068 | * sme_update_roam_scan_freq_list() - Update roam scan freq list |
| 1069 | * @mac_handle: Opaque handle to the global MAC context |
| 1070 | * @vdev_id: vdev identifier |
| 1071 | * @freq_list: List of frequencies to be configured |
| 1072 | * @num_channels: Number of frequencies to be configured |
| 1073 | * @freq_list_type: Type of frequency list to be configured to |
| 1074 | * |
| 1075 | * Update the frequencies from freq_list to the corresponding channel list |
| 1076 | * in neighborRoamInfo |
| 1077 | * |
| 1078 | * Return: QDF_STATUS |
| 1079 | */ |
| 1080 | QDF_STATUS |
| 1081 | sme_update_roam_scan_freq_list(mac_handle_t mac_handle, uint8_t vdev_id, |
| 1082 | uint32_t *freq_list, uint8_t num_chan, |
| 1083 | uint32_t freq_list_type); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1084 | QDF_STATUS sme_set_ese_roam_scan_channel_list(mac_handle_t mac_handle, |
| 1085 | uint8_t sessionId, |
Liangwei Dong | 075afa7 | 2019-10-30 12:58:22 +0800 | [diff] [blame] | 1086 | uint32_t *chan_freq_list, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1087 | uint8_t numChannels); |
| 1088 | QDF_STATUS sme_get_roam_scan_channel_list(mac_handle_t mac_handle, |
Jianmin Zhu | 203d753 | 2019-10-28 17:17:05 +0800 | [diff] [blame] | 1089 | uint32_t *freq_list, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1090 | uint8_t *pNumChannels, |
| 1091 | uint8_t sessionId); |
Srinivas Dasari | 25d77b2 | 2019-08-07 16:21:48 +0530 | [diff] [blame] | 1092 | /** |
| 1093 | * sme_dump_freq_list() - Dump the frequencies from given chan info |
| 1094 | * @chan_info: Contains the frequency list and number of frequencies |
| 1095 | * |
| 1096 | * Extract number of frequencies and frequency list from chan_info and print |
| 1097 | * to the logs. |
| 1098 | * |
| 1099 | * Return: None |
| 1100 | */ |
| 1101 | void sme_dump_freq_list(tCsrChannelInfo *chan_info); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1102 | bool sme_get_is_ese_feature_enabled(mac_handle_t mac_handle); |
| 1103 | bool sme_get_wes_mode(mac_handle_t mac_handle); |
| 1104 | bool sme_get_roam_scan_control(mac_handle_t mac_handle); |
| 1105 | bool sme_get_is_lfr_feature_enabled(mac_handle_t mac_handle); |
| 1106 | bool sme_get_is_ft_feature_enabled(mac_handle_t mac_handle); |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 1107 | bool sme_is_feature_supported_by_fw(enum cap_bitmap feature); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1108 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1109 | QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode); |
| 1110 | eCsrPhyMode sme_get_phy_mode(mac_handle_t mac_handle); |
| 1111 | QDF_STATUS sme_handoff_request(mac_handle_t mac_handle, uint8_t sessionId, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 1112 | tCsrHandoffRequest *pHandoffInfo); |
Jeff Johnson | 6866088 | 2018-12-16 15:55:56 -0800 | [diff] [blame] | 1113 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1114 | QDF_STATUS sme_add_periodic_tx_ptrn(mac_handle_t mac_handle, |
| 1115 | tSirAddPeriodicTxPtrn *addPeriodicTxPtrnParams); |
| 1116 | QDF_STATUS sme_del_periodic_tx_ptrn(mac_handle_t mac_handle, |
| 1117 | tSirDelPeriodicTxPtrn *delPeriodicTxPtrnParams); |
| 1118 | QDF_STATUS sme_send_rate_update_ind(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1119 | tSirRateUpdateInd *rateUpdateParams); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1120 | QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle, |
| 1121 | uint8_t sessionId, |
| 1122 | tPmkidCacheInfo *pmksa, |
| 1123 | bool flush_cache); |
| 1124 | void sme_get_command_q_status(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1125 | |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1126 | #ifdef FEATURE_WLAN_RMC |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1127 | QDF_STATUS sme_enable_rmc(mac_handle_t mac_handle, uint32_t sessionId); |
| 1128 | QDF_STATUS sme_disable_rmc(mac_handle_t mac_handle, uint32_t sessionId); |
| 1129 | QDF_STATUS sme_send_rmc_action_period(mac_handle_t mac_handle, |
| 1130 | uint32_t sessionId); |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1131 | #endif |
Abhishek Ambure | e0fe68d | 2019-09-18 15:06:32 +0530 | [diff] [blame] | 1132 | |
| 1133 | #ifdef QCA_IBSS_SUPPORT |
| 1134 | /* |
| 1135 | * sme_request_ibss_peer_info() - request ibss peer info |
| 1136 | * @mac_handle: Opaque handle to the global MAC context |
| 1137 | * @cb_context: Pointer to user data |
| 1138 | * @peer_info_cb: Peer info callback |
| 1139 | * @allPeerInfoReqd: All peer info required or not |
| 1140 | * @staIdx: sta index |
| 1141 | * |
| 1142 | * Return: QDF_STATUS |
| 1143 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1144 | QDF_STATUS sme_request_ibss_peer_info(mac_handle_t mac_handle, |
Jeff Johnson | afa022c | 2019-02-26 09:24:17 -0800 | [diff] [blame] | 1145 | void *cb_context, |
Jeff Johnson | d6a2316 | 2019-02-17 16:46:37 -0800 | [diff] [blame] | 1146 | ibss_peer_info_cb peer_info_cb, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1147 | bool allPeerInfoReqd, |
Yeshwanth Sriram Guntuka | 3f26210 | 2019-07-16 15:41:08 +0530 | [diff] [blame] | 1148 | uint8_t *mac_addr); |
Abhishek Ambure | e0fe68d | 2019-09-18 15:06:32 +0530 | [diff] [blame] | 1149 | #else |
| 1150 | static inline |
| 1151 | QDF_STATUS sme_request_ibss_peer_info(mac_handle_t mac_handle, |
| 1152 | void *cb_context, |
| 1153 | ibss_peer_info_cb peer_info_cb, |
| 1154 | bool allPeerInfoReqd, |
Yeshwanth Sriram Guntuka | 4ac1584 | 2019-07-16 15:47:21 +0530 | [diff] [blame] | 1155 | uint8_t *mac_addr) |
Abhishek Ambure | e0fe68d | 2019-09-18 15:06:32 +0530 | [diff] [blame] | 1156 | { |
| 1157 | return QDF_STATUS_SUCCESS; |
| 1158 | } |
| 1159 | #endif |
| 1160 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1161 | QDF_STATUS sme_send_cesium_enable_ind(mac_handle_t mac_handle, |
| 1162 | uint32_t sessionId); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1163 | |
Paul Zhang | 99fe884 | 2017-12-08 14:43:46 +0800 | [diff] [blame] | 1164 | /** |
| 1165 | * sme_set_wlm_latency_level_ind() - Used to set the latency level to fw |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1166 | * @mac_handle |
Paul Zhang | 99fe884 | 2017-12-08 14:43:46 +0800 | [diff] [blame] | 1167 | * @session_id |
| 1168 | * @latency_level |
| 1169 | * |
| 1170 | * Return QDF_STATUS |
| 1171 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1172 | QDF_STATUS sme_set_wlm_latency_level(mac_handle_t mac_handle, |
Paul Zhang | 99fe884 | 2017-12-08 14:43:46 +0800 | [diff] [blame] | 1173 | uint16_t session_id, |
| 1174 | uint16_t latency_level); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1175 | /* |
| 1176 | * SME API to enable/disable idle mode powersave |
| 1177 | * This should be called only if powersave offload |
| 1178 | * is enabled |
| 1179 | */ |
Arunk Khandavalli | 847969d | 2017-09-25 15:15:36 +0530 | [diff] [blame] | 1180 | QDF_STATUS sme_set_idle_powersave_config(bool value); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1181 | QDF_STATUS sme_notify_modem_power_state(mac_handle_t mac_handle, |
| 1182 | uint32_t value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1183 | |
| 1184 | /*SME API to convert convert the ini value to the ENUM used in csr and MAC*/ |
| 1185 | ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1186 | int sme_update_ht_config(mac_handle_t mac_handle, uint8_t sessionId, |
| 1187 | uint16_t htCapab, |
| 1188 | int value); |
| 1189 | int16_t sme_get_ht_config(mac_handle_t mac_handle, uint8_t session_id, |
| 1190 | uint16_t ht_capab); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1191 | #ifdef QCA_HT_2040_COEX |
Yeshwanth Sriram Guntuka | 3f26210 | 2019-07-16 15:41:08 +0530 | [diff] [blame] | 1192 | QDF_STATUS sme_notify_ht2040_mode(mac_handle_t mac_handle, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1193 | struct qdf_mac_addr macAddrSTA, |
| 1194 | uint8_t sessionId, |
| 1195 | uint8_t channel_type); |
| 1196 | QDF_STATUS sme_set_ht2040_mode(mac_handle_t mac_handle, uint8_t sessionId, |
| 1197 | uint8_t channel_type, bool obssEnabled); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1198 | #endif |
bings | e063e4f | 2019-10-31 18:26:46 +0800 | [diff] [blame] | 1199 | |
| 1200 | /** |
| 1201 | * sme_get_reg_info() - To get tx power information |
| 1202 | * @mac_handle: Opaque handle to the global MAC context |
| 1203 | * @chan_freq: channel freq |
| 1204 | * @regInfo1: first reg info to fill |
| 1205 | * @regInfo2: second reg info to fill |
| 1206 | * |
| 1207 | * This routine will give you tx power information |
| 1208 | * |
| 1209 | * Return: QDF_STATUS |
| 1210 | */ |
| 1211 | QDF_STATUS sme_get_reg_info(mac_handle_t mac_handle, uint32_t chan_freq, |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1212 | uint32_t *regInfo1, uint32_t *regInfo2); |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1213 | |
| 1214 | #ifdef FEATURE_WLAN_CH_AVOID |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1215 | QDF_STATUS sme_ch_avoid_update_req(mac_handle_t mac_handle); |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1216 | #else |
| 1217 | static inline |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1218 | QDF_STATUS sme_ch_avoid_update_req(mac_handle_t mac_handle) |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1219 | { |
| 1220 | return QDF_STATUS_SUCCESS; |
| 1221 | } |
| 1222 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1223 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
Jeff Johnson | eb7bbed | 2019-02-17 10:34:24 -0800 | [diff] [blame] | 1224 | /** |
| 1225 | * sme_set_auto_shutdown_cb() - Register auto shutdown evt handler |
| 1226 | * @mac_handle: Handle to the global MAC context |
| 1227 | * @callback_fn: callback function to be invoked when an auto shutdown |
| 1228 | * event is received |
| 1229 | * |
| 1230 | * Return: QDF_STATUS |
| 1231 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1232 | QDF_STATUS sme_set_auto_shutdown_cb(mac_handle_t mac_handle, |
Jeff Johnson | eb7bbed | 2019-02-17 10:34:24 -0800 | [diff] [blame] | 1233 | void (*callback_fn)(void)); |
| 1234 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1235 | QDF_STATUS sme_set_auto_shutdown_timer(mac_handle_t mac_handle, |
| 1236 | uint32_t timer_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1237 | #endif |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1238 | QDF_STATUS sme_roam_channel_change_req(mac_handle_t mac_handle, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 1239 | struct qdf_mac_addr bssid, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 1240 | struct ch_params *ch_params, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 1241 | struct csr_roam_profile *profile); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 1242 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1243 | QDF_STATUS sme_roam_start_beacon_req(mac_handle_t mac_handle, |
| 1244 | struct qdf_mac_addr bssid, |
| 1245 | uint8_t dfsCacWaitStatus); |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1246 | |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1247 | /** |
Tushnim Bhattacharyya | faa9c01 | 2019-10-28 15:18:36 -0700 | [diff] [blame] | 1248 | * sme_roam_csa_ie_request() - request CSA IE transmission from PE |
| 1249 | * @mac_handle: handle returned by mac_open |
| 1250 | * @bssid: SAP bssid |
| 1251 | * @target_chan_freq: target channel frequency information |
| 1252 | * @csaIeReqd: CSA IE Request |
| 1253 | * @ch_params: channel information |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1254 | * |
| 1255 | * Return: QDF_STATUS |
| 1256 | */ |
Jeff Johnson | 0a8786a | 2018-12-02 10:49:01 -0800 | [diff] [blame] | 1257 | QDF_STATUS sme_csa_restart(struct mac_context *mac_ctx, uint8_t session_id); |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 1258 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1259 | QDF_STATUS sme_roam_csa_ie_request(mac_handle_t mac_handle, |
| 1260 | struct qdf_mac_addr bssid, |
Tushnim Bhattacharyya | faa9c01 | 2019-10-28 15:18:36 -0700 | [diff] [blame] | 1261 | uint32_t target_chan_freq, uint8_t csaIeReqd, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 1262 | struct ch_params *ch_params); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 1263 | |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 1264 | /** |
| 1265 | * sme_set_addba_accept() - Allow/Reject the ADDBA req session |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1266 | * @mac_handle: handle returned by mac_open |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 1267 | * @session_id: sme session id |
| 1268 | * @value: Allow/Reject AddBA session |
| 1269 | * |
| 1270 | * Allows/Rejects the ADDBA req session |
| 1271 | * |
| 1272 | * Return: 0 on success else errno |
| 1273 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1274 | int sme_set_addba_accept(mac_handle_t mac_handle, uint8_t session_id, |
| 1275 | int value); |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 1276 | |
Manikandan Mohan | 9045e2e | 2018-11-26 16:44:19 -0800 | [diff] [blame] | 1277 | QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 1278 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1279 | QDF_STATUS sme_set_thermal_level(mac_handle_t mac_handle, uint8_t level); |
Jeff Johnson | 19ce8d0 | 2019-02-08 22:56:23 -0800 | [diff] [blame] | 1280 | QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle, |
| 1281 | struct tx_power_limit *psmetx); |
Jeff Johnson | e943bca | 2019-02-08 22:45:17 -0800 | [diff] [blame] | 1282 | |
| 1283 | /** |
| 1284 | * sme_get_link_speed() - Retrieve current link speed |
| 1285 | * @mac_handle: Global MAC handle |
| 1286 | * @req: Link speed request structure |
| 1287 | * @context: User context to be passed back when invoking @cb |
| 1288 | * @cb: Callback function to be invoked with link speed results |
| 1289 | * |
| 1290 | * Return: QDF_STATUS_SUCCESS if the request was accepted, otherwise |
| 1291 | * an appropriate error status. |
| 1292 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1293 | QDF_STATUS sme_get_link_speed(mac_handle_t mac_handle, |
Jeff Johnson | e943bca | 2019-02-08 22:45:17 -0800 | [diff] [blame] | 1294 | struct link_speed_info *req, |
| 1295 | void *context, |
| 1296 | sme_link_speed_cb cb); |
| 1297 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1298 | QDF_STATUS sme_modify_add_ie(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1299 | tSirModifyIE *pModifyIE, eUpdateIEsType updateType); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1300 | QDF_STATUS sme_update_add_ie(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1301 | tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1302 | QDF_STATUS sme_update_connect_debug(mac_handle_t mac_handle, |
| 1303 | uint32_t set_value); |
Rajeev Kumar | 43e25b1 | 2016-04-15 16:26:36 -0700 | [diff] [blame] | 1304 | const char *sme_bss_type_to_string(const uint8_t bss_type); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1305 | QDF_STATUS sme_ap_disable_intra_bss_fwd(mac_handle_t mac_handle, |
| 1306 | uint8_t sessionId, |
| 1307 | bool disablefwd); |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 1308 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1309 | /** |
| 1310 | * sme_send_unit_test_cmd() - send unit test command to lower layer |
| 1311 | * @session_id: sme session id to be filled while forming the command |
| 1312 | * @module_id: module id given by user to be filled in the command |
| 1313 | * @arg_count: number of argument count |
| 1314 | * @arg: pointer to argument list |
| 1315 | * |
| 1316 | * This API exposed to HDD layer which takes the argument from user and sends |
| 1317 | * down to lower layer for further processing |
| 1318 | * |
| 1319 | * Return: QDF_STATUS based on overall success |
| 1320 | */ |
| 1321 | QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id, |
| 1322 | uint32_t arg_count, uint32_t *arg); |
| 1323 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1324 | typedef struct sStatsExtRequestReq { |
| 1325 | uint32_t request_data_len; |
| 1326 | uint8_t *request_data; |
| 1327 | } tStatsExtRequestReq, *tpStatsExtRequestReq; |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 1328 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1329 | #ifdef WLAN_FEATURE_STATS_EXT |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1330 | /** |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 1331 | * sme_stats_ext_register_callback() - Register stats ext callback |
| 1332 | * @mac_handle: Opaque handle to the MAC context |
| 1333 | * @callback: Function to be invoked for stats ext events |
| 1334 | * |
| 1335 | * This function is called to register the callback that send vendor |
| 1336 | * event for stats ext |
| 1337 | */ |
| 1338 | void sme_stats_ext_register_callback(mac_handle_t mac_handle, |
| 1339 | stats_ext_cb callback); |
| 1340 | |
| 1341 | /** |
| 1342 | * sme_stats_ext_deregister_callback() - Deregister stats ext callback |
| 1343 | * @mac_handle: Opaque handle to the MAC context |
| 1344 | * |
| 1345 | * This function is called to deregister the callback that send vendor |
| 1346 | * event for stats ext |
| 1347 | */ |
| 1348 | void sme_stats_ext_deregister_callback(mac_handle_t mac_handle); |
| 1349 | |
| 1350 | /** |
| 1351 | * sme_stats_ext2_register_callback() - Register stats ext2 callback |
| 1352 | * @mac_handle: Opaque handle to the MAC context |
| 1353 | * @callback: Function to be invoked for stats ext2 events |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1354 | * |
| 1355 | * This function will register a callback for frame aggregation failure |
| 1356 | * indications processing. |
| 1357 | * |
| 1358 | * Return: void |
| 1359 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1360 | void sme_stats_ext2_register_callback(mac_handle_t mac_handle, |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 1361 | stats_ext2_cb callback); |
| 1362 | |
| 1363 | QDF_STATUS sme_stats_ext_request(uint8_t session_id, |
| 1364 | tpStatsExtRequestReq input); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1365 | #else |
| 1366 | static inline void |
| 1367 | sme_stats_ext_register_callback(mac_handle_t mac_handle, |
| 1368 | stats_ext_cb callback) |
| 1369 | { |
| 1370 | } |
| 1371 | |
| 1372 | static inline void |
Min Liu | d35ae31 | 2019-05-08 15:43:13 +0800 | [diff] [blame] | 1373 | sme_stats_ext_deregister_callback(mac_handle_t mac_handle) |
| 1374 | { |
| 1375 | } |
| 1376 | |
| 1377 | static inline void |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1378 | sme_stats_ext2_register_callback(mac_handle_t mac_handle, |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1379 | stats_ext2_cb callback) |
| 1380 | { |
| 1381 | } |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 1382 | #endif /* WLAN_FEATURE_STATS_EXT */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1383 | QDF_STATUS sme_update_dfs_scan_mode(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1384 | uint8_t sessionId, |
| 1385 | uint8_t allowDFSChannelRoam); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1386 | uint8_t sme_get_dfs_scan_mode(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1387 | |
Will Huang | a6af7e1 | 2019-10-31 17:40:06 +0800 | [diff] [blame] | 1388 | /** |
| 1389 | * sme_get_valid_channels_by_band() - to fetch valid channels filtered by band |
| 1390 | * @mac_handle: Opaque handle to the global MAC context |
| 1391 | * @wifi_band: RF band information |
| 1392 | * @valid_chan_list: output array to store channel info |
| 1393 | * @valid_chan_len: output number of channels |
| 1394 | * |
| 1395 | * SME API to fetch all valid channels filtered by band |
| 1396 | * |
| 1397 | * Return: QDF_STATUS |
| 1398 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1399 | QDF_STATUS sme_get_valid_channels_by_band(mac_handle_t mac_handle, |
Will Huang | a6af7e1 | 2019-10-31 17:40:06 +0800 | [diff] [blame] | 1400 | uint8_t wifi_band, |
| 1401 | uint32_t *valid_chan_list, |
| 1402 | uint8_t *valid_chan_len); |
Jeff Johnson | fed9a73 | 2018-07-18 12:18:03 -0700 | [diff] [blame] | 1403 | |
Ashish Kumar Dhanotiya | 1a720e7 | 2019-09-06 15:42:05 +0530 | [diff] [blame] | 1404 | #ifdef FEATURE_WLAN_EXTSCAN |
Jeff Johnson | fed9a73 | 2018-07-18 12:18:03 -0700 | [diff] [blame] | 1405 | /** |
| 1406 | * sme_ext_scan_get_capabilities() - SME API to fetch extscan capabilities |
| 1407 | * @mac_handle: Opaque handle to the MAC context |
| 1408 | * @params: extscan capabilities request structure |
| 1409 | * |
| 1410 | * Return: QDF_STATUS |
| 1411 | */ |
| 1412 | QDF_STATUS |
| 1413 | sme_ext_scan_get_capabilities(mac_handle_t mac_handle, |
| 1414 | struct extscan_capabilities_params *params); |
| 1415 | |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 1416 | /** |
| 1417 | * sme_ext_scan_start() - SME API to issue extscan start |
| 1418 | * @mac_handle: Opaque handle to the MAC context |
| 1419 | * @params: extscan start structure |
| 1420 | * |
| 1421 | * Return: QDF_STATUS |
| 1422 | */ |
| 1423 | QDF_STATUS |
| 1424 | sme_ext_scan_start(mac_handle_t mac_handle, |
| 1425 | struct wifi_scan_cmd_req_params *params); |
| 1426 | |
Jeff Johnson | 7272ea7 | 2018-07-15 17:22:27 -0700 | [diff] [blame] | 1427 | /** |
| 1428 | * sme_ext_scan_stop() - SME API to issue extscan stop |
| 1429 | * @mac_handle: Opaque handle to the MAC context |
| 1430 | * @params: extscan stop structure |
| 1431 | * |
| 1432 | * Return: QDF_STATUS |
| 1433 | */ |
| 1434 | QDF_STATUS sme_ext_scan_stop(mac_handle_t mac_handle, |
| 1435 | struct extscan_stop_req_params *params); |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 1436 | |
| 1437 | /** |
| 1438 | * sme_set_bss_hotlist() - SME API to set BSSID hotlist |
| 1439 | * @mac_handle: Opaque handle to the MAC context |
| 1440 | * @params: extscan set hotlist structure |
| 1441 | * |
| 1442 | * Handles the request to set the BSSID hotlist in firmware. |
| 1443 | * |
| 1444 | * Return: QDF_STATUS |
| 1445 | */ |
| 1446 | QDF_STATUS |
| 1447 | sme_set_bss_hotlist(mac_handle_t mac_handle, |
| 1448 | struct extscan_bssid_hotlist_set_params *params); |
| 1449 | |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 1450 | /** |
| 1451 | * sme_reset_bss_hotlist() - SME API to reset BSSID hotlist |
| 1452 | * @mac_handle: Opaque handle to the MAC context |
| 1453 | * @params: extscan reset hotlist structure |
| 1454 | * |
| 1455 | * Handles the request to reset the BSSID hotlist in firmware. |
| 1456 | * |
| 1457 | * Return: QDF_STATUS |
| 1458 | */ |
| 1459 | QDF_STATUS |
| 1460 | sme_reset_bss_hotlist(mac_handle_t mac_handle, |
| 1461 | struct extscan_bssid_hotlist_reset_params *params); |
| 1462 | |
Jeff Johnson | b43ed03 | 2018-07-16 06:59:21 -0700 | [diff] [blame] | 1463 | /** |
| 1464 | * sme_set_significant_change() - SME API to set significant change |
| 1465 | * @mac_handle: Opaque handle to the MAC context |
| 1466 | * @params: extscan set significant change structure |
| 1467 | * |
| 1468 | * Return: QDF_STATUS |
| 1469 | */ |
| 1470 | QDF_STATUS |
| 1471 | sme_set_significant_change(mac_handle_t mac_handle, |
| 1472 | struct extscan_set_sig_changereq_params *params); |
| 1473 | |
Jeff Johnson | 0c8dbc3 | 2018-07-16 22:10:48 -0700 | [diff] [blame] | 1474 | /** |
| 1475 | * sme_reset_significant_change() - SME API to reset significant change |
| 1476 | * @mac_handle: Opaque handle to the MAC context |
| 1477 | * @params: extscan reset significant change structure |
| 1478 | * |
| 1479 | * Return: QDF_STATUS |
| 1480 | */ |
| 1481 | QDF_STATUS |
| 1482 | sme_reset_significant_change(mac_handle_t mac_handle, |
| 1483 | struct extscan_capabilities_reset_params *params); |
| 1484 | |
Jeff Johnson | 2ba6009 | 2018-07-17 08:19:37 -0700 | [diff] [blame] | 1485 | /** |
| 1486 | * sme_get_cached_results() - SME API to get cached results |
| 1487 | * @mac_handle: Opaque handle to the MAC context |
| 1488 | * @params: extscan get cached results structure |
| 1489 | * |
| 1490 | * Return: QDF_STATUS |
| 1491 | */ |
| 1492 | QDF_STATUS |
| 1493 | sme_get_cached_results(mac_handle_t mac_handle, |
| 1494 | struct extscan_cached_result_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1495 | |
Jeff Johnson | 360135b | 2018-07-18 20:51:47 -0700 | [diff] [blame] | 1496 | /** |
| 1497 | * sme_set_epno_list() - set epno network list |
| 1498 | * @mac_handle: Opaque handle to the MAC context |
| 1499 | * @params: request message |
| 1500 | * |
| 1501 | * This function sends an Enhanced PNO configuration to firmware. |
| 1502 | * |
| 1503 | * Return: QDF_STATUS enumeration |
| 1504 | */ |
| 1505 | QDF_STATUS sme_set_epno_list(mac_handle_t mac_handle, |
| 1506 | struct wifi_enhanced_pno_params *params); |
| 1507 | |
Jeff Johnson | 2a7f101 | 2018-07-19 07:21:06 -0700 | [diff] [blame] | 1508 | /** |
| 1509 | * sme_set_passpoint_list() - set passpoint network list |
| 1510 | * @mac_handle: Opaque handle to the MAC context |
| 1511 | * @params: set passpoint list request parameters |
| 1512 | * |
| 1513 | * This function constructs the cds message and fill in message type, |
| 1514 | * bodyptr with @params and posts it to WDA queue. |
| 1515 | * |
| 1516 | * Return: QDF_STATUS enumeration |
| 1517 | */ |
| 1518 | QDF_STATUS sme_set_passpoint_list(mac_handle_t mac_handle, |
| 1519 | struct wifi_passpoint_req_param *params); |
| 1520 | |
| 1521 | /** |
| 1522 | * sme_reset_passpoint_list() - reset passpoint network list |
| 1523 | * @mac_handle: Opaque handle to the MAC context |
| 1524 | * @params: reset passpoint list request parameters |
| 1525 | * |
| 1526 | * Return: QDF_STATUS enumeration |
| 1527 | */ |
| 1528 | QDF_STATUS sme_reset_passpoint_list(mac_handle_t mac_handle, |
| 1529 | struct wifi_passpoint_req_param *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1530 | |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 1531 | QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle, |
| 1532 | ext_scan_ind_cb ext_scan_ind_cb); |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1533 | #else |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 1534 | static inline |
| 1535 | QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle, |
| 1536 | ext_scan_ind_cb ext_scan_ind_cb) |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1537 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1538 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 1539 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1540 | #endif /* FEATURE_WLAN_EXTSCAN */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1541 | QDF_STATUS sme_abort_roam_scan(mac_handle_t mac_handle, uint8_t sessionId); |
gaurank kathpalia | 3180067 | 2019-11-22 13:50:11 +0530 | [diff] [blame] | 1542 | |
| 1543 | /** |
| 1544 | * sme_get_vht_ch_width() - SME API to get the max supported FW chan width |
| 1545 | * |
| 1546 | * Return: Max channel width supported by FW (eg. 20, 40, 80, 160, 80+80) |
| 1547 | */ |
| 1548 | uint32_t sme_get_vht_ch_width(void); |
| 1549 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1550 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1551 | QDF_STATUS sme_ll_stats_clear_req(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1552 | tSirLLStatsClearReq * pclearStatsReq); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1553 | QDF_STATUS sme_ll_stats_set_req(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1554 | tSirLLStatsSetReq *psetStatsReq); |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 1555 | |
| 1556 | /** |
| 1557 | * sme_ll_stats_get_req() - SME API to get the Link Layer Statistics |
| 1558 | * @mac_handle: Global MAC handle |
| 1559 | * @get_stats_req: Link Layer get stats request params structure |
| 1560 | * @context: Callback context |
| 1561 | * |
| 1562 | * Return: QDF_STATUS |
| 1563 | */ |
| 1564 | QDF_STATUS sme_ll_stats_get_req(mac_handle_t mac_handle, |
| 1565 | tSirLLStatsGetReq *get_stats_req, |
| 1566 | void *context); |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1567 | |
| 1568 | /** |
| 1569 | * sme_set_link_layer_stats_ind_cb() - |
| 1570 | * SME API to trigger the stats are available after get request |
| 1571 | * @mac_handle: MAC handle |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 1572 | * @callback: HDD callback which needs to be invoked after |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1573 | * getting status notification from FW |
| 1574 | * |
| 1575 | * Return: QDF_STATUS |
| 1576 | */ |
| 1577 | QDF_STATUS sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle, |
| 1578 | link_layer_stats_cb callback); |
| 1579 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1580 | QDF_STATUS sme_set_link_layer_ext_cb(mac_handle_t mac_handle, |
Jeff Johnson | 2d29212 | 2018-06-02 21:02:02 -0700 | [diff] [blame] | 1581 | void (*ll_stats_ext_cb)(hdd_handle_t callback_ctx, |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 1582 | tSirLLStatsResults * rsp)); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1583 | QDF_STATUS sme_reset_link_layer_stats_ind_cb(mac_handle_t mac_handle); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1584 | QDF_STATUS sme_ll_stats_set_thresh(mac_handle_t mac_handle, |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 1585 | struct sir_ll_ext_stats_threshold *threshold); |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1586 | #else /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 1587 | static inline QDF_STATUS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1588 | sme_set_link_layer_ext_cb(mac_handle_t mac_handle, void (*ll_stats_ext_cb) |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1589 | (hdd_handle_t callback_ctx, tSirLLStatsResults |
| 1590 | *rsp)) |
| 1591 | { |
| 1592 | return QDF_STATUS_SUCCESS; |
| 1593 | } |
| 1594 | |
| 1595 | static inline QDF_STATUS |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 1596 | sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle, |
| 1597 | link_layer_stats_cb callback) |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1598 | { |
| 1599 | return QDF_STATUS_SUCCESS; |
| 1600 | } |
| 1601 | |
| 1602 | static inline QDF_STATUS |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1603 | sme_reset_link_layer_stats_ind_cb(mac_handle_t mac_handle) |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 1604 | { |
| 1605 | return QDF_STATUS_SUCCESS; |
| 1606 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1607 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 1608 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1609 | QDF_STATUS sme_set_wisa_params(mac_handle_t mac_handle, |
| 1610 | struct sir_wisa_params *wisa_params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1611 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Jeff Johnson | d5fb2db | 2018-11-08 14:20:28 -0800 | [diff] [blame] | 1612 | QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(mac_handle_t mac_handle, |
Deepak Dhamdhere | f2a7d8b | 2016-08-19 16:17:38 -0700 | [diff] [blame] | 1613 | uint8_t session_id, |
| 1614 | bool key_mgmt_offload_enabled, |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 1615 | struct pmkid_mode_bits *pmkid_modes); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1616 | #endif |
Jeff Johnson | ca7a716 | 2018-07-07 12:56:54 -0700 | [diff] [blame] | 1617 | QDF_STATUS sme_get_link_status(mac_handle_t mac_handle, |
| 1618 | csr_link_status_callback callback, |
| 1619 | void *context, uint8_t session_id); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1620 | QDF_STATUS sme_get_temperature(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1621 | void *tempContext, |
| 1622 | void (*pCallbackfn)(int temperature, |
| 1623 | void *pContext)); |
Jeff Johnson | 9d45f33 | 2019-01-29 08:42:00 -0800 | [diff] [blame] | 1624 | |
| 1625 | /** |
| 1626 | * sme_set_scanning_mac_oui() - SME API to set scanning mac oui |
| 1627 | * @mac_handle: MAC Handle |
| 1628 | * @scan_mac_oui: Scanning Mac Oui |
| 1629 | * |
| 1630 | * Return: QDF_STATUS |
| 1631 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1632 | QDF_STATUS sme_set_scanning_mac_oui(mac_handle_t mac_handle, |
Jeff Johnson | 9d45f33 | 2019-01-29 08:42:00 -0800 | [diff] [blame] | 1633 | struct scan_mac_oui *scan_mac_oui); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1634 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1635 | #ifdef DHCP_SERVER_OFFLOAD |
Jeff Johnson | 8bfc29e | 2019-02-15 07:58:15 -0800 | [diff] [blame] | 1636 | /** |
| 1637 | * sme_set_dhcp_srv_offload() - Set DHCP server offload |
| 1638 | * @mac_handle: Handle to the global MAC context |
| 1639 | * @dhcp_srv_info : DHCP server offload info struct |
| 1640 | * |
| 1641 | * Return: QDF_STATUS |
| 1642 | */ |
| 1643 | QDF_STATUS |
| 1644 | sme_set_dhcp_srv_offload(mac_handle_t mac_handle, |
| 1645 | struct dhcp_offload_info_params *dhcp_srv_info); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1646 | #endif /* DHCP_SERVER_OFFLOAD */ |
| 1647 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1648 | QDF_STATUS sme_set_led_flashing(mac_handle_t mac_handle, uint8_t type, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1649 | uint32_t x0, uint32_t x1); |
| 1650 | #endif |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1651 | QDF_STATUS sme_enable_dfs_chan_scan(mac_handle_t mac_handle, uint8_t dfs_flag); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1652 | QDF_STATUS sme_set_mas(uint32_t val); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1653 | QDF_STATUS sme_set_miracast(mac_handle_t mac_handle, uint8_t filter_type); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1654 | QDF_STATUS sme_ext_change_channel(mac_handle_t mac_handle, uint32_t channel, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1655 | uint8_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1656 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1657 | QDF_STATUS sme_configure_stats_avg_factor(mac_handle_t mac_handle, |
| 1658 | uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1659 | uint16_t stats_avg_factor); |
| 1660 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1661 | QDF_STATUS sme_configure_guard_time(mac_handle_t mac_handle, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1662 | uint32_t guard_time); |
| 1663 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1664 | QDF_STATUS sme_wifi_start_logger(mac_handle_t mac_handle, |
| 1665 | struct sir_wifi_start_log start_log); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1666 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1667 | bool sme_neighbor_middle_of_roaming(mac_handle_t mac_handle, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1668 | uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1669 | |
Jeff Johnson | 4089414 | 2018-11-17 12:05:54 -0800 | [diff] [blame] | 1670 | /** |
Padma, Santhosh Kumar | 86747ec | 2018-05-29 18:28:29 +0530 | [diff] [blame] | 1671 | * sme_is_any_session_in_middle_of_roaming() - check if roaming is in progress |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1672 | * @mac_handle: MAC Handle |
Padma, Santhosh Kumar | 86747ec | 2018-05-29 18:28:29 +0530 | [diff] [blame] | 1673 | * |
| 1674 | * Checks if any SME session is in middle of roaming |
| 1675 | * |
Jeff Johnson | 4089414 | 2018-11-17 12:05:54 -0800 | [diff] [blame] | 1676 | * Return: true if roaming is in progress else false |
Padma, Santhosh Kumar | 86747ec | 2018-05-29 18:28:29 +0530 | [diff] [blame] | 1677 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1678 | bool sme_is_any_session_in_middle_of_roaming(mac_handle_t mac_handle); |
Padma, Santhosh Kumar | 86747ec | 2018-05-29 18:28:29 +0530 | [diff] [blame] | 1679 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1680 | /** |
Jeff Johnson | 4089414 | 2018-11-17 12:05:54 -0800 | [diff] [blame] | 1681 | * sme_send_flush_logs_cmd_to_fw() - Initiate command to FW to flush logs |
| 1682 | * |
| 1683 | * This function will initiate a command to firmware to flush their logs. |
| 1684 | * This should normally be done in response to an anomaly detected by the |
| 1685 | * host. |
| 1686 | * |
| 1687 | * Return: QDF_STATUS_SUCCESS if the command was sent, otherwise an |
| 1688 | * appropriate QDF_STATUS error |
| 1689 | */ |
| 1690 | QDF_STATUS sme_send_flush_logs_cmd_to_fw(void); |
| 1691 | |
| 1692 | /** |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1693 | * sme_enable_uapsd_for_ac() - enable uapsd for access category request to WMA |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1694 | * @ac: access category |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1695 | * @tid: tid value |
| 1696 | * @pri: user priority |
| 1697 | * @srvc_int: service interval |
| 1698 | * @sus_int: suspend interval |
| 1699 | * @dir: tspec direction |
| 1700 | * @psb: PSB value |
| 1701 | * @sessionId: session id |
| 1702 | * @delay_interval: delay interval |
| 1703 | * |
| 1704 | * Return: QDF status |
| 1705 | */ |
Sourav Mohapatra | a3cf12a | 2019-08-19 15:40:49 +0530 | [diff] [blame] | 1706 | QDF_STATUS sme_enable_uapsd_for_ac(sme_ac_enum_type ac, uint8_t tid, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1707 | uint8_t pri, uint32_t srvc_int, |
| 1708 | uint32_t sus_int, |
| 1709 | enum sme_qos_wmm_dir_type dir, |
| 1710 | uint8_t psb, uint32_t sessionId, |
| 1711 | uint32_t delay_interval); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1712 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1713 | /** |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1714 | * sme_disable_uapsd_for_ac() - disable uapsd access category request to WMA |
Jeff Johnson | 698eacd | 2018-05-12 17:00:03 -0700 | [diff] [blame] | 1715 | * @ac: access category |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1716 | * @sessionId: session id |
| 1717 | * |
| 1718 | * Return: QDF status |
| 1719 | */ |
Sourav Mohapatra | a3cf12a | 2019-08-19 15:40:49 +0530 | [diff] [blame] | 1720 | QDF_STATUS sme_disable_uapsd_for_ac(sme_ac_enum_type ac, uint32_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1721 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1722 | #ifdef FEATURE_RSSI_MONITOR |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1723 | QDF_STATUS sme_set_rssi_monitoring(mac_handle_t mac_handle, |
Jeff Johnson | 4c6d40f | 2019-02-22 20:49:56 -0800 | [diff] [blame] | 1724 | struct rssi_monitor_param *input); |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 1725 | |
| 1726 | /** |
| 1727 | * sme_set_rssi_threshold_breached_cb() - Set RSSI threshold breached callback |
| 1728 | * @mac_handle: global MAC handle |
| 1729 | * @cb: callback function pointer |
| 1730 | * |
| 1731 | * This function registers the RSSI threshold breached callback function. |
| 1732 | * |
| 1733 | * Return: QDF_STATUS enumeration. |
| 1734 | */ |
| 1735 | QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle, |
| 1736 | rssi_threshold_breached_cb cb); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1737 | #else /* FEATURE_RSSI_MONITOR */ |
| 1738 | static inline |
| 1739 | QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle, |
| 1740 | rssi_threshold_breached_cb cb) |
| 1741 | { |
| 1742 | return QDF_STATUS_SUCCESS; |
| 1743 | } |
| 1744 | #endif |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 1745 | /** |
| 1746 | * sme_reset_rssi_threshold_breached_cb() - Reset RSSI threshold breached |
| 1747 | * callback |
| 1748 | * @mac_handle: global MAC handle |
| 1749 | * |
| 1750 | * This function de-registers the RSSI threshold breached callback function. |
| 1751 | * |
| 1752 | * Return: QDF_STATUS enumeration. |
| 1753 | */ |
| 1754 | 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] | 1755 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1756 | QDF_STATUS sme_register_mgmt_frame_ind_callback(mac_handle_t mac_handle, |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 1757 | sir_mgmt_frame_ind_callback callback); |
| 1758 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1759 | QDF_STATUS sme_update_nss(mac_handle_t mac_handle, uint8_t nss); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1760 | void sme_update_user_configured_nss(mac_handle_t mac_handle, uint8_t nss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1761 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1762 | bool sme_is_any_session_in_connected_state(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1763 | |
Krunal Soni | 8a090df | 2018-05-03 15:02:54 -0700 | [diff] [blame] | 1764 | QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list *msg); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1765 | QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1766 | QDF_STATUS sme_nss_update_request(uint32_t vdev_id, |
Liangwei Dong | 8c65f23 | 2019-10-23 15:42:59 +0800 | [diff] [blame] | 1767 | uint8_t new_nss, uint8_t ch_width, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1768 | policy_mgr_nss_update_cback cback, |
| 1769 | uint8_t next_action, |
| 1770 | struct wlan_objmgr_psoc *psoc, |
| 1771 | enum policy_mgr_conn_update_reason reason, |
| 1772 | uint32_t original_vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1773 | |
| 1774 | typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1775 | QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1776 | sme_peer_authorized_fp auth_fp, |
| 1777 | uint32_t vdev_id); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1778 | QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1779 | QDF_STATUS sme_soc_set_antenna_mode(mac_handle_t mac_handle, |
| 1780 | struct sir_antenna_mode_param *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1781 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1782 | void sme_setdef_dot11mode(mac_handle_t mac_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1783 | |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 1784 | /** |
| 1785 | * sme_update_tx_bfee_supp() - sets the Tx Bfee support |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 1786 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 1787 | * @session_id: SME session id |
| 1788 | * @cfg_val: Tx Bfee config value |
| 1789 | * |
| 1790 | * Return: 0 on success else err code |
| 1791 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1792 | int sme_update_tx_bfee_supp(mac_handle_t mac_handle, uint8_t session_id, |
| 1793 | uint8_t cfg_val); |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 1794 | |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 1795 | /** |
| 1796 | * sme_update_tx_bfee_nsts() - sets the Tx Bfee nsts |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1797 | * @mac_handle: MAC handle |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 1798 | * @session_id: SME session id |
| 1799 | * @usr_cfg_val: user config value |
| 1800 | * @nsts_val: Tx Bfee nsts config value |
| 1801 | * |
| 1802 | * Return: 0 on success else err code |
| 1803 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1804 | int sme_update_tx_bfee_nsts(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 1805 | uint8_t usr_cfg_val, uint8_t nsts_val); |
| 1806 | |
Jeff Johnson | 1856266 | 2018-11-09 14:27:23 -0800 | [diff] [blame] | 1807 | void wlan_sap_enable_phy_error_logs(mac_handle_t mac_handle, |
| 1808 | uint32_t enable_log); |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1809 | #ifdef WLAN_FEATURE_DSRC |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1810 | int sme_ocb_gen_timing_advert_frame(mac_handle_t mac_handle, |
| 1811 | tSirMacAddr self_addr, |
Naveen Rawat | b4d3762 | 2015-11-13 16:15:25 -0800 | [diff] [blame] | 1812 | uint8_t **buf, uint32_t *timestamp_offset, |
| 1813 | uint32_t *time_value_offset); |
| 1814 | |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1815 | #else |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1816 | static inline |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1817 | int sme_ocb_gen_timing_advert_frame(mac_handle_t mac_handle, |
| 1818 | tSirMacAddr self_addr, uint8_t **buf, |
| 1819 | uint32_t *timestamp_offset, |
| 1820 | uint32_t *time_value_offset) |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1821 | { |
| 1822 | return 0; |
| 1823 | } |
| 1824 | |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1825 | #endif |
Kiran Kumar Lokere | 1a43bcf | 2018-05-15 15:51:58 -0700 | [diff] [blame] | 1826 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1827 | void sme_add_set_thermal_level_callback(mac_handle_t mac_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1828 | sme_set_thermal_level_callback callback); |
| 1829 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1830 | void sme_update_tgt_services(mac_handle_t mac_handle, |
| 1831 | struct wma_tgt_services *cfg); |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1832 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1833 | bool sme_validate_sap_channel_switch(mac_handle_t mac_handle, |
Tushnim Bhattacharyya | faa9c01 | 2019-10-28 15:18:36 -0700 | [diff] [blame] | 1834 | uint32_t sap_ch_freq, eCsrPhyMode sap_phy_mode, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1835 | uint8_t cc_switch_mode, |
| 1836 | uint8_t session_id); |
| 1837 | |
| 1838 | bool sme_is_session_id_valid(mac_handle_t mac_handle, uint32_t session_id); |
Chandrasekaran, Manishekar | 2859de4 | 2016-02-11 16:17:38 +0530 | [diff] [blame] | 1839 | |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1840 | #ifdef FEATURE_WLAN_TDLS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1841 | void sme_get_opclass(mac_handle_t mac_handle, uint8_t channel, |
| 1842 | uint8_t bw_offset, uint8_t *opclass); |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1843 | #else |
| 1844 | static inline void |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1845 | sme_get_opclass(mac_handle_t mac_handle, uint8_t channel, uint8_t bw_offset, |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1846 | uint8_t *opclass) |
| 1847 | { |
| 1848 | } |
| 1849 | #endif |
| 1850 | |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1851 | #ifdef FEATURE_LFR_SUBNET_DETECTION |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1852 | QDF_STATUS sme_gateway_param_update(mac_handle_t mac_handle, |
Jeff Johnson | 38d0ce6 | 2019-02-22 17:05:14 -0800 | [diff] [blame] | 1853 | struct gateway_update_req_param *request); |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1854 | #endif |
| 1855 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1856 | void sme_update_fine_time_measurement_capab(mac_handle_t mac_handle, |
| 1857 | uint8_t session_id, |
| 1858 | uint32_t val); |
| 1859 | QDF_STATUS sme_ht40_stop_obss_scan(mac_handle_t mac_handle, uint32_t vdev_id); |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 1860 | QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1861 | QDF_STATUS sme_set_tsfcb(mac_handle_t mac_handle, |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1862 | int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx); |
Krunal Soni | e353194 | 2016-04-12 17:43:53 -0700 | [diff] [blame] | 1863 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1864 | QDF_STATUS sme_reset_tsfcb(mac_handle_t mac_handle); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1865 | |
yuanl | 2746f07 | 2018-09-21 19:19:16 +0800 | [diff] [blame] | 1866 | #if defined(WLAN_FEATURE_TSF) && !defined(WLAN_FEATURE_TSF_PLUS_NOIRQ) |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1867 | QDF_STATUS sme_set_tsf_gpio(mac_handle_t mac_handle, uint32_t pinvalue); |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1868 | #endif |
| 1869 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 1870 | QDF_STATUS sme_update_mimo_power_save(mac_handle_t mac_handle, |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1871 | uint8_t is_ht_smps_enabled, |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 1872 | uint8_t ht_smps_mode, |
| 1873 | bool send_smps_action); |
Abhinav Kumar | dbbfd2c | 2019-05-07 12:22:06 +0530 | [diff] [blame] | 1874 | #ifdef WLAN_BCN_RECV_FEATURE |
| 1875 | /** |
| 1876 | * sme_handle_bcn_recv_start() - Enable fw to start sending |
| 1877 | * beacons of the current connected AP |
| 1878 | * @mac_handle: Opaque handle to the global MAC context |
| 1879 | * @vdev_id: SME session id |
Abhinav Kumar | 8475bc3 | 2019-06-05 15:35:56 +0530 | [diff] [blame] | 1880 | * @nth_value: Beacon report period |
Abhinav Kumar | e85ae55 | 2019-06-05 19:02:14 +0530 | [diff] [blame] | 1881 | * @do_not_resume: beacon reporting resume after a pause is completed |
Abhinav Kumar | dbbfd2c | 2019-05-07 12:22:06 +0530 | [diff] [blame] | 1882 | * |
| 1883 | * This function remove beacon filter. It allow fw to send |
| 1884 | * all beacons from connected peer to driver. |
| 1885 | * |
| 1886 | * Return: QDF_STATUS enumeration |
| 1887 | */ |
| 1888 | QDF_STATUS sme_handle_bcn_recv_start(mac_handle_t mac_handle, |
Abhinav Kumar | 8475bc3 | 2019-06-05 15:35:56 +0530 | [diff] [blame] | 1889 | uint32_t vdev_id, |
Abhinav Kumar | e85ae55 | 2019-06-05 19:02:14 +0530 | [diff] [blame] | 1890 | uint32_t nth_value, |
| 1891 | bool do_not_resume); |
Abhinav Kumar | 3922215 | 2019-05-13 23:53:40 +0530 | [diff] [blame] | 1892 | |
| 1893 | /** |
| 1894 | * sme_is_beacon_report_started() - Check bcn recv started |
| 1895 | * @mac_handle: Opaque handle to the global MAC context |
| 1896 | * @session_id: SME session id |
| 1897 | * |
| 1898 | * This function is to check beacon report started or not. |
| 1899 | * |
| 1900 | * Return: true on success |
| 1901 | */ |
| 1902 | bool sme_is_beacon_report_started(mac_handle_t mac_handle, |
| 1903 | uint32_t session_id); |
| 1904 | |
| 1905 | /** |
Abhinav Kumar | e85ae55 | 2019-06-05 19:02:14 +0530 | [diff] [blame] | 1906 | * sme_is_beacon_reporting_do_not_resume() - Check auto resume allowed or not |
| 1907 | * @mac_handle: Opaque handle to the global MAC context |
| 1908 | * @session_id: SME session id |
| 1909 | * |
| 1910 | * This function is to check auto resume of beacon reporting is allowed or not. |
| 1911 | * |
| 1912 | * Return: true on success |
| 1913 | */ |
| 1914 | bool sme_is_beacon_reporting_do_not_resume(mac_handle_t mac_handle, |
| 1915 | uint32_t session_id); |
| 1916 | |
| 1917 | /** |
Abhinav Kumar | 3922215 | 2019-05-13 23:53:40 +0530 | [diff] [blame] | 1918 | * stop_beacon_report() - To stop beacon report |
| 1919 | * @mac_handle: Opaque handle to the global MAC context |
| 1920 | * @session_id: SME session id |
| 1921 | * |
| 1922 | * Return: None |
| 1923 | */ |
| 1924 | void sme_stop_beacon_report(mac_handle_t mac_handle, |
| 1925 | uint32_t session_id); |
| 1926 | |
| 1927 | #else |
| 1928 | static inline |
| 1929 | bool sme_is_beacon_report_started(mac_handle_t mac_handle, |
| 1930 | uint32_t session_id) |
| 1931 | { |
| 1932 | return true; |
| 1933 | } |
| 1934 | |
| 1935 | static inline |
Abhinav Kumar | e85ae55 | 2019-06-05 19:02:14 +0530 | [diff] [blame] | 1936 | bool sme_is_beacon_reporting_do_not_resume(mac_handle_t mac_handle, |
| 1937 | uint32_t session_id) |
| 1938 | { |
| 1939 | return false; |
| 1940 | } |
| 1941 | |
| 1942 | static inline |
Abhinav Kumar | 3922215 | 2019-05-13 23:53:40 +0530 | [diff] [blame] | 1943 | void sme_stop_beacon_report(mac_handle_t mac_handle, |
| 1944 | uint32_t session_id) |
| 1945 | { |
| 1946 | } |
| 1947 | |
Abhinav Kumar | dbbfd2c | 2019-05-07 12:22:06 +0530 | [diff] [blame] | 1948 | #endif |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1949 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1950 | QDF_STATUS sme_add_beacon_filter(mac_handle_t mac_handle, |
| 1951 | uint32_t session_id, uint32_t *ie_map); |
| 1952 | QDF_STATUS sme_remove_beacon_filter(mac_handle_t mac_handle, |
| 1953 | uint32_t session_id); |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 1954 | |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1955 | #ifdef FEATURE_WLAN_APF |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1956 | /** |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1957 | * sme_get_apf_capabilities() - Get APF capabilities |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 1958 | * @mac_handle: Opaque handle to the global MAC context |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1959 | * @callback: Callback function to be called with the result |
| 1960 | * @context: Opaque context to be used by the caller to associate the |
| 1961 | * request with the response |
| 1962 | * |
| 1963 | * This function constructs the cds message and fill in message type, |
| 1964 | * post the same to WDA. |
| 1965 | * |
| 1966 | * Return: QDF_STATUS enumeration |
| 1967 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1968 | QDF_STATUS sme_get_apf_capabilities(mac_handle_t mac_handle, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1969 | apf_get_offload_cb callback, |
| 1970 | void *context); |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1971 | |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1972 | /** |
| 1973 | * sme_set_apf_instructions() - Set APF apf filter instructions. |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 1974 | * @mac_handle: Opaque handle to the global MAC context |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1975 | * @apf_set_offload: struct to set apf filter instructions. |
| 1976 | * |
| 1977 | * APFv2 (Legacy APF) API to set the APF packet filter. |
| 1978 | * |
| 1979 | * Return: QDF_STATUS enumeration. |
| 1980 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1981 | QDF_STATUS sme_set_apf_instructions(mac_handle_t mac_handle, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1982 | struct sir_apf_set_offload |
| 1983 | *apf_set_offload); |
| 1984 | |
| 1985 | /** |
| 1986 | * sme_set_apf_enable_disable - Send apf enable/disable cmd |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 1987 | * @mac_handle: Opaque handle to the global MAC context |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1988 | * @vdev_id: vdev id |
| 1989 | * @apf_enable: true: Enable APF Int., false: Disable APF Int. |
| 1990 | * |
| 1991 | * API to either enable or disable the APF interpreter. |
| 1992 | * |
| 1993 | * Return: QDF_STATUS enumeration. |
| 1994 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 1995 | QDF_STATUS sme_set_apf_enable_disable(mac_handle_t mac_handle, uint8_t vdev_id, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 1996 | bool apf_enable); |
| 1997 | |
| 1998 | /** |
| 1999 | * sme_apf_write_work_memory - Write into the apf work memory |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2000 | * @mac_handle: Opaque handle to the global MAC context |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 2001 | * @write_params: APF parameters for the write operation |
| 2002 | * |
| 2003 | * API for writing into the APF work memory. |
| 2004 | * |
| 2005 | * Return: QDF_STATUS enumeration. |
| 2006 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2007 | QDF_STATUS sme_apf_write_work_memory(mac_handle_t mac_handle, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 2008 | struct wmi_apf_write_memory_params |
| 2009 | *write_params); |
| 2010 | |
| 2011 | /** |
| 2012 | * sme_apf_read_work_memory - Read part of apf work memory |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2013 | * @mac_handle: Opaque handle to the global MAC context |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 2014 | * @read_params: APF parameters for the get operation |
| 2015 | * @callback: callback to handle the the read response |
| 2016 | * |
| 2017 | * API for issuing a APF read memory request. |
| 2018 | * |
| 2019 | * Return: QDF_STATUS enumeration. |
| 2020 | */ |
| 2021 | QDF_STATUS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2022 | sme_apf_read_work_memory(mac_handle_t mac_handle, |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 2023 | struct wmi_apf_read_memory_params *read_params, |
| 2024 | apf_read_mem_cb callback); |
| 2025 | |
| 2026 | #endif /* FEATURE_WLAN_APF */ |
| 2027 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2028 | uint32_t sme_get_wni_dot11_mode(mac_handle_t mac_handle); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2029 | QDF_STATUS sme_create_mon_session(mac_handle_t mac_handle, uint8_t *bssid, |
Rajeev Kumar Sirasanagandla | e3b5991 | 2018-08-24 15:53:31 +0530 | [diff] [blame] | 2030 | uint8_t vdev_id); |
Naveen Rawat | a410c5a | 2016-09-19 14:22:33 -0700 | [diff] [blame] | 2031 | |
Jinwei Chen | bdd977f | 2019-06-14 15:09:30 +0800 | [diff] [blame] | 2032 | /** |
| 2033 | * sme_delete_mon_session() - post message to delete PE session for mon_mode |
| 2034 | * operation |
| 2035 | * @mac_handle: Opaque handle to the global MAC context |
| 2036 | * @vdev_id: sme session id |
| 2037 | * |
| 2038 | * Return: QDF_STATUS_SUCCESS on success, non-zero error code on failure. |
| 2039 | */ |
| 2040 | QDF_STATUS sme_delete_mon_session(mac_handle_t mac_handle, uint8_t vdev_id); |
| 2041 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2042 | void sme_set_vdev_ies_per_band(mac_handle_t mac_handle, uint8_t vdev_id); |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2043 | void sme_set_pdev_ht_vht_ies(mac_handle_t mac_handle, bool enable2x2); |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 2044 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2045 | /** |
| 2046 | * sme_update_vdev_type_nss() - sets the nss per vdev type |
| 2047 | * @mac_handle: Opaque handle to the global MAC context |
| 2048 | * @max_supp_nss: max_supported Nss |
| 2049 | * @band: 5G or 2.4G band |
| 2050 | * |
| 2051 | * Sets the per band Nss for each vdev type based on INI and configured |
| 2052 | * chain mask value. |
| 2053 | * |
| 2054 | * Return: None |
| 2055 | */ |
| 2056 | void sme_update_vdev_type_nss(mac_handle_t mac_handle, uint8_t max_supp_nss, |
gaurank kathpalia | 651abcd | 2018-11-12 22:41:23 +0530 | [diff] [blame] | 2057 | enum nss_chains_band_info band); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2058 | |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 2059 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2060 | void sme_register_p2p_lo_event(mac_handle_t mac_handle, void *context, |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 2061 | p2p_lo_callback callback); |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 2062 | #else |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2063 | static inline void sme_register_p2p_lo_event(mac_handle_t mac_handle, |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 2064 | void *context, |
| 2065 | p2p_lo_callback callback) |
| 2066 | { |
| 2067 | } |
| 2068 | #endif |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 2069 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2070 | QDF_STATUS sme_remove_bssid_from_scan_list(mac_handle_t mac_handle, |
Abhishek Singh | c994160 | 2016-08-09 16:06:22 +0530 | [diff] [blame] | 2071 | tSirMacAddr bssid); |
| 2072 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2073 | QDF_STATUS sme_process_mac_pwr_dbg_cmd(mac_handle_t mac_handle, |
| 2074 | uint32_t session_id, |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 2075 | struct sir_mac_pwr_dbg_cmd* |
| 2076 | dbg_args); |
| 2077 | |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 2078 | void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode, |
| 2079 | uint8_t *nss_2g, uint8_t *nss_5g); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2080 | QDF_STATUS sme_roam_set_default_key_index(mac_handle_t mac_handle, |
| 2081 | uint8_t session_id, |
Masti, Narayanraddi | ab712a7 | 2016-08-04 11:59:11 +0530 | [diff] [blame] | 2082 | uint8_t default_idx); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2083 | void sme_send_disassoc_req_frame(mac_handle_t mac_handle, |
| 2084 | uint8_t session_id, uint8_t *peer_mac, |
| 2085 | uint16_t reason, uint8_t wait_for_ack); |
| 2086 | QDF_STATUS sme_update_access_policy_vendor_ie(mac_handle_t mac_handle, |
| 2087 | uint8_t session_id, |
| 2088 | uint8_t *vendor_ie, |
| 2089 | int access_policy); |
Kondabattini, Ganesh | e4f18e0 | 2016-09-13 13:01:22 +0530 | [diff] [blame] | 2090 | |
Krishna Kumaar Natarajan | f1581df | 2017-02-21 13:42:08 -0800 | [diff] [blame] | 2091 | /** |
| 2092 | * sme_set_peer_param() - set peer param |
| 2093 | * @vdev_id: vdev ID |
| 2094 | * @peer_addr: peer MAC address |
| 2095 | * @param_id: param ID to be updated |
| 2096 | * @param_Value: paraam value |
| 2097 | * |
| 2098 | * This SME API is used to send the peer param to WMA to be sent to FW. |
| 2099 | * |
| 2100 | * Return: QDF_STATUS |
| 2101 | */ |
| 2102 | QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id, |
| 2103 | uint32_t param_value, uint32_t vdev_id); |
| 2104 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2105 | QDF_STATUS sme_update_sta_roam_policy(mac_handle_t mac_handle, |
Agrawal Ashish | 21ba257 | 2016-09-03 16:40:10 +0530 | [diff] [blame] | 2106 | enum sta_roam_policy_dfs_mode dfs_mode, |
| 2107 | bool skip_unsafe_channels, |
Agrawal, Ashish | 9f84c40 | 2016-11-30 16:19:44 +0530 | [diff] [blame] | 2108 | uint8_t session_id, uint8_t sap_operating_band); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2109 | QDF_STATUS sme_enable_disable_chanavoidind_event(mac_handle_t mac_handle, |
Selvaraj, Sridhar | ebda0f2 | 2016-08-29 16:05:23 +0530 | [diff] [blame] | 2110 | uint8_t set_value); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2111 | QDF_STATUS sme_set_default_scan_ie(mac_handle_t mac_handle, uint16_t session_id, |
Deepak Dhamdhere | b106ae5 | 2016-08-10 20:55:30 +0530 | [diff] [blame] | 2112 | uint8_t *ie_data, uint16_t ie_len); |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2113 | /** |
| 2114 | * sme_update_session_param() - API to update PE session param |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2115 | * @mac_handle: Opaque handle to the global MAC context |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2116 | * @session_id: Session ID |
| 2117 | * @param_type: Param type to be updated |
| 2118 | * @param_val: Param value to be update |
| 2119 | * |
| 2120 | * Note: this setting will not persist over reboots. |
| 2121 | * |
| 2122 | * Return: QDF_STATUS |
| 2123 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2124 | QDF_STATUS sme_update_session_param(mac_handle_t mac_handle, uint8_t session_id, |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2125 | uint32_t param_type, uint32_t param_val); |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 2126 | #ifdef WLAN_FEATURE_FIPS |
| 2127 | /** |
| 2128 | * sme_fips_request() - Perform a FIPS certification operation |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2129 | * @mac_handle: Opaque handle to the global MAC context |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 2130 | * @param: The FIPS certification parameters |
| 2131 | * @callback: Callback function to invoke with the results |
| 2132 | * @context: Opaque context to pass back to caller in the callback |
| 2133 | * |
| 2134 | * Return: QDF_STATUS_SUCCESS if the request is successfully sent |
| 2135 | * to firmware for processing, otherwise an error status. |
| 2136 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2137 | QDF_STATUS sme_fips_request(mac_handle_t mac_handle, struct fips_params *param, |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 2138 | wma_fips_cb callback, void *context); |
| 2139 | #else |
| 2140 | static inline |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2141 | QDF_STATUS sme_fips_request(mac_handle_t mac_handle, struct fips_params *param, |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 2142 | wma_fips_cb callback, void *context) |
| 2143 | { |
| 2144 | return QDF_STATUS_E_NOSUPPORT; |
| 2145 | } |
| 2146 | #endif /* WLAN_FEATURE_FIPS */ |
| 2147 | |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 2148 | /** |
| 2149 | * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW. |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2150 | * @mac_handle: Opaque handle to the global MAC context |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 2151 | * |
| 2152 | * Return: QDF_STATUS |
| 2153 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2154 | QDF_STATUS sme_set_cts2self_for_p2p_go(mac_handle_t mac_handle); |
Jeff Johnson | 42246bd | 2018-12-31 11:23:11 -0800 | [diff] [blame] | 2155 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2156 | QDF_STATUS sme_update_tx_fail_cnt_threshold(mac_handle_t mac_handle, |
Agrawal, Ashish | 35b251d | 2016-09-08 19:21:03 +0530 | [diff] [blame] | 2157 | uint8_t session_id, uint32_t tx_fail_count); |
Jeff Johnson | 63dab5d | 2018-12-17 22:44:14 -0800 | [diff] [blame] | 2158 | |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 2159 | /** |
| 2160 | * sme_roam_is_ese_assoc() - Check if association type is ESE |
| 2161 | * @roam_info: Pointer to roam info |
| 2162 | * |
| 2163 | * Return: true if ESE Association, false otherwise. |
| 2164 | */ |
| 2165 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2166 | 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] | 2167 | #else |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2168 | 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] | 2169 | { |
| 2170 | return false; |
| 2171 | } |
| 2172 | #endif |
| 2173 | /** |
| 2174 | * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2175 | * @mac_handle: MAC_HANDLE handle |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 2176 | * @session_id: session id |
| 2177 | * |
| 2178 | * Return: true if 11r Association, false otherwise. |
| 2179 | */ |
Jeff Johnson | d5fb2db | 2018-11-08 14:20:28 -0800 | [diff] [blame] | 2180 | bool sme_neighbor_roam_is11r_assoc(mac_handle_t mac_handle, uint8_t session_id); |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 2181 | |
| 2182 | /** |
| 2183 | * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2184 | * @mac_handle: Handle returned by mac_open |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 2185 | * @sta_inactivity_timer: struct for sta inactivity timer |
| 2186 | * |
| 2187 | * If a station does not send anything in sta_inactivity_timeout seconds, an |
| 2188 | * empty data frame is sent to it in order to verify whether it is |
| 2189 | * still in range. If this frame is not ACKed, the station will be |
| 2190 | * disassociated and then deauthenticated. |
| 2191 | * |
| 2192 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 2193 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2194 | QDF_STATUS sme_update_sta_inactivity_timeout(mac_handle_t mac_handle, |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 2195 | struct sme_sta_inactivity_timeout *sta_inactivity_timer); |
| 2196 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 2197 | /** |
| 2198 | * sme_set_lost_link_info_cb() - plug in callback function for receiving |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 2199 | * @mac_handle: Opaque handle to the MAC context |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 2200 | * @cb: callback function |
| 2201 | * |
| 2202 | * Return: HAL status |
| 2203 | */ |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 2204 | QDF_STATUS sme_set_lost_link_info_cb(mac_handle_t mac_handle, |
| 2205 | lost_link_info_cb cb); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 2206 | |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 2207 | /** |
| 2208 | * sme_update_new_channel_event() - update new channel event for sapFsm |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2209 | * @mac_handle: Opaque handle to the global MAC context |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 2210 | * @session_id: session id |
| 2211 | * |
| 2212 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 2213 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2214 | QDF_STATUS sme_update_new_channel_event(mac_handle_t mac_handle, |
| 2215 | uint8_t session_id); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 2216 | #ifdef WLAN_POWER_DEBUGFS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2217 | QDF_STATUS sme_power_debug_stats_req( |
| 2218 | mac_handle_t mac_handle, |
| 2219 | void (*callback_fn)(struct power_stats_response *response, |
| 2220 | void *context), |
| 2221 | void *power_stats_context); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 2222 | #endif |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 2223 | |
Arunk Khandavalli | ca56d4b | 2018-11-29 15:46:00 +0530 | [diff] [blame] | 2224 | #ifdef WLAN_FEATURE_BEACON_RECEPTION_STATS |
| 2225 | /** |
| 2226 | * sme_beacon_debug_stats_req() - SME API to collect beacon debug stats |
| 2227 | * @vdev_id: Vdev id on which stats is being requested |
| 2228 | * @callback_fn: Pointer to the callback function for beacon stats event |
| 2229 | * @beacon_stats_context: Pointer to context |
| 2230 | * |
| 2231 | * Return: QDF_STATUS |
| 2232 | */ |
| 2233 | QDF_STATUS sme_beacon_debug_stats_req( |
| 2234 | mac_handle_t mac_handle, uint32_t vdev_id, |
| 2235 | void (*callback_fn)(struct bcn_reception_stats_rsp |
| 2236 | *response, void *context), |
| 2237 | void *beacon_stats_context); |
| 2238 | #endif |
| 2239 | |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 2240 | /** |
| 2241 | * sme_get_sar_power_limits() - get SAR limits |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2242 | * @mac_handle: Opaque handle to the global MAC context |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 2243 | * @callback: Callback function to invoke with the results |
| 2244 | * @context: Opaque context to pass back to caller in the callback |
| 2245 | * |
| 2246 | * Return: QDF_STATUS_SUCCESS if the request is successfully sent |
| 2247 | * to firmware for processing, otherwise an error status. |
| 2248 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2249 | QDF_STATUS sme_get_sar_power_limits(mac_handle_t mac_handle, |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 2250 | wma_sar_cb callback, void *context); |
| 2251 | |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 2252 | /** |
| 2253 | * sme_set_sar_power_limits() - set sar limits |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2254 | * @mac_handle: Opaque handle to the global MAC context |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 2255 | * @sar_limit_cmd: struct to send sar limit cmd. |
| 2256 | * |
| 2257 | * Return: QDF_STATUS enumeration. |
| 2258 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2259 | QDF_STATUS sme_set_sar_power_limits(mac_handle_t mac_handle, |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 2260 | struct sar_limit_cmd_params *sar_limit_cmd); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 2261 | |
Dundi Raviteja | 3b63709 | 2018-09-12 13:42:50 +0530 | [diff] [blame] | 2262 | /** |
| 2263 | * sme_send_coex_config_cmd() - Send COEX config params |
| 2264 | * @coex_cfg_params: struct to coex config params |
| 2265 | * |
| 2266 | * Return: QDF_STATUS |
| 2267 | */ |
| 2268 | QDF_STATUS sme_send_coex_config_cmd(struct coex_config_params *coex_cfg_params); |
| 2269 | |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2270 | void sme_set_cc_src(mac_handle_t mac_handle, enum country_src); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 2271 | |
| 2272 | |
| 2273 | #ifdef WLAN_FEATURE_WOW_PULSE |
| 2274 | QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info); |
| 2275 | #endif |
| 2276 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 2277 | /* ARP DEBUG STATS */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2278 | QDF_STATUS sme_set_nud_debug_stats(mac_handle_t mac_handle, |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 2279 | struct set_arp_stats_params |
| 2280 | *set_stats_param); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2281 | QDF_STATUS sme_get_nud_debug_stats(mac_handle_t mac_handle, |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 2282 | struct get_arp_stats_params |
| 2283 | *get_stats_param); |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2284 | QDF_STATUS sme_set_nud_debug_stats_cb(mac_handle_t mac_handle, |
Dundi Raviteja | 3bcf3a8 | 2018-05-22 13:24:18 +0530 | [diff] [blame] | 2285 | void (*cb)(void *, struct rsp_stats *, void *context), |
| 2286 | void *context); |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 2287 | |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 2288 | /** |
| 2289 | * sme_set_chan_info_callback() - Register chan info callback |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2290 | * @mac_handle - MAC global handle |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 2291 | * @callback_routine - callback routine from HDD |
| 2292 | * |
| 2293 | * This API is invoked by HDD to register its callback to mac |
| 2294 | * |
| 2295 | * Return: QDF_STATUS |
| 2296 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2297 | void sme_set_chan_info_callback(mac_handle_t mac_handle, |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 2298 | void (*callback)(struct scan_chan_info *chan_info)); |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 2299 | |
| 2300 | /** |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 2301 | * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2302 | * @mac_handle: handle returned by mac_open |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 2303 | * @profile: current connected profile |
| 2304 | * @bssid: bssid to look for in scan cache |
| 2305 | * @rssi: rssi value found |
| 2306 | * @snr: snr value found |
| 2307 | * |
| 2308 | * Return: QDF_STATUS |
| 2309 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2310 | QDF_STATUS sme_get_rssi_snr_by_bssid(mac_handle_t mac_handle, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2311 | struct csr_roam_profile *profile, |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 2312 | const uint8_t *bssid, int8_t *rssi, |
| 2313 | int8_t *snr); |
| 2314 | |
| 2315 | /** |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 2316 | * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares |
| 2317 | * beacon frame |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2318 | * @mac_handle: handle returned by mac_open |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 2319 | * @profile: current connected profile |
| 2320 | * @bssid: bssid to look for in scan cache |
| 2321 | * @frame_buf: frame buffer to populate |
| 2322 | * @frame_len: length of constructed frame |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 2323 | * @ch_freq: Pointer to channel freq info to be filled |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 2324 | * |
| 2325 | * Return: QDF_STATUS |
| 2326 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2327 | QDF_STATUS sme_get_beacon_frm(mac_handle_t mac_handle, |
| 2328 | struct csr_roam_profile *profile, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2329 | const tSirMacAddr bssid, |
| 2330 | uint8_t **frame_buf, uint32_t *frame_len, |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 2331 | uint32_t *ch_freq); |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 2332 | |
| 2333 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 2334 | /** |
| 2335 | * sme_fast_reassoc() - invokes FAST REASSOC command |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2336 | * @mac_handle: handle returned by mac_open |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 2337 | * @profile: current connected profile |
| 2338 | * @bssid: bssid to look for in scan cache |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 2339 | * @ch_freq: channel on which reassoc should be send |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 2340 | * @vdev_id: vdev id |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 2341 | * @connected_bssid: bssid of currently connected profile |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 2342 | * |
| 2343 | * Return: QDF_STATUS |
| 2344 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2345 | QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle, |
| 2346 | struct csr_roam_profile *profile, |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 2347 | const tSirMacAddr bssid, uint32_t ch_freq, |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 2348 | uint8_t vdev_id, const tSirMacAddr connected_bssid); |
gaurank kathpalia | 7ef7218 | 2019-05-29 19:41:25 +0530 | [diff] [blame] | 2349 | |
| 2350 | /** |
| 2351 | * sme_roam_invoke_nud_fail() - invokes REASSOC command to best available bssid |
| 2352 | * @mac_handle: handle returned by mac_open |
| 2353 | * @vdev_id: vdev id |
| 2354 | * |
| 2355 | * Return: QDF_STATUS |
| 2356 | */ |
| 2357 | QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id); |
| 2358 | |
Jianmin Zhu | 462ab86 | 2019-02-21 11:14:49 +0800 | [diff] [blame] | 2359 | #else |
| 2360 | static inline |
| 2361 | QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle, |
| 2362 | struct csr_roam_profile *profile, |
Manikandan Mohan | 0ba7e55 | 2019-10-23 17:38:35 -0700 | [diff] [blame] | 2363 | const tSirMacAddr bssid, uint32_t ch_freq, |
Jianmin Zhu | 462ab86 | 2019-02-21 11:14:49 +0800 | [diff] [blame] | 2364 | uint8_t vdev_id, const tSirMacAddr connected_bssid) |
| 2365 | { |
| 2366 | return QDF_STATUS_SUCCESS; |
| 2367 | } |
gaurank kathpalia | 7ef7218 | 2019-05-29 19:41:25 +0530 | [diff] [blame] | 2368 | |
| 2369 | static inline |
| 2370 | QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id) |
| 2371 | { |
| 2372 | return QDF_STATUS_SUCCESS; |
| 2373 | } |
| 2374 | |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 2375 | #endif |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 2376 | |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 2377 | /** |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 2378 | * sme_register_tx_queue_cb(): Register tx queue callback |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 2379 | * @mac_handle: Opaque handle for MAC context |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 2380 | * @tx_queue_cb: Transmit Queues callback |
| 2381 | * |
| 2382 | * Return: QDF_STATUS |
| 2383 | */ |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 2384 | QDF_STATUS sme_register_tx_queue_cb(mac_handle_t mac_handle, |
| 2385 | tx_queue_cb tx_queue_cb); |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 2386 | |
| 2387 | /** |
| 2388 | * sme_deregister_tx_queue_cb() - Deregister the tx queue callback |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 2389 | * @mac_handle: Opaque handle for MAC context |
Varun Reddy Yeturu | 076eaa8 | 2018-01-16 12:16:14 -0800 | [diff] [blame] | 2390 | * |
| 2391 | * Return: QDF status |
| 2392 | */ |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 2393 | 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] | 2394 | |
| 2395 | /** |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 2396 | * sme_rso_cmd_status_cb() - Set RSO cmd status callback |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 2397 | * @mac_handle: Opaque handle for the MAC context |
| 2398 | * @cb: HDD Callback to rso command status read |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 2399 | * |
| 2400 | * This function is used to save HDD RSO Command status callback in MAC |
| 2401 | * |
| 2402 | * Return: QDF_STATUS |
| 2403 | */ |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 2404 | QDF_STATUS sme_rso_cmd_status_cb(mac_handle_t mac_handle, |
| 2405 | rso_cmd_status_cb cb); |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 2406 | |
| 2407 | /** |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 2408 | * sme_register_set_connection_info_cb() - Register connection |
| 2409 | * info callback |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2410 | * @mac_handle - MAC global handle |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 2411 | * @set_connection_info_cb - callback routine from HDD to set |
| 2412 | * connection info flag |
| 2413 | * @get_connection_info_cb - callback routine from HDD to get |
| 2414 | * connection info |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 2415 | * |
| 2416 | * This API is invoked by HDD to register its callback to mac |
| 2417 | * |
| 2418 | * Return: QDF_STATUS |
| 2419 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2420 | QDF_STATUS sme_register_set_connection_info_cb(mac_handle_t mac_handle, |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 2421 | bool (*set_connection_info_cb)(bool), |
| 2422 | bool (*get_connection_info_cb)(uint8_t *session_id, |
| 2423 | enum scan_reject_states *reason)); |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 2424 | |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 2425 | /** |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 2426 | * sme_set_dbs_scan_selection_config() - Update DBS scan selection |
| 2427 | * configuration |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2428 | * @mac_handle: The handle returned by macOpen |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 2429 | * @params: wmi_dbs_scan_sel_params config |
| 2430 | * |
| 2431 | * Return: QDF_STATUS if DBS scan selection update |
| 2432 | * configuration success else failure status |
| 2433 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2434 | QDF_STATUS sme_set_dbs_scan_selection_config(mac_handle_t mac_handle, |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 2435 | struct wmi_dbs_scan_sel_params *params); |
| 2436 | |
| 2437 | /** |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 2438 | * sme_store_pdev() - store pdev |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2439 | * @mac_handle - MAC global handle |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 2440 | * @pdev - pdev ptr |
| 2441 | * |
| 2442 | * Return: QDF_STATUS |
| 2443 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2444 | void sme_store_pdev(mac_handle_t mac_handle, struct wlan_objmgr_pdev *pdev); |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 2445 | |
Sandeep Puligilla | f587adf | 2017-04-27 19:53:21 -0700 | [diff] [blame] | 2446 | /** |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 2447 | * sme_set_reorder_timeout() - set reorder timeout value |
| 2448 | * including Voice,Video,Besteffort,Background parameters |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2449 | * @mac_handle: Opaque handle to the global MAC context |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 2450 | * @reg: struct sir_set_rx_reorder_timeout_val |
| 2451 | * |
| 2452 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 2453 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2454 | QDF_STATUS sme_set_reorder_timeout(mac_handle_t mac_handle, |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 2455 | struct sir_set_rx_reorder_timeout_val *req); |
| 2456 | |
| 2457 | /** |
| 2458 | * sme_set_rx_set_blocksize() - set blocksize value |
| 2459 | * including mac_addr and win_limit parameters |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2460 | * @mac_handle: Opaque handle to the global MAC context |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 2461 | * @reg: struct sir_peer_set_rx_blocksize |
| 2462 | * |
| 2463 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 2464 | */ |
| 2465 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2466 | QDF_STATUS sme_set_rx_set_blocksize(mac_handle_t mac_handle, |
| 2467 | struct sir_peer_set_rx_blocksize *req); |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 2468 | |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 2469 | /** |
| 2470 | * sme_get_rcpi() - gets the rcpi value for peer mac addr |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2471 | * @mac_handle: handle returned by mac_open |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 2472 | * @rcpi: rcpi request containing peer mac addr, callback and related info |
| 2473 | * |
| 2474 | * This function posts the rcpi measurement request message to wma queue |
| 2475 | * |
| 2476 | * Return: QDF_STATUS |
| 2477 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2478 | QDF_STATUS sme_get_rcpi(mac_handle_t mac_handle, struct sme_rcpi_req *rcpi); |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 2479 | |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 2480 | /** |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 2481 | * 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] | 2482 | * @mac_handle: opaque handle to the MAC context |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 2483 | * @cb: callback function pointer |
| 2484 | * |
| 2485 | * This function stores the chip power save failure callback function. |
| 2486 | * |
| 2487 | * Return: QDF_STATUS enumeration. |
| 2488 | */ |
| 2489 | |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 2490 | QDF_STATUS sme_set_chip_pwr_save_fail_cb(mac_handle_t mac_handle, |
| 2491 | pwr_save_fail_cb cb); |
Naveen Rawat | 247a868 | 2017-06-05 15:00:31 -0700 | [diff] [blame] | 2492 | /** |
| 2493 | * sme_cli_set_command() - SME wrapper API over WMA "set" command |
| 2494 | * processor cmd |
| 2495 | * @vdev_id: virtual device for the command |
| 2496 | * @param_id: parameter id |
| 2497 | * @sval: parameter value |
| 2498 | * @vpdev: parameter category |
| 2499 | * |
| 2500 | * Command handler for set operations |
| 2501 | * |
| 2502 | * Return: 0 on success, errno on failure |
| 2503 | */ |
| 2504 | 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] | 2505 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2506 | /** |
| 2507 | * 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] | 2508 | * @mac_handle: handle returned by mac_open |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2509 | * @cb: callback handler |
| 2510 | * |
| 2511 | * Return: QDF_STATUS |
| 2512 | */ |
Jeff Johnson | d0b6c7e | 2018-07-04 14:53:06 -0700 | [diff] [blame] | 2513 | QDF_STATUS sme_set_bt_activity_info_cb(mac_handle_t mac_handle, |
| 2514 | bt_activity_info_cb cb); |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 2515 | |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2516 | /** |
Vignesh Viswanathan | a851d75 | 2018-10-03 19:44:38 +0530 | [diff] [blame] | 2517 | * sme_set_enable_mem_deep_sleep - set the mem deep sleep config to FW |
| 2518 | * @mac_handle: handle returned by mac_open |
| 2519 | * @vdev_id: vdev id |
| 2520 | * |
| 2521 | * Return: 0 for success else failure code |
| 2522 | */ |
| 2523 | int sme_set_enable_mem_deep_sleep(mac_handle_t mac_handle, int vdev_id); |
| 2524 | |
| 2525 | /** |
| 2526 | * sme_set_cck_tx_fir_override - set the CCK TX FIR Override to FW |
| 2527 | * @mac_handle: handle returned by mac_open |
| 2528 | * @vdev_id: vdev id |
| 2529 | * |
| 2530 | * Return: 0 for success else failure code |
| 2531 | */ |
| 2532 | int sme_set_cck_tx_fir_override(mac_handle_t mac_handle, int vdev_id); |
| 2533 | |
| 2534 | /** |
Ashish Kumar Dhanotiya | b28338c | 2017-07-21 20:12:34 +0530 | [diff] [blame] | 2535 | * sme_set_smps_cfg() - set SMPS config params |
| 2536 | * @vdev_id: virtual device for the command |
| 2537 | * @param_id: parameter id |
| 2538 | * @param_val: parameter value |
| 2539 | * |
| 2540 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2541 | */ |
| 2542 | |
| 2543 | QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id, |
| 2544 | uint32_t param_val); |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2545 | |
| 2546 | /** |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2547 | * sme_get_peer_info_ext() - sme api to get peer ext info |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2548 | * @mac_handle: Opaque handle to the global MAC context |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2549 | * @req: peer ext info request struct send to wma |
| 2550 | * @context: context of callback function |
| 2551 | * @callbackfn: hdd callback function when receive response |
| 2552 | * |
| 2553 | * This function will send WMA_GET_PEER_INFO_EXT to WMA |
| 2554 | * |
| 2555 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2556 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2557 | QDF_STATUS sme_get_peer_info_ext(mac_handle_t mac_handle, |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 2558 | struct sir_peer_info_ext_req *req, |
| 2559 | void *context, |
| 2560 | void (*callbackfn)(struct sir_peer_info_ext_resp *param, |
| 2561 | void *pcontext)); |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 2562 | |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 2563 | /** |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 2564 | * sme_get_chain_rssi() - Get chain rssi |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2565 | * @mac_handle: Opaque handle to the global MAC context |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 2566 | * @input: get chain rssi req params |
| 2567 | * @callback: Callback function to be called with the result |
| 2568 | * @context: Opaque context to be used by the caller to associate the |
| 2569 | * request with the response |
| 2570 | * |
| 2571 | * This function constructs the cds message and fill in message type, |
| 2572 | * post the same to WDA. |
| 2573 | * |
| 2574 | * Return: QDF_STATUS enumeration |
| 2575 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2576 | QDF_STATUS sme_get_chain_rssi(mac_handle_t mac_handle, |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 2577 | struct get_chain_rssi_req_params *input, |
| 2578 | get_chain_rssi_callback callback, |
| 2579 | void *context); |
Tushnim Bhattacharyya | c3c375e | 2017-08-04 23:39:55 -0700 | [diff] [blame] | 2580 | |
guangde | 4853c40 | 2019-05-06 15:54:04 +0800 | [diff] [blame] | 2581 | /** |
| 2582 | * sme_get_isolation() - sme api to get antenna isolation |
| 2583 | * @mac_handle: hal handle for getting global mac struct |
| 2584 | * @context: context of callback function |
| 2585 | * @callbackfn: hdd callback function when receive response |
| 2586 | * |
| 2587 | * This function will send WMA_GET_ISOLATION to WMA |
| 2588 | * |
| 2589 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2590 | */ |
| 2591 | QDF_STATUS sme_get_isolation(mac_handle_t mac_handle, |
| 2592 | void *context, |
| 2593 | sme_get_isolation_cb callbackfn); |
| 2594 | |
Qun Zhang | ef65562 | 2019-02-25 10:48:10 +0800 | [diff] [blame] | 2595 | #ifdef FEATURE_FW_STATE |
| 2596 | /** |
| 2597 | * sme_get_fw_state() - Get fw state |
| 2598 | * @mac_handle: Opaque handle to the global MAC context |
| 2599 | * @callback: Callback function to be called with the result |
| 2600 | * @context: Opaque context to be used by the caller to associate the |
| 2601 | * request with the response |
| 2602 | * |
| 2603 | * This function constructs the cds message and fill in message type, |
| 2604 | * post the same to WDA. |
| 2605 | * |
| 2606 | * Return: QDF_STATUS enumeration |
| 2607 | */ |
| 2608 | QDF_STATUS sme_get_fw_state(mac_handle_t mac_handle, |
| 2609 | fw_state_callback callback, |
| 2610 | void *context); |
| 2611 | #endif /* FEATURE_FW_STATE */ |
| 2612 | |
Tushnim Bhattacharyya | c3c375e | 2017-08-04 23:39:55 -0700 | [diff] [blame] | 2613 | /** |
| 2614 | * sme_get_valid_channels() - sme api to get valid channels for |
| 2615 | * current regulatory domain |
Manikandan Mohan | 932c11e | 2019-08-14 14:09:08 -0700 | [diff] [blame] | 2616 | * @ch_freq_list: list of the valid channel frequencies |
Tushnim Bhattacharyya | c3c375e | 2017-08-04 23:39:55 -0700 | [diff] [blame] | 2617 | * @list_len: length of the channel list |
| 2618 | * |
| 2619 | * This function will get valid channels for current regulatory |
| 2620 | * domain |
| 2621 | * |
| 2622 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2623 | */ |
Manikandan Mohan | 932c11e | 2019-08-14 14:09:08 -0700 | [diff] [blame] | 2624 | QDF_STATUS sme_get_valid_channels(uint32_t *ch_freq_list, uint32_t *list_len); |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 2625 | |
| 2626 | /** |
| 2627 | * sme_get_mac_context() - sme api to get the pmac context |
| 2628 | * |
| 2629 | * This function will return the pmac context |
| 2630 | * |
| 2631 | * Return: pointer to pmac context |
| 2632 | */ |
Jeff Johnson | 0a8786a | 2018-12-02 10:49:01 -0800 | [diff] [blame] | 2633 | struct mac_context *sme_get_mac_context(void); |
Vignesh Viswanathan | 66c951d | 2017-09-06 12:23:42 +0530 | [diff] [blame] | 2634 | |
| 2635 | /** |
| 2636 | * sme_display_disconnect_stats() - Display per session Disconnect stats |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2637 | * @mac_handle: Opaque handle to the global MAC context |
Vignesh Viswanathan | 66c951d | 2017-09-06 12:23:42 +0530 | [diff] [blame] | 2638 | * session_id: SME session id |
| 2639 | * |
| 2640 | * Return: None |
| 2641 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2642 | void sme_display_disconnect_stats(mac_handle_t mac_handle, uint8_t session_id); |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 2643 | |
| 2644 | /** |
| 2645 | * sme_process_msg_callback() - process callback message from LIM |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 2646 | * @mac: global mac context |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 2647 | * @msg: scheduler message |
| 2648 | * |
| 2649 | * This function process the callback messages from LIM. |
| 2650 | * |
| 2651 | * Return: QDF_STATUS enumeration. |
| 2652 | */ |
Jeff Johnson | 0a8786a | 2018-12-02 10:49:01 -0800 | [diff] [blame] | 2653 | QDF_STATUS sme_process_msg_callback(struct mac_context *mac, |
Jeff Johnson | 5f9ce2d | 2018-06-09 21:20:45 -0700 | [diff] [blame] | 2654 | struct scheduler_msg *msg); |
Nachiket Kukade | aaf8a71 | 2017-07-27 19:15:36 +0530 | [diff] [blame] | 2655 | |
| 2656 | /** |
| 2657 | * sme_set_bmiss_bcnt() - set bmiss config parameters |
| 2658 | * @vdev_id: virtual device for the command |
| 2659 | * @first_cnt: bmiss first value |
| 2660 | * @final_cnt: bmiss final value |
| 2661 | * |
| 2662 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 2663 | */ |
| 2664 | QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt, |
| 2665 | uint32_t final_cnt); |
| 2666 | |
Ganesh Kondabattini | 479a8ae | 2017-10-03 16:49:24 +0530 | [diff] [blame] | 2667 | /** |
| 2668 | * sme_send_limit_off_channel_params() - send limit off channel parameters |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2669 | * @mac_handle: Opaque handle to the global MAC context |
Ganesh Kondabattini | 479a8ae | 2017-10-03 16:49:24 +0530 | [diff] [blame] | 2670 | * @vdev_id: vdev id |
| 2671 | * @is_tos_active: tos active or inactive |
| 2672 | * @max_off_chan_time: max off channel time |
| 2673 | * @rest_time: rest time |
| 2674 | * @skip_dfs_chan: skip dfs channel |
| 2675 | * |
| 2676 | * This function sends command to WMA for setting limit off channel command |
| 2677 | * parameters. |
| 2678 | * |
| 2679 | * Return: QDF_STATUS enumeration. |
| 2680 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2681 | QDF_STATUS sme_send_limit_off_channel_params(mac_handle_t mac_handle, |
| 2682 | uint8_t vdev_id, |
| 2683 | bool is_tos_active, |
| 2684 | uint32_t max_off_chan_time, |
| 2685 | uint32_t rest_time, |
| 2686 | bool skip_dfs_chan); |
Ganesh Kondabattini | 479a8ae | 2017-10-03 16:49:24 +0530 | [diff] [blame] | 2687 | |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 2688 | #ifdef FEATURE_WLAN_DYNAMIC_CVM |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 2689 | /** |
| 2690 | * sme_set_vc_mode_config() - Set voltage corner config to FW. |
| 2691 | * @bitmap: Bitmap that refers to voltage corner config with |
| 2692 | * different phymode and bw configuration |
| 2693 | * |
| 2694 | * Return: QDF_STATUS |
| 2695 | */ |
| 2696 | QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap); |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame] | 2697 | #endif |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 2698 | |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2699 | /** |
| 2700 | * sme_set_del_pmkid_cache() - API to update PMKID cache |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2701 | * @mac_handle: Opaque handle to the global MAC context |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2702 | * @session_id: Session id |
| 2703 | * @pmk_cache_info: Pointer to PMK cache info |
| 2704 | * @is_add: boolean that implies whether to add or delete PMKID entry |
| 2705 | * |
| 2706 | * Return: QDF_STATUS |
| 2707 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2708 | QDF_STATUS sme_set_del_pmkid_cache(mac_handle_t mac_handle, uint8_t session_id, |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2709 | tPmkidCacheInfo *pmk_cache_info, |
| 2710 | bool is_add); |
| 2711 | |
| 2712 | /** |
| 2713 | * sme_send_hlp_ie_info() - API to send HLP IE info to fw |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2714 | * @mac_handle: Opaque handle to the global MAC context |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2715 | * @vdev_id: vdev id |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2716 | * @profile: CSR Roam profile |
| 2717 | * @if_addr: IP address |
| 2718 | * |
| 2719 | * This API is used to send HLP IE info along with IP address |
| 2720 | * to fw if LFR3 is enabled. |
| 2721 | * |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2722 | * Return: None |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2723 | */ |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2724 | void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id, |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 2725 | struct csr_roam_profile *profile, uint32_t if_addr); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2726 | |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2727 | /** |
| 2728 | * sme_update_session_assoc_ie() - Updates the assoc IEs to csr_roam_session |
| 2729 | * @mac_handle: Opaque handle to the global MAC context |
| 2730 | * @vdev_id: vdev id |
| 2731 | * @src_profile: Pointer to Roam profile in HDD |
| 2732 | * |
| 2733 | * This API is used to copy the assoc IE sent from user space to |
| 2734 | * csr_roam_session |
| 2735 | * |
| 2736 | * Return: None |
| 2737 | */ |
| 2738 | void sme_update_session_assoc_ie(mac_handle_t mac_handle, |
| 2739 | uint8_t vdev_id, |
| 2740 | struct csr_roam_profile *src_profile); |
| 2741 | |
| 2742 | /** |
| 2743 | * sme_send_rso_connect_params() - Updates the assoc IEs to csr_roam_session |
| 2744 | * @mac_handle: Opaque handle to the global MAC context |
| 2745 | * @vdev_id: vdev id |
| 2746 | * @src_profile: CSR Roam profile |
| 2747 | * |
| 2748 | * When the user space updates the assoc IEs or FILS auth type or FILS ERP info, |
| 2749 | * host driver needs to send these updated parameters to firmware via |
| 2750 | * RSO update command. |
| 2751 | * |
| 2752 | * Return: None |
| 2753 | */ |
| 2754 | QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle, |
| 2755 | uint8_t vdev_id, |
| 2756 | struct csr_roam_profile *src_profile); |
| 2757 | |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2758 | #if defined(WLAN_FEATURE_FILS_SK) |
| 2759 | /** |
| 2760 | * sme_update_fils_config - Update FILS config to CSR roam session |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2761 | * @mac_handle: Opaque handle to the global MAC context |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2762 | * @vdev_id: vdev id |
| 2763 | * @src_profile: Source roam profile having latest FILS config |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2764 | * |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2765 | * API to update FILS config to roam csr session. |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2766 | * |
| 2767 | * Return: QDF_STATUS |
| 2768 | */ |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2769 | QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2770 | struct csr_roam_profile *src_profile); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2771 | |
| 2772 | /** |
| 2773 | * sme_free_join_rsp_fils_params - free fils params |
| 2774 | * @roam_info: roam info |
| 2775 | * |
| 2776 | * Return: void |
| 2777 | */ |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2778 | 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] | 2779 | #else |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2780 | static inline |
Pragaspathi Thilagaraj | 6695ba9 | 2019-04-04 17:59:47 +0530 | [diff] [blame] | 2781 | QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2782 | struct csr_roam_profile *src_profile) |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2783 | { |
| 2784 | return QDF_STATUS_SUCCESS; |
| 2785 | } |
| 2786 | |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 2787 | static inline |
| 2788 | 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] | 2789 | {} |
| 2790 | |
| 2791 | #endif |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 2792 | |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2793 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 2794 | /** |
| 2795 | * sme_set_he_bss_color() - Sets the HE BSS color |
| 2796 | * |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2797 | * @mac_handle: The handle returned by mac_open |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2798 | * @session_id: session_id of the request |
| 2799 | * @bss_color: HE BSS color value to set |
| 2800 | * |
| 2801 | * Return: QDF_STATUS |
| 2802 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2803 | QDF_STATUS sme_set_he_bss_color(mac_handle_t mac_handle, uint8_t session_id, |
| 2804 | uint8_t bss_color); |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2805 | #else |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2806 | static inline |
| 2807 | QDF_STATUS sme_set_he_bss_color(mac_handle_t mac_handle, uint8_t session_id, |
| 2808 | uint8_t bss_color) |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2809 | { |
| 2810 | return QDF_STATUS_SUCCESS; |
| 2811 | } |
| 2812 | #endif |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2813 | |
| 2814 | /** |
Vignesh Viswanathan | 7c43a7a | 2018-09-24 15:52:47 +0530 | [diff] [blame] | 2815 | * sme_is_conn_state_connected() -- check if SME connection state is connected |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2816 | * @mac_handle: Opaque handle to the global MAC context |
Vignesh Viswanathan | 7c43a7a | 2018-09-24 15:52:47 +0530 | [diff] [blame] | 2817 | * @session_id: current Session Id |
| 2818 | * |
| 2819 | * This API checks if the current SME connection state is connected for the |
| 2820 | * given session id. |
| 2821 | * |
| 2822 | * Return: True if connected, false if any other state. |
| 2823 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2824 | bool sme_is_conn_state_connected(mac_handle_t mac_handle, uint8_t session_id); |
Vignesh Viswanathan | 7c43a7a | 2018-09-24 15:52:47 +0530 | [diff] [blame] | 2825 | |
| 2826 | /** |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2827 | * sme_scan_get_result_for_bssid - gets the scan result from scan cache for the |
| 2828 | * bssid specified |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2829 | * @mac_handle: handle returned by mac_open |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2830 | * @bssid: bssid to get the scan result for |
| 2831 | * @res: pointer to tCsrScanResultInfo allocated from caller |
| 2832 | * |
| 2833 | * Return: QDF_STATUS |
| 2834 | */ |
Jeff Johnson | b460dd7 | 2018-11-08 10:26:51 -0800 | [diff] [blame] | 2835 | QDF_STATUS sme_scan_get_result_for_bssid(mac_handle_t mac_handle, |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2836 | struct qdf_mac_addr *bssid, |
| 2837 | tCsrScanResultInfo *res); |
| 2838 | |
| 2839 | /** |
| 2840 | * sme_get_bss_transition_status() - get bss transition status all cadidates |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2841 | * @mac_handle: handle returned by mac_open |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2842 | * @transition_reason : Transition reason |
| 2843 | * @bssid: bssid to get BSS transition status |
| 2844 | * @info : bss candidate information |
| 2845 | * @n_candidates : number of candidates |
| 2846 | * @is_bt_in_progress: bt activity indicator |
| 2847 | * |
Jeff Johnson | 6273725 | 2018-11-17 10:59:43 -0800 | [diff] [blame] | 2848 | * Return: QDF_STATUS_SUCCESS on success otherwise a QDF_STATUS error |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2849 | */ |
Jeff Johnson | 6273725 | 2018-11-17 10:59:43 -0800 | [diff] [blame] | 2850 | QDF_STATUS sme_get_bss_transition_status(mac_handle_t mac_handle, |
| 2851 | uint8_t transition_reason, |
| 2852 | struct qdf_mac_addr *bssid, |
| 2853 | struct bss_candidate_info *info, |
| 2854 | uint16_t n_candidates, |
| 2855 | bool is_bt_in_progress); |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 2856 | |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2857 | /** |
| 2858 | * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params |
| 2859 | * if optional fields are not present. |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2860 | * @mac_handle: handle returned by mac_open |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2861 | * @buf: rsn ie buffer pointer |
| 2862 | * @buf_len: rsn ie buffer length |
| 2863 | * @rsn_ie: outframe rsn ie structure |
| 2864 | * @append_ie: flag to indicate if the rsn_ie need to be appended from buf |
| 2865 | * |
| 2866 | * Return: parse status |
| 2867 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2868 | uint32_t sme_unpack_rsn_ie(mac_handle_t mac_handle, uint8_t *buf, |
| 2869 | uint8_t buf_len, tDot11fIERSN *rsn_ie, |
| 2870 | bool append_ie); |
Kiran Kumar Lokere | 89f01f0 | 2019-08-06 18:22:39 -0700 | [diff] [blame] | 2871 | |
| 2872 | /** |
| 2873 | * sme_add_qcn_ie: Adds QCN IE data to IE buffer |
| 2874 | * @mac_handle: handle returned by mac_open |
| 2875 | * @ie_data: ie buffer pointer |
| 2876 | * @ie_len: ie length pointer |
| 2877 | * |
| 2878 | * Return: none |
| 2879 | */ |
| 2880 | void sme_add_qcn_ie(mac_handle_t mac_handle, uint8_t *ie_data, |
| 2881 | uint16_t *ie_len); |
| 2882 | |
Sandeep Puligilla | 063a434 | 2018-01-10 02:50:14 -0800 | [diff] [blame] | 2883 | /** |
| 2884 | * sme_get_oper_chan_freq - gets the operating channel freq |
| 2885 | * @vdev: vdev handle |
| 2886 | * |
| 2887 | * Return: operating channel frequency |
| 2888 | */ |
| 2889 | int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev); |
| 2890 | |
| 2891 | /** |
| 2892 | * sme_get_oper_ch_width - gets the operating channel width |
| 2893 | * @vdev: vdev handle |
| 2894 | * |
| 2895 | * Return: operating channel width |
| 2896 | */ |
| 2897 | enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev); |
| 2898 | |
| 2899 | /** |
| 2900 | * sme_get_oper_ch_width - gets the secondary channel frequency |
| 2901 | * @vdev: vdev handle |
| 2902 | * @sec20chan_freq: secondary channel frequency |
| 2903 | * |
| 2904 | * Return: secondary channel frequency |
| 2905 | */ |
| 2906 | int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev, |
| 2907 | uint16_t *sec20chan_freq); |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2908 | |
Abhishek Singh | 1f217ec | 2017-12-22 11:48:27 +0530 | [diff] [blame] | 2909 | /** |
| 2910 | * sme_enable_roaming_on_connected_sta() - Enable roaming on an connected sta |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2911 | * @mac_handle: handle returned by mac_open |
Yeshwanth Sriram Guntuka | 1669fc0 | 2019-09-04 16:03:44 +0530 | [diff] [blame] | 2912 | * @vdev_id: vdev id |
Abhishek Singh | 1f217ec | 2017-12-22 11:48:27 +0530 | [diff] [blame] | 2913 | * |
| 2914 | * The function check if any connected STA is present on which roaming is not |
| 2915 | * enabled and if present enabled roaming on that STA. |
| 2916 | * |
| 2917 | * Return: none |
| 2918 | */ |
Yeshwanth Sriram Guntuka | 1669fc0 | 2019-09-04 16:03:44 +0530 | [diff] [blame] | 2919 | void sme_enable_roaming_on_connected_sta(mac_handle_t mac_handle, |
| 2920 | uint8_t vdev_id); |
Abhishek Singh | 1f217ec | 2017-12-22 11:48:27 +0530 | [diff] [blame] | 2921 | |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 2922 | /** |
| 2923 | * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2924 | * @mac_handle: The handle returned by mac_open |
Padma, Santhosh Kumar | 22c462c | 2018-01-16 17:56:44 +0530 | [diff] [blame] | 2925 | * @session_id: session id |
| 2926 | * @buf: pointer to frame |
| 2927 | * @len: frame length |
| 2928 | * |
| 2929 | * Return: QDF_STATUS |
| 2930 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2931 | QDF_STATUS sme_send_mgmt_tx(mac_handle_t mac_handle, uint8_t session_id, |
| 2932 | const uint8_t *buf, uint32_t len); |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2933 | |
| 2934 | #ifdef WLAN_FEATURE_SAE |
| 2935 | /** |
| 2936 | * sme_handle_sae_msg() - Sends SAE message received from supplicant |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2937 | * @mac_handle: The handle returned by mac_open |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2938 | * @session_id: session id |
| 2939 | * @sae_status: status of SAE authentication |
Srinivas Dasari | e854ff0 | 2019-02-11 17:24:48 +0530 | [diff] [blame] | 2940 | * @peer_mac_addr: mac address of the peer to be authenticated |
Pragaspathi Thilagaraj | a97d498 | 2019-07-18 01:18:44 +0530 | [diff] [blame] | 2941 | * @pmkid: PMKID derived at the end of SAE authentication |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2942 | * |
| 2943 | * Return: QDF_STATUS |
| 2944 | */ |
Srinivas Dasari | e854ff0 | 2019-02-11 17:24:48 +0530 | [diff] [blame] | 2945 | QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle, |
| 2946 | uint8_t session_id, |
| 2947 | uint8_t sae_status, |
Pragaspathi Thilagaraj | a97d498 | 2019-07-18 01:18:44 +0530 | [diff] [blame] | 2948 | struct qdf_mac_addr peer_mac_addr, |
| 2949 | const uint8_t *pmkid); |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2950 | #else |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2951 | static inline |
Srinivas Dasari | e854ff0 | 2019-02-11 17:24:48 +0530 | [diff] [blame] | 2952 | QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle, |
| 2953 | uint8_t session_id, |
| 2954 | uint8_t sae_status, |
Pragaspathi Thilagaraj | a97d498 | 2019-07-18 01:18:44 +0530 | [diff] [blame] | 2955 | struct qdf_mac_addr peer_mac_addr, |
| 2956 | const uint8_t *pmkid) |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 2957 | { |
| 2958 | return QDF_STATUS_SUCCESS; |
| 2959 | } |
| 2960 | #endif |
| 2961 | |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2962 | /** |
| 2963 | * sme_set_ba_buff_size() - sets BA buffer size |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2964 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2965 | * @session_id: SME session id |
| 2966 | * @buff_size: BA buffer size |
| 2967 | * |
| 2968 | * Return: 0 on success else err code |
| 2969 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2970 | int sme_set_ba_buff_size(mac_handle_t mac_handle, uint8_t session_id, |
| 2971 | uint16_t buff_size); |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2972 | |
| 2973 | /** |
| 2974 | * sme_send_addba_req() - send ADDBA request with user config |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2975 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2976 | * @session_id: SME session id |
| 2977 | * @tid: tid val for BA session |
| 2978 | * @buff_size: BA buffer size |
| 2979 | * |
| 2980 | * Return: 0 on success else err code |
| 2981 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2982 | int sme_send_addba_req(mac_handle_t mac_handle, uint8_t session_id, uint8_t tid, |
| 2983 | uint16_t buff_size); |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 2984 | |
Kiran Kumar Lokere | 3324f63 | 2018-03-01 21:43:21 -0800 | [diff] [blame] | 2985 | /** |
| 2986 | * sme_set_no_ack_policy() - Sets no ack policy for AC |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2987 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 3324f63 | 2018-03-01 21:43:21 -0800 | [diff] [blame] | 2988 | * @session_id: SME session id |
| 2989 | * @val: no ack policy value |
| 2990 | * @ac: access category |
| 2991 | * |
| 2992 | * Return: 0 on success else err code |
| 2993 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 2994 | int sme_set_no_ack_policy(mac_handle_t mac_handle, uint8_t session_id, |
| 2995 | uint8_t val, uint8_t ac); |
Kiran Kumar Lokere | 3324f63 | 2018-03-01 21:43:21 -0800 | [diff] [blame] | 2996 | |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 2997 | /** |
| 2998 | * sme_set_auto_rate_he_sgi() - Sets SGI for auto rate |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 2999 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 3000 | * @session_id: SME session id |
| 3001 | * @cfg_val: SGI configuration value |
| 3002 | * |
| 3003 | * Return: 0 on success else err code |
| 3004 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3005 | int sme_set_auto_rate_he_sgi(mac_handle_t mac_handle, uint8_t session_id, |
| 3006 | uint8_t cfg_val); |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 3007 | |
| 3008 | /** |
| 3009 | * sme_set_auto_rate_he_ltf() - Sets HE LTF for auto rate |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3010 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 3011 | * @session_id: SME session id |
| 3012 | * @cfg_val: LTF configuration value |
| 3013 | * |
| 3014 | * Return: 0 on success else err code |
| 3015 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3016 | int sme_set_auto_rate_he_ltf(mac_handle_t mac_handle, uint8_t session_id, |
| 3017 | uint8_t cfg_val); |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 3018 | |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3019 | #ifdef WLAN_FEATURE_11AX |
| 3020 | /** |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 3021 | * sme_update_tgt_he_cap() - sets the HE caps to pmac |
Jinwei Chen | ef742dc | 2018-06-27 12:57:50 +0800 | [diff] [blame] | 3022 | * @mac_handle: Pointer to MAC handle |
| 3023 | * @cfg: Pointer to WMA target CFG |
Jinwei Chen | ffaa467 | 2018-08-30 16:55:09 +0800 | [diff] [blame] | 3024 | * @he_cap_ini: Pointer to HE CAP configured by INI |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 3025 | * |
| 3026 | * Return: None |
| 3027 | */ |
Jinwei Chen | ffaa467 | 2018-08-30 16:55:09 +0800 | [diff] [blame] | 3028 | void sme_update_tgt_he_cap(mac_handle_t mac_handle, |
| 3029 | struct wma_tgt_cfg *cfg, |
| 3030 | tDot11fIEhe_cap *he_cap_ini); |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 3031 | |
| 3032 | /** |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3033 | * sme_update_he_cap_nss() - sets the nss based on user request |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3034 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3035 | * @session_id: SME session id |
| 3036 | * @nss: no.of spatial streams value |
| 3037 | * |
| 3038 | * Return: None |
| 3039 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3040 | void sme_update_he_cap_nss(mac_handle_t mac_handle, uint8_t session_id, |
| 3041 | uint8_t nss); |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 3042 | |
| 3043 | /** |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3044 | * sme_update_he_tx_bfee_supp() - sets the HE Tx Bfee support |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3045 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3046 | * @session_id: SME session id |
| 3047 | * @cfg_val: Tx Bfee config value |
| 3048 | * |
| 3049 | * Return: 0 on success else err code |
| 3050 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3051 | int sme_update_he_tx_bfee_supp(mac_handle_t mac_handle, uint8_t session_id, |
| 3052 | uint8_t cfg_val); |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 3053 | |
| 3054 | /** |
| 3055 | * sme_update_he_tx_bfee_nsts() - sets the HE Tx Bfee NSTS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3056 | * @mac_handle: MAC handle |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 3057 | * @session_id: SME session id |
| 3058 | * @cfg_val: Tx Bfee NSTS value |
| 3059 | * |
| 3060 | * Return: 0 on success else err code |
| 3061 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3062 | int sme_update_he_tx_bfee_nsts(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 3063 | uint8_t cfg_val); |
Kiran Kumar Lokere | 86e8559 | 2018-07-18 15:34:24 -0700 | [diff] [blame] | 3064 | |
| 3065 | /** |
| 3066 | * sme_set_he_tx_bf_cbf_rates() - sets the HE Tx Bfee CBF frame rates to FW |
| 3067 | * @session_id: SME session id |
| 3068 | * |
| 3069 | * Return: None |
| 3070 | */ |
| 3071 | void sme_set_he_tx_bf_cbf_rates(uint8_t session_id); |
| 3072 | |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3073 | /** |
Kiran Kumar Lokere | efdbd0b | 2018-09-25 18:53:46 -0700 | [diff] [blame] | 3074 | * sme_config_su_ppdu_queue() - Configures SU PPDU queue enable/disable in FW |
| 3075 | * @session_id: SME session id |
| 3076 | * @enable: Enable/Disable config |
| 3077 | * |
| 3078 | * Return: None |
| 3079 | */ |
| 3080 | void sme_config_su_ppdu_queue(uint8_t session_id, bool enable); |
| 3081 | |
| 3082 | /** |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 3083 | * sme_update_he_mcs() - sets the HE MCS based on user request |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3084 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 3085 | * @session_id: SME session id |
| 3086 | * @he_mcs: HE MCS value |
| 3087 | * |
| 3088 | * Return: 0 on success else err code |
| 3089 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3090 | int sme_update_he_mcs(mac_handle_t mac_handle, uint8_t session_id, |
| 3091 | uint16_t he_mcs); |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3092 | |
| 3093 | /** |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3094 | * sme_update_he_trigger_frm_mac_pad() - sets the HE MAC padding capability |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3095 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3096 | * @session_id: SME session id |
| 3097 | * @cfg_val: HE MAC padding duration value |
| 3098 | * |
| 3099 | * Return: 0 on success else err code |
| 3100 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3101 | int sme_update_he_trigger_frm_mac_pad(mac_handle_t mac_handle, |
| 3102 | uint8_t session_id, |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3103 | uint8_t cfg_val); |
Kiran Kumar Lokere | f1a96f4 | 2018-08-29 18:53:47 -0700 | [diff] [blame] | 3104 | |
| 3105 | /** |
| 3106 | * sme_update_he_om_ctrl_supp() - sets the HE OM control capability |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3107 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | f1a96f4 | 2018-08-29 18:53:47 -0700 | [diff] [blame] | 3108 | * @session_id: SME session id |
| 3109 | * @cfg_val: HE OM control config |
| 3110 | * |
| 3111 | * Return: 0 on success else err code |
| 3112 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3113 | int sme_update_he_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | f1a96f4 | 2018-08-29 18:53:47 -0700 | [diff] [blame] | 3114 | uint8_t cfg_val); |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3115 | |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 3116 | #define A_CTRL_ID_OMI 0x1 |
| 3117 | struct omi_ctrl_tx { |
| 3118 | uint32_t omi_in_vht:1; |
| 3119 | uint32_t omi_in_he:1; |
| 3120 | uint32_t a_ctrl_id:4; |
| 3121 | uint32_t rx_nss:3; |
| 3122 | uint32_t ch_bw:2; |
| 3123 | uint32_t ul_mu_dis:1; |
| 3124 | uint32_t tx_nsts:3; |
| 3125 | uint32_t er_su_dis:1; |
| 3126 | uint32_t dl_mu_mimo_resound:1; |
| 3127 | uint32_t ul_mu_data_dis:1; |
| 3128 | uint32_t reserved:14; |
| 3129 | }; |
| 3130 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3131 | int sme_send_he_om_ctrl_bw_update(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3132 | uint8_t cfg_val); |
| 3133 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3134 | int sme_send_he_om_ctrl_nss_update(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3135 | uint8_t cfg_val); |
| 3136 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3137 | void sme_reset_he_om_ctrl(mac_handle_t mac_handle); |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3138 | |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3139 | /** |
Kiran Kumar Lokere | ee20577 | 2018-09-27 00:27:27 -0700 | [diff] [blame] | 3140 | * sme_config_action_tx_in_tb_ppdu() - Sends action frame in TB PPDU cfg to FW |
| 3141 | * @mac_handle: Pointer to MAC handle |
| 3142 | * @session_id: SME session id |
| 3143 | * @cfg_val: configuration setting value |
| 3144 | * |
| 3145 | * Return: 0 on success else err code |
| 3146 | */ |
| 3147 | int sme_config_action_tx_in_tb_ppdu(mac_handle_t mac_handle, uint8_t session_id, |
| 3148 | uint8_t cfg_val); |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 3149 | |
| 3150 | /** |
| 3151 | * sme_send_he_om_ctrl_update() - Send HE OM ctrl Tx cmd to FW |
| 3152 | * @mac_handle: Pointer to mac handle |
| 3153 | * @session_id: SME session id |
| 3154 | * |
| 3155 | * Return: 0 on success else err code |
| 3156 | */ |
| 3157 | int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id); |
| 3158 | |
| 3159 | /** |
| 3160 | * sme_set_he_om_ctrl_param() - Update HE OM control params for OMI Tx |
| 3161 | * @mac_handle: Pointer to mac handle |
| 3162 | * @session_id: SME session id |
| 3163 | * @param: HE om control parameter |
| 3164 | * @cfg_val: HE OM control parameter config value |
| 3165 | * |
| 3166 | * Return: 0 on success else err code |
| 3167 | */ |
| 3168 | int sme_set_he_om_ctrl_param(mac_handle_t mac_handle, uint8_t session_id, |
| 3169 | enum qca_wlan_vendor_attr_he_omi_tx param, |
| 3170 | uint8_t cfg_val); |
| 3171 | |
Kiran Kumar Lokere | ee20577 | 2018-09-27 00:27:27 -0700 | [diff] [blame] | 3172 | /** |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3173 | * sme_set_usr_cfg_mu_edca() - sets the user cfg MU EDCA params flag |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3174 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3175 | * @val: value to be set |
| 3176 | * |
| 3177 | * Return: none |
| 3178 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3179 | void sme_set_usr_cfg_mu_edca(mac_handle_t mac_handle, bool val); |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3180 | |
| 3181 | /** |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3182 | * sme_set_he_mu_edca_def_cfg() - sets the default MU EDCA params values |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3183 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3184 | * |
| 3185 | * Return: none |
| 3186 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3187 | void sme_set_he_mu_edca_def_cfg(mac_handle_t mac_handle); |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3188 | |
| 3189 | /** |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 3190 | * sme_update_he_htc_he_supp() - Update +HTC-HE support in HE capabilities |
| 3191 | * @mac_handle: Pointer to mac handle |
| 3192 | * @session_id: SME session id |
| 3193 | * @cfg_val: config setting |
| 3194 | * |
| 3195 | * Return: 0 on success else err code |
| 3196 | */ |
| 3197 | int sme_update_he_htc_he_supp(mac_handle_t mac_handle, uint8_t session_id, |
| 3198 | bool cfg_val); |
| 3199 | |
| 3200 | /** |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3201 | * sme_update_mu_edca_params() - updates MU EDCA params values |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3202 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3203 | * @session_id: SME session id |
| 3204 | * |
| 3205 | * Return: 0 on success else err code |
| 3206 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3207 | int sme_update_mu_edca_params(mac_handle_t mac_handle, uint8_t session_id); |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3208 | |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3209 | /** |
| 3210 | * sme_update_he_tx_stbc_cap() - Sets the HE Tx STBC capability |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3211 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3212 | * @session_id: SME session id |
| 3213 | * @value: set value |
| 3214 | * |
| 3215 | * Return: 0 on success else err code |
| 3216 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3217 | int sme_update_he_tx_stbc_cap(mac_handle_t mac_handle, uint8_t session_id, |
| 3218 | int value); |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3219 | |
| 3220 | /** |
| 3221 | * sme_update_he_rx_stbc_cap() - Sets the HE Rx STBC capability |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3222 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3223 | * @session_id: SME session id |
| 3224 | * @value: set value |
| 3225 | * |
| 3226 | * Return: 0 on success else err code |
| 3227 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3228 | int sme_update_he_rx_stbc_cap(mac_handle_t mac_handle, uint8_t session_id, |
| 3229 | int value); |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 3230 | |
| 3231 | /** |
| 3232 | * sme_update_he_frag_supp() - sets the HE fragmentation support |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3233 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 3234 | * @session_id: SME session id |
| 3235 | * @he_frag: HE fragmention support value |
| 3236 | * |
| 3237 | * Return: 0 on success else err code |
| 3238 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3239 | int sme_update_he_frag_supp(mac_handle_t mac_handle, uint8_t session_id, |
| 3240 | uint16_t he_frag); |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 3241 | |
| 3242 | /** |
| 3243 | * sme_update_he_ldpc_supp() - sets the HE LDPC support |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3244 | * @mac_handle: Opaque handle to the global MAC context |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 3245 | * @session_id: SME session id |
| 3246 | * @he_ldpc: HE LDPC support value |
| 3247 | * |
| 3248 | * Return: 0 on success else err code |
| 3249 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3250 | int sme_update_he_ldpc_supp(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 3251 | uint16_t he_ldpc); |
Arif Hussain | 1f58cbb | 2019-03-14 17:06:56 -0700 | [diff] [blame] | 3252 | |
| 3253 | /** |
| 3254 | * sme_update_he_twt_req_support() - Sets twt request capability |
| 3255 | * @mac_handle: Opaque handle to the global MAC context |
| 3256 | * @session_id: SME session id |
| 3257 | * @value: set value |
| 3258 | * |
| 3259 | * Return: 0 on success else err code |
| 3260 | */ |
| 3261 | int sme_update_he_twt_req_support(mac_handle_t mac_handle, uint8_t session_id, |
| 3262 | uint8_t cfg_val); |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3263 | #else |
Jinwei Chen | ef742dc | 2018-06-27 12:57:50 +0800 | [diff] [blame] | 3264 | static inline void sme_update_tgt_he_cap(mac_handle_t mac_handle, |
Jinwei Chen | ffaa467 | 2018-08-30 16:55:09 +0800 | [diff] [blame] | 3265 | struct wma_tgt_cfg *cfg, |
| 3266 | tDot11fIEhe_cap *he_cap_ini) |
Jinwei Chen | 998a1a0 | 2018-06-20 17:20:34 +0800 | [diff] [blame] | 3267 | {} |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3268 | static inline void sme_update_he_cap_nss(mac_handle_t mac_handle, |
| 3269 | uint8_t session_id, |
| 3270 | uint8_t nss) |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3271 | {} |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3272 | static inline int sme_update_he_mcs(mac_handle_t mac_handle, uint8_t session_id, |
Kiran Kumar Lokere | 96246e5 | 2018-01-24 16:44:35 -0800 | [diff] [blame] | 3273 | uint16_t he_mcs) |
| 3274 | { |
| 3275 | return 0; |
| 3276 | } |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3277 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3278 | static inline void sme_set_he_mu_edca_def_cfg(mac_handle_t mac_handle) |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3279 | { |
| 3280 | } |
| 3281 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3282 | static inline int sme_update_mu_edca_params(mac_handle_t mac_handle, |
Kiran Kumar Lokere | fba2063 | 2018-07-05 16:51:27 -0700 | [diff] [blame] | 3283 | uint8_t session_id) |
| 3284 | { |
| 3285 | return 0; |
| 3286 | } |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3287 | |
| 3288 | static inline int sme_update_he_trigger_frm_mac_pad(mac_handle_t mac_handle, |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3289 | uint8_t session_id, |
| 3290 | uint8_t cfg_val) |
| 3291 | { |
| 3292 | return 0; |
| 3293 | } |
| 3294 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3295 | static inline int sme_update_he_om_ctrl_supp(mac_handle_t mac_handle, |
Kiran Kumar Lokere | f1a96f4 | 2018-08-29 18:53:47 -0700 | [diff] [blame] | 3296 | uint8_t session_id, |
| 3297 | uint8_t cfg_val) |
| 3298 | { |
| 3299 | return 0; |
| 3300 | } |
| 3301 | |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3302 | |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 3303 | static inline int |
| 3304 | sme_set_he_om_ctrl_param(mac_handle_t mac_handle, uint8_t session_id, |
| 3305 | enum qca_wlan_vendor_attr_he_omi_tx param, |
| 3306 | uint8_t cfg_val) |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3307 | { |
| 3308 | return 0; |
| 3309 | } |
| 3310 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3311 | static inline void sme_reset_he_om_ctrl(mac_handle_t mac_handle) |
Kiran Kumar Lokere | 9463415 | 2018-09-24 19:08:35 -0700 | [diff] [blame] | 3312 | { |
| 3313 | } |
| 3314 | |
Kiran Kumar Lokere | ee20577 | 2018-09-27 00:27:27 -0700 | [diff] [blame] | 3315 | static inline int sme_config_action_tx_in_tb_ppdu(mac_handle_t mac_handle, |
| 3316 | uint8_t session_id, |
| 3317 | uint8_t cfg_val) |
| 3318 | { |
| 3319 | return 0; |
| 3320 | } |
| 3321 | |
Kiran Kumar Lokere | acd107d | 2019-01-09 15:02:11 -0800 | [diff] [blame] | 3322 | static inline int sme_update_he_htc_he_supp(mac_handle_t mac_handle, |
| 3323 | uint8_t session_id, |
| 3324 | bool cfg_val) |
| 3325 | { |
| 3326 | return 0; |
| 3327 | } |
| 3328 | |
| 3329 | static inline int |
| 3330 | sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id) |
| 3331 | { |
| 3332 | return 0; |
| 3333 | } |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3334 | static inline void sme_set_usr_cfg_mu_edca(mac_handle_t mac_handle, bool val) |
Kiran Kumar Lokere | f54b855 | 2018-07-10 00:53:38 -0700 | [diff] [blame] | 3335 | { |
| 3336 | } |
| 3337 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3338 | static inline int sme_update_he_tx_stbc_cap(mac_handle_t mac_handle, |
| 3339 | uint8_t session_id, |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3340 | int value) |
| 3341 | { |
| 3342 | return 0; |
| 3343 | } |
| 3344 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3345 | static inline int sme_update_he_rx_stbc_cap(mac_handle_t mac_handle, |
| 3346 | uint8_t session_id, |
Kiran Kumar Lokere | 13dedac | 2018-02-05 19:51:59 -0800 | [diff] [blame] | 3347 | int value) |
| 3348 | { |
| 3349 | return 0; |
| 3350 | } |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 3351 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3352 | static inline int sme_update_he_frag_supp(mac_handle_t mac_handle, |
| 3353 | uint8_t session_id, |
| 3354 | uint16_t he_frag) |
Kiran Kumar Lokere | 5cc2f0d | 2018-02-08 17:10:05 -0800 | [diff] [blame] | 3355 | { |
| 3356 | return 0; |
| 3357 | } |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3358 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3359 | static inline int sme_update_he_ldpc_supp(mac_handle_t mac_handle, |
| 3360 | uint8_t session_id, |
Kiran Kumar Lokere | e43a458 | 2018-05-08 19:54:03 -0700 | [diff] [blame] | 3361 | uint16_t he_ldpc) |
| 3362 | { |
| 3363 | return 0; |
| 3364 | } |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3365 | |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3366 | static inline int sme_update_he_tx_bfee_supp(mac_handle_t mac_handle, |
| 3367 | uint8_t session_id, |
| 3368 | uint8_t cfg_val) |
Kiran Kumar Lokere | 6c7f3fa | 2018-05-14 18:12:27 -0700 | [diff] [blame] | 3369 | { |
| 3370 | return 0; |
| 3371 | } |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3372 | static inline int sme_update_he_tx_bfee_nsts(mac_handle_t mac_handle, |
| 3373 | uint8_t session_id, |
Kiran Kumar Lokere | f304485 | 2018-06-27 14:14:24 -0700 | [diff] [blame] | 3374 | uint8_t cfg_val) |
| 3375 | { |
| 3376 | return 0; |
| 3377 | } |
Kiran Kumar Lokere | 86e8559 | 2018-07-18 15:34:24 -0700 | [diff] [blame] | 3378 | |
| 3379 | static inline void sme_set_he_tx_bf_cbf_rates(uint8_t session_id) |
| 3380 | { |
| 3381 | } |
Kiran Kumar Lokere | efdbd0b | 2018-09-25 18:53:46 -0700 | [diff] [blame] | 3382 | |
| 3383 | static inline void sme_config_su_ppdu_queue(uint8_t session_id, bool enable) |
| 3384 | { |
| 3385 | } |
Arif Hussain | 1f58cbb | 2019-03-14 17:06:56 -0700 | [diff] [blame] | 3386 | |
| 3387 | static inline int sme_update_he_twt_req_support(mac_handle_t mac_handle, |
| 3388 | uint8_t session_id, |
| 3389 | uint8_t cfg_val) |
| 3390 | { |
| 3391 | return 0; |
| 3392 | } |
| 3393 | |
Kiran Kumar Lokere | 44a2943 | 2018-01-24 16:10:30 -0800 | [diff] [blame] | 3394 | #endif |
| 3395 | |
Vignesh Viswanathan | 0a56929 | 2018-02-14 15:34:47 +0530 | [diff] [blame] | 3396 | /** |
| 3397 | * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client |
| 3398 | * session has key exchange in progress |
| 3399 | * |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3400 | * @mac_handle: Opaque handle to the global MAC context |
Vignesh Viswanathan | 0a56929 | 2018-02-14 15:34:47 +0530 | [diff] [blame] | 3401 | * @session_id: session id |
| 3402 | * |
| 3403 | * Return: true - if key exchange in progress |
| 3404 | * false - if not in progress |
| 3405 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3406 | bool sme_is_sta_key_exchange_in_progress(mac_handle_t mac_handle, |
| 3407 | uint8_t session_id); |
Vignesh Viswanathan | 0a56929 | 2018-02-14 15:34:47 +0530 | [diff] [blame] | 3408 | |
Vignesh Viswanathan | a2f5ce58 | 2018-05-09 20:38:39 +0530 | [diff] [blame] | 3409 | /* |
| 3410 | * sme_validate_channel_list() - Validate the given channel list |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3411 | * @mac_handle: Opaque handle to the global MAC context |
Liangwei Dong | 075afa7 | 2019-10-30 12:58:22 +0800 | [diff] [blame] | 3412 | * @chan_freq_list: Pointer to the channel list |
Vignesh Viswanathan | a2f5ce58 | 2018-05-09 20:38:39 +0530 | [diff] [blame] | 3413 | * @num_channels: number of channels present in the chan_list |
| 3414 | * |
| 3415 | * Validates the given channel list with base channels in mac context |
| 3416 | * |
| 3417 | * Return: True if all channels in the list are valid, false otherwise |
| 3418 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3419 | bool sme_validate_channel_list(mac_handle_t mac_handle, |
Liangwei Dong | 075afa7 | 2019-10-30 12:58:22 +0800 | [diff] [blame] | 3420 | uint32_t *chan_freq_list, |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3421 | uint8_t num_channels); |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 3422 | /** |
| 3423 | * sme_set_amsdu() - set amsdu enable/disable based on user cfg |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3424 | * @mac_handle: Opaque handle to the global MAC context |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 3425 | * @enable: enable or disable |
| 3426 | * |
| 3427 | * Return: None |
| 3428 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3429 | void sme_set_amsdu(mac_handle_t mac_handle, bool enable); |
Vignesh Viswanathan | a2f5ce58 | 2018-05-09 20:38:39 +0530 | [diff] [blame] | 3430 | |
Kiran Kumar Lokere | 921b5a5 | 2019-02-24 21:53:20 -0800 | [diff] [blame] | 3431 | #ifdef WLAN_FEATURE_11AX |
| 3432 | void sme_set_he_testbed_def(mac_handle_t mac_handle, uint8_t vdev_id); |
| 3433 | void sme_reset_he_caps(mac_handle_t mac_handle, uint8_t vdev_id); |
| 3434 | #else |
| 3435 | static inline void sme_set_he_testbed_def(mac_handle_t mac_handle, |
| 3436 | uint8_t vdev_id) |
| 3437 | { |
| 3438 | } |
| 3439 | static inline void sme_reset_he_caps(mac_handle_t mac_handle, uint8_t vdev_id) |
| 3440 | { |
| 3441 | } |
| 3442 | #endif |
| 3443 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 3444 | /** |
| 3445 | * sme_get_mcs_idx() - gets mcs index |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 3446 | * @raw_rate: raw rate from fw |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 3447 | * @rate_flags: rate flags |
| 3448 | * @nss: number of nss |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 3449 | * @dcm: dcm will be calculated from rate |
| 3450 | * @guard_interval: guard interval info from rate |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 3451 | * @mcs_rate_flags: mcs rate flag |
| 3452 | * |
| 3453 | * Return: return mcs index |
| 3454 | */ |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 3455 | uint8_t sme_get_mcs_idx(uint16_t raw_rate, enum tx_rate_info rate_flags, |
| 3456 | uint8_t *nss, uint8_t *dcm, |
| 3457 | enum txrate_gi *guard_interval, |
| 3458 | enum tx_rate_info *mcs_rate_flags); |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 3459 | |
Varun Reddy Yeturu | d33033f | 2018-06-11 10:58:30 -0700 | [diff] [blame] | 3460 | #ifdef WLAN_SUPPORT_TWT |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3461 | /** |
| 3462 | * sme_register_twt_enable_complete_cb() - TWT enable registrar |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3463 | * @mac_handle: MAC handle |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3464 | * @twt_enable_cb: Function callback to handle enable event |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3465 | * |
| 3466 | * Return: QDF Status |
| 3467 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3468 | QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle, |
| 3469 | twt_enable_cb twt_enable_cb); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3470 | |
| 3471 | /** |
| 3472 | * sme_register_twt_disable_complete_cb - TWT disable registrar |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3473 | * @mac_handle: MAC handle |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3474 | * @twt_disable_cb: Function callback to handle disable event |
| 3475 | * |
| 3476 | * Return: QDF Status |
| 3477 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3478 | QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle, |
| 3479 | twt_disable_cb twt_disable_cb); |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3480 | |
| 3481 | /** |
| 3482 | * sme_deregister_twt_enable_complete_cb() - TWT enable deregistrar |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3483 | * @mac_handle: Opaque handle to the global MAC context |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3484 | * |
| 3485 | * Return: QDF Status |
| 3486 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3487 | 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] | 3488 | |
| 3489 | /** |
| 3490 | * sme_deregister_twt_disable_complete_cb - TWT disable deregistrar |
Jeff Johnson | e0d1dbe | 2018-11-17 08:51:09 -0800 | [diff] [blame] | 3491 | * @mac_handle: Opaque handle to the global MAC context |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3492 | * |
| 3493 | * Return: QDF Status |
| 3494 | */ |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3495 | 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] | 3496 | |
| 3497 | #else |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3498 | static inline |
| 3499 | QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle, |
| 3500 | twt_enable_cb twt_enable_cb) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3501 | { |
| 3502 | return QDF_STATUS_SUCCESS; |
| 3503 | } |
| 3504 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3505 | static inline |
| 3506 | QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle, |
| 3507 | twt_disable_cb twt_disable_cb) |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3508 | { |
| 3509 | return QDF_STATUS_SUCCESS; |
| 3510 | } |
| 3511 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3512 | static inline |
| 3513 | 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] | 3514 | { |
| 3515 | return QDF_STATUS_SUCCESS; |
| 3516 | } |
| 3517 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 3518 | static inline |
| 3519 | 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] | 3520 | { |
| 3521 | return QDF_STATUS_SUCCESS; |
| 3522 | } |
| 3523 | #endif |
Krunal Soni | 5e48378 | 2018-10-25 15:42:44 -0700 | [diff] [blame] | 3524 | /** |
| 3525 | * sme_get_sta_cxn_info() - This function populates all the connection |
| 3526 | * information which is formed by DUT-STA to AP |
| 3527 | * by calling CSR helper API. |
| 3528 | * @mac_ctx: pointer to mac context |
| 3529 | * @session: pointer to sta session |
| 3530 | * @conn_profile: pointer to connected DUTSTA-REFAP profile |
| 3531 | * @buf: pointer to char buffer to write all the connection information. |
| 3532 | * @buf_size: maximum size of the provided buffer |
| 3533 | * |
| 3534 | * Returns: QDF_STATUS |
| 3535 | */ |
| 3536 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR |
| 3537 | QDF_STATUS sme_get_sta_cxn_info(mac_handle_t mac_handle, uint32_t session_id, |
| 3538 | char *buf, uint32_t buf_sz); |
| 3539 | #else |
| 3540 | static inline QDF_STATUS |
| 3541 | sme_get_sta_cxn_info(mac_handle_t mac_handle, uint32_t session_id, |
| 3542 | char *buf, uint32_t buf_sz) |
| 3543 | { |
| 3544 | qdf_scnprintf(buf, buf_sz, |
| 3545 | "\nDiag macro disable, ask vendor to enable"); |
| 3546 | return QDF_STATUS_SUCCESS; |
| 3547 | } |
| 3548 | #endif |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 3549 | |
Pragaspathi Thilagaraj | 974c27e | 2019-03-02 22:26:05 +0530 | [diff] [blame] | 3550 | #if defined(FEATURE_WLAN_ESE) && defined(WLAN_FEATURE_ROAM_OFFLOAD) |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 3551 | /** |
| 3552 | * sme_add_key_btk() - Add BTK key |
| 3553 | * @mac_handle: MAC handle |
| 3554 | * @session_id: SME session identifier |
| 3555 | * @key: key material |
| 3556 | * @key_len: length of the key |
| 3557 | * |
| 3558 | * Return: 0 on success and negative value for failure |
| 3559 | */ |
| 3560 | int sme_add_key_btk(mac_handle_t mac_handle, uint8_t session_id, |
| 3561 | const uint8_t *key, const int key_len); |
Pragaspathi Thilagaraj | 974c27e | 2019-03-02 22:26:05 +0530 | [diff] [blame] | 3562 | |
| 3563 | #else |
| 3564 | static inline int sme_add_key_btk(mac_handle_t mac_handle, uint8_t session_id, |
| 3565 | const uint8_t *key, const int key_len) |
| 3566 | { |
| 3567 | return 0; |
| 3568 | } |
| 3569 | #endif |
| 3570 | |
| 3571 | #ifdef FEATURE_WLAN_ESE |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 3572 | /** |
| 3573 | * sme_add_key_krk() - Add KRK key |
| 3574 | * @mac_handle: MAC handle |
| 3575 | * @session_id: SME session identifier |
| 3576 | * @key: key material |
| 3577 | * @key_len: length of the key |
| 3578 | * |
| 3579 | * Return: 0 on success and negative value for failure |
| 3580 | */ |
| 3581 | int sme_add_key_krk(mac_handle_t mac_handle, uint8_t session_id, |
| 3582 | const uint8_t *key, const int key_len); |
| 3583 | |
| 3584 | #else |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 3585 | |
| 3586 | static inline int sme_add_key_krk(mac_handle_t mac_handle, uint8_t session_id, |
| 3587 | const uint8_t *key, const int key_len) |
| 3588 | { |
| 3589 | return 0; |
| 3590 | } |
| 3591 | #endif |
| 3592 | |
Chaoli Zhou | 75b062f | 2018-06-11 12:36:54 +0800 | [diff] [blame] | 3593 | /** |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 3594 | * sme_get_roam_scan_stats() - Send roam scan stats cmd to wma |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3595 | * @mac_handle: handle returned by mac_open |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 3596 | * @cb: call-back invoked for roam scan stats response |
| 3597 | * @context: context of callback |
| 3598 | * @vdev_id: vdev id |
| 3599 | * |
| 3600 | * Return: QDF_STATUS |
| 3601 | */ |
| 3602 | QDF_STATUS |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3603 | sme_get_roam_scan_stats(mac_handle_t mac_handle, roam_scan_stats_cb cb, |
| 3604 | void *context, uint32_t vdev_id); |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 3605 | |
Vignesh Viswanathan | 987f0bb | 2018-09-17 17:00:29 +0530 | [diff] [blame] | 3606 | /** |
| 3607 | * sme_update_score_config() - Update the Scoring Config from MLME |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3608 | * @mac_handle: Mac Handle |
Vignesh Viswanathan | 987f0bb | 2018-09-17 17:00:29 +0530 | [diff] [blame] | 3609 | * @score_config: Pointer to the scoring config structure to be populated |
| 3610 | * |
| 3611 | * Return: None |
| 3612 | */ |
Jeff Johnson | c730906 | 2018-11-09 20:59:42 -0800 | [diff] [blame] | 3613 | void sme_update_score_config(mac_handle_t mac_handle, |
Vignesh Viswanathan | 987f0bb | 2018-09-17 17:00:29 +0530 | [diff] [blame] | 3614 | struct scoring_config *score_config); |
lifeng | faa83cb | 2018-11-24 01:53:56 +0800 | [diff] [blame] | 3615 | |
| 3616 | /** |
| 3617 | * sme_enable_fw_module_log_level() - enable fw module log level |
| 3618 | * @mac_handle: handle returned by mac_open |
| 3619 | * @vdev_id: vdev id |
| 3620 | * |
| 3621 | * Return: None |
| 3622 | */ |
| 3623 | void sme_enable_fw_module_log_level(mac_handle_t mac_handle, int vdev_id); |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 3624 | |
| 3625 | #ifdef WLAN_FEATURE_MOTION_DETECTION |
| 3626 | /** |
| 3627 | * sme_motion_det_cfg - motion detection configuration |
| 3628 | * @vdev_id: vdev id |
| 3629 | * @time_t1: Time T1 for motion detection in msecs |
| 3630 | * @time_t2: Time T2 for motion detection in msecs |
| 3631 | * @n1: number of packets for coarse detection |
| 3632 | * @n2: number of packets for fine detection |
| 3633 | * @time_t1_gap: gap between packets in coarse detection in msecs |
| 3634 | * @time_t2_gap: gap between packets in fine detection in msecs |
| 3635 | * @coarse_k: number of times fine motion detection has to be performed for |
| 3636 | * coarse detection |
| 3637 | * @fine_k: number of times fine motion detection has to be performed for |
| 3638 | * fine detection |
| 3639 | * @coarse_q: number of times motion is expected to be detected for success |
| 3640 | * case in coarse detection |
| 3641 | * @fine_q: number of times motion is expected to be detected for success |
| 3642 | * case in fine detection |
| 3643 | * @md_coarse_thr_high: higher threshold value (in percent) from host to FW, |
| 3644 | * which will be used in coarse detection phase of motion |
| 3645 | * detection. This is the threshold for the correlation of |
| 3646 | * the old RF local-scattering environment with current RF |
| 3647 | * local-scattering environment. Value of 100(%) indicates |
| 3648 | * that neither the transceiver nor any nearby objects |
| 3649 | * have changed position |
| 3650 | * @md_fine_thr_high: higher threshold value (in percent) from host to FW, which |
| 3651 | * will be used in fine detection phase of motion detection. |
| 3652 | * This is the threshold for correlation between the old and |
| 3653 | * current RF environments, as explained above |
| 3654 | * @md_coarse_thr_low: lower threshold value (in percent) for immediate |
| 3655 | * detection of motion in coarse detection phase. This is |
| 3656 | * the threshold for correlation between the old and current |
| 3657 | * RF environments, as explained above |
| 3658 | * @md_fine_thr_low: lower threshold value (in percent) for immediate detection |
| 3659 | * of motion in fine detection phase. This is the threshold |
| 3660 | * for correlation between the old and current RF |
| 3661 | * environments, as explained above |
| 3662 | * @eSME_TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table |
| 3663 | */ |
| 3664 | |
| 3665 | struct sme_motion_det_cfg { |
| 3666 | uint8_t vdev_id; |
| 3667 | uint32_t time_t1; |
| 3668 | uint32_t time_t2; |
| 3669 | uint32_t n1; |
| 3670 | uint32_t n2; |
| 3671 | uint32_t time_t1_gap; |
| 3672 | uint32_t time_t2_gap; |
| 3673 | uint32_t coarse_K; |
| 3674 | uint32_t fine_K; |
| 3675 | uint32_t coarse_Q; |
| 3676 | uint32_t fine_Q; |
| 3677 | uint8_t md_coarse_thr_high; |
| 3678 | uint8_t md_fine_thr_high; |
| 3679 | uint8_t md_coarse_thr_low; |
| 3680 | uint8_t md_fine_thr_low; |
| 3681 | }; |
| 3682 | |
| 3683 | /** |
| 3684 | * sme_motion_det_base_line_cfg - motion detection base line configuration |
| 3685 | * @vdev_id : vdev id |
| 3686 | * @bl_time_t: time T for baseline (in ms), every bl_time_t, bl_n pkts are sent |
| 3687 | * @bl_packet_gap: gap between packets for baseline in msecs |
| 3688 | * bl_n: number of packets to be sent during one baseline |
| 3689 | * bl_num_meas: number of times the baseline measurement to be done |
| 3690 | */ |
| 3691 | struct sme_motion_det_base_line_cfg { |
| 3692 | uint8_t vdev_id; |
| 3693 | uint32_t bl_time_t; |
| 3694 | uint32_t bl_packet_gap; |
| 3695 | uint32_t bl_n; |
| 3696 | uint32_t bl_num_meas; |
| 3697 | }; |
| 3698 | |
| 3699 | /** |
| 3700 | * sme_motion_det_en - Start/Stop motion detection |
| 3701 | * @vdev_id: vdev_id |
| 3702 | * @enable: start = 1, stop =0 |
| 3703 | */ |
| 3704 | struct sme_motion_det_en { |
| 3705 | uint8_t vdev_id; |
| 3706 | bool enable; |
| 3707 | }; |
| 3708 | |
| 3709 | /** |
| 3710 | * sme_motion_det_base_line_en - Start/Stop motion detection base line |
| 3711 | * @vdev_id: vdev_id |
| 3712 | * @enable: start = 1, stop =0 |
| 3713 | */ |
| 3714 | struct sme_motion_det_base_line_en { |
| 3715 | uint8_t vdev_id; |
| 3716 | bool enable; |
| 3717 | }; |
| 3718 | |
| 3719 | /** |
| 3720 | * sme_motion_det_config - Post motion detection configuration msg to scheduler |
| 3721 | * @mac_handle: mac handle |
| 3722 | * @motion_det_cfg: motion detection configuration |
| 3723 | * |
| 3724 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3725 | */ |
| 3726 | QDF_STATUS sme_motion_det_config(mac_handle_t mac_handle, |
| 3727 | struct sme_motion_det_cfg *motion_det_cfg); |
| 3728 | |
| 3729 | /** |
| 3730 | * sme_motion_det_enable - Post motion detection start/stop msg to scheduler |
| 3731 | * @mac_handle: mac handle |
| 3732 | * @motion_det_en: motion detection start/stop |
| 3733 | * |
| 3734 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3735 | */ |
| 3736 | QDF_STATUS sme_motion_det_enable(mac_handle_t mac_handle, |
| 3737 | struct sme_motion_det_en *motion_det_en); |
| 3738 | |
| 3739 | /** |
| 3740 | * sme_motion_det_base_line_config - Post md baselining cfg msg to scheduler |
| 3741 | * @mac_handle: mac handle |
| 3742 | * @motion_det_base_line_cfg: motion detection baselining configuration |
| 3743 | * |
| 3744 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3745 | */ |
| 3746 | QDF_STATUS sme_motion_det_base_line_config( |
| 3747 | mac_handle_t mac_handle, |
| 3748 | struct sme_motion_det_base_line_cfg *motion_det_base_line_cfg); |
| 3749 | |
| 3750 | /** |
| 3751 | * sme_motion_det_base_line_enable - Post md baselining enable msg to scheduler |
| 3752 | * @mac_handle: mac handle |
| 3753 | * @motion_det_base_line_en: motion detection baselining start/stop |
| 3754 | * |
| 3755 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3756 | */ |
| 3757 | QDF_STATUS sme_motion_det_base_line_enable( |
| 3758 | mac_handle_t mac_handle, |
| 3759 | struct sme_motion_det_base_line_en *motion_det_base_line_en); |
| 3760 | |
| 3761 | /** |
| 3762 | * sme_set_md_host_evt_cb - Register/set motion detection callback |
| 3763 | * @mac_handle: mac handle |
| 3764 | * @callback_fn: motion detection callback function pointer |
| 3765 | * @hdd_ctx: hdd context |
| 3766 | * |
| 3767 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3768 | */ |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 3769 | QDF_STATUS sme_set_md_host_evt_cb |
| 3770 | ( |
| 3771 | mac_handle_t mac_handle, |
| 3772 | QDF_STATUS (*callback_fn)(void *ctx, struct sir_md_evt *event), |
| 3773 | void *hdd_ctx |
| 3774 | ); |
Visweswara Tanuku | 41d21c0 | 2019-10-25 14:51:59 +0530 | [diff] [blame] | 3775 | |
| 3776 | /** |
| 3777 | * sme_set_md_bl_evt_cb - Register/set motion detection baseline callback |
| 3778 | * @mac_handle: mac handle |
| 3779 | * @callback_fn: callback function pointer |
| 3780 | * @hdd_ctx: hdd context |
| 3781 | * |
| 3782 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 3783 | */ |
| 3784 | QDF_STATUS sme_set_md_bl_evt_cb |
| 3785 | ( |
| 3786 | mac_handle_t mac_handle, |
| 3787 | QDF_STATUS (*callback_fn)(void *ctx, struct sir_md_bl_evt *event), |
| 3788 | void *hdd_ctx |
| 3789 | ); |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 3790 | #endif /* WLAN_FEATURE_MOTION_DETECTION */ |
Visweswara Tanuku | 41d21c0 | 2019-10-25 14:51:59 +0530 | [diff] [blame] | 3791 | |
Visweswara Tanuku | 025f586 | 2019-01-08 17:35:33 +0530 | [diff] [blame] | 3792 | #ifdef FW_THERMAL_THROTTLE_SUPPORT |
| 3793 | /** |
| 3794 | * sme_set_thermal_throttle_cfg() - SME API to set the thermal throttle |
| 3795 | * configuration parameters |
| 3796 | * @mac_handle: Opaque handle to the global MAC context |
| 3797 | * @enable: Enable Throttle |
| 3798 | * @dc: duty cycle in msecs |
| 3799 | * @dc_off_percent: duty cycle off percentage |
| 3800 | * @prio: Disables the transmit queues in fw that have lower priority |
| 3801 | * than value defined by prio |
| 3802 | * @target_temp: Target temperature |
| 3803 | * |
| 3804 | * Return: QDF_STATUS |
| 3805 | */ |
| 3806 | QDF_STATUS sme_set_thermal_throttle_cfg(mac_handle_t mac_handle, bool enable, |
| 3807 | uint32_t dc, uint32_t dc_off_percent, |
| 3808 | uint32_t prio, uint32_t target_temp); |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 3809 | |
Visweswara Tanuku | 025f586 | 2019-01-08 17:35:33 +0530 | [diff] [blame] | 3810 | /** |
| 3811 | * sme_set_thermal_mgmt() - SME API to set the thermal management params |
| 3812 | * @mac_handle: Opaque handle to the global MAC context |
| 3813 | * @lower_thresh_deg: Lower threshold value of Temperature |
| 3814 | * @higher_thresh_deg: Higher threshold value of Temperature |
| 3815 | * |
| 3816 | * Return: QDF_STATUS |
| 3817 | */ |
| 3818 | QDF_STATUS sme_set_thermal_mgmt(mac_handle_t mac_handle, |
| 3819 | uint16_t lower_thresh_deg, |
| 3820 | uint16_t higher_thresh_deg); |
| 3821 | #endif /* FW_THERMAL_THROTTLE_SUPPORT */ |
Abhinav Kumar | 338e57d | 2019-02-04 17:30:10 +0530 | [diff] [blame] | 3822 | |
| 3823 | /** |
| 3824 | * sme_update_hidden_ssid_status_cb() - cb fun to update hidden ssid stats |
| 3825 | * @mac_handle: mac handler |
| 3826 | * @cb: cb of type hidden_ssid_cb |
| 3827 | */ |
| 3828 | QDF_STATUS sme_update_hidden_ssid_status_cb(mac_handle_t mac_handle, |
| 3829 | hidden_ssid_cb cb); |
| 3830 | |
Min Liu | 0daa098 | 2019-02-01 17:50:44 +0800 | [diff] [blame] | 3831 | /** |
| 3832 | * sme_update_owe_info() - Update OWE info |
| 3833 | * @mac: mac context |
| 3834 | * @assoc_ind: assoc ind |
| 3835 | * |
| 3836 | * Return: QDF_STATUS |
| 3837 | */ |
| 3838 | QDF_STATUS sme_update_owe_info(struct mac_context *mac, |
| 3839 | struct assoc_ind *assoc_ind); |
Arun Kumar Khandavalli | deda5a8 | 2019-03-11 15:32:19 +0530 | [diff] [blame] | 3840 | |
| 3841 | #ifdef WLAN_MWS_INFO_DEBUGFS |
| 3842 | /** |
| 3843 | * sme_get_mws_coex_info() - SME API to get the coex information |
| 3844 | * @mac_handle: mac handler |
| 3845 | * @vdev_id: Vdev_id |
| 3846 | * @cmd_id: enum mws_coex_cmdid which information is needed. |
| 3847 | * @callback_fn: Callback function |
| 3848 | * @context: callback context |
| 3849 | * |
| 3850 | * Return: QDF_STATUS |
| 3851 | */ |
| 3852 | QDF_STATUS |
| 3853 | sme_get_mws_coex_info(mac_handle_t mac_handle, uint32_t vdev_id, |
| 3854 | uint32_t cmd_id, void (*callback_fn)(void *coex_info_data, |
| 3855 | void *context, |
| 3856 | wmi_mws_coex_cmd_id |
| 3857 | cmd_id), |
| 3858 | void *context); |
| 3859 | #endif /* WLAN_MWS_INFO_DEBUGFS */ |
| 3860 | |
Abhinav Kumar | 0ed614c | 2019-04-11 22:11:47 +0530 | [diff] [blame] | 3861 | #ifdef WLAN_BCN_RECV_FEATURE |
| 3862 | /** |
| 3863 | * sme_register_bcn_recv_pause_ind_cb() - Register pause ind cb |
| 3864 | * mac_handle: man handler |
| 3865 | * cb: callback function to HDD |
| 3866 | * |
| 3867 | * This function register HDD callback in order to indicate beacon |
| 3868 | * receive pause indication to userspace. |
| 3869 | * |
| 3870 | * return QDF_STATUS of cb registration |
| 3871 | */ |
| 3872 | QDF_STATUS sme_register_bcn_recv_pause_ind_cb(mac_handle_t mac_handle, |
| 3873 | beacon_pause_cb cb); |
| 3874 | |
| 3875 | #else |
| 3876 | static inline |
| 3877 | QDF_STATUS sme_register_bcn_recv_pause_ind_cb(mac_handle_t mac_handle, |
| 3878 | beacon_pause_cb cb) |
| 3879 | { |
| 3880 | return QDF_STATUS_SUCCESS; |
| 3881 | } |
| 3882 | #endif |
| 3883 | |
Srinivas Dasari | 37e3731 | 2019-06-30 23:50:24 +0530 | [diff] [blame] | 3884 | /** |
| 3885 | * sme_set_disconnect_ies() - set disconnect IEs |
| 3886 | * @mac_handle: handle returned by mac_open |
| 3887 | * @vdev_id: vdev id |
| 3888 | * @ie_data: Disconnect IE data |
| 3889 | * @ie_len: Disconnect IE length |
| 3890 | * |
| 3891 | * Return: QDF_STATUS |
| 3892 | */ |
| 3893 | QDF_STATUS sme_set_disconnect_ies(mac_handle_t mac_handle, uint8_t vdev_id, |
| 3894 | uint8_t *ie_data, uint16_t ie_len); |
Jianmin Zhu | 5ce64f4 | 2019-07-15 19:20:09 +0800 | [diff] [blame] | 3895 | |
Jianmin Zhu | 5ce64f4 | 2019-07-15 19:20:09 +0800 | [diff] [blame] | 3896 | void sme_chan_to_freq_list( |
| 3897 | struct wlan_objmgr_pdev *pdev, |
| 3898 | uint32_t *freq_list, |
| 3899 | const uint8_t *chan_list, |
| 3900 | uint32_t chan_list_len); |
Srinivas Dasari | f4e1b12 | 2019-08-22 03:39:48 +0530 | [diff] [blame] | 3901 | |
| 3902 | /** |
| 3903 | * sme_set_roam_triggers() - Send roam trigger bitmap to WMA |
| 3904 | * @mac_handle: Opaque handle to the MAC context |
| 3905 | * @triggers: Carries pointer of the object containing vdev id and |
| 3906 | * roam_trigger_bitmap. |
| 3907 | * |
| 3908 | * Send the roam trigger bitmap received to WMA/WMI. WMI converts |
| 3909 | * the bitmap to firmware compatible bitmap as per reasons |
| 3910 | * defined @WMI_ROAM_TRIGGER_REASON_ID |
| 3911 | * |
| 3912 | * Return: QDF_STATUS |
| 3913 | */ |
| 3914 | QDF_STATUS sme_set_roam_triggers(mac_handle_t mac_handle, |
| 3915 | struct roam_triggers *triggers); |
Srinivas Dasari | 391692d | 2019-08-21 08:40:53 +0530 | [diff] [blame] | 3916 | |
| 3917 | /** |
| 3918 | * sme_set_roam_config_enable() - Cache roam config status in SME |
| 3919 | * @mac_handle: Opaque handle to the MAC context |
| 3920 | * @vdev_id: vdev id |
| 3921 | * @roam_control_enable: Carries a non-zero value if the current set request is |
| 3922 | * for enable, otherwise carries a 0. |
| 3923 | * |
| 3924 | * Cache control roam config enable/disable status in SME so that the |
| 3925 | * userspace can query for the status based on a vdev/session at any time. |
| 3926 | * |
| 3927 | * Return: QDF_STATUS |
| 3928 | */ |
| 3929 | QDF_STATUS sme_set_roam_config_enable(mac_handle_t mac_handle, |
| 3930 | uint8_t vdev_id, |
| 3931 | uint8_t roam_control_enable); |
Srinivas Dasari | 9ad9e25 | 2019-08-20 11:43:06 +0530 | [diff] [blame] | 3932 | |
| 3933 | /** |
| 3934 | * sme_get_roam_config_status() - Get roam config status from SME |
| 3935 | * @mac_handle: Opaque handle to the MAC context |
| 3936 | * @vdev_id: vdev id |
| 3937 | * @config_status: Pointer of a buffer to fill the status |
| 3938 | * |
| 3939 | * Get the cached control roam config status in SME and copy to status. |
| 3940 | * |
| 3941 | * Return: QDF_STATUS |
| 3942 | */ |
| 3943 | QDF_STATUS sme_get_roam_config_status(mac_handle_t mac_handle, uint8_t vdev_id, |
| 3944 | uint8_t *config_status); |
Srinivas Dasari | a33fdd8 | 2019-08-21 16:15:22 +0530 | [diff] [blame] | 3945 | |
| 3946 | /** |
Srinivas Dasari | 240d327 | 2019-09-20 12:00:57 +0530 | [diff] [blame] | 3947 | * sme_get_full_roam_scan_period_global() - get global full scan refresh period |
| 3948 | * @mac_handle: The handle returned by mac_open |
| 3949 | * |
| 3950 | * Return: Full roam scan period configured through ini |
| 3951 | */ |
| 3952 | uint16_t sme_get_full_roam_scan_period_global(mac_handle_t mac_handle); |
| 3953 | |
| 3954 | /** |
Srinivas Dasari | a33fdd8 | 2019-08-21 16:15:22 +0530 | [diff] [blame] | 3955 | * sme_get_full_roam_scan_period() - Get full roam scan period |
| 3956 | * @mac_handle: Opaque handle to the MAC context |
| 3957 | * @vdev_id: vdev id |
| 3958 | * @full_roam_scan_period: Pointer of a buffer to fill the full roam scan period |
| 3959 | * |
| 3960 | * Get the full scan period cached in neighborRoamInfo and fill in the given |
| 3961 | * buffer full_roam_scan_period. |
| 3962 | * |
| 3963 | * Return: QDF_STATUS |
| 3964 | */ |
| 3965 | QDF_STATUS sme_get_full_roam_scan_period(mac_handle_t mac_handle, |
| 3966 | uint8_t vdev_id, |
| 3967 | uint32_t *full_roam_scan_period); |
Arun Kumar Khandavalli | add284b | 2019-10-23 12:27:39 +0530 | [diff] [blame] | 3968 | |
| 3969 | /** |
| 3970 | * sme_check_for_duplicate_session() - check for duplicate session |
| 3971 | * @mac_handle: Opaque handle to the MAC context |
| 3972 | * @peer_addr: Peer device mac address |
| 3973 | * |
| 3974 | * Check for duplicate mac address is available on other vdev. |
| 3975 | * |
| 3976 | * Return: QDF_STATUS |
| 3977 | */ |
| 3978 | QDF_STATUS sme_check_for_duplicate_session(mac_handle_t mac_handle, |
| 3979 | uint8_t *peer_addr); |
Sourav Mohapatra | 2a67b0e | 2019-10-15 17:59:59 +0530 | [diff] [blame] | 3980 | #ifdef FEATURE_ANI_LEVEL_REQUEST |
| 3981 | /* |
| 3982 | * sme_get_ani_level() - |
| 3983 | * A wrapper function that client calls to register a callback to get ani level |
| 3984 | * |
| 3985 | * @mac_handle - pointer to mac handle |
| 3986 | * @freqs - frequencies for which ANI level has to be fetched |
| 3987 | * @num_freqs - number of frequencies |
| 3988 | * @callback - SME sends back the ani level using the callback |
| 3989 | * @context - user context to be passed back along with the callback |
| 3990 | * |
| 3991 | * Return: QDF_STATUS |
| 3992 | */ |
| 3993 | QDF_STATUS sme_get_ani_level(mac_handle_t mac_handle, uint32_t *freqs, |
| 3994 | uint8_t num_freqs, void (*callback)( |
| 3995 | struct wmi_host_ani_level_event *ani, uint8_t num, |
| 3996 | void *context), void *context); |
| 3997 | #endif /* FEATURE_ANI_LEVEL_REQUEST */ |
Ashish Kumar Dhanotiya | d8d7dea | 2019-10-24 14:34:56 +0530 | [diff] [blame] | 3998 | |
| 3999 | #ifdef FEATURE_OEM_DATA |
| 4000 | /** |
| 4001 | * sme_set_oem_data_event_handler_cb() - Register oem data event handler |
| 4002 | * callback |
| 4003 | * @mac_handle: Opaque handle to the MAC context |
| 4004 | * @oem_data_event_handler_cb: callback to be registered |
| 4005 | * |
| 4006 | * Return: QDF_STATUS |
| 4007 | */ |
| 4008 | QDF_STATUS sme_set_oem_data_event_handler_cb( |
| 4009 | mac_handle_t mac_handle, |
| 4010 | void (*oem_data_event_handler_cb) |
| 4011 | (const struct oem_data *oem_event_data)); |
| 4012 | |
| 4013 | /** |
| 4014 | * sme_reset_oem_data_event_handler_cb() - De-register oem data event handler |
| 4015 | * @mac_handle: Handler return by mac_open |
| 4016 | * |
| 4017 | * This function De-registers the OEM data event handler callback to SME |
| 4018 | * |
| 4019 | * Return: None |
| 4020 | */ |
| 4021 | void sme_reset_oem_data_event_handler_cb(mac_handle_t mac_handle); |
| 4022 | #else |
| 4023 | static inline QDF_STATUS sme_set_oem_data_event_handler_cb( |
| 4024 | mac_handle_t mac_handle, |
| 4025 | void (*oem_data_event_handler_cb) |
| 4026 | (void *oem_event_data)) |
| 4027 | { |
| 4028 | return QDF_STATUS_SUCCESS; |
| 4029 | } |
| 4030 | |
| 4031 | static inline void sme_reset_oem_data_event_handler_cb(mac_handle_t mac_handle) |
| 4032 | { |
| 4033 | } |
| 4034 | #endif |
| 4035 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4036 | #endif /* #if !defined( __SME_API_H ) */ |