blob: 1f0bc7b547b07e8c5c0459387fd0a740ce372947 [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
Sunil Ravid5406f22013-01-22 00:18:31 -0800837#ifdef FEATURE_WLAN_TDLS
838 /*number of total TDLS peers registered to TL
839 Incremented at WLANTL_RegisterSTAClient(staType == WLAN_STA_TDLS)
840 Decremented at WLANTL_ClearSTAClient(staType == WLAN_STA_TDLS) */
841 v_U8_t ucTdlsPeerCount;
842#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700843 /*whether we are in BMPS/UAPSD/WOWL mode, since the latter 2 need to be BMPS first*/
844 v_BOOL_t isBMPS;
Gopichand Nakkala11acd112012-12-31 16:04:04 -0800845 /* Whether WDA_DS_TX_START_XMIT msg is pending or not */
846 v_BOOL_t isTxTranmitMsgPending;
Jeff Johnson295189b2012-06-20 16:38:30 -0700847}WLANTL_CbType;
848
849/*==========================================================================
850
851 FUNCTION WLANTL_GetFrames
852
853 DESCRIPTION
854
855 BAL calls this function at the request of the lower bus interface.
856 When this request is being received TL will retrieve packets from HDD
857 in accordance with the priority rules and the count supplied by BAL.
858
859 DEPENDENCIES
860
861 HDD must have registered with TL at least one STA before this function
862 can be called.
863
864 PARAMETERS
865
866 IN
867 pAdapter: pointer to the global adapter context; a handle to TL's
868 or BAL's control block can be extracted from its context
869 uSize: maximum size accepted by the lower layer
870 uFlowMask TX flow control mask. Each bit is defined as
871 WDA_TXFlowEnumType
872
873 OUT
874 vosDataBuff: it will contain a pointer to the first buffer supplied
875 by TL, if there is more than one packet supplied, TL
876 will chain them through vOSS buffers
877
878 RETURN VALUE
879
880 The result code associated with performing the operation
881
882 1 or more: number of required resources if there are still frames to fetch
883 For Volans, it's BD/PDU numbers. For Prima, it's free DXE descriptors.
884 0 : error or HDD queues are drained
885
886 SIDE EFFECTS
887
888============================================================================*/
889v_U32_t
890WLANTL_GetFrames
891(
892 v_PVOID_t pAdapter,
893 vos_pkt_t **ppFrameDataBuff,
894 v_U32_t uSize,
895#if defined( FEATURE_WLAN_INTEGRATED_SOC )
896 v_U8_t uFlowMask,
897#endif
898 v_BOOL_t* pbUrgent
899);
900
901/*==========================================================================
902
903 FUNCTION WLANTL_TxComp
904
905 DESCRIPTION
906 It is being called by BAL upon asynchronous notification of the packet
907 or packets being sent over the bus.
908
909 DEPENDENCIES
910 Tx complete cannot be called without a previous transmit.
911
912 PARAMETERS
913
914 IN
915 pAdapter: pointer to the global adapter context; a handle to TL's
916 or BAL's control block can be extracted from its context
917 vosDataBuff: it will contain a pointer to the first buffer for which
918 the BAL report is being made, if there is more then one
919 packet they will be chained using vOSS buffers.
920 wTxSTAtus: the status of the transmitted packet, see above chapter
921 on HDD interaction for a list of possible values
922
923 RETURN VALUE
924 The result code associated with performing the operation
925
926 SIDE EFFECTS
927
928============================================================================*/
929VOS_STATUS
930WLANTL_TxComp
931(
932 v_PVOID_t pAdapter,
933 vos_pkt_t *pFrameDataBuff,
934 VOS_STATUS wTxStatus
935);
936
937/*==========================================================================
938
939 FUNCTION WLANTL_RxFrames
940
941 DESCRIPTION
942 Callback registered by TL and called by BAL when a packet is received
943 over the bus. Upon the call of this function TL will make the necessary
944 decision with regards to the forwarding or queuing of this packet and
945 the layer it needs to be delivered to.
946
947 DEPENDENCIES
948 TL must be initiailized before this function gets called.
949 If the frame carried is a data frame then the station for which it is
950 destined to must have been previously registered with TL.
951
952 PARAMETERS
953
954 IN
955 pAdapter: pointer to the global adapter context; a handle to TL's
956 or BAL's control block can be extracted from its context
957
958 vosDataBuff: it will contain a pointer to the first buffer received,
959 if there is more then one packet they will be chained
960 using vOSS buffers.
961
962 RETURN VALUE
963 The result code associated with performing the operation
964
965 SIDE EFFECTS
966
967============================================================================*/
968VOS_STATUS
969WLANTL_RxFrames
970(
971 v_PVOID_t pAdapter,
972 vos_pkt_t *pFrameDataBuff
973);
974
975/*==========================================================================
976
977 FUNCTION WLANTL_RxCachedFrames
978
979 DESCRIPTION
980 Utility function used by TL to forward the cached frames to a particular
981 station;
982
983 DEPENDENCIES
984 TL must be initiailized before this function gets called.
985 If the frame carried is a data frame then the station for which it is
986 destined to must have been previously registered with TL.
987
988 PARAMETERS
989
990 IN
991 pTLCb: pointer to TL handle
992
993 ucSTAId: station for which we need to forward the packets
994
995 vosDataBuff: it will contain a pointer to the first cached buffer
996 received, if there is more then one packet they will be
997 chained using vOSS buffers.
998
999 RETURN VALUE
1000 The result code associated with performing the operation
1001
1002 VOS_STATUS_E_INVAL: Input parameters are invalid
1003 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1004 page fault
1005 VOS_STATUS_SUCCESS: Everything is good :)
1006
1007 SIDE EFFECTS
1008
1009============================================================================*/
1010VOS_STATUS
1011WLANTL_RxCachedFrames
1012(
1013 WLANTL_CbType* pTLCb,
1014 v_U8_t ucSTAId,
1015 vos_pkt_t* vosDataBuff
1016);
1017
1018/*==========================================================================
1019 FUNCTION WLANTL_ResourceCB
1020
1021 DESCRIPTION
1022 Called by the TL when it has packets available for transmission.
1023
1024 DEPENDENCIES
1025 The TL must be registered with BAL before this function can be called.
1026
1027 PARAMETERS
1028
1029 IN
1030 pAdapter: pointer to the global adapter context; a handle to TL's
1031 or BAL's control block can be extracted from its context
1032 uCount: avail resource count obtained from hw
1033
1034 RETURN VALUE
1035 The result code associated with performing the operation
1036
1037 SIDE EFFECTS
1038
1039============================================================================*/
1040VOS_STATUS
1041WLANTL_ResourceCB
1042(
1043 v_PVOID_t pAdapter,
1044 v_U32_t uCount
1045);
1046
1047
1048/*==========================================================================
1049 FUNCTION WLANTL_ProcessMainMessage
1050
1051 DESCRIPTION
1052 Called by VOSS when a message was serialized for TL through the
1053 main thread/task.
1054
1055 DEPENDENCIES
1056 The TL must be initialized before this function can be called.
1057
1058 PARAMETERS
1059
1060 IN
1061 pAdapter: pointer to the global adapter context; a handle to TL's
1062 control block can be extracted from its context
1063 message: type and content of the message
1064
1065
1066 RETURN VALUE
1067 The result code associated with performing the operation
1068
1069 SIDE EFFECTS
1070
1071============================================================================*/
1072VOS_STATUS
1073WLANTL_ProcessMainMessage
1074(
1075 v_PVOID_t pAdapter,
1076 vos_msg_t* message
1077);
1078
1079/*==========================================================================
1080 FUNCTION WLANTL_ProcessTxMessage
1081
1082 DESCRIPTION
1083 Called by VOSS when a message was serialized for TL through the
1084 tx thread/task.
1085
1086 DEPENDENCIES
1087 The TL must be initialized before this function can be called.
1088
1089 PARAMETERS
1090
1091 IN
1092 pAdapter: pointer to the global adapter context; a handle to TL's
1093 control block can be extracted from its context
1094 message: type and content of the message
1095
1096
1097 RETURN VALUE
1098
1099 The result code associated with performing the operation
1100 VOS_STATUS_SUCCESS: Everything is good :)
1101
1102
1103 SIDE EFFECTS
1104
1105============================================================================*/
1106VOS_STATUS
1107WLANTL_ProcessTxMessage
1108(
1109 v_PVOID_t pAdapter,
1110 vos_msg_t* message
1111);
1112
1113/*==========================================================================
1114 FUNCTION WLAN_TLGetNextTxIds
1115
1116 DESCRIPTION
1117 Gets the next station and next AC in the list
1118
1119 DEPENDENCIES
1120
1121 PARAMETERS
1122
1123 OUT
1124 pucSTAId: STAtion ID
1125
1126 RETURN VALUE
1127 The result code associated with performing the operation
1128
1129 SIDE EFFECTS
1130
1131============================================================================*/
1132VOS_STATUS
1133WLAN_TLGetNextTxIds
1134(
1135 v_PVOID_t pAdapter,
1136 v_U8_t* pucSTAId
1137);
1138
1139/*==========================================================================
1140
1141 FUNCTION WLANTL_CleanCb
1142
1143 DESCRIPTION
1144 Cleans TL control block
1145
1146 DEPENDENCIES
1147
1148 PARAMETERS
1149
1150 IN
1151 pTLCb: pointer to TL's control block
1152 ucEmpty: set if TL has to clean up the queues and release pedning pkts
1153
1154 RETURN VALUE
1155 The result code associated with performing the operation
1156
1157 SIDE EFFECTS
1158
1159============================================================================*/
1160VOS_STATUS
1161WLANTL_CleanCB
1162(
1163 WLANTL_CbType* pTLCb,
1164 v_U8_t ucEmpty
1165);
1166
1167/*==========================================================================
1168
1169 FUNCTION WLANTL_CleanSTA
1170
1171 DESCRIPTION
1172 Cleans a station control block.
1173
1174 DEPENDENCIES
1175
1176 PARAMETERS
1177
1178 IN
1179 pAdapter: pointer to the global adapter context; a handle to TL's
1180 control block can be extracted from its context
1181 ucEmpty: if set the queues and pending pkts will be emptyed
1182
1183 RETURN VALUE
1184 The result code associated with performing the operation
1185
1186 SIDE EFFECTS
1187
1188============================================================================*/
1189VOS_STATUS
1190WLANTL_CleanSTA
1191(
1192 WLANTL_STAClientType* ptlSTAClient,
1193 v_U8_t ucEmpty
1194);
1195
1196/*==========================================================================
1197 FUNCTION WLANTL_GetTxResourcesCB
1198
1199 DESCRIPTION
1200 Processing function for Resource needed signal. A request will be issued
1201 to BAL to get mor tx resources.
1202
1203 DEPENDENCIES
1204 The TL must be initialized before this function can be called.
1205
1206 PARAMETERS
1207
1208 IN
1209 pvosGCtx: pointer to the global vos context; a handle to TL's
1210 control block can be extracted from its context
1211
1212
1213 RETURN VALUE
1214 The result code associated with performing the operation
1215
1216 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1217 page fault
1218 VOS_STATUS_SUCCESS: Everything is good :)
1219
1220 Other values can be returned as a result of a function call, please check
1221 corresponding API for more info.
1222 SIDE EFFECTS
1223
1224============================================================================*/
1225VOS_STATUS
1226WLANTL_GetTxResourcesCB
1227(
1228 v_PVOID_t pvosGCtx
1229);
1230
1231/*==========================================================================
1232 FUNCTION WLANTL_PrepareBDHeader
1233
1234 DESCRIPTION
1235 Callback function for serializing Suspend signal through Tx thread
1236
1237 DEPENDENCIES
1238 Just notify HAL that suspend in TL is complete.
1239
1240 PARAMETERS
1241
1242 IN
1243 pAdapter: pointer to the global adapter context; a handle to TL's
1244 control block can be extracted from its context
1245 pUserData: user data sent with the callback
1246
1247 RETURN VALUE
1248 The result code associated with performing the operation
1249
1250 SIDE EFFECTS
1251
1252============================================================================*/
1253void
1254WLANTL_PrepareBDHeader
1255(
1256 vos_pkt_t* vosDataBuff,
1257 v_PVOID_t* ppvBDHeader,
1258 v_MACADDR_t* pvDestMacAdddr,
1259 v_U8_t ucDisableFrmXtl,
1260 VOS_STATUS* pvosSTAtus,
1261 v_U16_t* usPktLen,
1262 v_U8_t ucQosEnabled,
1263 v_U8_t ucWDSEnabled,
1264 v_U8_t extraHeadSpace
1265);
1266
1267/*==========================================================================
1268 FUNCTION WLANTL_Translate8023To80211Header
1269
1270 DESCRIPTION
1271 Inline function for translating and 802.3 header into an 802.11 header.
1272
1273 DEPENDENCIES
1274
1275
1276 PARAMETERS
1277
1278 IN
1279 pTLCb: TL control block
Kiran Venkatappaa044eb92012-12-17 15:48:49 -08001280
1281 *pucStaId Station ID. In case of TDLS, this return the actual
1282 station index used to transmit.
Jeff Johnson295189b2012-06-20 16:38:30 -07001283
1284 IN/OUT
1285 vosDataBuff: vos data buffer, will contain the new header on output
1286
1287 OUT
1288 pvosStatus: status of the operation
1289
1290 RETURN VALUE
1291 No return.
1292
1293 SIDE EFFECTS
1294
1295============================================================================*/
Kiran Venkatappacab0d352012-12-17 13:09:22 -08001296VOS_STATUS
1297WLANTL_Translate8023To80211Header
1298(
1299 vos_pkt_t* vosDataBuff,
1300 VOS_STATUS* pvosStatus,
1301 WLANTL_CbType* pTLCb,
1302 v_U8_t *pucStaId,
1303 v_U8_t ucUP,
1304 v_U8_t *ucWDSEnabled,
1305 v_U8_t *extraHeadSpace
1306);
Jeff Johnson295189b2012-06-20 16:38:30 -07001307/*==========================================================================
1308 FUNCTION WLANTL_Translate80211To8023Header
1309
1310 DESCRIPTION
1311 Inline function for translating and 802.11 header into an 802.3 header.
1312
1313 DEPENDENCIES
1314
1315
1316 PARAMETERS
1317
1318 IN
1319 pTLCb: TL control block
1320 ucStaId: station ID
1321 ucHeaderLen: Length of the header from BD
1322 ucActualHLen: Length of header including padding or any other trailers
1323
1324 IN/OUT
1325 vosDataBuff: vos data buffer, will contain the new header on output
1326
1327 OUT
1328 pvosStatus: status of the operation
1329
1330 RETURN VALUE
1331 Status of the operation
1332
1333 SIDE EFFECTS
1334
1335============================================================================*/
1336VOS_STATUS
1337WLANTL_Translate80211To8023Header
1338(
1339 vos_pkt_t* vosDataBuff,
1340 VOS_STATUS* pvosStatus,
1341 v_U16_t usActualHLen,
1342 v_U8_t ucHeaderLen,
1343 WLANTL_CbType* pTLCb,
1344 v_U8_t ucSTAId
1345);
1346
1347/*==========================================================================
Madan Mohan Koyyalamudia148e1e2012-11-30 14:52:59 -08001348 FUNCTION WLANTL_FindFrameTypeBcMcUc
1349
1350 DESCRIPTION
1351 Utility function to find whether received frame is broadcast, multicast
1352 or unicast.
1353
1354 DEPENDENCIES
1355 The STA must be registered with TL before this function can be called.
1356
1357 PARAMETERS
1358
1359 IN
1360 pTLCb: pointer to the TL's control block
1361 ucSTAId: identifier of the station being processed
1362 vosDataBuff: pointer to the vos buffer
1363
1364 IN/OUT
1365 pucBcMcUc: pointer to buffer, will contain frame type on return
1366
1367 RETURN VALUE
1368 The result code associated with performing the operation
1369
1370 VOS_STATUS_E_INVAL: invalid input parameters
1371 VOS_STATUS_E_BADMSG: failed to extract info from data buffer
1372 VOS_STATUS_SUCCESS: success
1373
1374 SIDE EFFECTS
1375 None.
1376============================================================================*/
1377VOS_STATUS
1378WLANTL_FindFrameTypeBcMcUc
1379(
1380 WLANTL_CbType *pTLCb,
1381 v_U8_t ucSTAId,
1382 vos_pkt_t *vosDataBuff,
1383 v_U8_t *pucBcMcUc
1384);
1385
1386/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -07001387
1388 FUNCTION WLANTL_MgmtFrmRxDefaultCb
1389
1390 DESCRIPTION
1391 Default Mgmt Frm rx callback: asserts all the time. If this function gets
1392 called it means there is no registered rx cb pointer for Mgmt Frm.
1393
1394 DEPENDENCIES
1395
1396 PARAMETERS
1397
1398 Not used.
1399
1400 RETURN VALUE
1401 Always FAILURE.
1402
1403============================================================================*/
1404VOS_STATUS
1405WLANTL_MgmtFrmRxDefaultCb
1406(
1407 v_PVOID_t pAdapter,
1408 v_PVOID_t vosBuff
1409);
1410
1411/*==========================================================================
1412
1413 FUNCTION WLANTL_STARxDefaultCb
1414
1415 DESCRIPTION
1416 Default BAP rx callback: asserts all the time. If this function gets
1417 called it means there is no registered rx cb pointer for BAP.
1418
1419 DEPENDENCIES
1420
1421 PARAMETERS
1422
1423 Not used.
1424
1425 RETURN VALUE
1426 Always FAILURE.
1427
1428============================================================================*/
1429VOS_STATUS
1430WLANTL_BAPRxDefaultCb
1431(
1432 v_PVOID_t pAdapter,
1433 vos_pkt_t* vosDataBuff,
1434 WLANTL_BAPFrameEnumType frameType
1435);
1436
1437/*==========================================================================
1438
1439 FUNCTION WLANTL_STARxDefaultCb
1440
1441 DESCRIPTION
1442 Default STA rx callback: asserts all the time. If this function gets
1443 called it means there is no registered rx cb pointer for station.
1444 (Mem corruption most likely, it should never happen)
1445
1446 DEPENDENCIES
1447
1448 PARAMETERS
1449
1450 Not used.
1451
1452 RETURN VALUE
1453 Always FAILURE.
1454
1455============================================================================*/
1456VOS_STATUS
1457WLANTL_STARxDefaultCb
1458(
1459 v_PVOID_t pAdapter,
1460 vos_pkt_t* vosDataBuff,
1461 v_U8_t ucSTAId,
1462 WLANTL_RxMetaInfoType* pRxMetaInfo
1463);
1464
1465/*==========================================================================
1466
1467 FUNCTION WLANTL_STAFetchPktDefaultCb
1468
1469 DESCRIPTION
1470 Default fetch callback: asserts all the time. If this function gets
1471 called it means there is no registered fetch cb pointer for station.
1472 (Mem corruption most likely, it should never happen)
1473
1474 DEPENDENCIES
1475
1476 PARAMETERS
1477
1478 Not used.
1479
1480 RETURN VALUE
1481 Always FAILURE.
1482
1483============================================================================*/
1484VOS_STATUS
1485WLANTL_STAFetchPktDefaultCb
1486(
1487 v_PVOID_t pAdapter,
1488 v_U8_t* pucSTAId,
1489 WLANTL_ACEnumType ucAC,
1490 vos_pkt_t** vosDataBuff,
1491 WLANTL_MetaInfoType* tlMetaInfo
1492);
1493
1494/*==========================================================================
1495
1496 FUNCTION WLANTL_TxCompDefaultCb
1497
1498 DESCRIPTION
1499 Default tx complete handler. It will release the completed pkt to
1500 prevent memory leaks.
1501
1502 PARAMETERS
1503
1504 IN
1505 pAdapter: pointer to the global adapter context; a handle to
1506 TL/HAL/PE/BAP/HDD control block can be extracted from
1507 its context
1508 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1509 wTxSTAtus: status of the transmission
1510
1511
1512 RETURN VALUE
1513 The result code associated with performing the operation; please
1514 check vos_pkt_return_pkt for possible error codes.
1515
1516============================================================================*/
1517VOS_STATUS
1518WLANTL_TxCompDefaultCb
1519(
1520 v_PVOID_t pAdapter,
1521 vos_pkt_t* vosDataBuff,
1522 VOS_STATUS wTxSTAtus
1523);
1524
1525/*==========================================================================
1526
1527 FUNCTION WLANTL_PackUpTriggerFrame
1528
1529 DESCRIPTION
1530 Packs up a trigger frame and places it in TL's cache for tx and notifies
1531 BAL
1532
1533 DEPENDENCIES
1534
1535 PARAMETERS
1536
1537 IN
1538 pTLCb: pointer to the TL control block
1539 pfnSTATxComp: Tx Complete Cb to be used when frame is received
1540 ucSTAId: station id
1541 ucAC: access category
1542
1543 RETURN VALUE
1544 None
1545
1546 SIDE EFFECTS
1547
1548============================================================================*/
1549VOS_STATUS
1550WLANTL_PackUpTriggerFrame
1551(
1552 WLANTL_CbType* pTLCb,
1553 WLANTL_TxCompCBType pfnSTATxComp,
1554 v_U8_t ucSTAId,
1555 WLANTL_ACEnumType ucAC
1556);
1557
1558/*==========================================================================
1559
1560 FUNCTION WLANTL_TxCompTriggFrameSI
1561
1562 DESCRIPTION
1563 Tx complete handler for the service interval trigger frame.
1564 It will restart the SI timer.
1565
1566 PARAMETERS
1567
1568 IN
1569 pvosGCtx: pointer to the global vos context; a handle to
1570 TL/HAL/PE/BAP/HDD control block can be extracted from
1571 its context
1572 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1573 wTxSTAtus: status of the transmission
1574
1575
1576 RETURN VALUE
1577 The result code associated with performing the operation
1578
1579 ============================================================================*/
1580VOS_STATUS
1581WLANTL_TxCompTriggFrameSI
1582(
1583 v_PVOID_t pvosGCtx,
1584 vos_pkt_t* vosDataBuff,
1585 VOS_STATUS wTxSTAtus
1586);
1587
1588/*==========================================================================
1589
1590 FUNCTION WLANTL_TxCompTriggFrameSI
1591
1592 DESCRIPTION
1593 Tx complete handler for the service interval trigger frame.
1594 It will restart the SI timer.
1595
1596 PARAMETERS
1597
1598 IN
1599 pvosGCtx: pointer to the global vos context; a handle to
1600 TL/HAL/PE/BAP/HDD control block can be extracted from
1601 its context
1602 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1603 wTxSTAtus: status of the transmission
1604
1605
1606 RETURN VALUE
1607 The result code associated with performing the operation
1608
1609============================================================================*/
1610VOS_STATUS
1611WLANTL_TxCompTriggFrameDI
1612(
1613 v_PVOID_t pvosGCtx,
1614 vos_pkt_t* vosDataBuff,
1615 VOS_STATUS wTxSTAtus
1616);
1617
1618/*==========================================================================
1619
1620 FUNCTION
1621
1622 DESCRIPTION Read RSSI value out of a RX BD
1623
1624 PARAMETERS: Caller must validate all parameters
1625
1626 RETURN VALUE
1627
1628============================================================================*/
1629VOS_STATUS WLANTL_ReadRSSI
1630(
1631 v_PVOID_t pAdapter,
1632 v_PVOID_t pBDHeader,
1633 v_U8_t STAid
1634);
1635
1636
1637
1638void WLANTL_PowerStateChangedCB
1639(
1640 v_PVOID_t pAdapter,
1641 tPmcState newState
1642);
1643
1644#ifdef WLAN_SOFTAP_FEATURE
1645/*==========================================================================
1646 FUNCTION WLANTL_FwdPktToHDD
1647
1648 DESCRIPTION
1649 Determine the Destation Station ID and route the Frame to Upper Layer
1650
1651 DEPENDENCIES
1652
1653 PARAMETERS
1654
1655 IN
1656 pvosGCtx: pointer to the global vos context; a handle to TL's
1657 control block can be extracted from its context
1658 ucSTAId: identifier of the station being processed
1659 vosDataBuff: pointer to the rx vos buffer
1660
1661 RETURN VALUE
1662 The result code associated with performing the operation
1663
1664 VOS_STATUS_E_INVAL: invalid input parameters
1665 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1666 page fault
1667 VOS_STATUS_SUCCESS: Everything is good :)
1668
1669 SIDE EFFECTS
1670
1671============================================================================*/
1672
1673VOS_STATUS
1674WLANTL_FwdPktToHDD
1675(
1676 v_PVOID_t pvosGCtx,
1677 vos_pkt_t* pvosDataBuff,
1678 v_U8_t ucSTAId
1679);
1680
1681#endif /* #ifdef WLANTL_SOFTAP_FEATURE */
1682#endif /* #ifndef WLAN_QCT_TLI_H */