Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Sravan Kumar Kairam | b664b6c | 2018-02-27 17:43:10 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011, 2014-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | /** |
| 20 | * @file ol_htt_api.h |
| 21 | * @brief Specify the general HTT API functions called by the host data SW. |
| 22 | * @details |
| 23 | * This file declares the HTT API functions that are not specific to |
| 24 | * either tx nor rx. |
| 25 | */ |
| 26 | #ifndef _OL_HTT_API__H_ |
| 27 | #define _OL_HTT_API__H_ |
| 28 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 29 | #include <qdf_types.h> /* qdf_device_t */ |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 30 | #include <qdf_nbuf.h> /* qdf_nbuf_t */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 31 | #include <athdefs.h> /* A_STATUS */ |
| 32 | #include <htc_api.h> /* HTC_HANDLE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 33 | #include "htt.h" /* htt_dbg_stats_type, etc. */ |
Dhanashri Atre | 12a0839 | 2016-02-17 13:10:34 -0800 | [diff] [blame] | 34 | #include <cdp_txrx_cmn.h> /* ol_pdev_handle */ |
Leo Chang | 9872676 | 2016-10-28 11:07:18 -0700 | [diff] [blame] | 35 | #include <ol_defines.h> |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 36 | #include <cdp_txrx_handle.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 37 | /* TID */ |
| 38 | #define OL_HTT_TID_NON_QOS_UNICAST 16 |
| 39 | #define OL_HTT_TID_NON_QOS_MCAST_BCAST 18 |
| 40 | |
| 41 | struct htt_pdev_t; |
| 42 | typedef struct htt_pdev_t *htt_pdev_handle; |
| 43 | |
| 44 | htt_pdev_handle |
| 45 | htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev, |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 46 | struct cdp_cfg *ctrl_pdev, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 47 | HTC_HANDLE htc_pdev, qdf_device_t osdev); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 48 | |
| 49 | /** |
| 50 | * @brief Allocate and initialize a HTT instance. |
| 51 | * @details |
| 52 | * This function allocates and initializes an HTT instance. |
| 53 | * This involves allocating a pool of HTT tx descriptors in |
| 54 | * consistent memory, allocating and filling a rx ring (LL only), |
| 55 | * and connecting the HTC's HTT_DATA_MSG service. |
| 56 | * The HTC service connect call will block, so this function |
| 57 | * needs to be called in passive context. |
| 58 | * Because HTC setup has not been completed at the time this function |
| 59 | * is called, this function cannot send any HTC messages to the target. |
| 60 | * Messages to configure the target are instead sent in the |
| 61 | * htc_attach_target function. |
| 62 | * |
| 63 | * @param pdev - data SW's physical device handle |
| 64 | * (used as context pointer during HTT -> txrx calls) |
| 65 | * @param desc_pool_size - number of HTT descriptors to (pre)allocate |
| 66 | * @return success -> HTT pdev handle; failure -> NULL |
| 67 | */ |
| 68 | int |
| 69 | htt_attach(struct htt_pdev_t *pdev, int desc_pool_size); |
| 70 | |
| 71 | /** |
| 72 | * @brief Send HTT configuration messages to the target. |
| 73 | * @details |
| 74 | * For LL only, this function sends a rx ring configuration message to the |
| 75 | * target. For HL, this function is a no-op. |
| 76 | * |
| 77 | * @param htt_pdev - handle to the HTT instance being initialized |
| 78 | */ |
Rakesh Pillai | 7fb7a1f | 2017-06-23 14:46:36 +0530 | [diff] [blame] | 79 | QDF_STATUS htt_attach_target(htt_pdev_handle htt_pdev); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * enum htt_op_mode - Virtual device operation mode |
| 83 | * |
| 84 | * @htt_op_mode_unknown: Unknown mode |
| 85 | * @htt_op_mode_ap: AP mode |
| 86 | * @htt_op_mode_ibss: IBSS mode |
| 87 | * @htt_op_mode_sta: STA (client) mode |
| 88 | * @htt_op_mode_monitor: Monitor mode |
| 89 | * @htt_op_mode_ocb: OCB mode |
| 90 | */ |
| 91 | enum htt_op_mode { |
| 92 | htt_op_mode_unknown, |
| 93 | htt_op_mode_ap, |
| 94 | htt_op_mode_ibss, |
| 95 | htt_op_mode_sta, |
| 96 | htt_op_mode_monitor, |
| 97 | htt_op_mode_ocb, |
| 98 | }; |
| 99 | |
| 100 | /* no-ops */ |
| 101 | #define htt_vdev_attach(htt_pdev, vdev_id, op_mode) |
| 102 | #define htt_vdev_detach(htt_pdev, vdev_id) |
| 103 | #define htt_peer_qos_update(htt_pdev, peer_id, qos_capable) |
| 104 | #define htt_peer_uapsdmask_update(htt_pdev, peer_id, uapsd_mask) |
| 105 | |
| 106 | void htt_pdev_free(htt_pdev_handle pdev); |
| 107 | |
| 108 | /** |
| 109 | * @brief Deallocate a HTT instance. |
| 110 | * |
| 111 | * @param htt_pdev - handle to the HTT instance being torn down |
| 112 | */ |
| 113 | void htt_detach(htt_pdev_handle htt_pdev); |
| 114 | |
| 115 | /** |
| 116 | * @brief Stop the communication between HTT and target |
| 117 | * @details |
| 118 | * For ISOC solution, this function stop the communication between HTT and |
| 119 | * target. |
| 120 | * For Peregrine/Rome, it's already stopped by ol_ath_disconnect_htc |
| 121 | * before ol_txrx_pdev_detach called in ol_ath_detach. So this function is |
| 122 | * a no-op. |
| 123 | * Peregrine/Rome HTT layer is on top of HTC while ISOC solution HTT layer is |
| 124 | * on top of DXE layer. |
| 125 | * |
| 126 | * @param htt_pdev - handle to the HTT instance being initialized |
| 127 | */ |
| 128 | void htt_detach_target(htt_pdev_handle htt_pdev); |
| 129 | |
| 130 | /* |
| 131 | * @brief Tell the target side of HTT to suspend H2T processing until synced |
| 132 | * @param htt_pdev - the host HTT object |
| 133 | * @param sync_cnt - what sync count value the target HTT FW should wait for |
| 134 | * before resuming H2T processing |
| 135 | */ |
| 136 | A_STATUS htt_h2t_sync_msg(htt_pdev_handle htt_pdev, uint8_t sync_cnt); |
| 137 | |
| 138 | int |
| 139 | htt_h2t_aggr_cfg_msg(htt_pdev_handle htt_pdev, |
| 140 | int max_subfrms_ampdu, int max_subfrms_amsdu); |
| 141 | |
| 142 | /** |
| 143 | * @brief Get the FW status |
| 144 | * @details |
| 145 | * Trigger FW HTT to retrieve FW status. |
| 146 | * A separate HTT message will come back with the statistics we want. |
| 147 | * |
| 148 | * @param pdev - handle to the HTT instance |
| 149 | * @param stats_type_upload_mask - bitmask identifying which stats to upload |
| 150 | * @param stats_type_reset_mask - bitmask identifying which stats to reset |
| 151 | * @param cookie - unique value to distinguish and identify stats requests |
| 152 | * @return 0 - succeed to send the request to FW; otherwise, failed to do so. |
| 153 | */ |
| 154 | int |
| 155 | htt_h2t_dbg_stats_get(struct htt_pdev_t *pdev, |
| 156 | uint32_t stats_type_upload_mask, |
| 157 | uint32_t stats_type_reset_mask, |
| 158 | uint8_t cfg_stats_type, |
| 159 | uint32_t cfg_val, uint64_t cookie); |
| 160 | |
| 161 | /** |
| 162 | * @brief Get the fields from HTT T2H stats upload message's stats info header |
| 163 | * @details |
| 164 | * Parse the a HTT T2H message's stats info tag-length-value header, |
Jeff Johnson | fe8e949 | 2018-05-06 15:40:52 -0700 | [diff] [blame] | 165 | * to obtain the stats type, status, data length, and data address. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 166 | * |
| 167 | * @param stats_info_list - address of stats record's header |
| 168 | * @param[out] type - which type of FW stats are contained in the record |
| 169 | * @param[out] status - whether the stats are (fully) present in the record |
| 170 | * @param[out] length - how large the data portion of the stats record is |
| 171 | * @param[out] stats_data - where the data portion of the stats record is |
| 172 | */ |
| 173 | void |
| 174 | htt_t2h_dbg_stats_hdr_parse(uint8_t *stats_info_list, |
| 175 | enum htt_dbg_stats_type *type, |
| 176 | enum htt_dbg_stats_status *status, |
| 177 | int *length, uint8_t **stats_data); |
| 178 | |
| 179 | /** |
| 180 | * @brief Display a stats record from the HTT T2H STATS_CONF message. |
| 181 | * @details |
| 182 | * Parse the stats type and status, and invoke a type-specified printout |
| 183 | * to display the stats values. |
| 184 | * |
| 185 | * @param stats_data - buffer holding the stats record from the STATS_CONF msg |
| 186 | * @param concise - whether to do a verbose or concise printout |
| 187 | */ |
| 188 | void htt_t2h_stats_print(uint8_t *stats_data, int concise); |
| 189 | |
Poddar, Siddarth | b904759 | 2017-10-05 15:48:28 +0530 | [diff] [blame] | 190 | /** |
| 191 | * htt_log_rx_ring_info() - log htt rx ring info during FW_RX_REFILL failure |
| 192 | * @pdev: handle to the HTT instance |
| 193 | * |
| 194 | * Return: None |
| 195 | */ |
| 196 | void htt_log_rx_ring_info(htt_pdev_handle pdev); |
| 197 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 198 | #ifndef HTT_DEBUG_LEVEL |
| 199 | #if defined(DEBUG) |
| 200 | #define HTT_DEBUG_LEVEL 10 |
| 201 | #else |
| 202 | #define HTT_DEBUG_LEVEL 0 |
| 203 | #endif |
| 204 | #endif |
| 205 | |
| 206 | #if HTT_DEBUG_LEVEL > 5 |
| 207 | void htt_display(htt_pdev_handle pdev, int indent); |
| 208 | #else |
| 209 | #define htt_display(pdev, indent) |
| 210 | #endif |
| 211 | |
| 212 | #define HTT_DXE_RX_LOG 0 |
| 213 | #define htt_rx_reorder_log_print(pdev) |
| 214 | |
| 215 | #ifdef IPA_OFFLOAD |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 216 | int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev); |
| 217 | |
Sravan Kumar Kairam | b664b6c | 2018-02-27 17:43:10 +0530 | [diff] [blame] | 218 | /** |
| 219 | * htt_ipa_uc_get_resource() - Get uc resource from htt and lower layer |
| 220 | * @pdev - handle to the HTT instance |
| 221 | * @ce_sr - CE source ring DMA mapping info |
| 222 | * @tx_comp_ring - tx completion ring DMA mapping info |
| 223 | * @rx_rdy_ring - rx Ready ring DMA mapping info |
| 224 | * @rx2_rdy_ring - rx2 Ready ring DMA mapping info |
| 225 | * @rx_proc_done_idx - rx process done index |
| 226 | * @rx2_proc_done_idx - rx2 process done index |
| 227 | * @ce_sr_ring_size: copyengine source ring size |
| 228 | * @ce_reg_paddr - CE Register address |
| 229 | * @tx_num_alloc_buffer - Number of TX allocated buffers |
| 230 | * |
| 231 | * Return: 0 success |
| 232 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 233 | int |
| 234 | htt_ipa_uc_get_resource(htt_pdev_handle pdev, |
Sravan Kumar Kairam | b664b6c | 2018-02-27 17:43:10 +0530 | [diff] [blame] | 235 | qdf_shared_mem_t **ce_sr, |
| 236 | qdf_shared_mem_t **tx_comp_ring, |
| 237 | qdf_shared_mem_t **rx_rdy_ring, |
| 238 | qdf_shared_mem_t **rx2_rdy_ring, |
| 239 | qdf_shared_mem_t **rx_proc_done_idx, |
| 240 | qdf_shared_mem_t **rx2_proc_done_idx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 241 | uint32_t *ce_sr_ring_size, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 242 | qdf_dma_addr_t *ce_reg_paddr, |
Sravan Kumar Kairam | b664b6c | 2018-02-27 17:43:10 +0530 | [diff] [blame] | 243 | uint32_t *tx_num_alloc_buffer); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 244 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 245 | int |
| 246 | htt_ipa_uc_set_doorbell_paddr(htt_pdev_handle pdev, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 247 | qdf_dma_addr_t ipa_uc_tx_doorbell_paddr, |
| 248 | qdf_dma_addr_t ipa_uc_rx_doorbell_paddr); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 249 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 250 | int |
| 251 | htt_h2t_ipa_uc_set_active(struct htt_pdev_t *pdev, bool uc_active, bool is_tx); |
| 252 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 253 | int htt_h2t_ipa_uc_get_stats(struct htt_pdev_t *pdev); |
| 254 | |
Yun Park | 637d648 | 2016-10-05 10:51:33 -0700 | [diff] [blame] | 255 | int htt_h2t_ipa_uc_get_share_stats(struct htt_pdev_t *pdev, |
| 256 | uint8_t reset_stats); |
| 257 | |
| 258 | int htt_h2t_ipa_uc_set_quota(struct htt_pdev_t *pdev, uint64_t quota_bytes); |
| 259 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 260 | int htt_ipa_uc_attach(struct htt_pdev_t *pdev); |
| 261 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 262 | void htt_ipa_uc_detach(struct htt_pdev_t *pdev); |
| 263 | #else |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 264 | /** |
| 265 | * htt_h2t_ipa_uc_rsc_cfg_msg() - Send WDI IPA config message to firmware |
| 266 | * @pdev: handle to the HTT instance |
| 267 | * |
| 268 | * Return: 0 success |
| 269 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 270 | static inline int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev) |
| 271 | { |
| 272 | return 0; |
| 273 | } |
| 274 | |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 275 | /** |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 276 | * htt_ipa_uc_set_doorbell_paddr() - Propagate IPA doorbell address |
| 277 | * @pdev: handle to the HTT instance |
| 278 | * @ipa_uc_tx_doorbell_paddr: TX doorbell base physical address |
| 279 | * @ipa_uc_rx_doorbell_paddr: RX doorbell base physical address |
| 280 | * |
| 281 | * Return: 0 success |
| 282 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 283 | static inline int |
| 284 | htt_ipa_uc_set_doorbell_paddr(htt_pdev_handle pdev, |
| 285 | uint32_t ipa_uc_tx_doorbell_paddr, |
| 286 | uint32_t ipa_uc_rx_doorbell_paddr) |
| 287 | { |
| 288 | return 0; |
| 289 | } |
| 290 | |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 291 | /** |
| 292 | * htt_h2t_ipa_uc_set_active() - Propagate WDI path enable/disable to firmware |
| 293 | * @pdev: handle to the HTT instance |
| 294 | * @uc_active: WDI UC path enable or not |
| 295 | * @is_tx: TX path or RX path |
| 296 | * |
| 297 | * Return: 0 success |
| 298 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 299 | static inline int |
| 300 | htt_h2t_ipa_uc_set_active(struct htt_pdev_t *pdev, bool uc_active, |
| 301 | bool is_tx) |
| 302 | { |
| 303 | return 0; |
| 304 | } |
| 305 | |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 306 | /** |
| 307 | * htt_h2t_ipa_uc_get_stats() - WDI UC state query request to firmware |
| 308 | * @pdev: handle to the HTT instance |
| 309 | * |
| 310 | * Return: 0 success |
| 311 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | static inline int htt_h2t_ipa_uc_get_stats(struct htt_pdev_t *pdev) |
| 313 | { |
| 314 | return 0; |
| 315 | } |
| 316 | |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 317 | /** |
Yun Park | 637d648 | 2016-10-05 10:51:33 -0700 | [diff] [blame] | 318 | * htt_h2t_ipa_uc_get_share_stats() - WDI UC wifi sharing state request to FW |
| 319 | * @pdev: handle to the HTT instance |
| 320 | * |
| 321 | * Return: 0 success |
| 322 | */ |
| 323 | static inline int htt_h2t_ipa_uc_get_share_stats(struct htt_pdev_t *pdev, |
| 324 | uint8_t reset_stats) |
| 325 | { |
| 326 | return 0; |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * htt_h2t_ipa_uc_set_quota() - WDI UC set quota request to firmware |
| 331 | * @pdev: handle to the HTT instance |
| 332 | * |
| 333 | * Return: 0 success |
| 334 | */ |
| 335 | static inline int htt_h2t_ipa_uc_set_quota(struct htt_pdev_t *pdev, |
| 336 | uint64_t quota_bytes) |
| 337 | { |
| 338 | return 0; |
| 339 | } |
| 340 | |
| 341 | /** |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 342 | * htt_ipa_uc_attach() - Allocate UC data path resources |
| 343 | * @pdev: handle to the HTT instance |
| 344 | * |
| 345 | * Return: 0 success |
| 346 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 347 | static inline int htt_ipa_uc_attach(struct htt_pdev_t *pdev) |
| 348 | { |
| 349 | return 0; |
| 350 | } |
| 351 | |
Leo Chang | 8e07361 | 2015-11-13 10:55:34 -0800 | [diff] [blame] | 352 | /** |
| 353 | * htt_ipa_uc_attach() - Remove UC data path resources |
| 354 | * @pdev: handle to the HTT instance |
| 355 | * |
| 356 | * Return: 0 success |
| 357 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 358 | static inline void htt_ipa_uc_detach(struct htt_pdev_t *pdev) |
| 359 | { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 360 | } |
| 361 | #endif /* IPA_OFFLOAD */ |
| 362 | |
Nirav Shah | 73713f7 | 2018-05-17 14:50:41 +0530 | [diff] [blame] | 363 | #ifdef FEATURE_MONITOR_MODE_SUPPORT |
Manjunathappa Prakash | b757372 | 2016-04-21 11:24:07 -0700 | [diff] [blame] | 364 | void htt_rx_mon_note_capture_channel(htt_pdev_handle pdev, int mon_ch); |
| 365 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 366 | void ol_htt_mon_note_chan(struct cdp_pdev *ppdev, int mon_ch); |
Nirav Shah | 73713f7 | 2018-05-17 14:50:41 +0530 | [diff] [blame] | 367 | #else |
| 368 | static inline |
| 369 | void htt_rx_mon_note_capture_channel(htt_pdev_handle pdev, int mon_ch) {} |
| 370 | |
| 371 | static inline |
| 372 | void ol_htt_mon_note_chan(struct cdp_pdev *ppdev, int mon_ch) {} |
| 373 | #endif |
Siddarth Poddar | 1df1cd8 | 2016-04-27 17:32:21 +0530 | [diff] [blame] | 374 | |
| 375 | #if defined(DEBUG_HL_LOGGING) && defined(CONFIG_HL_SUPPORT) |
| 376 | |
| 377 | void htt_dump_bundle_stats(struct htt_pdev_t *pdev); |
| 378 | void htt_clear_bundle_stats(struct htt_pdev_t *pdev); |
| 379 | #else |
| 380 | |
| 381 | static inline void htt_dump_bundle_stats(struct htt_pdev_t *pdev) |
| 382 | { |
Siddarth Poddar | 1df1cd8 | 2016-04-27 17:32:21 +0530 | [diff] [blame] | 383 | } |
| 384 | |
| 385 | static inline void htt_clear_bundle_stats(struct htt_pdev_t *pdev) |
| 386 | { |
Siddarth Poddar | 1df1cd8 | 2016-04-27 17:32:21 +0530 | [diff] [blame] | 387 | } |
| 388 | #endif |
| 389 | |
Himanshu Agarwal | 19141bb | 2016-07-20 20:15:48 +0530 | [diff] [blame] | 390 | void htt_mark_first_wakeup_packet(htt_pdev_handle pdev, uint8_t value); |
Nirav Shah | bb8e47c | 2018-05-17 16:56:41 +0530 | [diff] [blame^] | 391 | |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 392 | typedef void (*tp_rx_pkt_dump_cb)(qdf_nbuf_t msdu, uint8_t peer_id, |
| 393 | uint8_t status); |
Nirav Shah | bb8e47c | 2018-05-17 16:56:41 +0530 | [diff] [blame^] | 394 | #ifdef REMOVE_PKT_LOG |
| 395 | static inline |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 396 | void htt_register_rx_pkt_dump_callback(struct htt_pdev_t *pdev, |
Nirav Shah | bb8e47c | 2018-05-17 16:56:41 +0530 | [diff] [blame^] | 397 | tp_rx_pkt_dump_cb ol_rx_pkt_dump_call) |
| 398 | { |
| 399 | } |
| 400 | |
| 401 | static inline |
| 402 | void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev) |
| 403 | { |
| 404 | } |
| 405 | |
| 406 | static inline |
| 407 | void ol_rx_pkt_dump_call(qdf_nbuf_t msdu, uint8_t peer_id, uint8_t status) |
| 408 | { |
| 409 | } |
| 410 | #else |
| 411 | void htt_register_rx_pkt_dump_callback(struct htt_pdev_t *pdev, |
| 412 | tp_rx_pkt_dump_cb ol_rx_pkt_dump_call); |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 413 | void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev); |
| 414 | void ol_rx_pkt_dump_call(qdf_nbuf_t msdu, uint8_t peer_id, uint8_t status); |
Nirav Shah | bb8e47c | 2018-05-17 16:56:41 +0530 | [diff] [blame^] | 415 | #endif |
Siddarth Poddar | 1df1cd8 | 2016-04-27 17:32:21 +0530 | [diff] [blame] | 416 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 417 | #endif /* _OL_HTT_API__H_ */ |