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