Dhanashri Atre | 9c222b1 | 2016-03-22 13:26:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 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 | * @file cdp_txrx_misc.h |
| 29 | * @brief Define the host data path miscelleneous API functions |
| 30 | * called by the host control SW and the OS interface module |
| 31 | */ |
| 32 | #ifndef _CDP_TXRX_MISC_H_ |
| 33 | #define _CDP_TXRX_MISC_H_ |
| 34 | |
| 35 | /** |
| 36 | * @enum ol_tx_spec |
| 37 | * @brief indicate what non-standard transmission actions to apply |
| 38 | * @details |
| 39 | * Indicate one or more of the following: |
| 40 | * - The tx frame already has a complete 802.11 header. |
| 41 | * Thus, skip 802.3/native-WiFi to 802.11 header encapsulation and |
| 42 | * A-MSDU aggregation. |
| 43 | * - The tx frame should not be aggregated (A-MPDU or A-MSDU) |
| 44 | * - The tx frame is already encrypted - don't attempt encryption. |
| 45 | * - The tx frame is a segment of a TCP jumbo frame. |
| 46 | * - This tx frame should not be unmapped and freed by the txrx layer |
| 47 | * after transmission, but instead given to a registered tx completion |
| 48 | * callback. |
| 49 | * More than one of these specification can apply, though typically |
| 50 | * only a single specification is applied to a tx frame. |
| 51 | * A compound specification can be created, as a bit-OR of these |
| 52 | * specifications. |
| 53 | */ |
| 54 | enum ol_tx_spec { |
| 55 | OL_TX_SPEC_STD = 0x0, /* do regular processing */ |
| 56 | OL_TX_SPEC_RAW = 0x1, /* skip encap + A-MSDU aggr */ |
| 57 | OL_TX_SPEC_NO_AGGR = 0x2, /* skip encap + all aggr */ |
| 58 | OL_TX_SPEC_NO_ENCRYPT = 0x4, /* skip encap + encrypt */ |
| 59 | OL_TX_SPEC_TSO = 0x8, /* TCP segmented */ |
| 60 | OL_TX_SPEC_NWIFI_NO_ENCRYPT = 0x10, /* skip encrypt for nwifi */ |
| 61 | OL_TX_SPEC_NO_FREE = 0x20, /* give to cb rather than free */ |
| 62 | }; |
| 63 | |
Manjunathappa Prakash | 5f45de5 | 2016-03-07 11:25:38 -0800 | [diff] [blame] | 64 | /** |
| 65 | * ol_tx_non_std() - Allow the control-path SW to send data frames |
| 66 | * |
| 67 | * @data_vdev - which vdev should transmit the tx data frames |
| 68 | * @tx_spec - what non-standard handling to apply to the tx data frames |
| 69 | * @msdu_list - NULL-terminated list of tx MSDUs |
| 70 | * |
| 71 | * Generally, all tx data frames come from the OS shim into the txrx layer. |
| 72 | * However, there are rare cases such as TDLS messaging where the UMAC |
| 73 | * control-path SW creates tx data frames. |
| 74 | * This UMAC SW can call this function to provide the tx data frames to |
| 75 | * the txrx layer. |
| 76 | * The UMAC SW can request a callback for these data frames after their |
| 77 | * transmission completes, by using the ol_txrx_data_tx_cb_set function |
| 78 | * to register a tx completion callback, and by specifying |
| 79 | * ol_tx_spec_no_free as the tx_spec arg when giving the frames to |
| 80 | * ol_tx_non_std. |
| 81 | * The MSDUs need to have the appropriate L2 header type (802.3 vs. 802.11), |
| 82 | * as specified by ol_cfg_frame_type(). |
| 83 | * |
| 84 | * Return: null - success, skb - failure |
| 85 | */ |
| 86 | qdf_nbuf_t ol_tx_non_std(ol_txrx_vdev_handle vdev, |
| 87 | enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); |
Dhanashri Atre | 9c222b1 | 2016-03-22 13:26:13 -0700 | [diff] [blame] | 88 | |
Manjunathappa Prakash | 5f45de5 | 2016-03-07 11:25:38 -0800 | [diff] [blame] | 89 | /** |
| 90 | * ol_txrx_update_ibss_vdev_heart_beat_timer_of_vdev() - Update ibss vdev heart |
| 91 | * beat timer |
| 92 | * @vdev: vdev handle |
| 93 | * @timer_value_sec: new heart beat timer value |
| 94 | * |
| 95 | * Return: Old timer value set in vdev. |
| 96 | */ |
| 97 | uint16_t ol_txrx_set_ibss_vdev_heart_beat_timer(ol_txrx_vdev_handle vdev, |
| 98 | uint16_t timer_value_sec); |
Dhanashri Atre | 9c222b1 | 2016-03-22 13:26:13 -0700 | [diff] [blame] | 99 | #endif /* _CDP_TXRX_MISC_H_ */ |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |