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