Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013 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 | /* |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 26 | */ |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 27 | |
| 28 | |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 29 | |
| 30 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 31 | #ifndef WLAN_QCT_TLI_H |
| 32 | #define WLAN_QCT_TLI_H |
| 33 | |
| 34 | /*=========================================================================== |
| 35 | |
| 36 | W L A N T R A N S P O R T L A Y E R |
| 37 | I N T E R N A L A P I |
| 38 | |
| 39 | |
| 40 | DESCRIPTION |
| 41 | This file contains the internal declarations used within wlan transport |
| 42 | layer module. |
| 43 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 44 | ===========================================================================*/ |
| 45 | |
| 46 | |
| 47 | /*=========================================================================== |
| 48 | |
| 49 | EDIT HISTORY FOR FILE |
| 50 | |
| 51 | |
| 52 | This section contains comments describing changes made to the module. |
| 53 | Notice that changes are listed in reverse chronological order. |
| 54 | |
| 55 | |
| 56 | $Header:$ $DateTime: $ $Author: $ |
| 57 | |
| 58 | |
| 59 | when who what, where, why |
| 60 | -------- --- ---------------------------------------------------------- |
| 61 | 02/19/10 bad Fixed 802.11 to 802.3 ft issues with WAPI |
| 62 | 01/14/10 rnair Fixed the byte order for the WAI packet type. |
| 63 | 01/08/10 lti Added TL Data Caching |
| 64 | 10/09/09 rnair Add support for WAPI |
| 65 | 02/02/09 sch Add Handoff support |
| 66 | 12/09/08 lti Fixes for AMSS compilation |
| 67 | 12/02/08 lti Fix fo trigger frame generation |
| 68 | 10/31/08 lti Fix fo TL tx suspend |
| 69 | 10/01/08 lti Merged in fixes from reordering |
| 70 | 09/05/08 lti Fixes following QOS unit testing |
| 71 | 08/06/08 lti Added QOS support |
| 72 | 07/18/08 lti Fixes following integration |
| 73 | Added frame translation |
| 74 | 06/26/08 lti Fixes following unit testing |
| 75 | 05/05/08 lti Created module. |
| 76 | |
| 77 | ===========================================================================*/ |
| 78 | |
| 79 | |
| 80 | |
| 81 | /*=========================================================================== |
| 82 | |
| 83 | INCLUDE FILES FOR MODULE |
| 84 | |
| 85 | ===========================================================================*/ |
| 86 | |
| 87 | /*---------------------------------------------------------------------------- |
| 88 | * Include Files |
| 89 | * -------------------------------------------------------------------------*/ |
| 90 | #include "vos_packet.h" |
| 91 | #include "vos_api.h" |
| 92 | #include "vos_timer.h" |
| 93 | #include "vos_mq.h" |
| 94 | #include "vos_list.h" |
| 95 | #include "wlan_qct_tl.h" |
| 96 | #include "pmcApi.h" |
| 97 | #include "wlan_qct_hal.h" |
| 98 | |
| 99 | |
| 100 | #define STATIC static |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 101 | /*---------------------------------------------------------------------------- |
| 102 | * Preprocessor Definitions and Constants |
| 103 | * -------------------------------------------------------------------------*/ |
| 104 | |
| 105 | /*Maximum number of TIDs */ |
| 106 | #define WLAN_MAX_TID 8 |
| 107 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 108 | /*Offset of the OUI field inside the LLC/SNAP header*/ |
| 109 | #define WLANTL_LLC_OUI_OFFSET 3 |
| 110 | |
| 111 | /*Size of the OUI type field inside the LLC/SNAP header*/ |
| 112 | #define WLANTL_LLC_OUI_SIZE 3 |
| 113 | |
| 114 | /*Offset of the protocol type field inside the LLC/SNAP header*/ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 115 | #define WLANTL_LLC_PROTO_TYPE_OFFSET (WLANTL_LLC_OUI_OFFSET + WLANTL_LLC_OUI_SIZE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 116 | |
| 117 | /*Size of the protocol type field inside the LLC/SNAP header*/ |
| 118 | #define WLANTL_LLC_PROTO_TYPE_SIZE 2 |
| 119 | |
| 120 | /*802.1x protocol type */ |
| 121 | #define WLANTL_LLC_8021X_TYPE 0x888E |
| 122 | |
| 123 | /*WAPI protocol type */ |
| 124 | #define WLANTL_LLC_WAI_TYPE 0x88b4 |
| 125 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 126 | #ifdef FEATURE_WLAN_TDLS |
| 127 | #define WLANTL_LLC_TDLS_TYPE 0x890d |
| 128 | #endif |
| 129 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 130 | /*Length offset inside the AMSDU sub-frame header*/ |
| 131 | #define WLANTL_AMSDU_SUBFRAME_LEN_OFFSET 12 |
| 132 | |
| 133 | /*802.3 header definitions*/ |
| 134 | #define WLANTL_802_3_HEADER_LEN 14 |
| 135 | |
| 136 | /* Offset of DA field in a 802.3 header*/ |
| 137 | #define WLANTL_802_3_HEADER_DA_OFFSET 0 |
| 138 | |
| 139 | /*802.11 header definitions - header len without QOS ctrl field*/ |
| 140 | #define WLANTL_802_11_HEADER_LEN 24 |
| 141 | |
| 142 | /*802.11 header length + QOS ctrl field*/ |
| 143 | #define WLANTL_MPDU_HEADER_LEN 32 |
| 144 | |
| 145 | /*802.11 header definitions*/ |
| 146 | #define WLANTL_802_11_MAX_HEADER_LEN 40 |
| 147 | |
| 148 | /*802.11 header definitions - qos ctrl field len*/ |
| 149 | #define WLANTL_802_11_HEADER_QOS_CTL 2 |
| 150 | |
| 151 | /*802.11 header definitions - ht ctrl field len*/ |
| 152 | #define WLANTL_802_11_HEADER_HT_CTL 4 |
| 153 | |
| 154 | /* Offset of Addr1 field in a 802.11 header*/ |
| 155 | #define WLANTL_802_11_HEADER_ADDR1_OFFSET 4 |
| 156 | |
| 157 | /*802.11 ADDR4 MAC addr field len */ |
| 158 | #define WLANTL_802_11_HEADER_ADDR4_LEN VOS_MAC_ADDR_SIZE |
| 159 | |
| 160 | /* Length of an AMSDU sub-frame */ |
| 161 | #define TL_AMSDU_SUBFRM_HEADER_LEN 14 |
| 162 | |
| 163 | /* Length of the LLC header*/ |
| 164 | #define WLANTL_LLC_HEADER_LEN 8 |
| 165 | |
| 166 | /*As per 802.11 spec */ |
| 167 | #define WLANTL_MGMT_FRAME_TYPE 0x00 |
| 168 | #define WLANTL_CTRL_FRAME_TYPE 0x10 |
| 169 | #define WLANTL_DATA_FRAME_TYPE 0x20 |
| 170 | |
| 171 | /*Value of the data type field in the 802.11 frame */ |
| 172 | #define WLANTL_80211_DATA_TYPE 0x02 |
| 173 | #define WLANTL_80211_DATA_QOS_SUBTYPE 0x08 |
| 174 | #define WLANTL_80211_NULL_QOS_SUBTYPE 0x0C |
| 175 | |
Madan Mohan Koyyalamudi | a148e1e | 2012-11-30 14:52:59 -0800 | [diff] [blame] | 176 | /*Defines for internal utility functions */ |
| 177 | #define WLANTL_FRAME_TYPE_BCAST 0xff |
| 178 | #define WLANTL_FRAME_TYPE_MCAST 0x01 |
| 179 | #define WLANTL_FRAME_TYPE_UCAST 0x00 |
| 180 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 181 | |
| 182 | /*------------------------------------------------------------------------- |
| 183 | BT-AMP related definition - !!! should probably be moved to BT-AMP header |
| 184 | ---------------------------------------------------------------------------*/ |
| 185 | |
| 186 | /*------------------------------------------------------------------------- |
| 187 | Helper macros |
| 188 | ---------------------------------------------------------------------------*/ |
| 189 | /*Checks STA index validity*/ |
| 190 | #define WLANTL_STA_ID_INVALID( _staid )( _staid >= WLAN_MAX_STA_COUNT ) |
| 191 | |
| 192 | /*As per Libra behavior */ |
| 193 | #define WLANTL_STA_ID_BCAST 0xFF |
| 194 | |
| 195 | /*Checks TID validity*/ |
| 196 | #define WLANTL_TID_INVALID( _tid ) ( _tid >= WLAN_MAX_TID ) |
| 197 | |
| 198 | /*Checks AC validity*/ |
| 199 | #define WLANTL_AC_INVALID( _tid ) ( _tid >= WLANTL_MAX_AC ) |
| 200 | |
| 201 | /*Determines the addr field offset based on the frame xtl bit*/ |
| 202 | #define WLANTL_MAC_ADDR_ALIGN( _dxtl ) \ |
| 203 | ( ( 0 == _dxtl ) ? \ |
| 204 | WLANTL_802_3_HEADER_DA_OFFSET: WLANTL_802_11_HEADER_ADDR1_OFFSET ) |
| 205 | |
| 206 | /*Determines the header len based on the disable xtl field*/ |
| 207 | #define WLANTL_MAC_HEADER_LEN( _dxtl) \ |
| 208 | ( ( 0 == _dxtl )? \ |
| 209 | WLANTL_802_3_HEADER_LEN:WLANTL_802_11_HEADER_LEN ) |
| 210 | |
| 211 | /*Determines the necesary length of the BD header - in case |
| 212 | UMA translation is enabled enough room needs to be left in front of the |
| 213 | packet for the 802.11 header to be inserted*/ |
| 214 | #define WLANTL_BD_HEADER_LEN( _dxtl ) \ |
| 215 | ( ( 0 == _dxtl )? \ |
| 216 | (WLANHAL_TX_BD_HEADER_SIZE+WLANTL_802_11_MAX_HEADER_LEN): WLANHAL_TX_BD_HEADER_SIZE ) |
| 217 | |
| 218 | |
| 219 | #define WLAN_TL_CEIL( _a, _b) (( 0 != (_a)%(_b))? (_a)/(_b) + 1: (_a)/(_b)) |
| 220 | |
| 221 | /*get TL control block from vos global context */ |
| 222 | #define VOS_GET_TL_CB(_pvosGCtx) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 223 | ((WLANTL_CbType*)vos_get_context( VOS_MODULE_ID_TL, _pvosGCtx)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 224 | |
| 225 | /* Check whether Rx frame is LS or EAPOL packet (other than data) */ |
| 226 | #define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 227 | ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \ |
| 228 | (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 229 | |
| 230 | /*get RSSI0 from a RX BD*/ |
| 231 | /* 7 bits in phystats represent -100dBm to +27dBm */ |
| 232 | #define WLAN_TL_RSSI_CORRECTION 100 |
| 233 | #define WLANTL_GETRSSI0(pBD) (WDA_GETRSSI0(pBD) - WLAN_TL_RSSI_CORRECTION) |
| 234 | |
| 235 | /*get RSSI1 from a RX BD*/ |
| 236 | #define WLANTL_GETRSSI1(pBD) (WDA_GETRSSI1(pBD) - WLAN_TL_RSSI_CORRECTION) |
| 237 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 238 | #define WLANTL_GETSNR(pBD) WDA_GET_RX_SNR(pBD) |
| 239 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 240 | /* Check whether Rx frame is LS or EAPOL packet (other than data) */ |
| 241 | #define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 242 | ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \ |
| 243 | (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 244 | |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 245 | #define WLANTL_CACHE_TRACE_WATERMARK 100 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 246 | /*--------------------------------------------------------------------------- |
| 247 | TL signals for TX thread |
| 248 | ---------------------------------------------------------------------------*/ |
| 249 | typedef enum |
| 250 | { |
| 251 | /*Suspend signal - following serialization of a HAL suspend request*/ |
| 252 | WLANTL_TX_SIG_SUSPEND = 0, |
| 253 | |
| 254 | /*Res need signal - triggered when all pending TxComp have been received |
| 255 | and TL is low on resources*/ |
| 256 | WLANTL_TX_RES_NEEDED = 1, |
| 257 | |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 258 | /* Forwarding RX cached frames. This is not used anymore as it is |
| 259 | replaced by WLANTL_RX_FWD_CACHED in RX thread*/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 260 | WLANTL_TX_FWD_CACHED = 2, |
| 261 | |
| 262 | /* Serialized STAID AC Indication */ |
| 263 | WLANTL_TX_STAID_AC_IND = 3, |
| 264 | |
| 265 | /* Serialzie TX transmit request */ |
| 266 | WLANTL_TX_START_XMIT = 4, |
| 267 | |
| 268 | /* Serialzie Finish UL Authentication request */ |
| 269 | WLANTL_FINISH_ULA = 5, |
| 270 | |
Madan Mohan Koyyalamudi | a96f544 | 2013-05-10 11:32:06 +0530 | [diff] [blame] | 271 | /* Serialized Snapshot request indication */ |
| 272 | WLANTL_TX_SNAPSHOT = 6, |
| 273 | |
Mihir Shete | fd62d9d | 2014-08-06 15:08:21 +0530 | [diff] [blame] | 274 | /* Detected a fatal error issue SSR */ |
| 275 | WLANTL_TX_FATAL_ERROR = 7, |
| 276 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 277 | WLANTL_TX_MAX |
| 278 | }WLANTL_TxSignalsType; |
| 279 | |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 280 | |
| 281 | /*--------------------------------------------------------------------------- |
| 282 | TL signals for RX thread |
| 283 | ---------------------------------------------------------------------------*/ |
| 284 | typedef enum |
| 285 | { |
| 286 | |
| 287 | /* Forwarding RX cached frames */ |
| 288 | WLANTL_RX_FWD_CACHED = 0, |
| 289 | |
| 290 | }WLANTL_RxSignalsType; |
| 291 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 292 | /*--------------------------------------------------------------------------- |
| 293 | STA Event type |
| 294 | ---------------------------------------------------------------------------*/ |
| 295 | typedef enum |
| 296 | { |
| 297 | /* Transmit frame event */ |
| 298 | WLANTL_TX_EVENT = 0, |
| 299 | |
| 300 | /* Receive frame event */ |
| 301 | WLANTL_RX_EVENT = 1, |
| 302 | |
| 303 | WLANTL_MAX_EVENT |
| 304 | }WLANTL_STAEventType; |
| 305 | |
| 306 | /*--------------------------------------------------------------------------- |
| 307 | |
| 308 | DESCRIPTION |
| 309 | State machine used by transport layer for receiving or transmitting |
| 310 | packets. |
| 311 | |
| 312 | PARAMETERS |
| 313 | |
| 314 | IN |
| 315 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 316 | control block can be extracted from its context |
| 317 | ucSTAId: identifier of the station being processed |
| 318 | vosDataBuff: pointer to the tx/rx vos buffer |
| 319 | |
| 320 | RETURN VALUE |
| 321 | The result code associated with performing the operation |
| 322 | |
| 323 | ---------------------------------------------------------------------------*/ |
| 324 | typedef VOS_STATUS (*WLANTL_STAFuncType)( v_PVOID_t pAdapter, |
| 325 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 326 | vos_pkt_t** pvosDataBuff, |
| 327 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 328 | |
| 329 | /*--------------------------------------------------------------------------- |
| 330 | STA FSM Entry type |
| 331 | ---------------------------------------------------------------------------*/ |
| 332 | typedef struct |
| 333 | { |
| 334 | WLANTL_STAFuncType pfnSTATbl[WLANTL_MAX_EVENT]; |
| 335 | } WLANTL_STAFsmEntryType; |
| 336 | |
| 337 | /* Receive in connected state - only EAPOL or WAI*/ |
| 338 | VOS_STATUS WLANTL_STARxConn( v_PVOID_t pAdapter, |
| 339 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 340 | vos_pkt_t** pvosDataBuff, |
| 341 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 342 | |
| 343 | /* Transmit in connected state - only EAPOL or WAI*/ |
| 344 | VOS_STATUS WLANTL_STATxConn( v_PVOID_t pAdapter, |
| 345 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 346 | vos_pkt_t** pvosDataBuff, |
| 347 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 348 | |
| 349 | /* Receive in authenticated state - all data allowed*/ |
| 350 | VOS_STATUS WLANTL_STARxAuth( v_PVOID_t pAdapter, |
| 351 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 352 | vos_pkt_t** pvosDataBuff, |
| 353 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 354 | |
| 355 | /* Transmit in authenticated state - all data allowed*/ |
| 356 | VOS_STATUS WLANTL_STATxAuth( v_PVOID_t pAdapter, |
| 357 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 358 | vos_pkt_t** pvosDataBuff, |
| 359 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 360 | |
| 361 | /* Receive in disconnected state - no data allowed*/ |
| 362 | VOS_STATUS WLANTL_STARxDisc( v_PVOID_t pAdapter, |
| 363 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 364 | vos_pkt_t** pvosDataBuff, |
| 365 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 366 | |
| 367 | /* Transmit in disconnected state - no data allowed*/ |
| 368 | VOS_STATUS WLANTL_STATxDisc( v_PVOID_t pAdapter, |
| 369 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 370 | vos_pkt_t** pvosDataBuff, |
| 371 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 372 | |
| 373 | /* TL State Machine */ |
| 374 | STATIC const WLANTL_STAFsmEntryType tlSTAFsm[WLANTL_STA_MAX_STATE] = |
| 375 | { |
| 376 | /* WLANTL_STA_INIT */ |
| 377 | { { |
| 378 | NULL, /* WLANTL_TX_EVENT - no packets should get transmitted*/ |
| 379 | NULL, /* WLANTL_RX_EVENT - no packets should be received - drop*/ |
| 380 | } }, |
| 381 | |
| 382 | /* WLANTL_STA_CONNECTED */ |
| 383 | { { |
| 384 | WLANTL_STATxConn, /* WLANTL_TX_EVENT - only EAPoL or WAI frames are allowed*/ |
| 385 | WLANTL_STARxConn, /* WLANTL_RX_EVENT - only EAPoL or WAI frames can be rx*/ |
| 386 | } }, |
| 387 | |
| 388 | /* WLANTL_STA_AUTHENTICATED */ |
| 389 | { { |
| 390 | WLANTL_STATxAuth, /* WLANTL_TX_EVENT - all data frames allowed*/ |
| 391 | WLANTL_STARxAuth, /* WLANTL_RX_EVENT - all data frames can be rx */ |
| 392 | } }, |
| 393 | |
| 394 | /* WLANTL_STA_DISCONNECTED */ |
| 395 | { { |
| 396 | WLANTL_STATxDisc, /* WLANTL_TX_EVENT - do nothing */ |
| 397 | WLANTL_STARxDisc, /* WLANTL_RX_EVENT - frames will still be fwd-ed*/ |
| 398 | } } |
| 399 | }; |
| 400 | |
| 401 | /*--------------------------------------------------------------------------- |
| 402 | Reordering information |
| 403 | ---------------------------------------------------------------------------*/ |
| 404 | |
| 405 | #define WLANTL_MAX_WINSIZE 64 |
| 406 | #define WLANTL_MAX_BA_SESSION 40 |
| 407 | |
| 408 | typedef struct |
| 409 | { |
| 410 | v_BOOL_t isAvailable; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 411 | v_U64_t ullReplayCounter[WLANTL_MAX_WINSIZE]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 412 | v_PVOID_t arrayBuffer[WLANTL_MAX_WINSIZE]; |
| 413 | } WLANTL_REORDER_BUFFER_T; |
| 414 | |
| 415 | |
| 416 | /* To handle Frame Q aging, timer is needed |
| 417 | * After timer expired, Qed frames have to be routed to upper layer |
| 418 | * WLANTL_TIMER_EXPIER_UDATA_T is user data type for timer callback |
| 419 | */ |
| 420 | typedef struct |
| 421 | { |
| 422 | /* Global contect, HAL, HDD need this */ |
| 423 | v_PVOID_t pAdapter; |
| 424 | |
| 425 | /* TL context handle */ |
| 426 | v_PVOID_t pTLHandle; |
| 427 | |
| 428 | /* Current STAID, to know STA context */ |
| 429 | v_U32_t STAID; |
| 430 | |
| 431 | v_U8_t TID; |
| 432 | } WLANTL_TIMER_EXPIER_UDATA_T; |
| 433 | |
| 434 | typedef struct |
| 435 | { |
| 436 | /*specifies if re-order session exists*/ |
| 437 | v_U8_t ucExists; |
| 438 | |
| 439 | /* Current Index */ |
| 440 | v_U32_t ucCIndex; |
| 441 | |
| 442 | /* Count of the total packets in list*/ |
| 443 | v_U16_t usCount; |
| 444 | |
| 445 | /* vos ttimer to handle Qed frames aging */ |
| 446 | vos_timer_t agingTimer; |
| 447 | |
| 448 | /* Q windoe size */ |
| 449 | v_U32_t winSize; |
| 450 | |
| 451 | /* Available RX frame buffer size */ |
| 452 | v_U32_t bufferSize; |
| 453 | |
| 454 | /* Start Sequence number */ |
| 455 | v_U32_t SSN; |
| 456 | |
| 457 | /* BA session ID, generate by HAL */ |
| 458 | v_U32_t sessionID; |
| 459 | |
| 460 | v_U32_t currentESN; |
| 461 | |
| 462 | v_U32_t pendingFramesCount; |
| 463 | |
| 464 | vos_lock_t reorderLock; |
| 465 | |
| 466 | /* Aging timer callback user data */ |
| 467 | WLANTL_TIMER_EXPIER_UDATA_T timerUdata; |
| 468 | |
| 469 | WLANTL_REORDER_BUFFER_T *reorderBuffer; |
Madan Mohan Koyyalamudi | 31e4cad | 2013-08-21 20:21:14 +0530 | [diff] [blame] | 470 | |
| 471 | v_U16_t LastSN; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 472 | }WLANTL_BAReorderType; |
| 473 | |
| 474 | |
| 475 | /*--------------------------------------------------------------------------- |
| 476 | UAPSD information |
| 477 | ---------------------------------------------------------------------------*/ |
| 478 | typedef struct |
| 479 | { |
| 480 | /* flag set when a UAPSD session with triggers generated in fw is being set*/ |
| 481 | v_U8_t ucSet; |
| 482 | }WLANTL_UAPSDInfoType; |
| 483 | |
| 484 | /*--------------------------------------------------------------------------- |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 485 | per-STA cache info |
| 486 | ---------------------------------------------------------------------------*/ |
| 487 | typedef struct |
| 488 | { |
| 489 | v_U16_t cacheSize; |
| 490 | v_TIME_t cacheInitTime; |
| 491 | v_TIME_t cacheDoneTime; |
| 492 | v_TIME_t cacheClearTime; |
| 493 | }WLANTL_CacheInfoType; |
| 494 | |
| 495 | /*--------------------------------------------------------------------------- |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 496 | STA Client type |
| 497 | ---------------------------------------------------------------------------*/ |
| 498 | typedef struct |
| 499 | { |
| 500 | /* Flag that keeps track of registration; only one STA with unique |
| 501 | ID allowed */ |
| 502 | v_U8_t ucExists; |
| 503 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 504 | /* Function pointer to the receive packet handler from HDD */ |
| 505 | WLANTL_STARxCBType pfnSTARx; |
| 506 | |
| 507 | /* Function pointer to the transmit complete confirmation handler |
| 508 | from HDD */ |
| 509 | WLANTL_TxCompCBType pfnSTATxComp; |
| 510 | |
| 511 | /* Function pointer to the packet retrieval routine in HDD */ |
| 512 | WLANTL_STAFetchPktCBType pfnSTAFetchPkt; |
| 513 | |
| 514 | /* Reordering information for the STA */ |
| 515 | WLANTL_BAReorderType atlBAReorderInfo[WLAN_MAX_TID]; |
| 516 | |
| 517 | /* STA Descriptor, contains information related to the new added STA */ |
| 518 | WLAN_STADescType wSTADesc; |
| 519 | |
| 520 | /* Current connectivity state of the STA */ |
| 521 | WLANTL_STAStateType tlState; |
| 522 | |
| 523 | /* Station priority */ |
| 524 | WLANTL_STAPriorityType tlPri; |
| 525 | |
| 526 | /* Value of the averaged RSSI for this station */ |
| 527 | v_S7_t rssiAvg; |
| 528 | |
| 529 | /* Value of the averaged RSSI for this station in BMPS */ |
| 530 | v_S7_t rssiAvgBmps; |
| 531 | |
Shailender Karmuchi | 13c0d08 | 2013-03-26 14:41:39 -0700 | [diff] [blame] | 532 | /* Value of the Alpha to calculate RSSI average */ |
| 533 | v_S7_t rssiAlpha; |
| 534 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 535 | /* Value of the averaged RSSI for this station */ |
| 536 | v_U32_t uLinkQualityAvg; |
| 537 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 538 | /* Sum of SNR for snrIdx number of consecutive frames */ |
| 539 | v_U32_t snrSum; |
| 540 | |
| 541 | /* Number of consecutive frames over which snrSum is calculated */ |
| 542 | v_S7_t snrIdx; |
| 543 | |
| 544 | /* Average SNR of previous 20 frames */ |
| 545 | v_S7_t prevSnrAvg; |
| 546 | |
| 547 | /* Average SNR returned by fw */ |
| 548 | v_S7_t snrAvgBmps; |
| 549 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 550 | /* Tx packet count per station per TID */ |
| 551 | v_U32_t auTxCount[WLAN_MAX_TID]; |
| 552 | |
| 553 | /* Rx packet count per station per TID */ |
| 554 | v_U32_t auRxCount[WLAN_MAX_TID]; |
| 555 | |
| 556 | /* Suspend flag */ |
| 557 | v_U8_t ucTxSuspended; |
| 558 | |
| 559 | /* Pointer to the AMSDU chain maintained by the AMSDU de-aggregation |
| 560 | completion sub-module */ |
| 561 | vos_pkt_t* vosAMSDUChainRoot; |
| 562 | |
| 563 | /* Pointer to the root of the chain */ |
| 564 | vos_pkt_t* vosAMSDUChain; |
| 565 | |
| 566 | /* Used for saving/restoring frame header for 802.3/11 AMSDU sub-frames */ |
| 567 | v_U8_t aucMPDUHeader[WLANTL_MPDU_HEADER_LEN]; |
| 568 | |
| 569 | /* length of the header */ |
| 570 | v_U8_t ucMPDUHeaderLen; |
| 571 | |
| 572 | /* Enabled ACs currently serviced by TL (automatic setup in TL)*/ |
| 573 | v_U8_t aucACMask[WLANTL_MAX_AC]; |
| 574 | |
| 575 | /* Current AC to be retrieved */ |
| 576 | WLANTL_ACEnumType ucCurrentAC; |
| 577 | |
| 578 | /*Packet pending flag - set if tx is pending for the station*/ |
| 579 | v_U8_t ucPktPending; |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 580 | |
Madan Mohan Koyyalamudi | 1541a5b | 2012-10-29 16:18:21 -0700 | [diff] [blame] | 581 | /*EAPOL Packet pending flag - set if EAPOL packet is pending for the station*/ |
| 582 | v_U8_t ucEapolPktPending; |
| 583 | |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 584 | /*used on tx packet to signal when there is no more data to tx for the |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 585 | moment=> packets can be passed to BAL */ |
| 586 | v_U8_t ucNoMoreData; |
| 587 | |
| 588 | /* Last serviced AC to be retrieved */ |
| 589 | WLANTL_ACEnumType ucServicedAC; |
| 590 | |
| 591 | /* Current weight for the AC */ |
| 592 | v_U8_t ucCurrentWeight; |
| 593 | |
| 594 | /* Info used for UAPSD trigger frame generation */ |
| 595 | WLANTL_UAPSDInfoType wUAPSDInfo[WLANTL_MAX_AC]; |
| 596 | |
| 597 | /* flag to signal if a trigger frames is pending */ |
| 598 | v_U8_t ucPendingTrigFrm; |
| 599 | |
| 600 | WLANTL_TRANSFER_STA_TYPE trafficStatistics; |
| 601 | |
| 602 | /*Members needed for packet caching in TL*/ |
| 603 | /*Begining of the cached packets chain*/ |
| 604 | vos_pkt_t* vosBegCachedFrame; |
| 605 | |
| 606 | /*Begining of the cached packets chain*/ |
| 607 | vos_pkt_t* vosEndCachedFrame; |
| 608 | |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 609 | WLANTL_CacheInfoType tlCacheInfo; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 610 | /* LWM related fields */ |
| 611 | |
Katya Nigam | 6390293 | 2014-06-26 19:04:23 +0530 | [diff] [blame] | 612 | v_BOOL_t enableCaching; |
| 613 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 614 | //current station is slow. LWM mode is enabled. |
| 615 | v_BOOL_t ucLwmModeEnabled; |
| 616 | //LWM events is reported when LWM mode is on. Able to send more traffic |
| 617 | //under the constraints of uBuffThresholdMax |
| 618 | v_BOOL_t ucLwmEventReported; |
| 619 | |
| 620 | //v_U8_t uLwmEventReported; |
| 621 | |
| 622 | /* Flow control fields */ |
| 623 | //memory used in previous round |
| 624 | v_U8_t bmuMemConsumed; |
| 625 | |
| 626 | //the number packets injected in this round |
| 627 | v_U32_t uIngress_length; |
| 628 | |
| 629 | //number of packets allowed in current round beforing receiving new FW memory updates |
| 630 | v_U32_t uBuffThresholdMax; |
| 631 | |
| 632 | |
| 633 | // v_U32_t uEgress_length; |
| 634 | |
| 635 | // v_U32_t uIngress_length; |
| 636 | |
| 637 | // v_U32_t uBuffThresholdMax; |
| 638 | |
| 639 | // v_U32_t uBuffThresholdUsed; |
| 640 | |
| 641 | /* Value used to set LWM in FW. Initialized to 1/3* WLAN_STA_BMU_THRESHOLD_MAX |
| 642 | In the future, it can be dynamically adjusted if we find the reason to implement |
| 643 | such algorithm. */ |
| 644 | v_U32_t uLwmThreshold; |
| 645 | |
| 646 | //tx disable forced by Riva software |
| 647 | v_U16_t fcStaTxDisabled; |
| 648 | |
| 649 | /** HDD buffer status for packet scheduling. Once HDD |
| 650 | * stores a new packet in a previously empty queue, it |
| 651 | * will call TL interface to set the fields. The fields |
| 652 | * will be cleaned by TL when TL can't fetch more packets |
| 653 | * from the queue. */ |
| 654 | // the fields are ucPktPending and ucACMask; |
| 655 | |
| 656 | /* Queue to keep unicast station management frame */ |
| 657 | vos_list_t pStaManageQ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 658 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 659 | /* 1 means replay check is needed for the station, |
| 660 | * 0 means replay check is not needed for the station*/ |
| 661 | v_BOOL_t ucIsReplayCheckValid; |
| 662 | |
| 663 | /* It contains 48-bit replay counter per TID*/ |
| 664 | v_U64_t ullReplayCounter[WLANTL_MAX_TID]; |
| 665 | |
| 666 | /* It contains no of replay packets found per STA. |
| 667 | It is for debugging purpose only.*/ |
| 668 | v_U32_t ulTotalReplayPacketsDetected; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 669 | |
Gopichand Nakkala | 8b54e91 | 2013-03-11 10:44:21 +0530 | [diff] [blame] | 670 | /* Set when pairwise key is installed, if ptkInstalled is |
| 671 | 1 then we have to encrypt the data irrespective of TL |
| 672 | state (CONNECTED/AUTHENTICATED) */ |
| 673 | v_U8_t ptkInstalled; |
Gopichand Nakkala | 8a2b144 | 2013-05-29 15:33:14 +0530 | [diff] [blame] | 674 | |
| 675 | v_U32_t linkCapacity; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 676 | }WLANTL_STAClientType; |
| 677 | |
| 678 | /*--------------------------------------------------------------------------- |
| 679 | BAP Client type |
| 680 | ---------------------------------------------------------------------------*/ |
| 681 | typedef struct |
| 682 | { |
| 683 | /* flag that keeps track of registration; only one non-data BT-AMP client |
| 684 | allowed */ |
| 685 | v_U8_t ucExists; |
| 686 | |
| 687 | /* pointer to the receive processing routine for non-data BT-AMP frames */ |
| 688 | WLANTL_BAPRxCBType pfnTlBAPRx; |
| 689 | |
| 690 | /* pointer to the flush call back complete function */ |
| 691 | WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb; |
| 692 | |
| 693 | /* pointer to the non-data BT-AMP frame pending transmission */ |
| 694 | vos_pkt_t* vosPendingDataBuff; |
| 695 | |
| 696 | /* BAP station ID */ |
| 697 | v_U8_t ucBAPSTAId; |
| 698 | }WLANTL_BAPClientType; |
| 699 | |
| 700 | |
| 701 | /*--------------------------------------------------------------------------- |
| 702 | Management Frame Client type |
| 703 | ---------------------------------------------------------------------------*/ |
| 704 | typedef struct |
| 705 | { |
| 706 | /* flag that keeps track of registration; only one management frame |
| 707 | client allowed */ |
| 708 | v_U8_t ucExists; |
| 709 | |
| 710 | /* pointer to the receive processing routine for management frames */ |
| 711 | WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx; |
| 712 | |
| 713 | /* pointer to the management frame pending transmission */ |
| 714 | vos_pkt_t* vosPendingDataBuff; |
| 715 | }WLANTL_MgmtFrmClientType; |
| 716 | |
| 717 | typedef struct |
| 718 | { |
| 719 | WLANTL_TrafficStatusChangedCBType trafficCB; |
| 720 | WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus; |
| 721 | v_U32_t idleThreshold; |
| 722 | v_U32_t measurePeriod; |
| 723 | v_U32_t rtRXFrameCount; |
| 724 | v_U32_t rtTXFrameCount; |
| 725 | v_U32_t nrtRXFrameCount; |
| 726 | v_U32_t nrtTXFrameCount; |
| 727 | vos_timer_t trafficTimer; |
| 728 | v_PVOID_t usrCtxt; |
| 729 | } WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE; |
| 730 | |
| 731 | typedef struct |
| 732 | { |
| 733 | v_S7_t rssiValue; |
| 734 | v_U8_t triggerEvent[WLANTL_HS_NUM_CLIENT]; |
| 735 | v_PVOID_t usrCtxt[WLANTL_HS_NUM_CLIENT]; |
| 736 | v_U8_t whoIsClient[WLANTL_HS_NUM_CLIENT]; |
| 737 | WLANTL_RSSICrossThresholdCBType crossCBFunction[WLANTL_HS_NUM_CLIENT]; |
| 738 | v_U8_t numClient; |
| 739 | } WLANTL_HO_RSSI_INDICATION_TYPE; |
| 740 | |
| 741 | typedef struct |
| 742 | { |
| 743 | v_U8_t numThreshold; |
| 744 | v_U8_t regionNumber; |
| 745 | v_S7_t historyRSSI; |
| 746 | v_U8_t alpha; |
| 747 | v_U32_t sampleTime; |
| 748 | v_U32_t fwNotification; |
| 749 | } WLANTL_CURRENT_HO_STATE_TYPE; |
| 750 | |
| 751 | typedef struct |
| 752 | { |
| 753 | WLANTL_HO_RSSI_INDICATION_TYPE registeredInd[WLANTL_MAX_AVAIL_THRESHOLD]; |
| 754 | WLANTL_CURRENT_HO_STATE_TYPE currentHOState; |
| 755 | WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE currentTraffic; |
| 756 | v_PVOID_t macCtxt; |
| 757 | vos_lock_t hosLock; |
| 758 | } WLANTL_HO_SUPPORT_TYPE; |
| 759 | |
| 760 | /*--------------------------------------------------------------------------- |
| 761 | TL control block type |
| 762 | ---------------------------------------------------------------------------*/ |
| 763 | typedef struct |
| 764 | { |
| 765 | /* TL configuration information */ |
| 766 | WLANTL_ConfigInfoType tlConfigInfo; |
| 767 | |
| 768 | /* list of the active stations */ |
Madan Mohan Koyylamudi | 3b8400c | 2013-01-24 17:47:01 +0530 | [diff] [blame] | 769 | WLANTL_STAClientType* atlSTAClients[WLAN_MAX_STA_COUNT]; |
| 770 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 771 | |
| 772 | /* information on the management frame client */ |
| 773 | WLANTL_MgmtFrmClientType tlMgmtFrmClient; |
| 774 | |
| 775 | /* information on the BT AMP client */ |
| 776 | WLANTL_BAPClientType tlBAPClient; |
| 777 | |
| 778 | /* number of packets sent to BAL waiting for tx complete confirmation */ |
| 779 | v_U16_t usPendingTxCompleteCount; |
| 780 | |
| 781 | /* global suspend flag */ |
| 782 | v_U8_t ucTxSuspended; |
| 783 | |
| 784 | /* resource flag */ |
| 785 | v_U32_t uResCount; |
| 786 | |
| 787 | /* dummy vos buffer - used for chains */ |
| 788 | vos_pkt_t* vosDummyBuf; |
| 789 | |
| 790 | /* temporary buffer for storing the packet that no longer fits */ |
| 791 | vos_pkt_t* vosTempBuf; |
| 792 | |
| 793 | /* The value of the station id and AC for the cached buffer */ |
| 794 | v_U8_t ucCachedSTAId; |
| 795 | v_U8_t ucCachedAC; |
| 796 | |
| 797 | /* Last registered STA - until multiple sta support is added this will |
| 798 | be used always for tx */ |
| 799 | v_U8_t ucRegisteredStaId; |
| 800 | |
| 801 | /*Current TL STA used for TX*/ |
| 802 | v_U8_t ucCurrentSTA; |
| 803 | |
| 804 | WLANTL_REORDER_BUFFER_T *reorderBufferPool; /* Allocate memory for [WLANTL_MAX_BA_SESSION] sessions */ |
| 805 | |
| 806 | WLANTL_HO_SUPPORT_TYPE hoSupport; |
| 807 | |
| 808 | v_BOOL_t bUrgent; |
| 809 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 810 | |
| 811 | /* resource flag */ |
| 812 | v_U32_t bd_pduResCount; |
| 813 | |
| 814 | /* time interval to evaluate LWM mode*/ |
| 815 | //vos_timer_t tThresholdSamplingTimer; |
| 816 | |
| 817 | #if 0 |
| 818 | //information fields for flow control |
| 819 | tFcTxParams_type tlFCInfo; |
| 820 | #endif |
| 821 | |
| 822 | vos_pkt_t* vosTxFCBuf; |
| 823 | |
| 824 | /* LWM mode is enabled or not for each station. Bit-wise operation.32 station maximum. */ |
| 825 | // v_U32_t uStaLwmMask; |
| 826 | |
| 827 | /* LWM event is reported by FW. */ |
| 828 | // v_U32_t uStaLwmEventReported; |
| 829 | |
| 830 | /** Multiple Station Scheduling and TL queue management. |
| 831 | 4 HDD BC/MC data packet queue status is specified as Station 0's status. Weights used |
| 832 | in WFQ algorith are initialized in WLANTL_OPEN and contained in tlConfigInfo field. |
| 833 | Each station has fields of ucPktPending and AC mask to tell whether a AC has traffic |
| 834 | or not. |
| 835 | |
| 836 | Stations are served in a round-robin fashion from highest priority to lowest priority. |
| 837 | The number of round-robin times of each prioirty equals to the WFQ weights and differetiates |
| 838 | the traffic of different prioirty. As such, stations can not provide low priority packets if |
| 839 | high priority packets are all served. |
| 840 | */ |
| 841 | |
| 842 | /* Currently served station id. Reuse ucCurrentSTA field. */ |
| 843 | //v_U8_t uCurStaId; |
| 844 | |
| 845 | /* Current served station ID in round-robin method to traverse all stations.*/ |
| 846 | WLANTL_ACEnumType uCurServedAC; |
| 847 | |
| 848 | /* How many weights have not been served in current AC. */ |
| 849 | v_U8_t ucCurLeftWeight; |
| 850 | |
| 851 | /* BC/MC management queue. Current implementation uses queue size 1. Will check whether |
| 852 | size N is supported. */ |
| 853 | vos_list_t pMCBCManageQ; |
| 854 | |
| 855 | v_U32_t sendFCFrame; |
| 856 | |
| 857 | v_U8_t done_once; |
| 858 | v_U8_t uFramesProcThres; |
Sunil Ravi | d5406f2 | 2013-01-22 00:18:31 -0800 | [diff] [blame] | 859 | #ifdef FEATURE_WLAN_TDLS |
| 860 | /*number of total TDLS peers registered to TL |
| 861 | Incremented at WLANTL_RegisterSTAClient(staType == WLAN_STA_TDLS) |
| 862 | Decremented at WLANTL_ClearSTAClient(staType == WLAN_STA_TDLS) */ |
| 863 | v_U8_t ucTdlsPeerCount; |
| 864 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 865 | /*whether we are in BMPS/UAPSD/WOWL mode, since the latter 2 need to be BMPS first*/ |
| 866 | v_BOOL_t isBMPS; |
Gopichand Nakkala | 11acd11 | 2012-12-31 16:04:04 -0800 | [diff] [blame] | 867 | /* Whether WDA_DS_TX_START_XMIT msg is pending or not */ |
| 868 | v_BOOL_t isTxTranmitMsgPending; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 869 | }WLANTL_CbType; |
| 870 | |
| 871 | /*========================================================================== |
| 872 | |
| 873 | FUNCTION WLANTL_GetFrames |
| 874 | |
| 875 | DESCRIPTION |
| 876 | |
| 877 | BAL calls this function at the request of the lower bus interface. |
| 878 | When this request is being received TL will retrieve packets from HDD |
| 879 | in accordance with the priority rules and the count supplied by BAL. |
| 880 | |
| 881 | DEPENDENCIES |
| 882 | |
| 883 | HDD must have registered with TL at least one STA before this function |
| 884 | can be called. |
| 885 | |
| 886 | PARAMETERS |
| 887 | |
| 888 | IN |
| 889 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 890 | or BAL's control block can be extracted from its context |
| 891 | uSize: maximum size accepted by the lower layer |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 892 | uFlowMask TX flow control mask. Each bit is defined as |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 893 | WDA_TXFlowEnumType |
| 894 | |
| 895 | OUT |
| 896 | vosDataBuff: it will contain a pointer to the first buffer supplied |
| 897 | by TL, if there is more than one packet supplied, TL |
| 898 | will chain them through vOSS buffers |
| 899 | |
| 900 | RETURN VALUE |
| 901 | |
| 902 | The result code associated with performing the operation |
| 903 | |
| 904 | 1 or more: number of required resources if there are still frames to fetch |
| 905 | For Volans, it's BD/PDU numbers. For Prima, it's free DXE descriptors. |
| 906 | 0 : error or HDD queues are drained |
| 907 | |
| 908 | SIDE EFFECTS |
| 909 | |
| 910 | ============================================================================*/ |
| 911 | v_U32_t |
| 912 | WLANTL_GetFrames |
| 913 | ( |
| 914 | v_PVOID_t pAdapter, |
| 915 | vos_pkt_t **ppFrameDataBuff, |
| 916 | v_U32_t uSize, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 917 | v_U8_t uFlowMask, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 918 | v_BOOL_t* pbUrgent |
| 919 | ); |
| 920 | |
| 921 | /*========================================================================== |
| 922 | |
| 923 | FUNCTION WLANTL_TxComp |
| 924 | |
| 925 | DESCRIPTION |
| 926 | It is being called by BAL upon asynchronous notification of the packet |
| 927 | or packets being sent over the bus. |
| 928 | |
| 929 | DEPENDENCIES |
| 930 | Tx complete cannot be called without a previous transmit. |
| 931 | |
| 932 | PARAMETERS |
| 933 | |
| 934 | IN |
| 935 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 936 | or BAL's control block can be extracted from its context |
| 937 | vosDataBuff: it will contain a pointer to the first buffer for which |
| 938 | the BAL report is being made, if there is more then one |
| 939 | packet they will be chained using vOSS buffers. |
| 940 | wTxSTAtus: the status of the transmitted packet, see above chapter |
| 941 | on HDD interaction for a list of possible values |
| 942 | |
| 943 | RETURN VALUE |
| 944 | The result code associated with performing the operation |
| 945 | |
| 946 | SIDE EFFECTS |
| 947 | |
| 948 | ============================================================================*/ |
| 949 | VOS_STATUS |
| 950 | WLANTL_TxComp |
| 951 | ( |
| 952 | v_PVOID_t pAdapter, |
| 953 | vos_pkt_t *pFrameDataBuff, |
| 954 | VOS_STATUS wTxStatus |
| 955 | ); |
| 956 | |
| 957 | /*========================================================================== |
| 958 | |
| 959 | FUNCTION WLANTL_RxFrames |
| 960 | |
| 961 | DESCRIPTION |
| 962 | Callback registered by TL and called by BAL when a packet is received |
| 963 | over the bus. Upon the call of this function TL will make the necessary |
| 964 | decision with regards to the forwarding or queuing of this packet and |
| 965 | the layer it needs to be delivered to. |
| 966 | |
| 967 | DEPENDENCIES |
| 968 | TL must be initiailized before this function gets called. |
| 969 | If the frame carried is a data frame then the station for which it is |
| 970 | destined to must have been previously registered with TL. |
| 971 | |
| 972 | PARAMETERS |
| 973 | |
| 974 | IN |
| 975 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 976 | or BAL's control block can be extracted from its context |
| 977 | |
| 978 | vosDataBuff: it will contain a pointer to the first buffer received, |
| 979 | if there is more then one packet they will be chained |
| 980 | using vOSS buffers. |
| 981 | |
| 982 | RETURN VALUE |
| 983 | The result code associated with performing the operation |
| 984 | |
| 985 | SIDE EFFECTS |
| 986 | |
| 987 | ============================================================================*/ |
| 988 | VOS_STATUS |
| 989 | WLANTL_RxFrames |
| 990 | ( |
| 991 | v_PVOID_t pAdapter, |
| 992 | vos_pkt_t *pFrameDataBuff |
| 993 | ); |
| 994 | |
| 995 | /*========================================================================== |
| 996 | |
| 997 | FUNCTION WLANTL_RxCachedFrames |
| 998 | |
| 999 | DESCRIPTION |
| 1000 | Utility function used by TL to forward the cached frames to a particular |
| 1001 | station; |
| 1002 | |
| 1003 | DEPENDENCIES |
| 1004 | TL must be initiailized before this function gets called. |
| 1005 | If the frame carried is a data frame then the station for which it is |
| 1006 | destined to must have been previously registered with TL. |
| 1007 | |
| 1008 | PARAMETERS |
| 1009 | |
| 1010 | IN |
| 1011 | pTLCb: pointer to TL handle |
| 1012 | |
| 1013 | ucSTAId: station for which we need to forward the packets |
| 1014 | |
| 1015 | vosDataBuff: it will contain a pointer to the first cached buffer |
| 1016 | received, if there is more then one packet they will be |
| 1017 | chained using vOSS buffers. |
| 1018 | |
| 1019 | RETURN VALUE |
| 1020 | The result code associated with performing the operation |
| 1021 | |
| 1022 | VOS_STATUS_E_INVAL: Input parameters are invalid |
| 1023 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1024 | page fault |
| 1025 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1026 | |
| 1027 | SIDE EFFECTS |
| 1028 | |
| 1029 | ============================================================================*/ |
| 1030 | VOS_STATUS |
| 1031 | WLANTL_RxCachedFrames |
| 1032 | ( |
| 1033 | WLANTL_CbType* pTLCb, |
| 1034 | v_U8_t ucSTAId, |
| 1035 | vos_pkt_t* vosDataBuff |
| 1036 | ); |
| 1037 | |
| 1038 | /*========================================================================== |
| 1039 | FUNCTION WLANTL_ResourceCB |
| 1040 | |
| 1041 | DESCRIPTION |
| 1042 | Called by the TL when it has packets available for transmission. |
| 1043 | |
| 1044 | DEPENDENCIES |
| 1045 | The TL must be registered with BAL before this function can be called. |
| 1046 | |
| 1047 | PARAMETERS |
| 1048 | |
| 1049 | IN |
| 1050 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1051 | or BAL's control block can be extracted from its context |
| 1052 | uCount: avail resource count obtained from hw |
| 1053 | |
| 1054 | RETURN VALUE |
| 1055 | The result code associated with performing the operation |
| 1056 | |
| 1057 | SIDE EFFECTS |
| 1058 | |
| 1059 | ============================================================================*/ |
| 1060 | VOS_STATUS |
| 1061 | WLANTL_ResourceCB |
| 1062 | ( |
| 1063 | v_PVOID_t pAdapter, |
| 1064 | v_U32_t uCount |
| 1065 | ); |
| 1066 | |
| 1067 | |
| 1068 | /*========================================================================== |
| 1069 | FUNCTION WLANTL_ProcessMainMessage |
| 1070 | |
| 1071 | DESCRIPTION |
| 1072 | Called by VOSS when a message was serialized for TL through the |
| 1073 | main thread/task. |
| 1074 | |
| 1075 | DEPENDENCIES |
| 1076 | The TL must be initialized before this function can be called. |
| 1077 | |
| 1078 | PARAMETERS |
| 1079 | |
| 1080 | IN |
| 1081 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1082 | control block can be extracted from its context |
| 1083 | message: type and content of the message |
| 1084 | |
| 1085 | |
| 1086 | RETURN VALUE |
| 1087 | The result code associated with performing the operation |
| 1088 | |
| 1089 | SIDE EFFECTS |
| 1090 | |
| 1091 | ============================================================================*/ |
| 1092 | VOS_STATUS |
| 1093 | WLANTL_ProcessMainMessage |
| 1094 | ( |
| 1095 | v_PVOID_t pAdapter, |
| 1096 | vos_msg_t* message |
| 1097 | ); |
| 1098 | |
| 1099 | /*========================================================================== |
| 1100 | FUNCTION WLANTL_ProcessTxMessage |
| 1101 | |
| 1102 | DESCRIPTION |
| 1103 | Called by VOSS when a message was serialized for TL through the |
| 1104 | tx thread/task. |
| 1105 | |
| 1106 | DEPENDENCIES |
| 1107 | The TL must be initialized before this function can be called. |
| 1108 | |
| 1109 | PARAMETERS |
| 1110 | |
| 1111 | IN |
| 1112 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1113 | control block can be extracted from its context |
| 1114 | message: type and content of the message |
| 1115 | |
| 1116 | |
| 1117 | RETURN VALUE |
| 1118 | |
| 1119 | The result code associated with performing the operation |
| 1120 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1121 | |
| 1122 | |
| 1123 | SIDE EFFECTS |
| 1124 | |
| 1125 | ============================================================================*/ |
| 1126 | VOS_STATUS |
| 1127 | WLANTL_ProcessTxMessage |
| 1128 | ( |
| 1129 | v_PVOID_t pAdapter, |
| 1130 | vos_msg_t* message |
| 1131 | ); |
| 1132 | |
| 1133 | /*========================================================================== |
| 1134 | FUNCTION WLAN_TLGetNextTxIds |
| 1135 | |
| 1136 | DESCRIPTION |
| 1137 | Gets the next station and next AC in the list |
| 1138 | |
| 1139 | DEPENDENCIES |
| 1140 | |
| 1141 | PARAMETERS |
| 1142 | |
| 1143 | OUT |
| 1144 | pucSTAId: STAtion ID |
| 1145 | |
| 1146 | RETURN VALUE |
| 1147 | The result code associated with performing the operation |
| 1148 | |
| 1149 | SIDE EFFECTS |
| 1150 | |
| 1151 | ============================================================================*/ |
| 1152 | VOS_STATUS |
| 1153 | WLAN_TLGetNextTxIds |
| 1154 | ( |
| 1155 | v_PVOID_t pAdapter, |
| 1156 | v_U8_t* pucSTAId |
| 1157 | ); |
| 1158 | |
| 1159 | /*========================================================================== |
| 1160 | |
| 1161 | FUNCTION WLANTL_CleanCb |
| 1162 | |
| 1163 | DESCRIPTION |
| 1164 | Cleans TL control block |
| 1165 | |
| 1166 | DEPENDENCIES |
| 1167 | |
| 1168 | PARAMETERS |
| 1169 | |
| 1170 | IN |
| 1171 | pTLCb: pointer to TL's control block |
| 1172 | ucEmpty: set if TL has to clean up the queues and release pedning pkts |
| 1173 | |
| 1174 | RETURN VALUE |
| 1175 | The result code associated with performing the operation |
| 1176 | |
| 1177 | SIDE EFFECTS |
| 1178 | |
| 1179 | ============================================================================*/ |
| 1180 | VOS_STATUS |
| 1181 | WLANTL_CleanCB |
| 1182 | ( |
| 1183 | WLANTL_CbType* pTLCb, |
| 1184 | v_U8_t ucEmpty |
| 1185 | ); |
| 1186 | |
| 1187 | /*========================================================================== |
| 1188 | |
| 1189 | FUNCTION WLANTL_CleanSTA |
| 1190 | |
| 1191 | DESCRIPTION |
| 1192 | Cleans a station control block. |
| 1193 | |
| 1194 | DEPENDENCIES |
| 1195 | |
| 1196 | PARAMETERS |
| 1197 | |
| 1198 | IN |
| 1199 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1200 | control block can be extracted from its context |
| 1201 | ucEmpty: if set the queues and pending pkts will be emptyed |
| 1202 | |
| 1203 | RETURN VALUE |
| 1204 | The result code associated with performing the operation |
| 1205 | |
| 1206 | SIDE EFFECTS |
| 1207 | |
| 1208 | ============================================================================*/ |
| 1209 | VOS_STATUS |
| 1210 | WLANTL_CleanSTA |
| 1211 | ( |
| 1212 | WLANTL_STAClientType* ptlSTAClient, |
| 1213 | v_U8_t ucEmpty |
| 1214 | ); |
| 1215 | |
| 1216 | /*========================================================================== |
| 1217 | FUNCTION WLANTL_GetTxResourcesCB |
| 1218 | |
| 1219 | DESCRIPTION |
| 1220 | Processing function for Resource needed signal. A request will be issued |
| 1221 | to BAL to get mor tx resources. |
| 1222 | |
| 1223 | DEPENDENCIES |
| 1224 | The TL must be initialized before this function can be called. |
| 1225 | |
| 1226 | PARAMETERS |
| 1227 | |
| 1228 | IN |
| 1229 | pvosGCtx: pointer to the global vos context; a handle to TL's |
| 1230 | control block can be extracted from its context |
| 1231 | |
| 1232 | |
| 1233 | RETURN VALUE |
| 1234 | The result code associated with performing the operation |
| 1235 | |
| 1236 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1237 | page fault |
| 1238 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1239 | |
| 1240 | Other values can be returned as a result of a function call, please check |
| 1241 | corresponding API for more info. |
| 1242 | SIDE EFFECTS |
| 1243 | |
| 1244 | ============================================================================*/ |
| 1245 | VOS_STATUS |
| 1246 | WLANTL_GetTxResourcesCB |
| 1247 | ( |
| 1248 | v_PVOID_t pvosGCtx |
| 1249 | ); |
| 1250 | |
| 1251 | /*========================================================================== |
| 1252 | FUNCTION WLANTL_PrepareBDHeader |
| 1253 | |
| 1254 | DESCRIPTION |
| 1255 | Callback function for serializing Suspend signal through Tx thread |
| 1256 | |
| 1257 | DEPENDENCIES |
| 1258 | Just notify HAL that suspend in TL is complete. |
| 1259 | |
| 1260 | PARAMETERS |
| 1261 | |
| 1262 | IN |
| 1263 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1264 | control block can be extracted from its context |
| 1265 | pUserData: user data sent with the callback |
| 1266 | |
| 1267 | RETURN VALUE |
| 1268 | The result code associated with performing the operation |
| 1269 | |
| 1270 | SIDE EFFECTS |
| 1271 | |
| 1272 | ============================================================================*/ |
| 1273 | void |
| 1274 | WLANTL_PrepareBDHeader |
| 1275 | ( |
| 1276 | vos_pkt_t* vosDataBuff, |
| 1277 | v_PVOID_t* ppvBDHeader, |
| 1278 | v_MACADDR_t* pvDestMacAdddr, |
| 1279 | v_U8_t ucDisableFrmXtl, |
| 1280 | VOS_STATUS* pvosSTAtus, |
| 1281 | v_U16_t* usPktLen, |
| 1282 | v_U8_t ucQosEnabled, |
| 1283 | v_U8_t ucWDSEnabled, |
| 1284 | v_U8_t extraHeadSpace |
| 1285 | ); |
| 1286 | |
| 1287 | /*========================================================================== |
| 1288 | FUNCTION WLANTL_Translate8023To80211Header |
| 1289 | |
| 1290 | DESCRIPTION |
| 1291 | Inline function for translating and 802.3 header into an 802.11 header. |
| 1292 | |
| 1293 | DEPENDENCIES |
| 1294 | |
| 1295 | |
| 1296 | PARAMETERS |
| 1297 | |
| 1298 | IN |
| 1299 | pTLCb: TL control block |
Kiran Venkatappa | a044eb9 | 2012-12-17 15:48:49 -0800 | [diff] [blame] | 1300 | |
| 1301 | *pucStaId Station ID. In case of TDLS, this return the actual |
| 1302 | station index used to transmit. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1303 | |
| 1304 | IN/OUT |
| 1305 | vosDataBuff: vos data buffer, will contain the new header on output |
| 1306 | |
| 1307 | OUT |
| 1308 | pvosStatus: status of the operation |
| 1309 | |
| 1310 | RETURN VALUE |
| 1311 | No return. |
| 1312 | |
| 1313 | SIDE EFFECTS |
| 1314 | |
| 1315 | ============================================================================*/ |
Kiran Venkatappa | cab0d35 | 2012-12-17 13:09:22 -0800 | [diff] [blame] | 1316 | VOS_STATUS |
| 1317 | WLANTL_Translate8023To80211Header |
| 1318 | ( |
| 1319 | vos_pkt_t* vosDataBuff, |
| 1320 | VOS_STATUS* pvosStatus, |
| 1321 | WLANTL_CbType* pTLCb, |
| 1322 | v_U8_t *pucStaId, |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1323 | WLANTL_MetaInfoType* pTlMetaInfo, |
Kiran Venkatappa | cab0d35 | 2012-12-17 13:09:22 -0800 | [diff] [blame] | 1324 | v_U8_t *ucWDSEnabled, |
| 1325 | v_U8_t *extraHeadSpace |
| 1326 | ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1327 | /*========================================================================== |
| 1328 | FUNCTION WLANTL_Translate80211To8023Header |
| 1329 | |
| 1330 | DESCRIPTION |
| 1331 | Inline function for translating and 802.11 header into an 802.3 header. |
| 1332 | |
| 1333 | DEPENDENCIES |
| 1334 | |
| 1335 | |
| 1336 | PARAMETERS |
| 1337 | |
| 1338 | IN |
| 1339 | pTLCb: TL control block |
| 1340 | ucStaId: station ID |
| 1341 | ucHeaderLen: Length of the header from BD |
| 1342 | ucActualHLen: Length of header including padding or any other trailers |
| 1343 | |
| 1344 | IN/OUT |
| 1345 | vosDataBuff: vos data buffer, will contain the new header on output |
| 1346 | |
| 1347 | OUT |
| 1348 | pvosStatus: status of the operation |
| 1349 | |
| 1350 | RETURN VALUE |
| 1351 | Status of the operation |
| 1352 | |
| 1353 | SIDE EFFECTS |
| 1354 | |
| 1355 | ============================================================================*/ |
| 1356 | VOS_STATUS |
| 1357 | WLANTL_Translate80211To8023Header |
| 1358 | ( |
| 1359 | vos_pkt_t* vosDataBuff, |
| 1360 | VOS_STATUS* pvosStatus, |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 1361 | v_U16_t usActualHLen, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1362 | v_U8_t ucHeaderLen, |
| 1363 | WLANTL_CbType* pTLCb, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1364 | v_U8_t ucSTAId, |
| 1365 | v_BOOL_t bForwardIAPPwithLLC |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1366 | ); |
| 1367 | |
| 1368 | /*========================================================================== |
Madan Mohan Koyyalamudi | a148e1e | 2012-11-30 14:52:59 -0800 | [diff] [blame] | 1369 | FUNCTION WLANTL_FindFrameTypeBcMcUc |
| 1370 | |
| 1371 | DESCRIPTION |
| 1372 | Utility function to find whether received frame is broadcast, multicast |
| 1373 | or unicast. |
| 1374 | |
| 1375 | DEPENDENCIES |
| 1376 | The STA must be registered with TL before this function can be called. |
| 1377 | |
| 1378 | PARAMETERS |
| 1379 | |
| 1380 | IN |
| 1381 | pTLCb: pointer to the TL's control block |
| 1382 | ucSTAId: identifier of the station being processed |
| 1383 | vosDataBuff: pointer to the vos buffer |
| 1384 | |
| 1385 | IN/OUT |
| 1386 | pucBcMcUc: pointer to buffer, will contain frame type on return |
| 1387 | |
| 1388 | RETURN VALUE |
| 1389 | The result code associated with performing the operation |
| 1390 | |
| 1391 | VOS_STATUS_E_INVAL: invalid input parameters |
| 1392 | VOS_STATUS_E_BADMSG: failed to extract info from data buffer |
| 1393 | VOS_STATUS_SUCCESS: success |
| 1394 | |
| 1395 | SIDE EFFECTS |
| 1396 | None. |
| 1397 | ============================================================================*/ |
| 1398 | VOS_STATUS |
| 1399 | WLANTL_FindFrameTypeBcMcUc |
| 1400 | ( |
| 1401 | WLANTL_CbType *pTLCb, |
| 1402 | v_U8_t ucSTAId, |
| 1403 | vos_pkt_t *vosDataBuff, |
| 1404 | v_U8_t *pucBcMcUc |
| 1405 | ); |
| 1406 | |
| 1407 | /*========================================================================== |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1408 | |
| 1409 | FUNCTION WLANTL_MgmtFrmRxDefaultCb |
| 1410 | |
| 1411 | DESCRIPTION |
| 1412 | Default Mgmt Frm rx callback: asserts all the time. If this function gets |
| 1413 | called it means there is no registered rx cb pointer for Mgmt Frm. |
| 1414 | |
| 1415 | DEPENDENCIES |
| 1416 | |
| 1417 | PARAMETERS |
| 1418 | |
| 1419 | Not used. |
| 1420 | |
| 1421 | RETURN VALUE |
| 1422 | Always FAILURE. |
| 1423 | |
| 1424 | ============================================================================*/ |
| 1425 | VOS_STATUS |
| 1426 | WLANTL_MgmtFrmRxDefaultCb |
| 1427 | ( |
| 1428 | v_PVOID_t pAdapter, |
| 1429 | v_PVOID_t vosBuff |
| 1430 | ); |
| 1431 | |
| 1432 | /*========================================================================== |
| 1433 | |
| 1434 | FUNCTION WLANTL_STARxDefaultCb |
| 1435 | |
| 1436 | DESCRIPTION |
| 1437 | Default BAP rx callback: asserts all the time. If this function gets |
| 1438 | called it means there is no registered rx cb pointer for BAP. |
| 1439 | |
| 1440 | DEPENDENCIES |
| 1441 | |
| 1442 | PARAMETERS |
| 1443 | |
| 1444 | Not used. |
| 1445 | |
| 1446 | RETURN VALUE |
| 1447 | Always FAILURE. |
| 1448 | |
| 1449 | ============================================================================*/ |
| 1450 | VOS_STATUS |
| 1451 | WLANTL_BAPRxDefaultCb |
| 1452 | ( |
| 1453 | v_PVOID_t pAdapter, |
| 1454 | vos_pkt_t* vosDataBuff, |
| 1455 | WLANTL_BAPFrameEnumType frameType |
| 1456 | ); |
| 1457 | |
| 1458 | /*========================================================================== |
| 1459 | |
| 1460 | FUNCTION WLANTL_STARxDefaultCb |
| 1461 | |
| 1462 | DESCRIPTION |
| 1463 | Default STA rx callback: asserts all the time. If this function gets |
| 1464 | called it means there is no registered rx cb pointer for station. |
| 1465 | (Mem corruption most likely, it should never happen) |
| 1466 | |
| 1467 | DEPENDENCIES |
| 1468 | |
| 1469 | PARAMETERS |
| 1470 | |
| 1471 | Not used. |
| 1472 | |
| 1473 | RETURN VALUE |
| 1474 | Always FAILURE. |
| 1475 | |
| 1476 | ============================================================================*/ |
| 1477 | VOS_STATUS |
| 1478 | WLANTL_STARxDefaultCb |
| 1479 | ( |
| 1480 | v_PVOID_t pAdapter, |
| 1481 | vos_pkt_t* vosDataBuff, |
| 1482 | v_U8_t ucSTAId, |
| 1483 | WLANTL_RxMetaInfoType* pRxMetaInfo |
| 1484 | ); |
| 1485 | |
| 1486 | /*========================================================================== |
| 1487 | |
| 1488 | FUNCTION WLANTL_STAFetchPktDefaultCb |
| 1489 | |
| 1490 | DESCRIPTION |
| 1491 | Default fetch callback: asserts all the time. If this function gets |
| 1492 | called it means there is no registered fetch cb pointer for station. |
| 1493 | (Mem corruption most likely, it should never happen) |
| 1494 | |
| 1495 | DEPENDENCIES |
| 1496 | |
| 1497 | PARAMETERS |
| 1498 | |
| 1499 | Not used. |
| 1500 | |
| 1501 | RETURN VALUE |
| 1502 | Always FAILURE. |
| 1503 | |
| 1504 | ============================================================================*/ |
| 1505 | VOS_STATUS |
| 1506 | WLANTL_STAFetchPktDefaultCb |
| 1507 | ( |
| 1508 | v_PVOID_t pAdapter, |
| 1509 | v_U8_t* pucSTAId, |
| 1510 | WLANTL_ACEnumType ucAC, |
| 1511 | vos_pkt_t** vosDataBuff, |
| 1512 | WLANTL_MetaInfoType* tlMetaInfo |
| 1513 | ); |
| 1514 | |
| 1515 | /*========================================================================== |
| 1516 | |
| 1517 | FUNCTION WLANTL_TxCompDefaultCb |
| 1518 | |
| 1519 | DESCRIPTION |
| 1520 | Default tx complete handler. It will release the completed pkt to |
| 1521 | prevent memory leaks. |
| 1522 | |
| 1523 | PARAMETERS |
| 1524 | |
| 1525 | IN |
| 1526 | pAdapter: pointer to the global adapter context; a handle to |
| 1527 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1528 | its context |
| 1529 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1530 | wTxSTAtus: status of the transmission |
| 1531 | |
| 1532 | |
| 1533 | RETURN VALUE |
| 1534 | The result code associated with performing the operation; please |
| 1535 | check vos_pkt_return_pkt for possible error codes. |
| 1536 | |
| 1537 | ============================================================================*/ |
| 1538 | VOS_STATUS |
| 1539 | WLANTL_TxCompDefaultCb |
| 1540 | ( |
| 1541 | v_PVOID_t pAdapter, |
| 1542 | vos_pkt_t* vosDataBuff, |
| 1543 | VOS_STATUS wTxSTAtus |
| 1544 | ); |
| 1545 | |
| 1546 | /*========================================================================== |
| 1547 | |
| 1548 | FUNCTION WLANTL_PackUpTriggerFrame |
| 1549 | |
| 1550 | DESCRIPTION |
| 1551 | Packs up a trigger frame and places it in TL's cache for tx and notifies |
| 1552 | BAL |
| 1553 | |
| 1554 | DEPENDENCIES |
| 1555 | |
| 1556 | PARAMETERS |
| 1557 | |
| 1558 | IN |
| 1559 | pTLCb: pointer to the TL control block |
| 1560 | pfnSTATxComp: Tx Complete Cb to be used when frame is received |
| 1561 | ucSTAId: station id |
| 1562 | ucAC: access category |
| 1563 | |
| 1564 | RETURN VALUE |
| 1565 | None |
| 1566 | |
| 1567 | SIDE EFFECTS |
| 1568 | |
| 1569 | ============================================================================*/ |
| 1570 | VOS_STATUS |
| 1571 | WLANTL_PackUpTriggerFrame |
| 1572 | ( |
| 1573 | WLANTL_CbType* pTLCb, |
| 1574 | WLANTL_TxCompCBType pfnSTATxComp, |
| 1575 | v_U8_t ucSTAId, |
| 1576 | WLANTL_ACEnumType ucAC |
| 1577 | ); |
| 1578 | |
| 1579 | /*========================================================================== |
| 1580 | |
| 1581 | FUNCTION WLANTL_TxCompTriggFrameSI |
| 1582 | |
| 1583 | DESCRIPTION |
| 1584 | Tx complete handler for the service interval trigger frame. |
| 1585 | It will restart the SI timer. |
| 1586 | |
| 1587 | PARAMETERS |
| 1588 | |
| 1589 | IN |
| 1590 | pvosGCtx: pointer to the global vos context; a handle to |
| 1591 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1592 | its context |
| 1593 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1594 | wTxSTAtus: status of the transmission |
| 1595 | |
| 1596 | |
| 1597 | RETURN VALUE |
| 1598 | The result code associated with performing the operation |
| 1599 | |
| 1600 | ============================================================================*/ |
| 1601 | VOS_STATUS |
| 1602 | WLANTL_TxCompTriggFrameSI |
| 1603 | ( |
| 1604 | v_PVOID_t pvosGCtx, |
| 1605 | vos_pkt_t* vosDataBuff, |
| 1606 | VOS_STATUS wTxSTAtus |
| 1607 | ); |
| 1608 | |
| 1609 | /*========================================================================== |
| 1610 | |
| 1611 | FUNCTION WLANTL_TxCompTriggFrameSI |
| 1612 | |
| 1613 | DESCRIPTION |
| 1614 | Tx complete handler for the service interval trigger frame. |
| 1615 | It will restart the SI timer. |
| 1616 | |
| 1617 | PARAMETERS |
| 1618 | |
| 1619 | IN |
| 1620 | pvosGCtx: pointer to the global vos context; a handle to |
| 1621 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1622 | its context |
| 1623 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1624 | wTxSTAtus: status of the transmission |
| 1625 | |
| 1626 | |
| 1627 | RETURN VALUE |
| 1628 | The result code associated with performing the operation |
| 1629 | |
| 1630 | ============================================================================*/ |
| 1631 | VOS_STATUS |
| 1632 | WLANTL_TxCompTriggFrameDI |
| 1633 | ( |
| 1634 | v_PVOID_t pvosGCtx, |
| 1635 | vos_pkt_t* vosDataBuff, |
| 1636 | VOS_STATUS wTxSTAtus |
| 1637 | ); |
| 1638 | |
| 1639 | /*========================================================================== |
| 1640 | |
| 1641 | FUNCTION |
| 1642 | |
| 1643 | DESCRIPTION Read RSSI value out of a RX BD |
| 1644 | |
| 1645 | PARAMETERS: Caller must validate all parameters |
| 1646 | |
| 1647 | RETURN VALUE |
| 1648 | |
| 1649 | ============================================================================*/ |
| 1650 | VOS_STATUS WLANTL_ReadRSSI |
| 1651 | ( |
| 1652 | v_PVOID_t pAdapter, |
| 1653 | v_PVOID_t pBDHeader, |
| 1654 | v_U8_t STAid |
| 1655 | ); |
| 1656 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 1657 | /*========================================================================== |
| 1658 | |
| 1659 | FUNCTION |
| 1660 | |
| 1661 | DESCRIPTION Read SNR value out of a RX BD |
| 1662 | |
| 1663 | PARAMETERS: Caller must validate all parameters |
| 1664 | |
| 1665 | RETURN VALUE |
| 1666 | |
| 1667 | ============================================================================*/ |
| 1668 | VOS_STATUS WLANTL_ReadSNR |
| 1669 | ( |
| 1670 | v_PVOID_t pAdapter, |
| 1671 | v_PVOID_t pBDHeader, |
| 1672 | v_U8_t STAid |
| 1673 | ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1674 | |
| 1675 | |
| 1676 | void WLANTL_PowerStateChangedCB |
| 1677 | ( |
| 1678 | v_PVOID_t pAdapter, |
| 1679 | tPmcState newState |
| 1680 | ); |
| 1681 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1682 | /*========================================================================== |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 1683 | FUNCTION WLANTL_FwdPktToHDD |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1684 | |
| 1685 | DESCRIPTION |
| 1686 | Determine the Destation Station ID and route the Frame to Upper Layer |
| 1687 | |
| 1688 | DEPENDENCIES |
| 1689 | |
| 1690 | PARAMETERS |
| 1691 | |
| 1692 | IN |
| 1693 | pvosGCtx: pointer to the global vos context; a handle to TL's |
| 1694 | control block can be extracted from its context |
| 1695 | ucSTAId: identifier of the station being processed |
| 1696 | vosDataBuff: pointer to the rx vos buffer |
| 1697 | |
| 1698 | RETURN VALUE |
| 1699 | The result code associated with performing the operation |
| 1700 | |
| 1701 | VOS_STATUS_E_INVAL: invalid input parameters |
| 1702 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1703 | page fault |
| 1704 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1705 | |
| 1706 | SIDE EFFECTS |
| 1707 | |
| 1708 | ============================================================================*/ |
| 1709 | |
| 1710 | VOS_STATUS |
| 1711 | WLANTL_FwdPktToHDD |
| 1712 | ( |
| 1713 | v_PVOID_t pvosGCtx, |
| 1714 | vos_pkt_t* pvosDataBuff, |
| 1715 | v_U8_t ucSTAId |
| 1716 | ); |
| 1717 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1718 | #endif /* #ifndef WLAN_QCT_TLI_H */ |