1 /* 2 * Copyright (c) 2011-2014,2016-2017 The Linux Foundation. All rights reserved. 3 * 4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc. 5 * 6 * 7 * Permission to use, copy, modify, and/or distribute this software for 8 * any purpose with or without fee is hereby granted, provided that the 9 * above copyright notice and this permission notice appear in all 10 * copies. 11 * 12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19 * PERFORMANCE OF THIS SOFTWARE. 20 */ 21 22 /* 23 * This file was originally distributed by Qualcomm Atheros, Inc. 24 * under proprietary terms before Copyright ownership was assigned 25 * to the Linux Foundation. 26 */ 27 28 /** 29 * @file ol_txrx_api.h 30 * @brief Definitions used in multiple external interfaces to the txrx SW. 31 */ 32 #ifndef _OL_TXRX_API__H_ 33 #define _OL_TXRX_API__H_ 34 35 /** 36 * @brief ADDBA negotiation status, used both during requests and confirmations 37 */ 38 enum ol_addba_status { 39 /* status: negotiation started or completed successfully */ 40 ol_addba_success, 41 42 /* reject: aggregation is not applicable - don't try again */ 43 ol_addba_reject, 44 45 /* busy: ADDBA negotiation couldn't be performed - try again later */ 46 ol_addba_busy, 47 }; 48 49 enum ol_sec_type { 50 ol_sec_type_none, 51 ol_sec_type_wep128, 52 ol_sec_type_wep104, 53 ol_sec_type_wep40, 54 ol_sec_type_tkip, 55 ol_sec_type_tkip_nomic, 56 ol_sec_type_aes_ccmp, 57 ol_sec_type_wapi, 58 59 /* keep this last! */ 60 ol_sec_type_types 61 }; 62 63 typedef void (*tp_ol_packetdump_cb)(qdf_nbuf_t netbuf, 64 uint8_t status, uint8_t vdev_id, uint8_t type); 65 void ol_register_packetdump_callback(tp_ol_packetdump_cb ol_tx_packetdump_cb, 66 tp_ol_packetdump_cb ol_rx_packetdump_cb); 67 void ol_deregister_packetdump_callback(void); 68 69 #ifdef WLAN_FEATURE_TSF_PLUS 70 typedef int (*tp_ol_timestamp_cb)(qdf_nbuf_t netbuf, uint64_t target_time); 71 72 /** 73 * ol_register_timestamp_callback() - set callbacks for timestamp tx msdu. 74 * @ol_tx_timestamp_cb: callback function for time stamp tx msdu 75 * 76 * This function register timestamp callback, the callback will 77 * be called when tx a msdu 78 * 79 * Return: nothing 80 */ 81 void ol_register_timestamp_callback(tp_ol_timestamp_cb ol_tx_timestamp_cb); 82 83 /** 84 * ol_deregister_timestamp_callback() - reset callbacks for timestamp 85 * tx msdu to NULL. 86 * 87 * This function reset the timestamp callbacks for tx 88 * 89 * Return: nothing 90 */ 91 void ol_deregister_timestamp_callback(void); 92 #endif 93 #endif /* _OL_TXRX_API__H_ */ 94