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