Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Abhishek Ambure | 5e9b6a4 | 2020-02-12 21:32:35 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011-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(__SMEINTERNAL_H) |
| 20 | #define __SMEINTERNAL_H |
| 21 | |
| 22 | /** |
| 23 | * \file sme_internal.h |
| 24 | * |
| 25 | * \brief prototype for SME internal structures and APIs used for SME and MAC |
| 26 | */ |
| 27 | |
| 28 | /*-------------------------------------------------------------------------- |
| 29 | Include Files |
| 30 | ------------------------------------------------------------------------*/ |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 31 | #include "qdf_status.h" |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 32 | #include "qdf_lock.h" |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 33 | #include "qdf_trace.h" |
Anurag Chouhan | 600c3a0 | 2016-03-01 10:33:54 +0530 | [diff] [blame] | 34 | #include "qdf_mem.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 35 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 36 | #include "host_diag_core_event.h" |
| 37 | #include "csr_link_list.h" |
| 38 | #include "sme_power_save.h" |
Arun Kumar Khandavalli | deda5a8 | 2019-03-11 15:32:19 +0530 | [diff] [blame] | 39 | #include "wmi_unified.h" |
Ashish Kumar Dhanotiya | d8d7dea | 2019-10-24 14:34:56 +0530 | [diff] [blame] | 40 | #include "wmi_unified_param.h" |
Jeff Johnson | c45168b | 2018-07-04 14:23:08 -0700 | [diff] [blame] | 41 | |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 42 | struct wmi_twt_enable_complete_event_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | /*-------------------------------------------------------------------------- |
| 44 | Type declarations |
| 45 | ------------------------------------------------------------------------*/ |
| 46 | |
| 47 | /* Mask can be only have one bit set */ |
| 48 | typedef enum eSmeCommandType { |
| 49 | eSmeNoCommand = 0, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 50 | /* this is not a command, it is to identify this is a CSR command */ |
| 51 | eSmeCsrCommandMask = 0x10000, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 52 | eSmeCommandRoam, |
| 53 | eSmeCommandWmStatusChange, |
Ashish Kumar Dhanotiya | b9dc8a2 | 2020-04-13 18:28:20 +0530 | [diff] [blame] | 54 | eSmeCommandGetdisconnectStats, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | /* QOS */ |
| 56 | eSmeQosCommandMask = 0x40000, /* To identify Qos commands */ |
| 57 | eSmeCommandAddTs, |
| 58 | eSmeCommandDelTs, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 59 | e_sme_command_set_hw_mode, |
| 60 | e_sme_command_nss_update, |
| 61 | e_sme_command_set_dual_mac_config, |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 62 | e_sme_command_set_antenna_mode, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | } eSmeCommandType; |
| 64 | |
| 65 | typedef enum eSmeState { |
| 66 | SME_STATE_STOP, |
| 67 | SME_STATE_START, |
| 68 | SME_STATE_READY, |
| 69 | } eSmeState; |
| 70 | |
Jeff Johnson | 72021f7 | 2018-11-22 14:23:47 -0800 | [diff] [blame] | 71 | #define SME_IS_START(mac) (SME_STATE_STOP != (mac)->sme.state) |
| 72 | #define SME_IS_READY(mac) (SME_STATE_READY == (mac)->sme.state) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 73 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 74 | /* HDD Callback function */ |
Jeff Johnson | 56ba88a | 2019-02-17 17:18:43 -0800 | [diff] [blame] | 75 | typedef void (*ibss_peer_info_cb)(void *cb_context, |
| 76 | tSirPeerInfoRspParams *infoParam); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 77 | |
| 78 | /* Peer info */ |
Jeff Johnson | 56ba88a | 2019-02-17 17:18:43 -0800 | [diff] [blame] | 79 | struct ibss_peer_info_cb_info { |
| 80 | void *peer_info_cb_context; |
Jeff Johnson | d6a2316 | 2019-02-17 16:46:37 -0800 | [diff] [blame] | 81 | ibss_peer_info_cb peer_info_cb; |
Jeff Johnson | 56ba88a | 2019-02-17 17:18:43 -0800 | [diff] [blame] | 82 | }; |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 83 | |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 84 | /** |
| 85 | * struct stats_ext_event - stats_ext_event payload |
| 86 | * @vdev_id: ID of the vdev for the stats |
| 87 | * @event_data_len: length of the @event_data |
| 88 | * @event_data: actual ext stats |
| 89 | */ |
| 90 | struct stats_ext_event { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 91 | uint32_t vdev_id; |
| 92 | uint32_t event_data_len; |
| 93 | uint8_t event_data[]; |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 94 | }; |
| 95 | |
| 96 | /** |
| 97 | * typedef stats_ext_cb - stats ext callback |
| 98 | * @hdd_handle: Opaque handle to the HDD context |
| 99 | * @data: stats ext payload from firmware |
| 100 | */ |
| 101 | typedef void (*stats_ext_cb)(hdd_handle_t hdd_handle, |
| 102 | struct stats_ext_event *data); |
| 103 | |
| 104 | /** |
| 105 | * typedef stats_ext2_cb - stats ext2 callback |
| 106 | * @hdd_handle: Opaque handle to the HDD context |
| 107 | * @data: stats ext2 payload from firmware |
| 108 | */ |
| 109 | typedef void (*stats_ext2_cb)(hdd_handle_t hdd_handle, |
| 110 | struct sir_sme_rx_aggr_hole_ind *data); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | |
| 112 | #define MAX_ACTIVE_CMD_STATS 16 |
| 113 | |
| 114 | typedef struct sActiveCmdStats { |
| 115 | eSmeCommandType command; |
| 116 | uint32_t reason; |
| 117 | uint32_t sessionId; |
| 118 | uint64_t timestamp; |
| 119 | } tActiveCmdStats; |
| 120 | |
| 121 | typedef struct sSelfRecoveryStats { |
| 122 | tActiveCmdStats activeCmdStats[MAX_ACTIVE_CMD_STATS]; |
| 123 | uint8_t cmdStatsIndx; |
| 124 | } tSelfRecoveryStats; |
| 125 | |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 126 | typedef void (*link_layer_stats_cb)(hdd_handle_t hdd_handle, |
| 127 | int indication_type, |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 128 | tSirLLStatsResults *results, |
| 129 | void *cookie); |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 130 | |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 131 | typedef void (*ext_scan_ind_cb)(hdd_handle_t hdd_handle, |
| 132 | const uint16_t, void *); |
| 133 | |
Jeff Johnson | e943bca | 2019-02-08 22:45:17 -0800 | [diff] [blame] | 134 | /** |
| 135 | * typedef sme_link_speed_cb - sme_get_link_speed() callback function |
| 136 | * @info: link speed information |
| 137 | * @context: user context supplied to sme_get_link_speed() |
| 138 | * |
| 139 | * This is the signature of a callback function whose addresses is |
| 140 | * passed as the asynchronous callback function to sme_get_link_speed(). |
| 141 | */ |
| 142 | |
| 143 | typedef void (*sme_link_speed_cb)(struct link_speed_info *info, |
| 144 | void *context); |
| 145 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 146 | typedef void (*ocb_callback)(void *context, void *response); |
Jeff Johnson | 0e96308 | 2018-07-04 19:39:20 -0700 | [diff] [blame] | 147 | typedef void (*sme_set_thermal_level_callback)(hdd_handle_t hdd_handle, |
| 148 | u_int8_t level); |
Jeff Johnson | f7e36d6 | 2018-07-04 21:14:02 -0700 | [diff] [blame] | 149 | typedef void (*p2p_lo_callback)(void *context, |
| 150 | struct sir_p2p_lo_event *event); |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 151 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 152 | typedef void (*sme_send_oem_data_rsp_msg)(struct oem_data_rsp *); |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 153 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 154 | |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 155 | typedef void (*twt_enable_cb)(hdd_handle_t hdd_handle, |
| 156 | struct wmi_twt_enable_complete_event_param *params); |
| 157 | typedef void (*twt_disable_cb)(hdd_handle_t hdd_handle); |
| 158 | |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 159 | #ifdef FEATURE_WLAN_APF |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 160 | /** |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 161 | * typedef apf_get_offload_cb - APF offload callback signature |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 162 | * @context: Opaque context that the client can use to associate the |
| 163 | * callback with the request |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 164 | * @caps: APF offload capabilities as reported by firmware |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 165 | */ |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 166 | struct sir_apf_get_offload; |
| 167 | typedef void (*apf_get_offload_cb)(void *context, |
| 168 | struct sir_apf_get_offload *caps); |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 169 | |
Jeff Johnson | e8216e8 | 2017-01-26 15:54:51 -0800 | [diff] [blame] | 170 | /** |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 171 | * typedef apf_read_mem_cb - APF read memory response callback |
| 172 | * @context: Opaque context that the client can use to associate the |
| 173 | * callback with the request |
| 174 | * @evt: APF read memory response event parameters |
| 175 | */ |
| 176 | typedef void (*apf_read_mem_cb)(void *context, |
| 177 | struct wmi_apf_read_memory_resp_event_params |
| 178 | *evt); |
| 179 | #endif /* FEATURE_WLAN_APF */ |
| 180 | |
| 181 | /** |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 182 | * typedef rssi_threshold_breached_cb - RSSI threshold breach callback |
| 183 | * @hdd_handle: Opaque handle to the HDD context |
| 184 | * @event: The RSSI breach event |
| 185 | */ |
| 186 | typedef void (*rssi_threshold_breached_cb)(hdd_handle_t hdd_handle, |
| 187 | struct rssi_breach_event *event); |
| 188 | |
| 189 | /** |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 190 | * typedef get_chain_rssi_callback - get chain rssi callback |
| 191 | * @context: Opaque context that the client can use to associate the |
| 192 | * callback with the request |
| 193 | * @data: chain rssi result reported by firmware |
| 194 | */ |
| 195 | struct chain_rssi_result; |
| 196 | typedef void (*get_chain_rssi_callback)(void *context, |
| 197 | struct chain_rssi_result *data); |
| 198 | |
Qun Zhang | ef65562 | 2019-02-25 10:48:10 +0800 | [diff] [blame] | 199 | #ifdef FEATURE_FW_STATE |
| 200 | /** |
| 201 | * typedef fw_state_callback - get firmware state callback |
| 202 | * @context: Opaque context that the client can use to associate the |
| 203 | * callback with the request |
| 204 | */ |
| 205 | typedef void (*fw_state_callback)(void *context); |
| 206 | #endif /* FEATURE_FW_STATE */ |
| 207 | |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 208 | typedef void (*tx_queue_cb)(hdd_handle_t hdd_handle, uint32_t vdev_id, |
| 209 | enum netif_action_type action, |
| 210 | enum netif_reason_type reason); |
| 211 | |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 212 | /** |
| 213 | * typedef pwr_save_fail_cb - power save fail callback function |
| 214 | * @hdd_handle: HDD handle registered with SME |
| 215 | * @params: failure parameters |
| 216 | */ |
| 217 | struct chip_pwr_save_fail_detected_params; |
| 218 | typedef void (*pwr_save_fail_cb)(hdd_handle_t hdd_handle, |
| 219 | struct chip_pwr_save_fail_detected_params *params); |
| 220 | |
Jeff Johnson | f6182e4 | 2018-07-03 14:46:17 -0700 | [diff] [blame] | 221 | /** |
Jeff Johnson | d0b6c7e | 2018-07-04 14:53:06 -0700 | [diff] [blame] | 222 | * typedef bt_activity_info_cb - bluetooth activity callback function |
| 223 | * @hdd_handle: HDD handle registered with SME |
| 224 | * @bt_activity: bluetooth activity information |
| 225 | */ |
| 226 | typedef void (*bt_activity_info_cb)(hdd_handle_t hdd_handle, |
| 227 | uint32_t bt_activity); |
| 228 | |
| 229 | /** |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 230 | * typedef rso_cmd_status_cb - RSO command status callback function |
| 231 | * @hdd_handle: HDD handle registered with SME |
| 232 | * @rso_status: Status of the operation |
| 233 | */ |
| 234 | typedef void (*rso_cmd_status_cb)(hdd_handle_t hdd_handle, |
| 235 | struct rso_cmd_status *rso_status); |
| 236 | |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 237 | /** |
| 238 | * typedef lost_link_info_cb - lost link indication callback function |
| 239 | * @hdd_handle: HDD handle registered with SME |
| 240 | * @lost_link_info: Information about the lost link |
| 241 | */ |
| 242 | typedef void (*lost_link_info_cb)(hdd_handle_t hdd_handle, |
| 243 | struct sir_lost_link_info *lost_link_info); |
Abhinav Kumar | 338e57d | 2019-02-04 17:30:10 +0530 | [diff] [blame] | 244 | /** |
| 245 | * typedef hidden_ssid_cb - hidden ssid rsp callback fun |
| 246 | * @hdd_handle: HDD handle registered with SME |
| 247 | * @vdev_id: Vdev Id |
| 248 | */ |
| 249 | typedef void (*hidden_ssid_cb)(hdd_handle_t hdd_handle, |
| 250 | uint8_t vdev_id); |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 251 | |
Abhinav Kumar | 4d1f9f4 | 2019-05-07 13:14:49 +0530 | [diff] [blame] | 252 | /** |
| 253 | * typedef bcn_report_cb - recv bcn callback fun |
| 254 | * @hdd_handle: HDD handle registered with SME |
| 255 | * @beacon_report: Beacon report structure |
| 256 | */ |
Bapiraju Alla | 1c4c0b2 | 2020-03-25 10:23:42 +0530 | [diff] [blame] | 257 | typedef QDF_STATUS (*beacon_report_cb) |
| 258 | (hdd_handle_t hdd_handle, struct wlan_beacon_report *beacon_report); |
Abhinav Kumar | 4d1f9f4 | 2019-05-07 13:14:49 +0530 | [diff] [blame] | 259 | |
Abhinav Kumar | 0ed614c | 2019-04-11 22:11:47 +0530 | [diff] [blame] | 260 | /** |
| 261 | * beacon_pause_cb : scan start callback fun |
| 262 | * @hdd_handler: HDD handler |
| 263 | * @vdev_id: vdev id |
| 264 | * @type: scan event type |
Abhinav Kumar | 3922215 | 2019-05-13 23:53:40 +0530 | [diff] [blame] | 265 | * @is_disconnected: Driver is in dis connected state or not |
Abhinav Kumar | 0ed614c | 2019-04-11 22:11:47 +0530 | [diff] [blame] | 266 | */ |
| 267 | typedef void (*beacon_pause_cb)(hdd_handle_t hdd_handle, |
| 268 | uint8_t vdev_id, |
Abhinav Kumar | 3922215 | 2019-05-13 23:53:40 +0530 | [diff] [blame] | 269 | enum scan_event_type type, |
| 270 | bool is_disconnected); |
Abhinav Kumar | 0ed614c | 2019-04-11 22:11:47 +0530 | [diff] [blame] | 271 | |
guangde | 4853c40 | 2019-05-06 15:54:04 +0800 | [diff] [blame] | 272 | /** |
| 273 | * typedef sme_get_isolation_cb - get isolation callback fun |
| 274 | * @param: isolation result reported by firmware |
| 275 | * @pcontext: Opaque context that the client can use to associate the |
| 276 | * callback with the request |
| 277 | */ |
| 278 | typedef void (*sme_get_isolation_cb)(struct sir_isolation_resp *param, |
| 279 | void *pcontext); |
| 280 | |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 281 | #ifdef WLAN_FEATURE_MOTION_DETECTION |
Visweswara Tanuku | 6488a1c | 2019-02-13 14:15:26 +0530 | [diff] [blame] | 282 | typedef QDF_STATUS (*md_host_evt_cb)(void *hdd_ctx, struct sir_md_evt *event); |
Visweswara Tanuku | 41d21c0 | 2019-10-25 14:51:59 +0530 | [diff] [blame] | 283 | typedef QDF_STATUS (*md_bl_evt_cb)(void *hdd_ctx, struct sir_md_bl_evt *event); |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 284 | #endif /* WLAN_FEATURE_MOTION_DETECTION */ |
| 285 | |
Jeff Johnson | 50980e1 | 2019-02-17 11:38:30 -0800 | [diff] [blame] | 286 | struct sme_context { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 287 | eSmeState state; |
Jeff Johnson | 3e7a493 | 2019-02-17 12:11:36 -0800 | [diff] [blame] | 288 | qdf_mutex_t sme_global_lock; |
Jeff Johnson | 2a84c53 | 2019-02-17 12:22:04 -0800 | [diff] [blame] | 289 | uint32_t sme_cmd_count; |
Naveen Rawat | e7d8605 | 2015-11-13 12:01:43 -0800 | [diff] [blame] | 290 | /* following pointer contains array of pointers for tSmeCmd* */ |
Jeff Johnson | 1935317 | 2019-02-17 12:53:46 -0800 | [diff] [blame] | 291 | void **sme_cmd_buf_addr; |
Jeff Johnson | ea9f3d7 | 2019-02-17 13:27:55 -0800 | [diff] [blame] | 292 | tDblLinkList sme_cmd_freelist; /* preallocated roam cmd list */ |
Jeff Johnson | 5a6a0c9 | 2019-02-17 16:12:02 -0800 | [diff] [blame] | 293 | enum QDF_OPMODE curr_device_mode; |
Jeff Johnson | e7aa5cd | 2019-02-17 19:36:01 -0800 | [diff] [blame] | 294 | struct ibss_peer_info_cb_info peer_info_cb_info; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 295 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR |
| 296 | host_event_wlan_status_payload_type eventPayload; |
| 297 | #endif |
Dundi Raviteja | e232cf1 | 2018-05-16 18:34:34 +0530 | [diff] [blame] | 298 | void *ll_stats_context; |
Jeff Johnson | 959f369 | 2018-07-03 17:30:40 -0700 | [diff] [blame] | 299 | link_layer_stats_cb link_layer_stats_cb; |
Jeff Johnson | 2d29212 | 2018-06-02 21:02:02 -0700 | [diff] [blame] | 300 | void (*link_layer_stats_ext_cb)(hdd_handle_t callback_ctx, |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 301 | tSirLLStatsResults *rsp); |
Aditya Kodukula | 0a59037 | 2020-04-15 13:30:14 -0700 | [diff] [blame^] | 302 | #ifdef WLAN_POWER_DEBUG |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 303 | void *power_debug_stats_context; |
| 304 | void (*power_stats_resp_callback)(struct power_stats_response *rsp, |
| 305 | void *callback_context); |
Aditya Kodukula | 0a59037 | 2020-04-15 13:30:14 -0700 | [diff] [blame^] | 306 | #endif |
Arunk Khandavalli | ca56d4b | 2018-11-29 15:46:00 +0530 | [diff] [blame] | 307 | #ifdef WLAN_FEATURE_BEACON_RECEPTION_STATS |
| 308 | void *beacon_stats_context; |
| 309 | void (*beacon_stats_resp_callback)(struct bcn_reception_stats_rsp *rsp, |
| 310 | void *callback_context); |
| 311 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
Jeff Johnson | eb7bbed | 2019-02-17 10:34:24 -0800 | [diff] [blame] | 313 | void (*auto_shutdown_cb)(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 314 | #endif |
| 315 | /* Maximum interfaces allowed by the host */ |
| 316 | uint8_t max_intf_count; |
Jeff Johnson | 4584365 | 2018-07-04 12:47:34 -0700 | [diff] [blame] | 317 | stats_ext_cb stats_ext_cb; |
| 318 | stats_ext2_cb stats_ext2_cb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 319 | /* linkspeed callback */ |
Jeff Johnson | e943bca | 2019-02-08 22:45:17 -0800 | [diff] [blame] | 320 | sme_link_speed_cb link_speed_cb; |
| 321 | void *link_speed_context; |
Ashish Kumar Dhanotiya | 1ac4188 | 2019-06-27 20:35:31 +0530 | [diff] [blame] | 322 | |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 323 | /* get extended peer info callback */ |
| 324 | void (*pget_peer_info_ext_ind_cb)(struct sir_peer_info_ext_resp *param, |
| 325 | void *pcontext); |
| 326 | void *pget_peer_info_ext_cb_context; |
guangde | 4853c40 | 2019-05-06 15:54:04 +0800 | [diff] [blame] | 327 | sme_get_isolation_cb get_isolation_cb; |
| 328 | void *get_isolation_cb_context; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 329 | #ifdef FEATURE_WLAN_EXTSCAN |
Jeff Johnson | 17b1239 | 2018-07-03 22:21:15 -0700 | [diff] [blame] | 330 | ext_scan_ind_cb ext_scan_ind_cb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 331 | #endif /* FEATURE_WLAN_EXTSCAN */ |
Jeff Johnson | ca7a716 | 2018-07-07 12:56:54 -0700 | [diff] [blame] | 332 | csr_link_status_callback link_status_callback; |
| 333 | void *link_status_context; |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 334 | int (*get_tsf_cb)(void *pcb_cxt, struct stsf *ptsf); |
| 335 | void *get_tsf_cxt; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 336 | /* get temperature event context and callback */ |
Jeff Johnson | 3f3ad25 | 2019-02-17 20:44:11 -0800 | [diff] [blame] | 337 | void *temperature_cb_context; |
| 338 | void (*temperature_cb)(int temperature, void *context); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 339 | uint8_t miracast_value; |
| 340 | struct ps_global_info ps_global_info; |
Jeff Johnson | 3201e62 | 2018-07-04 10:05:18 -0700 | [diff] [blame] | 341 | rssi_threshold_breached_cb rssi_threshold_breached_cb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 342 | sme_set_thermal_level_callback set_thermal_level_cb; |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 343 | void *apf_get_offload_context; |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 344 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 345 | p2p_lo_callback p2p_lo_event_callback; |
| 346 | void *p2p_lo_event_context; |
Rachit Kankane | 026e77a | 2018-07-31 16:21:09 +0530 | [diff] [blame] | 347 | #endif |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 348 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | bbbf2ef | 2016-08-03 14:06:26 -0700 | [diff] [blame] | 349 | sme_send_oem_data_rsp_msg oem_data_rsp_callback; |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 350 | #endif |
Jeff Johnson | dc198ec | 2018-07-04 17:39:53 -0700 | [diff] [blame] | 351 | lost_link_info_cb lost_link_info_cb; |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 352 | |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 353 | bool (*set_connection_info_cb)(bool); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 354 | bool (*get_connection_info_cb)(uint8_t *session_id, |
| 355 | enum scan_reject_states *reason); |
Jeff Johnson | 4397514 | 2018-07-04 15:33:47 -0700 | [diff] [blame] | 356 | rso_cmd_status_cb rso_cmd_status_cb; |
Jeff Johnson | b7fa256 | 2018-07-02 08:36:17 -0700 | [diff] [blame] | 357 | pwr_save_fail_cb chip_power_save_fail_cb; |
Jeff Johnson | d0b6c7e | 2018-07-04 14:53:06 -0700 | [diff] [blame] | 358 | bt_activity_info_cb bt_activity_info_cb; |
Dundi Raviteja | 3bcf3a8 | 2018-05-22 13:24:18 +0530 | [diff] [blame] | 359 | void *get_arp_stats_context; |
| 360 | void (*get_arp_stats_cb)(void *, struct rsp_stats *, void *); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 361 | get_chain_rssi_callback get_chain_rssi_cb; |
| 362 | void *get_chain_rssi_context; |
Qun Zhang | ef65562 | 2019-02-25 10:48:10 +0800 | [diff] [blame] | 363 | #ifdef FEATURE_FW_STATE |
| 364 | fw_state_callback fw_state_cb; |
| 365 | void *fw_state_context; |
| 366 | #endif /* FEATURE_FW_STATE */ |
Jeff Johnson | da2afa4 | 2018-07-04 10:25:42 -0700 | [diff] [blame] | 367 | tx_queue_cb tx_queue_cb; |
Jeff Johnson | 3a08ff9 | 2018-07-03 19:40:44 -0700 | [diff] [blame] | 368 | twt_enable_cb twt_enable_cb; |
| 369 | twt_disable_cb twt_disable_cb; |
Nachiket Kukade | 177b5b0 | 2018-05-22 20:52:17 +0530 | [diff] [blame] | 370 | #ifdef FEATURE_WLAN_APF |
| 371 | apf_get_offload_cb apf_get_offload_cb; |
| 372 | apf_read_mem_cb apf_read_mem_cb; |
| 373 | #endif |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 374 | #ifdef WLAN_FEATURE_MOTION_DETECTION |
| 375 | md_host_evt_cb md_host_evt_cb; |
Visweswara Tanuku | 41d21c0 | 2019-10-25 14:51:59 +0530 | [diff] [blame] | 376 | md_bl_evt_cb md_bl_evt_cb; |
Visweswara Tanuku | 633976b | 2019-01-07 16:13:12 +0530 | [diff] [blame] | 377 | void *md_ctx; |
| 378 | #endif /* WLAN_FEATURE_MOTION_DETECTION */ |
Abhinav Kumar | 338e57d | 2019-02-04 17:30:10 +0530 | [diff] [blame] | 379 | /* hidden ssid rsp callback */ |
| 380 | hidden_ssid_cb hidden_ssid_cb; |
Arun Kumar Khandavalli | deda5a8 | 2019-03-11 15:32:19 +0530 | [diff] [blame] | 381 | #ifdef WLAN_MWS_INFO_DEBUGFS |
| 382 | void *mws_coex_info_ctx; |
| 383 | void (*mws_coex_info_state_resp_callback)(void *coex_info_data, |
| 384 | void *context, |
| 385 | wmi_mws_coex_cmd_id cmd_id); |
| 386 | #endif /* WLAN_MWS_INFO_DEBUGFS */ |
Abhinav Kumar | 338e57d | 2019-02-04 17:30:10 +0530 | [diff] [blame] | 387 | |
Abhinav Kumar | 4d1f9f4 | 2019-05-07 13:14:49 +0530 | [diff] [blame] | 388 | #ifdef WLAN_BCN_RECV_FEATURE |
| 389 | beacon_report_cb beacon_report_cb; |
Abhinav Kumar | 0ed614c | 2019-04-11 22:11:47 +0530 | [diff] [blame] | 390 | beacon_pause_cb beacon_pause_cb; |
Abhinav Kumar | 4d1f9f4 | 2019-05-07 13:14:49 +0530 | [diff] [blame] | 391 | #endif |
Ashish Kumar Dhanotiya | d8d7dea | 2019-10-24 14:34:56 +0530 | [diff] [blame] | 392 | #ifdef FEATURE_OEM_DATA |
| 393 | void (*oem_data_event_handler_cb) |
sheenam monga | 2ab7b47 | 2020-05-29 21:54:39 +0530 | [diff] [blame] | 394 | (const struct oem_data *oem_event_data, |
| 395 | uint8_t vdev_id); |
| 396 | uint8_t oem_data_vdev_id; |
Ashish Kumar Dhanotiya | d8d7dea | 2019-10-24 14:34:56 +0530 | [diff] [blame] | 397 | #endif |
Abhishek Ambure | 5e9b6a4 | 2020-02-12 21:32:35 +0530 | [diff] [blame] | 398 | sme_get_raom_scan_ch_callback roam_scan_ch_callback; |
| 399 | void *roam_scan_ch_get_context; |
Pankaj Singh | cb4da12 | 2020-03-27 00:44:47 +0530 | [diff] [blame] | 400 | #ifdef FEATURE_MONITOR_MODE_SUPPORT |
| 401 | void (*monitor_mode_cb)(uint8_t vdev_id); |
| 402 | #endif |
Jeff Johnson | 50980e1 | 2019-02-17 11:38:30 -0800 | [diff] [blame] | 403 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 404 | |
| 405 | #endif /* #if !defined( __SMEINTERNAL_H ) */ |