1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved.
3*5113495bSYour Name *
4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name * above copyright notice and this permission notice appear in all
7*5113495bSYour Name * copies.
8*5113495bSYour Name *
9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name */
18*5113495bSYour Name
19*5113495bSYour Name #ifndef _OL_RX__H_
20*5113495bSYour Name #define _OL_RX__H_
21*5113495bSYour Name
22*5113495bSYour Name #include <qdf_nbuf.h> /* qdf_nbuf_t */
23*5113495bSYour Name #include <ol_htt_api.h> /* htt_pdev_handle */
24*5113495bSYour Name #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t */
25*5113495bSYour Name
26*5113495bSYour Name #ifdef WLAN_PARTIAL_REORDER_OFFLOAD
27*5113495bSYour Name void
28*5113495bSYour Name ol_rx_deliver(struct ol_txrx_vdev_t *vdev,
29*5113495bSYour Name struct ol_txrx_peer_t *peer, unsigned int tid,
30*5113495bSYour Name qdf_nbuf_t head_msdu);
31*5113495bSYour Name #else
32*5113495bSYour Name static inline void
ol_rx_deliver(struct ol_txrx_vdev_t * vdev,struct ol_txrx_peer_t * peer,unsigned int tid,qdf_nbuf_t head_msdu)33*5113495bSYour Name ol_rx_deliver(struct ol_txrx_vdev_t *vdev,
34*5113495bSYour Name struct ol_txrx_peer_t *peer, unsigned int tid,
35*5113495bSYour Name qdf_nbuf_t head_msdu)
36*5113495bSYour Name {
37*5113495bSYour Name }
38*5113495bSYour Name #endif
39*5113495bSYour Name
40*5113495bSYour Name void
41*5113495bSYour Name ol_rx_discard(struct ol_txrx_vdev_t *vdev,
42*5113495bSYour Name struct ol_txrx_peer_t *peer, unsigned int tid,
43*5113495bSYour Name qdf_nbuf_t head_msdu);
44*5113495bSYour Name
45*5113495bSYour Name /**
46*5113495bSYour Name * ol_rx_send_mic_err_ind() - ol rx mic err handler
47*5113495bSYour Name * @pdev: ol pdev
48*5113495bSYour Name * @vdev_id: vdev id
49*5113495bSYour Name * @peer_mac_addr: peer mac address
50*5113495bSYour Name * @tid: TID
51*5113495bSYour Name * @tsf32: TSF
52*5113495bSYour Name * @err_type: error type
53*5113495bSYour Name * @rx_frame: rx frame
54*5113495bSYour Name * @pn: PN Number
55*5113495bSYour Name * @key_id: key id
56*5113495bSYour Name *
57*5113495bSYour Name * This function handles rx error and send MIC error failure to HDD
58*5113495bSYour Name *
59*5113495bSYour Name * Return: none
60*5113495bSYour Name */
61*5113495bSYour Name void
62*5113495bSYour Name ol_rx_send_mic_err_ind(struct ol_txrx_pdev_t *pdev, uint8_t vdev_id,
63*5113495bSYour Name uint8_t *peer_mac_addr, int tid, uint32_t tsf32,
64*5113495bSYour Name enum ol_rx_err_type err_type, qdf_nbuf_t rx_frame,
65*5113495bSYour Name uint64_t *pn, uint8_t key_id);
66*5113495bSYour Name
67*5113495bSYour Name void ol_rx_frames_free(htt_pdev_handle htt_pdev, qdf_nbuf_t frames);
68*5113495bSYour Name
69*5113495bSYour Name void ol_rx_peer_init(struct ol_txrx_pdev_t *pdev, struct ol_txrx_peer_t *peer);
70*5113495bSYour Name
71*5113495bSYour Name void
72*5113495bSYour Name ol_rx_peer_cleanup(struct ol_txrx_vdev_t *vdev, struct ol_txrx_peer_t *peer);
73*5113495bSYour Name
74*5113495bSYour Name #ifdef WDI_EVENT_ENABLE
75*5113495bSYour Name void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
76*5113495bSYour Name struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu,
77*5113495bSYour Name uint8_t pktlog_bit);
78*5113495bSYour Name #else
79*5113495bSYour Name static inline
ol_rx_send_pktlog_event(struct ol_txrx_pdev_t * pdev,struct ol_txrx_peer_t * peer,qdf_nbuf_t msdu,uint8_t pktlog_bit)80*5113495bSYour Name void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
81*5113495bSYour Name struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu,
82*5113495bSYour Name uint8_t pktlog_bit)
83*5113495bSYour Name {
84*5113495bSYour Name }
85*5113495bSYour Name #endif
86*5113495bSYour Name
87*5113495bSYour Name #ifdef WLAN_FULL_REORDER_OFFLOAD
88*5113495bSYour Name void
89*5113495bSYour Name ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
90*5113495bSYour Name struct ol_txrx_peer_t *peer,
91*5113495bSYour Name unsigned int tid, qdf_nbuf_t head_msdu);
92*5113495bSYour Name #else
93*5113495bSYour Name static inline void
ol_rx_in_order_deliver(struct ol_txrx_vdev_t * vdev,struct ol_txrx_peer_t * peer,unsigned int tid,qdf_nbuf_t head_msdu)94*5113495bSYour Name ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
95*5113495bSYour Name struct ol_txrx_peer_t *peer,
96*5113495bSYour Name unsigned int tid, qdf_nbuf_t head_msdu)
97*5113495bSYour Name {
98*5113495bSYour Name }
99*5113495bSYour Name #endif
100*5113495bSYour Name
101*5113495bSYour Name void ol_rx_log_packet(htt_pdev_handle htt_pdev,
102*5113495bSYour Name uint8_t peer_id, qdf_nbuf_t msdu);
103*5113495bSYour Name void
104*5113495bSYour Name ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
105*5113495bSYour Name uint32_t msdu_count,
106*5113495bSYour Name uint32_t *msg_word);
107*5113495bSYour Name void ol_rx_update_histogram_stats(uint32_t msdu_count,
108*5113495bSYour Name uint8_t frag_ind, uint8_t offload_ind);
109*5113495bSYour Name
110*5113495bSYour Name void
111*5113495bSYour Name ol_rx_mic_error_handler(
112*5113495bSYour Name ol_txrx_pdev_handle pdev,
113*5113495bSYour Name u_int8_t tid,
114*5113495bSYour Name u_int16_t peer_id,
115*5113495bSYour Name void *msdu_desc,
116*5113495bSYour Name qdf_nbuf_t msdu);
117*5113495bSYour Name
118*5113495bSYour Name void htt_rx_fill_ring_count(htt_pdev_handle pdev);
119*5113495bSYour Name
120*5113495bSYour Name void ol_rx_timestamp(struct cdp_cfg *cfg_pdev, void *rx_desc, qdf_nbuf_t msdu);
121*5113495bSYour Name
122*5113495bSYour Name #endif /* _OL_RX__H_ */
123