blob: bcc6bab80382aef91030c5800d0091b31c782ffa [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Nirav Shahbb8e47c2018-05-17 16:56:41 +05302 * Copyright (c) 2011, 2014-2018 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * 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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#ifndef _OL_RX__H_
20#define _OL_RX__H_
21
Nirav Shahcbc6d722016-03-01 16:24:53 +053022#include <qdf_nbuf.h> /* qdf_nbuf_t */
Dhanashri Atre12a08392016-02-17 13:10:34 -080023#include <ol_htt_api.h> /* htt_pdev_handle */
24#include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080025
26void
27ol_rx_deliver(struct ol_txrx_vdev_t *vdev,
Yun Park34adb052017-04-08 11:37:26 -070028 struct ol_txrx_peer_t *peer, unsigned int tid,
29 qdf_nbuf_t head_msdu);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080030
31void
32ol_rx_discard(struct ol_txrx_vdev_t *vdev,
Yun Park34adb052017-04-08 11:37:26 -070033 struct ol_txrx_peer_t *peer, unsigned int tid,
34 qdf_nbuf_t head_msdu);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080035
Nirav Shahcbc6d722016-03-01 16:24:53 +053036void ol_rx_frames_free(htt_pdev_handle htt_pdev, qdf_nbuf_t frames);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080037
38void ol_rx_peer_init(struct ol_txrx_pdev_t *pdev, struct ol_txrx_peer_t *peer);
39
40void
41ol_rx_peer_cleanup(struct ol_txrx_vdev_t *vdev, struct ol_txrx_peer_t *peer);
42
Nirav Shahbb8e47c2018-05-17 16:56:41 +053043#ifdef WDI_EVENT_ENABLE
Poddar, Siddarthd56b4c42016-10-07 15:05:56 +053044void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
Nirav Shahbb8e47c2018-05-17 16:56:41 +053045 struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu,
46 uint8_t pktlog_bit);
47#else
48static inline
49void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
50 struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu,
51 uint8_t pktlog_bit)
52{
53}
54#endif
Poddar, Siddarthd56b4c42016-10-07 15:05:56 +053055
56
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080057void
58ol_rx_in_order_deliver(struct ol_txrx_vdev_t *vdev,
59 struct ol_txrx_peer_t *peer,
Yun Park34adb052017-04-08 11:37:26 -070060 unsigned int tid, qdf_nbuf_t head_msdu);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080061
Nirav Shah0d58a7e2016-04-26 22:54:12 +053062void ol_rx_log_packet(htt_pdev_handle htt_pdev,
63 uint8_t peer_id, qdf_nbuf_t msdu);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080064void
65ol_rx_offload_paddr_deliver_ind_handler(htt_pdev_handle htt_pdev,
66 uint32_t msdu_count,
67 uint32_t *msg_word);
Nirav Shahda008342016-05-17 18:50:40 +053068void ol_rx_update_histogram_stats(uint32_t msdu_count,
69 uint8_t frag_ind, uint8_t offload_ind);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080070
71void
72ol_rx_mic_error_handler(
73 ol_txrx_pdev_handle pdev,
74 u_int8_t tid,
75 u_int16_t peer_id,
76 void *msdu_desc,
Nirav Shahcbc6d722016-03-01 16:24:53 +053077 qdf_nbuf_t msdu);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080078
79#endif /* _OL_RX__H_ */