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