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