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