xref: /wlan-dirver/qcacld-3.0/core/dp/txrx/ol_rx.h (revision 0bec9a925953c0d92cb530c808dd67de56a0923e)
1 /*
2  * Copyright (c) 2011, 2014-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 #ifndef _OL_RX__H_
29 #define _OL_RX__H_
30 
31 #include <qdf_nbuf.h>           /* qdf_nbuf_t */
32 #include <ol_htt_api.h>         /* htt_pdev_handle */
33 #include <cdp_txrx_cmn.h>       /* ol_txrx_vdev_t */
34 
35 void
36 ol_rx_deliver(struct ol_txrx_vdev_t *vdev,
37 	      struct ol_txrx_peer_t *peer, unsigned int tid,
38 	      qdf_nbuf_t head_msdu);
39 
40 void
41 ol_rx_discard(struct ol_txrx_vdev_t *vdev,
42 	      struct ol_txrx_peer_t *peer, unsigned int tid,
43 	      qdf_nbuf_t head_msdu);
44 
45 void ol_rx_frames_free(htt_pdev_handle htt_pdev, qdf_nbuf_t frames);
46 
47 void ol_rx_peer_init(struct ol_txrx_pdev_t *pdev, struct ol_txrx_peer_t *peer);
48 
49 void
50 ol_rx_peer_cleanup(struct ol_txrx_vdev_t *vdev, struct ol_txrx_peer_t *peer);
51 
52 void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
53 	struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit);
54 
55 
56 void
57 ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
58 		       struct ol_txrx_peer_t *peer,
59 		       unsigned int tid, qdf_nbuf_t head_msdu);
60 
61 void ol_rx_log_packet(htt_pdev_handle htt_pdev,
62 		 uint8_t peer_id, qdf_nbuf_t msdu);
63 void
64 ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
65 					uint32_t msdu_count,
66 					uint32_t *msg_word);
67 void ol_rx_update_histogram_stats(uint32_t msdu_count,
68 		uint8_t frag_ind, uint8_t offload_ind);
69 
70 void
71 ol_rx_mic_error_handler(
72 	ol_txrx_pdev_handle pdev,
73 	u_int8_t tid,
74 	u_int16_t peer_id,
75 	void *msdu_desc,
76 	qdf_nbuf_t msdu);
77 
78 #endif /* _OL_RX__H_ */
79