Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 1 | /* |
Houston Hoffman | dbfb7ad | 2015-11-10 16:45:19 -0800 | [diff] [blame] | 2 | * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 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 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 28 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 29 | * DOC: qdf_types.h |
| 30 | * QCA driver framework (QDF) basic type definitions |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 31 | */ |
| 32 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 33 | #if !defined(__QDF_TYPES_H) |
| 34 | #define __QDF_TYPES_H |
| 35 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 36 | /* Include Files */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 37 | #include <i_qdf_types.h> |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 38 | |
| 39 | /* Preprocessor definitions and constants */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 40 | #define QDF_MAX_SGLIST 4 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 41 | |
| 42 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 43 | * struct qdf_sglist - scatter-gather list |
| 44 | * @nsegs: total number of segments |
| 45 | * struct __sg_segs - scatter-gather segment list |
| 46 | * @vaddr: Virtual address of the segment |
| 47 | * @len: Length of the segment |
| 48 | */ |
| 49 | typedef struct qdf_sglist { |
| 50 | uint32_t nsegs; |
| 51 | struct __sg_segs { |
| 52 | uint8_t *vaddr; |
| 53 | uint32_t len; |
| 54 | } sg_segs[QDF_MAX_SGLIST]; |
| 55 | } qdf_sglist_t; |
| 56 | |
| 57 | #define QDF_MAX_SCATTER __QDF_MAX_SCATTER |
| 58 | |
| 59 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 60 | * QDF_SWAP_U16 - swap input u16 value |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 61 | * @_x: variable to swap |
| 62 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 63 | #define QDF_SWAP_U16(_x) \ |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 64 | ((((_x) << 8) & 0xFF00) | (((_x) >> 8) & 0x00FF)) |
| 65 | |
| 66 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 67 | * QDF_SWAP_U32 - swap input u32 value |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 68 | * @_x: variable to swap |
| 69 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 70 | #define QDF_SWAP_U32(_x) \ |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 71 | (((((_x) << 24) & 0xFF000000) | (((_x) >> 24) & 0x000000FF)) | \ |
| 72 | ((((_x) << 8) & 0x00FF0000) | (((_x) >> 8) & 0x0000FF00))) |
| 73 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 74 | /* ticks per second */ |
| 75 | #define QDF_TICKS_PER_SECOND (1000) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 76 | |
| 77 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 78 | * QDF_ARRAY_SIZE - get array size |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 79 | * @_arr: array variable name |
| 80 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 81 | #define QDF_ARRAY_SIZE(_arr) (sizeof(_arr) / sizeof((_arr)[0])) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 82 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 83 | #define QDF_MAX_SCATTER __QDF_MAX_SCATTER |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 84 | |
| 85 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 86 | * qdf_packed - denotes structure is packed. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 87 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 88 | #define qdf_packed __qdf_packed |
| 89 | |
| 90 | typedef void *qdf_net_handle_t; |
| 91 | |
| 92 | typedef void *qdf_netlink_handle_t; |
| 93 | typedef void *qdf_drv_handle_t; |
| 94 | typedef void *qdf_os_handle_t; |
| 95 | typedef void *qdf_pm_t; |
| 96 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 97 | |
| 98 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 99 | * typedef qdf_handle_t - handles opaque to each other |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 100 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 101 | typedef void *qdf_handle_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 102 | |
| 103 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 104 | * typedef qdf_device_t - Platform/bus generic handle. |
| 105 | * Used for bus specific functions. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 106 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 107 | typedef __qdf_device_t qdf_device_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 108 | |
| 109 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 110 | * typedef qdf_size_t - size of an object |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 111 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 112 | typedef __qdf_size_t qdf_size_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 113 | |
| 114 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 115 | * typedef __qdf_off_t - offset for API's that need them. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 116 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 117 | typedef __qdf_off_t qdf_off_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 118 | |
| 119 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 120 | * typedef qdf_dma_map_t - DMA mapping object. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 121 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 122 | typedef __qdf_dma_map_t qdf_dma_map_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 123 | |
| 124 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 125 | * tyepdef qdf_dma_addr_t - DMA address. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 126 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 127 | typedef __qdf_dma_addr_t qdf_dma_addr_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 128 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 129 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 130 | * typedef __qdf_dma_size_t - DMA size. |
| 131 | */ |
| 132 | typedef __qdf_dma_size_t qdf_dma_size_t; |
| 133 | |
| 134 | /** |
| 135 | * tyepdef qdf_dma_context_t - DMA context. |
| 136 | */ |
| 137 | typedef __qdf_dma_context_t qdf_dma_context_t; |
| 138 | |
| 139 | /** |
| 140 | * struct qdf_dma_map_info - Information inside a DMA map. |
| 141 | * @nsegs: total number mapped segments |
| 142 | * struct __dma_segs - Information of physical address. |
| 143 | * @paddr: physical(dam'able) address of the segment |
| 144 | * @len: length of the segment |
| 145 | */ |
| 146 | typedef struct qdf_dma_map_info { |
| 147 | uint32_t nsegs; |
| 148 | struct __dma_segs { |
| 149 | qdf_dma_addr_t paddr; |
| 150 | qdf_dma_size_t len; |
| 151 | } dma_segs[QDF_MAX_SCATTER]; |
| 152 | } qdf_dmamap_info_t; |
| 153 | |
| 154 | #define qdf_iomem_t __qdf_iomem_t; |
| 155 | |
| 156 | /** |
| 157 | * typedef enum QDF_TIMER_TYPE - QDF timer type |
| 158 | * @QDF_TIMER_TYPE_SW: Deferrable SW timer it will not cause CPU to wake up |
| 159 | * on expiry |
| 160 | * @QDF_TIMER_TYPE_WAKE_APPS: Non deferrable timer which will cause CPU to |
| 161 | * wake up on expiry |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 162 | */ |
| 163 | typedef enum { |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 164 | QDF_TIMER_TYPE_SW, |
| 165 | QDF_TIMER_TYPE_WAKE_APPS |
| 166 | } QDF_TIMER_TYPE; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 167 | |
| 168 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 169 | * tyepdef qdf_resource_type_t - hw resources |
| 170 | * @QDF_RESOURCE_TYPE_MEM: memory resource |
| 171 | * @QDF_RESOURCE_TYPE_IO: io resource |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 172 | * Define the hw resources the OS has allocated for the device |
| 173 | * Note that start defines a mapped area. |
| 174 | */ |
| 175 | typedef enum { |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 176 | QDF_RESOURCE_TYPE_MEM, |
| 177 | QDF_RESOURCE_TYPE_IO, |
| 178 | } qdf_resource_type_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 179 | |
| 180 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 181 | * tyepdef qdf_resource_t - representation of a h/w resource. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 182 | * @start: start |
| 183 | * @end: end |
| 184 | * @type: resource type |
| 185 | */ |
| 186 | typedef struct { |
| 187 | uint64_t start; |
| 188 | uint64_t end; |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 189 | qdf_resource_type_t type; |
| 190 | } qdf_resource_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 191 | |
| 192 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 193 | * typedef qdf_dma_dir_t - DMA directions |
| 194 | * @QDF_DMA_BIDIRECTIONAL: bidirectional data |
| 195 | * @QDF_DMA_TO_DEVICE: data going from device to memory |
| 196 | * @QDF_DMA_FROM_DEVICE: data going from memory to device |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 197 | */ |
| 198 | typedef enum { |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 199 | QDF_DMA_BIDIRECTIONAL = __QDF_DMA_BIDIRECTIONAL, |
| 200 | QDF_DMA_TO_DEVICE = __QDF_DMA_TO_DEVICE, |
| 201 | QDF_DMA_FROM_DEVICE = __QDF_DMA_FROM_DEVICE, |
| 202 | } qdf_dma_dir_t; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 203 | |
| 204 | /* work queue(kernel thread)/DPC function callback */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 205 | typedef void (*qdf_defer_fn_t)(void *); |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 206 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 207 | /* |
| 208 | * Prototype of the critical region function that is to be |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 209 | * executed with spinlock held and interrupt disalbed |
| 210 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 211 | typedef bool (*qdf_irqlocked_func_t)(void *); |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 212 | |
| 213 | /* Prototype of timer function */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 214 | typedef void (*qdf_timer_func_t)(void *); |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 215 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 216 | #define qdf_offsetof(type, field) offsetof(type, field) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 217 | |
| 218 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 219 | * typedef QDF_MODULE_ID - QDF Module IDs |
| 220 | * @QDF_MODULE_ID_TLSHIM: TLSHIM module ID |
| 221 | * @QDF_MODULE_ID_WMI: WMI module ID |
| 222 | * @QDF_MODULE_ID_HTT: HTT module ID |
| 223 | * @QDF_MODULE_ID_RSV4: Reserved |
| 224 | * @QDF_MODULE_ID_HDD: HDD module ID |
| 225 | * @QDF_MODULE_ID_SME: SME module ID |
| 226 | * @QDF_MODULE_ID_PE: PE module ID |
| 227 | * @QDF_MODULE_ID_WMA: WMA module ID |
| 228 | * @QDF_MODULE_ID_SYS: SYS module ID |
| 229 | * @QDF_MODULE_ID_QDF: QDF module ID |
| 230 | * @QDF_MODULE_ID_SAP: SAP module ID |
| 231 | * @QDF_MODULE_ID_HDD_SOFTAP: HDD SAP module ID |
| 232 | * @QDF_MODULE_ID_HDD_DATA: HDD DATA module ID |
| 233 | * @QDF_MODULE_ID_HDD_SAP_DATA: HDD SAP DATA module ID |
| 234 | * @QDF_MODULE_ID_HIF: HIF module ID |
| 235 | * @QDF_MODULE_ID_HTC: HTC module ID |
| 236 | * @QDF_MODULE_ID_TXRX: TXRX module ID |
| 237 | * @QDF_MODULE_ID_QDF_DEVICE: QDF DEVICE module ID |
| 238 | * @QDF_MODULE_ID_CFG: CFG module ID |
| 239 | * @QDF_MODULE_ID_BMI: BMI module ID |
| 240 | * @QDF_MODULE_ID_EPPING: EPPING module ID |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 241 | * @QDF_MODULE_ID_QVIT: QVIT module ID |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 242 | * @QDF_MODULE_ID_MAX: Max place holder module ID |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 243 | * |
| 244 | * These are generic IDs that identify the various modules in the software |
| 245 | * system |
| 246 | * 0 is unused for historical purposes |
| 247 | * 3 & 4 are unused for historical purposes |
| 248 | */ |
| 249 | typedef enum { |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 250 | QDF_MODULE_ID_TLSHIM = 1, |
| 251 | QDF_MODULE_ID_WMI = 2, |
| 252 | QDF_MODULE_ID_HTT = 3, |
| 253 | QDF_MODULE_ID_RSV4 = 4, |
| 254 | QDF_MODULE_ID_HDD = 5, |
| 255 | QDF_MODULE_ID_SME = 6, |
| 256 | QDF_MODULE_ID_PE = 7, |
| 257 | QDF_MODULE_ID_WMA = 8, |
| 258 | QDF_MODULE_ID_SYS = 9, |
| 259 | QDF_MODULE_ID_QDF = 10, |
| 260 | QDF_MODULE_ID_SAP = 11, |
| 261 | QDF_MODULE_ID_HDD_SOFTAP = 12, |
| 262 | QDF_MODULE_ID_HDD_DATA = 14, |
| 263 | QDF_MODULE_ID_HDD_SAP_DATA = 15, |
| 264 | QDF_MODULE_ID_HIF = 16, |
| 265 | QDF_MODULE_ID_HTC = 17, |
| 266 | QDF_MODULE_ID_TXRX = 18, |
| 267 | QDF_MODULE_ID_QDF_DEVICE = 19, |
| 268 | QDF_MODULE_ID_CFG = 20, |
| 269 | QDF_MODULE_ID_BMI = 21, |
| 270 | QDF_MODULE_ID_EPPING = 22, |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 271 | QDF_MODULE_ID_QVIT = 23, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 272 | QDF_MODULE_ID_MAX |
| 273 | } QDF_MODULE_ID; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 274 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 275 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 276 | * enum tQDF_ADAPTER_MODE - Concurrency role. |
| 277 | * @QDF_STA_MODE: STA mode |
| 278 | * @QDF_SAP_MODE: SAP mode |
| 279 | * @QDF_P2P_CLIENT_MODE: P2P client mode |
| 280 | * @QDF_P2P_GO_MODE: P2P GO mode |
| 281 | * @QDF_FTM_MODE: FTM mode |
| 282 | * @QDF_IBSS_MODE: IBSS mode |
Manjunathappa Prakash | 2c3575e | 2016-04-26 15:59:16 -0700 | [diff] [blame] | 283 | * @QDF_MONITOR_MODE: Monitor mode |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 284 | * @QDF_P2P_DEVICE_MODE: P2P device mode |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 285 | * @QDF_OCB_MODE: OCB device mode |
Naveen Rawat | 9123c15 | 2016-04-14 17:13:19 -0700 | [diff] [blame] | 286 | * @QDF_EPPING_MODE: EPPING device mode |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 287 | * @QDF_QVIT_MODE: QVIT device mode |
Deepak Dhamdhere | 987c1fa | 2016-05-26 02:23:10 -0700 | [diff] [blame^] | 288 | * @QDF_NDI_MODE: NAN datapath mode |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 289 | * @QDF_MAX_NO_OF_MODE: Max place holder |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 290 | * |
| 291 | * These are generic IDs that identify the various roles |
| 292 | * in the software system |
| 293 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 294 | enum tQDF_ADAPTER_MODE { |
Naveen Rawat | 9123c15 | 2016-04-14 17:13:19 -0700 | [diff] [blame] | 295 | QDF_STA_MODE, |
| 296 | QDF_SAP_MODE, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 297 | QDF_P2P_CLIENT_MODE, |
| 298 | QDF_P2P_GO_MODE, |
| 299 | QDF_FTM_MODE, |
| 300 | QDF_IBSS_MODE, |
Manjunathappa Prakash | 2c3575e | 2016-04-26 15:59:16 -0700 | [diff] [blame] | 301 | QDF_MONITOR_MODE, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 302 | QDF_P2P_DEVICE_MODE, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 303 | QDF_OCB_MODE, |
Naveen Rawat | 9123c15 | 2016-04-14 17:13:19 -0700 | [diff] [blame] | 304 | QDF_EPPING_MODE, |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 305 | QDF_QVIT_MODE, |
Deepak Dhamdhere | 987c1fa | 2016-05-26 02:23:10 -0700 | [diff] [blame^] | 306 | QDF_NDI_MODE, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 307 | QDF_MAX_NO_OF_MODE |
Peng Xu | 7b96253 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 308 | }; |
| 309 | |
| 310 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 311 | * enum tQDF_GLOBAL_CON_MODE - global config mode when |
Peng Xu | 7b96253 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 312 | * driver is loaded. |
| 313 | * |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 314 | * @QDF_GLOBAL_MISSION_MODE: mission mode (STA, SAP...) |
Manjunathappa Prakash | 2c3575e | 2016-04-26 15:59:16 -0700 | [diff] [blame] | 315 | * @QDF_GLOBAL_MONITOR_MODE: Monitor Mode |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 316 | * @QDF_GLOBAL_FTM_MODE: FTM mode |
| 317 | * @QDF_GLOBAL_EPPING_MODE: EPPING mode |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 318 | * @QDF_GLOBAL_QVIT_MODE: QVIT global mode |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 319 | * @QDF_GLOBAL_MAX_MODE: Max place holder |
Peng Xu | 7b96253 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 320 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 321 | enum tQDF_GLOBAL_CON_MODE { |
| 322 | QDF_GLOBAL_MISSION_MODE, |
Manjunathappa Prakash | 2c3575e | 2016-04-26 15:59:16 -0700 | [diff] [blame] | 323 | QDF_GLOBAL_MONITOR_MODE = 4, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 324 | QDF_GLOBAL_FTM_MODE = 5, |
| 325 | QDF_GLOBAL_EPPING_MODE = 8, |
Rajeev Kumar | 3537500 | 2016-04-15 10:57:41 -0700 | [diff] [blame] | 326 | QDF_GLOBAL_QVIT_MODE = 9, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 327 | QDF_GLOBAL_MAX_MODE |
Peng Xu | 7b96253 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 328 | }; |
| 329 | |
Houston Hoffman | 75ef5a5 | 2016-04-14 17:15:49 -0700 | [diff] [blame] | 330 | #define QDF_IS_EPPING_ENABLED(mode) (mode == QDF_GLOBAL_EPPING_MODE) |
| 331 | |
Anurag Chouhan | f0825ae | 2016-05-04 15:15:45 +0530 | [diff] [blame] | 332 | #ifdef CONFIG_MCL |
Anurag Chouhan | 85bc91a | 2016-03-21 19:18:37 +0530 | [diff] [blame] | 333 | #define qdf_print(args...) \ |
| 334 | QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, ## args) |
Anurag Chouhan | 8bfdee0 | 2016-04-04 17:11:39 +0530 | [diff] [blame] | 335 | |
Anurag Chouhan | 85bc91a | 2016-03-21 19:18:37 +0530 | [diff] [blame] | 336 | #else |
Anurag Chouhan | 85bc91a | 2016-03-21 19:18:37 +0530 | [diff] [blame] | 337 | #define qdf_print printk |
Anurag Chouhan | 85bc91a | 2016-03-21 19:18:37 +0530 | [diff] [blame] | 338 | #endif /* CONFIG_MCL */ |
| 339 | |
Anurag Chouhan | 8bfdee0 | 2016-04-04 17:11:39 +0530 | [diff] [blame] | 340 | #define qdf_vprint __qdf_vprint |
| 341 | #define qdf_snprint __qdf_snprint |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 342 | |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 343 | #ifdef WLAN_OPEN_P2P_INTERFACE |
| 344 | /* This should match with WLAN_MAX_INTERFACES */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 345 | #define QDF_MAX_CONCURRENCY_PERSONA (4) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 346 | #else |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 347 | #define QDF_MAX_CONCURRENCY_PERSONA (3) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 348 | #endif |
| 349 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 350 | #define QDF_STA_MASK (1 << QDF_STA_MODE) |
| 351 | #define QDF_SAP_MASK (1 << QDF_SAP_MODE) |
| 352 | #define QDF_P2P_CLIENT_MASK (1 << QDF_P2P_CLIENT_MODE) |
| 353 | #define QDF_P2P_GO_MASK (1 << QDF_P2P_GO_MODE) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 354 | |
| 355 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 356 | |
| 357 | /** |
| 358 | * typedef tQDF_MCC_TO_SCC_SWITCH_MODE - MCC to SCC switch mode. |
| 359 | * @QDF_MCC_TO_SCC_SWITCH_DISABLE: Disable switch |
| 360 | * @QDF_MCC_TO_SCC_SWITCH_ENABLE: Enable switch |
Manishekar Chandrasekaran | be11624 | 2016-05-09 17:30:17 +0530 | [diff] [blame] | 361 | * @QDF_MCC_TO_SCC_SWITCH_FORCE: Force switch with SAP restart |
| 362 | * @QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION: Force switch without |
| 363 | * restart of SAP |
| 364 | * @QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL: Switch using fav channel(s) |
| 365 | * without SAP restart |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 366 | * @QDF_MCC_TO_SCC_SWITCH_MAX: max switch |
| 367 | */ |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 368 | typedef enum { |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 369 | QDF_MCC_TO_SCC_SWITCH_DISABLE = 0, |
| 370 | QDF_MCC_TO_SCC_SWITCH_ENABLE, |
| 371 | QDF_MCC_TO_SCC_SWITCH_FORCE, |
Chandrasekaran Manishekar | 4758eb4 | 2016-04-14 19:01:48 +0530 | [diff] [blame] | 372 | QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION, |
Manishekar Chandrasekaran | be11624 | 2016-05-09 17:30:17 +0530 | [diff] [blame] | 373 | QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL, |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 374 | QDF_MCC_TO_SCC_SWITCH_MAX |
| 375 | } tQDF_MCC_TO_SCC_SWITCH_MODE; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 376 | #endif |
| 377 | |
| 378 | #if !defined(NULL) |
| 379 | #ifdef __cplusplus |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 380 | #define NULL 0 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 381 | #else |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 382 | #define NULL ((void *)0) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 383 | #endif |
| 384 | #endif |
| 385 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 386 | /* typedef for QDF Context... */ |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 387 | typedef void *v_CONTEXT_t; |
| 388 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 389 | #define QDF_MAC_ADDR_SIZE (6) |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 390 | |
| 391 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 392 | * struct qdf_mac_addr - mac address array |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 393 | * @bytes: MAC address bytes |
| 394 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 395 | struct qdf_mac_addr { |
| 396 | uint8_t bytes[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 397 | }; |
| 398 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 399 | /** |
| 400 | * This macro is used to initialize a QDF MacAddress to the broadcast |
| 401 | * MacAddress. It is used like this... |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 402 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 403 | #define QDF_MAC_ADDR_BROADCAST_INITIALIZER \ |
| 404 | { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 405 | |
| 406 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 407 | * This macro is used to initialize a QDF MacAddress to zero |
| 408 | * It is used like this... |
| 409 | */ |
| 410 | #define QDF_MAC_ADDR_ZERO_INITIALIZER { { 0, 0, 0, 0, 0, 0 } } |
| 411 | |
| 412 | #define QDF_IPV4_ADDR_SIZE (4) |
| 413 | #define QDF_IPV6_ADDR_SIZE (16) |
Manishekar Chandrasekaran | be11624 | 2016-05-09 17:30:17 +0530 | [diff] [blame] | 414 | #define QDF_MAX_NUM_CHAN (128) |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 415 | |
| 416 | /** |
| 417 | * struct qdf_tso_frag_t - fragments of a single TCP segment |
| 418 | * @paddr_low_32: Lower 32 bits of the buffer pointer |
| 419 | * @paddr_upper_16: upper 16 bits of the buffer pointer |
| 420 | * @length: length of the buffer |
| 421 | * @vaddr: virtual address |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 422 | * |
| 423 | * This structure holds the fragments of a single TCP segment of a |
| 424 | * given jumbo TSO network buffer |
| 425 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 426 | struct qdf_tso_frag_t { |
Dhanashri Atre | 5cfd37e | 2016-06-03 14:20:51 -0700 | [diff] [blame] | 427 | uint16_t length; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 428 | unsigned char *vaddr; |
Dhanashri Atre | 5cfd37e | 2016-06-03 14:20:51 -0700 | [diff] [blame] | 429 | qdf_dma_addr_t paddr; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | #define FRAG_NUM_MAX 6 |
| 433 | |
| 434 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 435 | * struct qdf_tso_flags_t - TSO specific flags |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 436 | * @tso_enable: Enable transmit segmentation offload |
| 437 | * @tcp_flags_mask: Tcp_flag is inserted into the header based |
| 438 | * on the mask |
| 439 | * @l2_len: L2 length for the msdu |
| 440 | * @ip_len: IP length for the msdu |
| 441 | * @tcp_seq_num: TCP sequence number |
| 442 | * @ip_id: IP identification number |
| 443 | * |
| 444 | * This structure holds the TSO specific flags extracted from the TSO network |
| 445 | * buffer for a given TCP segment |
| 446 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 447 | struct qdf_tso_flags_t { |
| 448 | uint32_t tso_enable:1, |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 449 | reserved_0a:6, |
| 450 | fin:1, |
| 451 | syn:1, |
| 452 | rst:1, |
| 453 | psh:1, |
| 454 | ack:1, |
| 455 | urg:1, |
| 456 | ece:1, |
| 457 | cwr:1, |
| 458 | ns:1, |
| 459 | tcp_flags_mask:9, |
| 460 | reserved_0b:7; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 461 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 462 | uint32_t l2_len:16, |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 463 | ip_len:16; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 464 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 465 | uint32_t tcp_seq_num; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 466 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 467 | uint32_t ip_id:16, |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 468 | ipv4_checksum_en:1, |
| 469 | udp_ipv4_checksum_en:1, |
| 470 | udp_ipv6_checksum_en:1, |
| 471 | tcp_ipv4_checksum_en:1, |
| 472 | tcp_ipv6_checksum_en:1, |
| 473 | partial_checksum_en:1, |
| 474 | reserved_3a:10; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 475 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 476 | uint32_t checksum_offset:14, |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 477 | reserved_4a:2, |
| 478 | payload_start_offset:14, |
| 479 | reserved_4b:2; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 480 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 481 | uint32_t payload_end_offset:14, |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 482 | reserved_5:18; |
| 483 | }; |
| 484 | |
| 485 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 486 | * struct qdf_tso_seg_t - single TSO segment |
| 487 | * @tso_flags: TSO flags |
| 488 | * @num_frags: number of fragments |
| 489 | * @tso_frags: array holding the fragments |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 490 | * |
| 491 | * This structure holds the information of a single TSO segment of a jumbo |
| 492 | * TSO network buffer |
| 493 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 494 | struct qdf_tso_seg_t { |
| 495 | struct qdf_tso_flags_t tso_flags; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 496 | uint32_t num_frags; |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 497 | struct qdf_tso_frag_t tso_frags[FRAG_NUM_MAX]; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 498 | }; |
| 499 | |
| 500 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 501 | * qdf_tso_seg_elem_t - tso segment element |
| 502 | * @seg: instance of segment |
| 503 | * @next: pointer to the next segment |
| 504 | */ |
| 505 | struct qdf_tso_seg_elem_t { |
| 506 | struct qdf_tso_seg_t seg; |
| 507 | struct qdf_tso_seg_elem_t *next; |
| 508 | }; |
| 509 | |
| 510 | /** |
| 511 | * struct qdf_tso_info_t - TSO information extracted |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 512 | * @is_tso: is this is a TSO frame |
| 513 | * @num_segs: number of segments |
| 514 | * @total_len: total length of the packet |
| 515 | * @tso_seg_list: list of TSO segments for this jumbo packet |
| 516 | * @curr_seg: segment that is currently being processed |
| 517 | * |
| 518 | * This structure holds the TSO information extracted after parsing the TSO |
| 519 | * jumbo network buffer. It contains a chain of the TSO segments belonging to |
| 520 | * the jumbo packet |
| 521 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 522 | struct qdf_tso_info_t { |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 523 | uint8_t is_tso; |
| 524 | uint32_t num_segs; |
| 525 | uint32_t total_len; |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 526 | struct qdf_tso_seg_elem_t *tso_seg_list; |
| 527 | struct qdf_tso_seg_elem_t *curr_seg; |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 528 | }; |
| 529 | |
| 530 | /** |
| 531 | * Used to set classify bit in CE desc. |
| 532 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 533 | #define QDF_CE_TX_CLASSIFY_BIT_S 5 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 534 | |
| 535 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 536 | * QDF_CE_TX_PKT_TYPE_BIT_S - 2 bits starting at bit 6 in CE desc. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 537 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 538 | #define QDF_CE_TX_PKT_TYPE_BIT_S 6 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 539 | |
| 540 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 541 | * QDF_CE_TX_PKT_OFFSET_BIT_S - 12 bits --> 16-27, in the CE desciptor |
| 542 | * the length of HTT/HTC descriptor |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 543 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 544 | #define QDF_CE_TX_PKT_OFFSET_BIT_S 16 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 545 | |
| 546 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 547 | * QDF_CE_TX_PKT_OFFSET_BIT_M - Mask for packet offset in the CE descriptor. |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 548 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 549 | #define QDF_CE_TX_PKT_OFFSET_BIT_M 0x0fff0000 |
Prakash Dhavali | d5c9f1c | 2015-11-08 19:04:44 -0800 | [diff] [blame] | 550 | |
Houston Hoffman | dbfb7ad | 2015-11-10 16:45:19 -0800 | [diff] [blame] | 551 | /** |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 552 | * enum qdf_suspend_type - type of suspend |
| 553 | * @QDF_SYSTEM_SUSPEND: System suspend triggered wlan suspend |
| 554 | * @QDF_RUNTIME_SUSPEND: Runtime pm inactivity timer triggered wlan suspend |
Houston Hoffman | dbfb7ad | 2015-11-10 16:45:19 -0800 | [diff] [blame] | 555 | */ |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 556 | enum qdf_suspend_type { |
| 557 | QDF_SYSTEM_SUSPEND, |
| 558 | QDF_RUNTIME_SUSPEND |
Houston Hoffman | dbfb7ad | 2015-11-10 16:45:19 -0800 | [diff] [blame] | 559 | }; |
| 560 | |
Chouhan, Anurag | 5776318 | 2016-03-03 18:57:27 +0530 | [diff] [blame] | 561 | #endif /* __QDF_TYPES_H */ |