xref: /wlan-driver/qcacld-3.0/core/dp/txrx/ol_rx_reorder_timeout.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012, 2014, 2016-2017 The Linux Foundation. All rights reserved.
3  *
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 
19 #ifndef _OL_RX_REORDER_TIMEOUT__H_
20 #define _OL_RX_REORDER_TIMEOUT__H_
21 
22 #include <cdp_txrx_cmn.h>       /* ol_txrx_vdev_t, etc. */
23 #ifdef QCA_SUPPORT_OL_RX_REORDER_TIMEOUT
24 
25 void ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev);
26 void ol_rx_reorder_timeout_cleanup(struct ol_txrx_pdev_t *pdev);
27 void ol_rx_reorder_timeout_remove(struct ol_txrx_peer_t *peer,
28 				  unsigned int tid);
29 void ol_rx_reorder_timeout_update(struct ol_txrx_peer_t *peer, uint8_t tid);
30 void ol_rx_reorder_timeout_peer_cleanup(struct ol_txrx_peer_t *peer);
31 
32 #define OL_RX_REORDER_TIMEOUT_INIT    ol_rx_reorder_timeout_init
33 #define OL_RX_REORDER_TIMEOUT_PEER_CLEANUP ol_rx_reorder_timeout_peer_cleanup
34 #define OL_RX_REORDER_TIMEOUT_CLEANUP ol_rx_reorder_timeout_cleanup
35 #define OL_RX_REORDER_TIMEOUT_REMOVE  ol_rx_reorder_timeout_remove
36 #define OL_RX_REORDER_TIMEOUT_UPDATE  ol_rx_reorder_timeout_update
37 #define OL_RX_REORDER_TIMEOUT_PEER_TID_INIT(peer, tid) \
38 	(peer)->tids_rx_reorder[(tid)].timeout.active = 0
39 #define OL_RX_REORDER_TIMEOUT_MUTEX_LOCK(pdev) \
40 	qdf_spin_lock(&(pdev)->rx.mutex)
41 #define OL_RX_REORDER_TIMEOUT_MUTEX_UNLOCK(pdev) \
42 	qdf_spin_unlock(&(pdev)->rx.mutex)
43 
44 #else
45 
46 #define OL_RX_REORDER_TIMEOUT_INIT(pdev)        /* no-op */
47 #define OL_RX_REORDER_TIMEOUT_PEER_CLEANUP(peer)        /* no-op */
48 #define OL_RX_REORDER_TIMEOUT_CLEANUP(pdev)     /* no-op */
49 #define OL_RX_REORDER_TIMEOUT_REMOVE(peer, tid) /* no-op */
50 #define OL_RX_REORDER_TIMEOUT_UPDATE(peer, tid) /* no-op */
51 #define OL_RX_REORDER_TIMEOUT_PEER_TID_INIT(peer, tid)  /* no-op */
52 #define OL_RX_REORDER_TIMEOUT_MUTEX_LOCK(pdev)  /* no-op */
53 #define OL_RX_REORDER_TIMEOUT_MUTEX_UNLOCK(pdev)        /* no-op */
54 
55 #endif /* QCA_SUPPORT_OL_RX_REORDER_TIMEOUT */
56 
57 #endif /* _OL_RX_REORDER_TIMEOUT__H_ */
58