blob: a76b82992cb05f9cb31080ea851236d32a621e86 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Dhanashri Atre83d373d2015-07-28 16:45:59 -07002 * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
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/**
29 * @file ol_tx.h
30 * @brief Internal definitions for the high-level tx module.
31 */
32#ifndef _OL_TX__H_
33#define _OL_TX__H_
34
Nirav Shahcbc6d722016-03-01 16:24:53 +053035#include <qdf_nbuf.h> /* qdf_nbuf_t */
Anurag Chouhana37b5b72016-02-21 14:53:42 +053036#include <qdf_lock.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080037#include <ol_txrx_api.h> /* ol_txrx_vdev_handle */
38
39#include <ol_txrx_types.h> /* ol_tx_desc_t, ol_txrx_msdu_info_t */
40
Nirav Shahcbc6d722016-03-01 16:24:53 +053041qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080042#ifdef WLAN_FEATURE_FASTPATH
Nirav Shahcbc6d722016-03-01 16:24:53 +053043qdf_nbuf_t ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080044#endif
45
Nirav Shahcbc6d722016-03-01 16:24:53 +053046qdf_nbuf_t ol_tx_ll_queue(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080047
48#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
49#define OL_TX_LL ol_tx_ll_queue
50#else
51#define OL_TX_LL ol_tx_ll
52#endif
53
54#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
55void ol_tx_vdev_ll_pause_queue_send(void *context);
56void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev);
57#else
58static inline void ol_tx_vdev_ll_pause_queue_send(void *context)
59{
60 return;
61}
62static inline
63void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev)
64{
65 return;
66}
67#endif
Nirav Shahcbc6d722016-03-01 16:24:53 +053068qdf_nbuf_t
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080069ol_tx_non_std_ll(ol_txrx_vdev_handle data_vdev,
Nirav Shahcbc6d722016-03-01 16:24:53 +053070 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080071
Nirav Shahcbc6d722016-03-01 16:24:53 +053072qdf_nbuf_t
73ol_tx_reinject(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu, uint16_t peer_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080074
Nirav Shahcbc6d722016-03-01 16:24:53 +053075void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080076
77
78#if defined(FEATURE_TSO)
79void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev, uint32_t num_seg);
80void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev);
Leo Chang376398b2015-10-23 14:19:02 -070081#else
82static inline void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev,
83 uint32_t num_seg)
84{
85 return;
86}
87static inline void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev)
88{
89 return;
90}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080091#endif
Dhanashri Atre83d373d2015-07-28 16:45:59 -070092
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080093#endif /* _OL_TX__H_ */