blob: d3aa20a19922624ceab4afb559cb9f5645be0472 [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
Gopichand Nakkala96237bc2013-01-04 12:20:29 -0800583 /* ULA notfication is pending */
584 v_U8_t ucULANotificationPending;
585
586 void (*callbackRoutine) (void *callbackContext);
587
588 void *callbackContext;
589
Jeff Johnson295189b2012-06-20 16:38:30 -0700590#ifdef WLAN_SOFTAP_FEATURE
591
592 /* LWM related fields */
593
594 //current station is slow. LWM mode is enabled.
595 v_BOOL_t ucLwmModeEnabled;
596 //LWM events is reported when LWM mode is on. Able to send more traffic
597 //under the constraints of uBuffThresholdMax
598 v_BOOL_t ucLwmEventReported;
599
600 //v_U8_t uLwmEventReported;
601
602 /* Flow control fields */
603 //memory used in previous round
604 v_U8_t bmuMemConsumed;
605
606 //the number packets injected in this round
607 v_U32_t uIngress_length;
608
609 //number of packets allowed in current round beforing receiving new FW memory updates
610 v_U32_t uBuffThresholdMax;
611
612
613 // v_U32_t uEgress_length;
614
615 // v_U32_t uIngress_length;
616
617 // v_U32_t uBuffThresholdMax;
618
619 // v_U32_t uBuffThresholdUsed;
620
621 /* Value used to set LWM in FW. Initialized to 1/3* WLAN_STA_BMU_THRESHOLD_MAX
622 In the future, it can be dynamically adjusted if we find the reason to implement
623 such algorithm. */
624 v_U32_t uLwmThreshold;
625
626 //tx disable forced by Riva software
627 v_U16_t fcStaTxDisabled;
628
629 /** HDD buffer status for packet scheduling. Once HDD
630 * stores a new packet in a previously empty queue, it
631 * will call TL interface to set the fields. The fields
632 * will be cleaned by TL when TL can't fetch more packets
633 * from the queue. */
634 // the fields are ucPktPending and ucACMask;
635
636 /* Queue to keep unicast station management frame */
637 vos_list_t pStaManageQ;
638#endif
639
640#ifdef ANI_CHIPSET_VOLANS
641 /* 1 means replay check is needed for the station,
642 * 0 means replay check is not needed for the station*/
643 v_BOOL_t ucIsReplayCheckValid;
644
645 /* It contains 48-bit replay counter per TID*/
646 v_U64_t ullReplayCounter[WLANTL_MAX_TID];
647
648 /* It contains no of replay packets found per STA.
649 It is for debugging purpose only.*/
650 v_U32_t ulTotalReplayPacketsDetected;
651#endif
652
653}WLANTL_STAClientType;
654
655/*---------------------------------------------------------------------------
656 BAP Client type
657---------------------------------------------------------------------------*/
658typedef struct
659{
660 /* flag that keeps track of registration; only one non-data BT-AMP client
661 allowed */
662 v_U8_t ucExists;
663
664 /* pointer to the receive processing routine for non-data BT-AMP frames */
665 WLANTL_BAPRxCBType pfnTlBAPRx;
666
667 /* pointer to the flush call back complete function */
668 WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb;
669
670 /* pointer to the non-data BT-AMP frame pending transmission */
671 vos_pkt_t* vosPendingDataBuff;
672
673 /* BAP station ID */
674 v_U8_t ucBAPSTAId;
675}WLANTL_BAPClientType;
676
677
678/*---------------------------------------------------------------------------
679 Management Frame Client type
680---------------------------------------------------------------------------*/
681typedef struct
682{
683 /* flag that keeps track of registration; only one management frame
684 client allowed */
685 v_U8_t ucExists;
686
687 /* pointer to the receive processing routine for management frames */
688 WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx;
689
690 /* pointer to the management frame pending transmission */
691 vos_pkt_t* vosPendingDataBuff;
692}WLANTL_MgmtFrmClientType;
693
694typedef struct
695{
696 WLANTL_TrafficStatusChangedCBType trafficCB;
697 WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus;
698 v_U32_t idleThreshold;
699 v_U32_t measurePeriod;
700 v_U32_t rtRXFrameCount;
701 v_U32_t rtTXFrameCount;
702 v_U32_t nrtRXFrameCount;
703 v_U32_t nrtTXFrameCount;
704 vos_timer_t trafficTimer;
705 v_PVOID_t usrCtxt;
706} WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE;
707
708typedef struct
709{
710 v_S7_t rssiValue;
711 v_U8_t triggerEvent[WLANTL_HS_NUM_CLIENT];
712 v_PVOID_t usrCtxt[WLANTL_HS_NUM_CLIENT];
713 v_U8_t whoIsClient[WLANTL_HS_NUM_CLIENT];
714 WLANTL_RSSICrossThresholdCBType crossCBFunction[WLANTL_HS_NUM_CLIENT];
715 v_U8_t numClient;
716} WLANTL_HO_RSSI_INDICATION_TYPE;
717
718typedef struct
719{
720 v_U8_t numThreshold;
721 v_U8_t regionNumber;
722 v_S7_t historyRSSI;
723 v_U8_t alpha;
724 v_U32_t sampleTime;
725 v_U32_t fwNotification;
726} WLANTL_CURRENT_HO_STATE_TYPE;
727
728typedef struct
729{
730 WLANTL_HO_RSSI_INDICATION_TYPE registeredInd[WLANTL_MAX_AVAIL_THRESHOLD];
731 WLANTL_CURRENT_HO_STATE_TYPE currentHOState;
732 WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE currentTraffic;
733 v_PVOID_t macCtxt;
734 vos_lock_t hosLock;
735} WLANTL_HO_SUPPORT_TYPE;
736
737/*---------------------------------------------------------------------------
738 TL control block type
739---------------------------------------------------------------------------*/
740typedef struct
741{
742 /* TL configuration information */
743 WLANTL_ConfigInfoType tlConfigInfo;
744
745 /* list of the active stations */
746 WLANTL_STAClientType *atlSTAClients; /*Allocate memory [WLAN_MAX_STA_COUNT] of station */
747
748 /* information on the management frame client */
749 WLANTL_MgmtFrmClientType tlMgmtFrmClient;
750
751 /* information on the BT AMP client */
752 WLANTL_BAPClientType tlBAPClient;
753
754 /* number of packets sent to BAL waiting for tx complete confirmation */
755 v_U16_t usPendingTxCompleteCount;
756
757 /* global suspend flag */
758 v_U8_t ucTxSuspended;
759
760 /* resource flag */
761 v_U32_t uResCount;
762
763 /* dummy vos buffer - used for chains */
764 vos_pkt_t* vosDummyBuf;
765
766 /* temporary buffer for storing the packet that no longer fits */
767 vos_pkt_t* vosTempBuf;
768
769 /* The value of the station id and AC for the cached buffer */
770 v_U8_t ucCachedSTAId;
771 v_U8_t ucCachedAC;
772
773 /* Last registered STA - until multiple sta support is added this will
774 be used always for tx */
775 v_U8_t ucRegisteredStaId;
776
777 /*Current TL STA used for TX*/
778 v_U8_t ucCurrentSTA;
779
780 WLANTL_REORDER_BUFFER_T *reorderBufferPool; /* Allocate memory for [WLANTL_MAX_BA_SESSION] sessions */
781
782 WLANTL_HO_SUPPORT_TYPE hoSupport;
783
784 v_BOOL_t bUrgent;
785
786#ifdef WLAN_SOFTAP_FEATURE
787
788 /* resource flag */
789 v_U32_t bd_pduResCount;
790
791 /* time interval to evaluate LWM mode*/
792 //vos_timer_t tThresholdSamplingTimer;
793
794#if 0
795 //information fields for flow control
796 tFcTxParams_type tlFCInfo;
797#endif
798
799 vos_pkt_t* vosTxFCBuf;
800
801 /* LWM mode is enabled or not for each station. Bit-wise operation.32 station maximum. */
802 // v_U32_t uStaLwmMask;
803
804 /* LWM event is reported by FW. */
805 // v_U32_t uStaLwmEventReported;
806
807 /** Multiple Station Scheduling and TL queue management.
808 4 HDD BC/MC data packet queue status is specified as Station 0's status. Weights used
809 in WFQ algorith are initialized in WLANTL_OPEN and contained in tlConfigInfo field.
810 Each station has fields of ucPktPending and AC mask to tell whether a AC has traffic
811 or not.
812
813 Stations are served in a round-robin fashion from highest priority to lowest priority.
814 The number of round-robin times of each prioirty equals to the WFQ weights and differetiates
815 the traffic of different prioirty. As such, stations can not provide low priority packets if
816 high priority packets are all served.
817 */
818
819 /* Currently served station id. Reuse ucCurrentSTA field. */
820 //v_U8_t uCurStaId;
821
822 /* Current served station ID in round-robin method to traverse all stations.*/
823 WLANTL_ACEnumType uCurServedAC;
824
825 /* How many weights have not been served in current AC. */
826 v_U8_t ucCurLeftWeight;
827
828 /* BC/MC management queue. Current implementation uses queue size 1. Will check whether
829 size N is supported. */
830 vos_list_t pMCBCManageQ;
831
832 v_U32_t sendFCFrame;
833
834 v_U8_t done_once;
835 v_U8_t uFramesProcThres;
836#endif
837 /*whether we are in BMPS/UAPSD/WOWL mode, since the latter 2 need to be BMPS first*/
838 v_BOOL_t isBMPS;
Gopichand Nakkala11acd112012-12-31 16:04:04 -0800839 /* Whether WDA_DS_TX_START_XMIT msg is pending or not */
840 v_BOOL_t isTxTranmitMsgPending;
Jeff Johnson295189b2012-06-20 16:38:30 -0700841}WLANTL_CbType;
842
843/*==========================================================================
844
845 FUNCTION WLANTL_GetFrames
846
847 DESCRIPTION
848
849 BAL calls this function at the request of the lower bus interface.
850 When this request is being received TL will retrieve packets from HDD
851 in accordance with the priority rules and the count supplied by BAL.
852
853 DEPENDENCIES
854
855 HDD must have registered with TL at least one STA before this function
856 can be called.
857
858 PARAMETERS
859
860 IN
861 pAdapter: pointer to the global adapter context; a handle to TL's
862 or BAL's control block can be extracted from its context
863 uSize: maximum size accepted by the lower layer
864 uFlowMask TX flow control mask. Each bit is defined as
865 WDA_TXFlowEnumType
866
867 OUT
868 vosDataBuff: it will contain a pointer to the first buffer supplied
869 by TL, if there is more than one packet supplied, TL
870 will chain them through vOSS buffers
871
872 RETURN VALUE
873
874 The result code associated with performing the operation
875
876 1 or more: number of required resources if there are still frames to fetch
877 For Volans, it's BD/PDU numbers. For Prima, it's free DXE descriptors.
878 0 : error or HDD queues are drained
879
880 SIDE EFFECTS
881
882============================================================================*/
883v_U32_t
884WLANTL_GetFrames
885(
886 v_PVOID_t pAdapter,
887 vos_pkt_t **ppFrameDataBuff,
888 v_U32_t uSize,
889#if defined( FEATURE_WLAN_INTEGRATED_SOC )
890 v_U8_t uFlowMask,
891#endif
892 v_BOOL_t* pbUrgent
893);
894
895/*==========================================================================
896
897 FUNCTION WLANTL_TxComp
898
899 DESCRIPTION
900 It is being called by BAL upon asynchronous notification of the packet
901 or packets being sent over the bus.
902
903 DEPENDENCIES
904 Tx complete cannot be called without a previous transmit.
905
906 PARAMETERS
907
908 IN
909 pAdapter: pointer to the global adapter context; a handle to TL's
910 or BAL's control block can be extracted from its context
911 vosDataBuff: it will contain a pointer to the first buffer for which
912 the BAL report is being made, if there is more then one
913 packet they will be chained using vOSS buffers.
914 wTxSTAtus: the status of the transmitted packet, see above chapter
915 on HDD interaction for a list of possible values
916
917 RETURN VALUE
918 The result code associated with performing the operation
919
920 SIDE EFFECTS
921
922============================================================================*/
923VOS_STATUS
924WLANTL_TxComp
925(
926 v_PVOID_t pAdapter,
927 vos_pkt_t *pFrameDataBuff,
928 VOS_STATUS wTxStatus
929);
930
931/*==========================================================================
932
933 FUNCTION WLANTL_RxFrames
934
935 DESCRIPTION
936 Callback registered by TL and called by BAL when a packet is received
937 over the bus. Upon the call of this function TL will make the necessary
938 decision with regards to the forwarding or queuing of this packet and
939 the layer it needs to be delivered to.
940
941 DEPENDENCIES
942 TL must be initiailized before this function gets called.
943 If the frame carried is a data frame then the station for which it is
944 destined to must have been previously registered with TL.
945
946 PARAMETERS
947
948 IN
949 pAdapter: pointer to the global adapter context; a handle to TL's
950 or BAL's control block can be extracted from its context
951
952 vosDataBuff: it will contain a pointer to the first buffer received,
953 if there is more then one packet they will be chained
954 using vOSS buffers.
955
956 RETURN VALUE
957 The result code associated with performing the operation
958
959 SIDE EFFECTS
960
961============================================================================*/
962VOS_STATUS
963WLANTL_RxFrames
964(
965 v_PVOID_t pAdapter,
966 vos_pkt_t *pFrameDataBuff
967);
968
969/*==========================================================================
970
971 FUNCTION WLANTL_RxCachedFrames
972
973 DESCRIPTION
974 Utility function used by TL to forward the cached frames to a particular
975 station;
976
977 DEPENDENCIES
978 TL must be initiailized before this function gets called.
979 If the frame carried is a data frame then the station for which it is
980 destined to must have been previously registered with TL.
981
982 PARAMETERS
983
984 IN
985 pTLCb: pointer to TL handle
986
987 ucSTAId: station for which we need to forward the packets
988
989 vosDataBuff: it will contain a pointer to the first cached buffer
990 received, if there is more then one packet they will be
991 chained using vOSS buffers.
992
993 RETURN VALUE
994 The result code associated with performing the operation
995
996 VOS_STATUS_E_INVAL: Input parameters are invalid
997 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
998 page fault
999 VOS_STATUS_SUCCESS: Everything is good :)
1000
1001 SIDE EFFECTS
1002
1003============================================================================*/
1004VOS_STATUS
1005WLANTL_RxCachedFrames
1006(
1007 WLANTL_CbType* pTLCb,
1008 v_U8_t ucSTAId,
1009 vos_pkt_t* vosDataBuff
1010);
1011
1012/*==========================================================================
1013 FUNCTION WLANTL_ResourceCB
1014
1015 DESCRIPTION
1016 Called by the TL when it has packets available for transmission.
1017
1018 DEPENDENCIES
1019 The TL must be registered with BAL before this function can be called.
1020
1021 PARAMETERS
1022
1023 IN
1024 pAdapter: pointer to the global adapter context; a handle to TL's
1025 or BAL's control block can be extracted from its context
1026 uCount: avail resource count obtained from hw
1027
1028 RETURN VALUE
1029 The result code associated with performing the operation
1030
1031 SIDE EFFECTS
1032
1033============================================================================*/
1034VOS_STATUS
1035WLANTL_ResourceCB
1036(
1037 v_PVOID_t pAdapter,
1038 v_U32_t uCount
1039);
1040
1041
1042/*==========================================================================
1043 FUNCTION WLANTL_ProcessMainMessage
1044
1045 DESCRIPTION
1046 Called by VOSS when a message was serialized for TL through the
1047 main thread/task.
1048
1049 DEPENDENCIES
1050 The TL must be initialized before this function can be called.
1051
1052 PARAMETERS
1053
1054 IN
1055 pAdapter: pointer to the global adapter context; a handle to TL's
1056 control block can be extracted from its context
1057 message: type and content of the message
1058
1059
1060 RETURN VALUE
1061 The result code associated with performing the operation
1062
1063 SIDE EFFECTS
1064
1065============================================================================*/
1066VOS_STATUS
1067WLANTL_ProcessMainMessage
1068(
1069 v_PVOID_t pAdapter,
1070 vos_msg_t* message
1071);
1072
1073/*==========================================================================
1074 FUNCTION WLANTL_ProcessTxMessage
1075
1076 DESCRIPTION
1077 Called by VOSS when a message was serialized for TL through the
1078 tx thread/task.
1079
1080 DEPENDENCIES
1081 The TL must be initialized before this function can be called.
1082
1083 PARAMETERS
1084
1085 IN
1086 pAdapter: pointer to the global adapter context; a handle to TL's
1087 control block can be extracted from its context
1088 message: type and content of the message
1089
1090
1091 RETURN VALUE
1092
1093 The result code associated with performing the operation
1094 VOS_STATUS_SUCCESS: Everything is good :)
1095
1096
1097 SIDE EFFECTS
1098
1099============================================================================*/
1100VOS_STATUS
1101WLANTL_ProcessTxMessage
1102(
1103 v_PVOID_t pAdapter,
1104 vos_msg_t* message
1105);
1106
1107/*==========================================================================
1108 FUNCTION WLAN_TLGetNextTxIds
1109
1110 DESCRIPTION
1111 Gets the next station and next AC in the list
1112
1113 DEPENDENCIES
1114
1115 PARAMETERS
1116
1117 OUT
1118 pucSTAId: STAtion ID
1119
1120 RETURN VALUE
1121 The result code associated with performing the operation
1122
1123 SIDE EFFECTS
1124
1125============================================================================*/
1126VOS_STATUS
1127WLAN_TLGetNextTxIds
1128(
1129 v_PVOID_t pAdapter,
1130 v_U8_t* pucSTAId
1131);
1132
1133/*==========================================================================
1134
1135 FUNCTION WLANTL_CleanCb
1136
1137 DESCRIPTION
1138 Cleans TL control block
1139
1140 DEPENDENCIES
1141
1142 PARAMETERS
1143
1144 IN
1145 pTLCb: pointer to TL's control block
1146 ucEmpty: set if TL has to clean up the queues and release pedning pkts
1147
1148 RETURN VALUE
1149 The result code associated with performing the operation
1150
1151 SIDE EFFECTS
1152
1153============================================================================*/
1154VOS_STATUS
1155WLANTL_CleanCB
1156(
1157 WLANTL_CbType* pTLCb,
1158 v_U8_t ucEmpty
1159);
1160
1161/*==========================================================================
1162
1163 FUNCTION WLANTL_CleanSTA
1164
1165 DESCRIPTION
1166 Cleans a station control block.
1167
1168 DEPENDENCIES
1169
1170 PARAMETERS
1171
1172 IN
1173 pAdapter: pointer to the global adapter context; a handle to TL's
1174 control block can be extracted from its context
1175 ucEmpty: if set the queues and pending pkts will be emptyed
1176
1177 RETURN VALUE
1178 The result code associated with performing the operation
1179
1180 SIDE EFFECTS
1181
1182============================================================================*/
1183VOS_STATUS
1184WLANTL_CleanSTA
1185(
1186 WLANTL_STAClientType* ptlSTAClient,
1187 v_U8_t ucEmpty
1188);
1189
1190/*==========================================================================
1191 FUNCTION WLANTL_GetTxResourcesCB
1192
1193 DESCRIPTION
1194 Processing function for Resource needed signal. A request will be issued
1195 to BAL to get mor tx resources.
1196
1197 DEPENDENCIES
1198 The TL must be initialized before this function can be called.
1199
1200 PARAMETERS
1201
1202 IN
1203 pvosGCtx: pointer to the global vos context; a handle to TL's
1204 control block can be extracted from its context
1205
1206
1207 RETURN VALUE
1208 The result code associated with performing the operation
1209
1210 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1211 page fault
1212 VOS_STATUS_SUCCESS: Everything is good :)
1213
1214 Other values can be returned as a result of a function call, please check
1215 corresponding API for more info.
1216 SIDE EFFECTS
1217
1218============================================================================*/
1219VOS_STATUS
1220WLANTL_GetTxResourcesCB
1221(
1222 v_PVOID_t pvosGCtx
1223);
1224
1225/*==========================================================================
1226 FUNCTION WLANTL_PrepareBDHeader
1227
1228 DESCRIPTION
1229 Callback function for serializing Suspend signal through Tx thread
1230
1231 DEPENDENCIES
1232 Just notify HAL that suspend in TL is complete.
1233
1234 PARAMETERS
1235
1236 IN
1237 pAdapter: pointer to the global adapter context; a handle to TL's
1238 control block can be extracted from its context
1239 pUserData: user data sent with the callback
1240
1241 RETURN VALUE
1242 The result code associated with performing the operation
1243
1244 SIDE EFFECTS
1245
1246============================================================================*/
1247void
1248WLANTL_PrepareBDHeader
1249(
1250 vos_pkt_t* vosDataBuff,
1251 v_PVOID_t* ppvBDHeader,
1252 v_MACADDR_t* pvDestMacAdddr,
1253 v_U8_t ucDisableFrmXtl,
1254 VOS_STATUS* pvosSTAtus,
1255 v_U16_t* usPktLen,
1256 v_U8_t ucQosEnabled,
1257 v_U8_t ucWDSEnabled,
1258 v_U8_t extraHeadSpace
1259);
1260
1261/*==========================================================================
1262 FUNCTION WLANTL_Translate8023To80211Header
1263
1264 DESCRIPTION
1265 Inline function for translating and 802.3 header into an 802.11 header.
1266
1267 DEPENDENCIES
1268
1269
1270 PARAMETERS
1271
1272 IN
1273 pTLCb: TL control block
Kiran Venkatappaa044eb92012-12-17 15:48:49 -08001274
1275 *pucStaId Station ID. In case of TDLS, this return the actual
1276 station index used to transmit.
Jeff Johnson295189b2012-06-20 16:38:30 -07001277
1278 IN/OUT
1279 vosDataBuff: vos data buffer, will contain the new header on output
1280
1281 OUT
1282 pvosStatus: status of the operation
1283
1284 RETURN VALUE
1285 No return.
1286
1287 SIDE EFFECTS
1288
1289============================================================================*/
Kiran Venkatappacab0d352012-12-17 13:09:22 -08001290VOS_STATUS
1291WLANTL_Translate8023To80211Header
1292(
1293 vos_pkt_t* vosDataBuff,
1294 VOS_STATUS* pvosStatus,
1295 WLANTL_CbType* pTLCb,
1296 v_U8_t *pucStaId,
1297 v_U8_t ucUP,
1298 v_U8_t *ucWDSEnabled,
1299 v_U8_t *extraHeadSpace
1300);
Jeff Johnson295189b2012-06-20 16:38:30 -07001301/*==========================================================================
1302 FUNCTION WLANTL_Translate80211To8023Header
1303
1304 DESCRIPTION
1305 Inline function for translating and 802.11 header into an 802.3 header.
1306
1307 DEPENDENCIES
1308
1309
1310 PARAMETERS
1311
1312 IN
1313 pTLCb: TL control block
1314 ucStaId: station ID
1315 ucHeaderLen: Length of the header from BD
1316 ucActualHLen: Length of header including padding or any other trailers
1317
1318 IN/OUT
1319 vosDataBuff: vos data buffer, will contain the new header on output
1320
1321 OUT
1322 pvosStatus: status of the operation
1323
1324 RETURN VALUE
1325 Status of the operation
1326
1327 SIDE EFFECTS
1328
1329============================================================================*/
1330VOS_STATUS
1331WLANTL_Translate80211To8023Header
1332(
1333 vos_pkt_t* vosDataBuff,
1334 VOS_STATUS* pvosStatus,
1335 v_U16_t usActualHLen,
1336 v_U8_t ucHeaderLen,
1337 WLANTL_CbType* pTLCb,
1338 v_U8_t ucSTAId
1339);
1340
1341/*==========================================================================
Madan Mohan Koyyalamudia148e1e2012-11-30 14:52:59 -08001342 FUNCTION WLANTL_FindFrameTypeBcMcUc
1343
1344 DESCRIPTION
1345 Utility function to find whether received frame is broadcast, multicast
1346 or unicast.
1347
1348 DEPENDENCIES
1349 The STA must be registered with TL before this function can be called.
1350
1351 PARAMETERS
1352
1353 IN
1354 pTLCb: pointer to the TL's control block
1355 ucSTAId: identifier of the station being processed
1356 vosDataBuff: pointer to the vos buffer
1357
1358 IN/OUT
1359 pucBcMcUc: pointer to buffer, will contain frame type on return
1360
1361 RETURN VALUE
1362 The result code associated with performing the operation
1363
1364 VOS_STATUS_E_INVAL: invalid input parameters
1365 VOS_STATUS_E_BADMSG: failed to extract info from data buffer
1366 VOS_STATUS_SUCCESS: success
1367
1368 SIDE EFFECTS
1369 None.
1370============================================================================*/
1371VOS_STATUS
1372WLANTL_FindFrameTypeBcMcUc
1373(
1374 WLANTL_CbType *pTLCb,
1375 v_U8_t ucSTAId,
1376 vos_pkt_t *vosDataBuff,
1377 v_U8_t *pucBcMcUc
1378);
1379
1380/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -07001381
1382 FUNCTION WLANTL_MgmtFrmRxDefaultCb
1383
1384 DESCRIPTION
1385 Default Mgmt Frm rx callback: asserts all the time. If this function gets
1386 called it means there is no registered rx cb pointer for Mgmt Frm.
1387
1388 DEPENDENCIES
1389
1390 PARAMETERS
1391
1392 Not used.
1393
1394 RETURN VALUE
1395 Always FAILURE.
1396
1397============================================================================*/
1398VOS_STATUS
1399WLANTL_MgmtFrmRxDefaultCb
1400(
1401 v_PVOID_t pAdapter,
1402 v_PVOID_t vosBuff
1403);
1404
1405/*==========================================================================
1406
1407 FUNCTION WLANTL_STARxDefaultCb
1408
1409 DESCRIPTION
1410 Default BAP rx callback: asserts all the time. If this function gets
1411 called it means there is no registered rx cb pointer for BAP.
1412
1413 DEPENDENCIES
1414
1415 PARAMETERS
1416
1417 Not used.
1418
1419 RETURN VALUE
1420 Always FAILURE.
1421
1422============================================================================*/
1423VOS_STATUS
1424WLANTL_BAPRxDefaultCb
1425(
1426 v_PVOID_t pAdapter,
1427 vos_pkt_t* vosDataBuff,
1428 WLANTL_BAPFrameEnumType frameType
1429);
1430
1431/*==========================================================================
1432
1433 FUNCTION WLANTL_STARxDefaultCb
1434
1435 DESCRIPTION
1436 Default STA rx callback: asserts all the time. If this function gets
1437 called it means there is no registered rx cb pointer for station.
1438 (Mem corruption most likely, it should never happen)
1439
1440 DEPENDENCIES
1441
1442 PARAMETERS
1443
1444 Not used.
1445
1446 RETURN VALUE
1447 Always FAILURE.
1448
1449============================================================================*/
1450VOS_STATUS
1451WLANTL_STARxDefaultCb
1452(
1453 v_PVOID_t pAdapter,
1454 vos_pkt_t* vosDataBuff,
1455 v_U8_t ucSTAId,
1456 WLANTL_RxMetaInfoType* pRxMetaInfo
1457);
1458
1459/*==========================================================================
1460
1461 FUNCTION WLANTL_STAFetchPktDefaultCb
1462
1463 DESCRIPTION
1464 Default fetch callback: asserts all the time. If this function gets
1465 called it means there is no registered fetch cb pointer for station.
1466 (Mem corruption most likely, it should never happen)
1467
1468 DEPENDENCIES
1469
1470 PARAMETERS
1471
1472 Not used.
1473
1474 RETURN VALUE
1475 Always FAILURE.
1476
1477============================================================================*/
1478VOS_STATUS
1479WLANTL_STAFetchPktDefaultCb
1480(
1481 v_PVOID_t pAdapter,
1482 v_U8_t* pucSTAId,
1483 WLANTL_ACEnumType ucAC,
1484 vos_pkt_t** vosDataBuff,
1485 WLANTL_MetaInfoType* tlMetaInfo
1486);
1487
1488/*==========================================================================
1489
1490 FUNCTION WLANTL_TxCompDefaultCb
1491
1492 DESCRIPTION
1493 Default tx complete handler. It will release the completed pkt to
1494 prevent memory leaks.
1495
1496 PARAMETERS
1497
1498 IN
1499 pAdapter: pointer to the global adapter context; a handle to
1500 TL/HAL/PE/BAP/HDD control block can be extracted from
1501 its context
1502 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1503 wTxSTAtus: status of the transmission
1504
1505
1506 RETURN VALUE
1507 The result code associated with performing the operation; please
1508 check vos_pkt_return_pkt for possible error codes.
1509
1510============================================================================*/
1511VOS_STATUS
1512WLANTL_TxCompDefaultCb
1513(
1514 v_PVOID_t pAdapter,
1515 vos_pkt_t* vosDataBuff,
1516 VOS_STATUS wTxSTAtus
1517);
1518
1519/*==========================================================================
1520
1521 FUNCTION WLANTL_PackUpTriggerFrame
1522
1523 DESCRIPTION
1524 Packs up a trigger frame and places it in TL's cache for tx and notifies
1525 BAL
1526
1527 DEPENDENCIES
1528
1529 PARAMETERS
1530
1531 IN
1532 pTLCb: pointer to the TL control block
1533 pfnSTATxComp: Tx Complete Cb to be used when frame is received
1534 ucSTAId: station id
1535 ucAC: access category
1536
1537 RETURN VALUE
1538 None
1539
1540 SIDE EFFECTS
1541
1542============================================================================*/
1543VOS_STATUS
1544WLANTL_PackUpTriggerFrame
1545(
1546 WLANTL_CbType* pTLCb,
1547 WLANTL_TxCompCBType pfnSTATxComp,
1548 v_U8_t ucSTAId,
1549 WLANTL_ACEnumType ucAC
1550);
1551
1552/*==========================================================================
1553
1554 FUNCTION WLANTL_TxCompTriggFrameSI
1555
1556 DESCRIPTION
1557 Tx complete handler for the service interval trigger frame.
1558 It will restart the SI timer.
1559
1560 PARAMETERS
1561
1562 IN
1563 pvosGCtx: pointer to the global vos context; a handle to
1564 TL/HAL/PE/BAP/HDD control block can be extracted from
1565 its context
1566 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1567 wTxSTAtus: status of the transmission
1568
1569
1570 RETURN VALUE
1571 The result code associated with performing the operation
1572
1573 ============================================================================*/
1574VOS_STATUS
1575WLANTL_TxCompTriggFrameSI
1576(
1577 v_PVOID_t pvosGCtx,
1578 vos_pkt_t* vosDataBuff,
1579 VOS_STATUS wTxSTAtus
1580);
1581
1582/*==========================================================================
1583
1584 FUNCTION WLANTL_TxCompTriggFrameSI
1585
1586 DESCRIPTION
1587 Tx complete handler for the service interval trigger frame.
1588 It will restart the SI timer.
1589
1590 PARAMETERS
1591
1592 IN
1593 pvosGCtx: pointer to the global vos context; a handle to
1594 TL/HAL/PE/BAP/HDD control block can be extracted from
1595 its context
1596 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1597 wTxSTAtus: status of the transmission
1598
1599
1600 RETURN VALUE
1601 The result code associated with performing the operation
1602
1603============================================================================*/
1604VOS_STATUS
1605WLANTL_TxCompTriggFrameDI
1606(
1607 v_PVOID_t pvosGCtx,
1608 vos_pkt_t* vosDataBuff,
1609 VOS_STATUS wTxSTAtus
1610);
1611
1612/*==========================================================================
1613
1614 FUNCTION
1615
1616 DESCRIPTION Read RSSI value out of a RX BD
1617
1618 PARAMETERS: Caller must validate all parameters
1619
1620 RETURN VALUE
1621
1622============================================================================*/
1623VOS_STATUS WLANTL_ReadRSSI
1624(
1625 v_PVOID_t pAdapter,
1626 v_PVOID_t pBDHeader,
1627 v_U8_t STAid
1628);
1629
1630
1631
1632void WLANTL_PowerStateChangedCB
1633(
1634 v_PVOID_t pAdapter,
1635 tPmcState newState
1636);
1637
1638#ifdef WLAN_SOFTAP_FEATURE
1639/*==========================================================================
1640 FUNCTION WLANTL_FwdPktToHDD
1641
1642 DESCRIPTION
1643 Determine the Destation Station ID and route the Frame to Upper Layer
1644
1645 DEPENDENCIES
1646
1647 PARAMETERS
1648
1649 IN
1650 pvosGCtx: pointer to the global vos context; a handle to TL's
1651 control block can be extracted from its context
1652 ucSTAId: identifier of the station being processed
1653 vosDataBuff: pointer to the rx vos buffer
1654
1655 RETURN VALUE
1656 The result code associated with performing the operation
1657
1658 VOS_STATUS_E_INVAL: invalid input parameters
1659 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1660 page fault
1661 VOS_STATUS_SUCCESS: Everything is good :)
1662
1663 SIDE EFFECTS
1664
1665============================================================================*/
1666
1667VOS_STATUS
1668WLANTL_FwdPktToHDD
1669(
1670 v_PVOID_t pvosGCtx,
1671 vos_pkt_t* pvosDataBuff,
1672 v_U8_t ucSTAId
1673);
1674
1675#endif /* #ifdef WLANTL_SOFTAP_FEATURE */
1676#endif /* #ifndef WLAN_QCT_TLI_H */