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