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