1 /* 2 * Copyright (c) 2011-2016 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 /** 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 35 #include <qdf_nbuf.h> /* qdf_nbuf_t */ 36 #include <qdf_lock.h> 37 #include <cdp_txrx_cmn.h> /* ol_txrx_vdev_t, etc. */ 38 #include <cdp_txrx_misc.h> /* ol_tx_spec */ 39 40 #include <ol_txrx_types.h> /* ol_tx_desc_t, ol_txrx_msdu_info_t */ 41 42 qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); 43 qdf_nbuf_t ol_tx_ll_wrapper(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); 44 #ifdef WLAN_FEATURE_FASTPATH 45 qdf_nbuf_t ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); 46 #endif 47 48 qdf_nbuf_t ol_tx_ll_queue(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); 49 50 #ifdef CONFIG_HL_SUPPORT 51 #define OL_TX_SEND ol_tx_hl 52 #else 53 #define OL_TX_SEND OL_TX_LL 54 #endif 55 56 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL 57 #define OL_TX_LL ol_tx_ll_queue 58 #else 59 #define OL_TX_LL ol_tx_ll_wrapper 60 #endif 61 62 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL 63 void ol_tx_vdev_ll_pause_queue_send(void *context); 64 void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev); 65 #else 66 static inline void ol_tx_vdev_ll_pause_queue_send(void *context) 67 { 68 return; 69 } 70 static inline 71 void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev) 72 { 73 return; 74 } 75 #endif 76 77 /** 78 * ol_tx_non_std_hl() - send non std tx frame. 79 * @vdev: the virtual device sending the data 80 * @tx_spec: indicate what non-standard transmission actions to apply 81 * @msdu_list: the tx frames to send 82 * 83 * Return: NULL if all MSDUs are accepted 84 */ 85 qdf_nbuf_t 86 ol_tx_non_std_hl(ol_txrx_vdev_handle data_vdev, 87 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); 88 89 /** 90 * ol_tx_hl() - transmit tx frames for a HL system. 91 * @vdev: the virtual device transmit the data 92 * @msdu_list: the tx frames to send 93 * 94 * Return: NULL if all MSDUs are accepted 95 */ 96 qdf_nbuf_t 97 ol_tx_hl(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list); 98 99 qdf_nbuf_t 100 ol_tx_non_std_ll(ol_txrx_vdev_handle data_vdev, 101 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); 102 103 qdf_nbuf_t 104 ol_tx_reinject(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu, uint16_t peer_id); 105 106 void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err); 107 108 109 #if defined(FEATURE_TSO) 110 void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev, uint32_t num_seg); 111 void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev); 112 #else 113 static inline void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev, 114 uint32_t num_seg) 115 { 116 return; 117 } 118 static inline void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev) 119 { 120 return; 121 } 122 #endif 123 124 #if defined(HELIUMPLUS_PADDR64) 125 void ol_txrx_dump_frag_desc(char *msg, struct ol_tx_desc_t *tx_desc); 126 #else 127 static inline 128 void ol_txrx_dump_frag_desc(char *msg, struct ol_tx_desc_t *tx_desc) 129 { 130 } 131 #endif 132 133 #endif /* _OL_TX__H_ */ 134