blob: d6073bfd4ce8e4dab59c69cf3393afce18c72157 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * */
24
25#ifndef WLAN_QCT_WLANTL_H
26#define WLAN_QCT_WLANTL_H
27
28/*===========================================================================
29
30 W L A N T R A N S P O R T L A Y E R
31 E X T E R N A L A P I
32
33
34DESCRIPTION
35 This file contains the external API exposed by the wlan transport layer
36 module.
37
38
39 Copyright (c) 2008 QUALCOMM Incorporated. All Rights Reserved.
40 Qualcomm Confidential and Proprietary
41===========================================================================*/
42
43
44/*===========================================================================
45
46 EDIT HISTORY FOR FILE
47
48
49 This section contains comments describing changes made to the module.
50 Notice that changes are listed in reverse chronological order.
51
52
53 $Header:$ $DateTime: $ $Author: $
54
55
56when who what, where, why
57-------- --- ----------------------------------------------------------
5801/08/10 lti Added TL Data Caching
5910/15/09 rnair Modifying STADescType struct
6010/06/09 rnair Adding support for WAPI
6109/22/09 lti Add deregistration API for management client
6202/02/09 sch Add Handoff support
6312/09/08 lti Fixes for AMSS compilation
6409/05/08 lti Fixes after QOS unit testing
6508/06/08 lti Added QOS support
6605/01/08 lti Created module.
67
68===========================================================================*/
69
70
71
72/*===========================================================================
73
74 INCLUDE FILES FOR MODULE
75
76===========================================================================*/
77
78/*----------------------------------------------------------------------------
79 * Include Files
80 * -------------------------------------------------------------------------*/
81#include "vos_api.h"
82#include "vos_packet.h"
83#include "sirApi.h"
84#ifdef WLAN_SOFTAP_FEATURE
85#include "csrApi.h"
86#include "sapApi.h"
87#endif
88
89/*----------------------------------------------------------------------------
90 * Preprocessor Definitions and Constants
91 * -------------------------------------------------------------------------*/
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95
96/*Offset of the OUI field inside the LLC/SNAP header*/
97#define WLANTL_LLC_OUI_OFFSET 3
98
99/*Size of the OUI type field inside the LLC/SNAP header*/
100#define WLANTL_LLC_OUI_SIZE 3
101
102/*Offset of the LLC/SNAP header*/
103#define WLANTL_LLC_SNAP_OFFSET 0
104
105/*Size of the LLC/SNAP header*/
106#define WLANTL_LLC_SNAP_SIZE 8
107
108/*============================================================================
109 * GENERIC STRUCTURES - not belonging to TL
110 * TO BE MOVED TO A GLOBAL HEADER
111 ============================================================================*/
112/*Maximum number of ACs */
113#define WLANTL_MAX_AC 4
114
115#ifdef WLAN_SOFTAP_FEATURE
116
117/* Bit Mask to represent All Stations */
118#define WLAN_ALL_STA 0xFF
119
120/* Maximum number of station supported by TL, including BC. */
121#define WLAN_MAX_STA_COUNT (HAL_NUM_STA)
122
123/* The symbolic station ID return to HDD to specify the packet is bc/mc */
124#define WLAN_RX_BCMC_STA_ID (WLAN_MAX_STA_COUNT + 1)
125
126/* The symbolic station ID return to HDD to specify the packet is to soft-AP itself */
127#define WLAN_RX_SAP_SELF_STA_ID (WLAN_MAX_STA_COUNT + 2)
128
129/* Used by HDS systme. This station ID is used by TL to tell upper layer that
130 this packet is for WDS and not for a loopback for an associated station. */
131#define WLANTL_RX_WDS_STAID WLAN_MAX_STA_COUNT
132
133/* Station ID used for BC traffic. This value will be used when upper layer registers
134 the broadcast client or allocate station strcuture to keep per-station info.*/
135//#define WLANTL_BC_STA_ID 0x00
136
137#endif
138
139#ifdef ANI_CHIPSET_VOLANS
140#define WLANTL_MAX_TID 15
141#endif
142/*--------------------------------------------------------------------------
143 Access category enum used by TL
144 - order must be kept as these values are used to setup the AC mask
145 --------------------------------------------------------------------------*/
146typedef enum
147{
148 WLANTL_AC_BK = 0,
149 WLANTL_AC_BE = 1,
150 WLANTL_AC_VI = 2,
151 WLANTL_AC_VO = 3
152}WLANTL_ACEnumType;
153
154/*---------------------------------------------------------------------------
155 STA Type
156---------------------------------------------------------------------------*/
157typedef enum
158{
159 /* Indicates a link to an AP*/
160 WLAN_STA_INFRA = 0,
161
162 /* AD-hoc link*/
163 WLAN_STA_IBSS,
164
165 /* BT-AMP link*/
166 WLAN_STA_BT_AMP,
167
168#ifdef WLAN_SOFTAP_FEATURE
169 /* SoftAP station */
170 WLAN_STA_SOFTAP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800171
172#ifdef FEATURE_WLAN_TDLS
173 /* TDLS direct link */
174 WLAN_STA_TDLS, /* 4 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700175#endif
176
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800177#else /* !defined WLAN_SOFTAP_FEATURE */
178#ifdef FEATURE_WLAN_TDLS
179 /* TDLS direct link */
180 WLAN_STA_TDLS, /* 3 */
181#endif
182
183#endif/* WLAN_SOFTAP_FEATURE */
184
Jeff Johnson295189b2012-06-20 16:38:30 -0700185 /* Invalid link*/
186 WLAN_STA_MAX
187
188}WLAN_STAType;
189
190/*---------------------------------------------------------------------------
191 BAP Management frame type
192---------------------------------------------------------------------------*/
193typedef enum
194{
195 /* BT-AMP packet of type data */
196 WLANTL_BT_AMP_TYPE_DATA = 0x0001,
197
198 /* BT-AMP packet of type activity report */
199 WLANTL_BT_AMP_TYPE_AR = 0x0002,
200
201 /* BT-AMP packet of type security frame */
202 WLANTL_BT_AMP_TYPE_SEC = 0x0003,
203
204 /* BT-AMP packet of type Link Supervision request frame */
205 WLANTL_BT_AMP_TYPE_LS_REQ = 0x0004,
206
207 /* BT-AMP packet of type Link Supervision reply frame */
208 WLANTL_BT_AMP_TYPE_LS_REP = 0x0005,
209
210 /* Invalid Frame */
211 WLANTL_BAP_INVALID_FRAME
212
213} WLANTL_BAPFrameEnumType;
214
215#ifdef WLAN_SOFTAP_FEATURE
216/* Type used to specify LWM threshold unit */
217typedef enum {
218 WLAN_LWM_THRESHOLD_BYTE = 0,
219
220 WLAN_LWM_THRESHOLD_PACKET
221} WLAN_LWM_Threshold_Type;
222#endif
223
224/*---------------------------------------------------------------------------
225 TL States
226---------------------------------------------------------------------------*/
227typedef enum
228{
229 /* Transition in this state made upon creation*/
230 WLANTL_STA_INIT = 0,
231
232 /* Transition happens after Assoc success if second level authentication
233 is needed*/
234 WLANTL_STA_CONNECTED,
235
236 /* Transition happens when second level auth is successful and keys are
237 properly installed */
238 WLANTL_STA_AUTHENTICATED,
239
240 /* Transition happens when connectivity is lost*/
241 WLANTL_STA_DISCONNECTED,
242
243 WLANTL_STA_MAX_STATE
244}WLANTL_STAStateType;
245
246
247/*---------------------------------------------------------------------------
248 STA Descriptor Type
249---------------------------------------------------------------------------*/
250typedef struct
251{
252 /*STA unique identifier, originating from HAL*/
253 v_U8_t ucSTAId;
254
255 /*STA MAC Address*/
256 v_MACADDR_t vSTAMACAddress;
257
258 /*BSSID for IBSS*/
259 v_MACADDR_t vBSSIDforIBSS;
260
261 /*Self MAC Address*/
262 v_MACADDR_t vSelfMACAddress;
263
264 /*Type of the STA*/
265 WLAN_STAType wSTAType;
266
267 /*flag for setting the state of the QOS for the link*/
268 v_U8_t ucQosEnabled;
269
270 /*enable FT in TL */
271 v_U8_t ucSwFrameTXXlation;
272 v_U8_t ucSwFrameRXXlation;
273
274 /*Flag for signaling TL if LLC header needs to be added for outgoing
275 packets*/
276 v_U8_t ucAddRmvLLC;
277
278 /*Flag for signaling if the privacy bit needs to be set*/
279 v_U8_t ucProtectedFrame;
280
281 /*DPU Signature used for unicast data - used for data caching*/
282 v_U8_t ucUcastSig;
283 /*Flag to indicate if STA is a WAPI STA*/
284 v_U8_t ucIsWapiSta;
285
286#ifdef FEATURE_WLAN_CCX
287 /*Flag to indicate if STA is a CCX STA*/
288 v_U8_t ucIsCcxSta;
289#endif
290
291 /*DPU Signature used for broadcast data - used for data caching*/
292 v_U8_t ucBcastSig;
293
294 /*Initial state at which the STA should be brought up to*/
295 WLANTL_STAStateType ucInitState;
296#ifdef ANI_CHIPSET_VOLANS
297 /* 1 means replay check is needed for the station,
298 0 means replay check is not needed for the station*/
299 v_BOOL_t ucIsReplayCheckValid;
300#endif
301}WLAN_STADescType;
302
303/*---------------------------------------------------------------------------
304 TL Configuration
305---------------------------------------------------------------------------*/
306typedef struct
307{
308 /*AC weight for WFQ*/
309 v_U8_t ucAcWeights[WLANTL_MAX_AC];
310
311 /*Delayed trigger frame timmer: - used by TL to send trigger frames less
312 often when it has established that the App is suspended*/
313 v_U32_t uDelayedTriggerFrmInt;
314
315#ifdef WLAN_SOFTAP_FEATURE
316 /* Min Threshold for Processing Frames in TL */
317 v_U8_t uMinFramesProcThres;
318#endif
319}WLANTL_ConfigInfoType;
320
321/*---------------------------------------------------------------------------
322 TSPEC Direction Enum Type
323---------------------------------------------------------------------------*/
324typedef enum
325{
326 /* uplink */
327 WLANTL_TX_DIR = 0,
328
329 /* downlink */
330 WLANTL_RX_DIR = 1,
331
332 /*bidirectional*/
333 WLANTL_BI_DIR = 2,
334}WLANTL_TSDirType;
335
336/*============================================================================
337 * GENERIC STRUCTURES - END
338 ============================================================================*/
339
340
341
342/*----------------------------------------------------------------------------
343 * Type Declarations
344 * -------------------------------------------------------------------------*/
345
346/*---------------------------------------------------------------------------
347 TL Error Type
348---------------------------------------------------------------------------*/
349typedef enum
350{
351 /* Generic error */
352 WLANTL_ERROR = 0,
353
354 /* No rx callback registered for data path */
355 WLANTL_NO_RX_DATA_CB,
356
357 /* No rx callback registered for management path*/
358 WLANTL_NO_RX_MGMT_CB,
359
360 /* Generic memory error*/
361 WLANTL_MEM_ERROR,
362
363 /* Bus error notified by BAL */
364 WLANTL_BUS_ERROR
365
366}WLANTL_ErrorType;
367
368/*---------------------------------------------------------------------------
369 STA priority type
370---------------------------------------------------------------------------*/
371typedef enum
372{
373 /* STA gets to tx every second round*/
374 WLANTL_STA_PRI_VERY_LOW = -2,
375
376 /* STA gets to tx every other round*/
377 WLANTL_STA_PRI_LOW = -1,
378
379 /* STA gets to tx each time */
380 WLANTL_STA_PRI_NORMAL = 0,
381
382 /* STA gets to tx twice each time*/
383 WLANTL_STA_PRI_HIGH = 1,
384
385 /* STA gets to tx three times each time*/
386 WLANTL_STA_PRI_VERY_HIGH = 2
387
388}WLANTL_STAPriorityType;
389
390/*---------------------------------------------------------------------------
391 Meta information requested from HDD by TL
392---------------------------------------------------------------------------*/
393typedef struct
394{
395 /* TID of the packet being sent */
396 v_U8_t ucTID;
397
398 /* UP of the packet being sent */
399 v_U8_t ucUP;
400
401 /* notifying TL if this is an EAPOL frame or not */
402 v_U8_t ucIsEapol;
403#ifdef FEATURE_WLAN_WAPI
404 /* notifying TL if this is a WAI frame or not */
405 v_U8_t ucIsWai;
406#endif
407 /* frame is 802.11 and it does not need translation */
408 v_U8_t ucDisableFrmXtl;
409
410 /* frame is broadcast */
411 v_U8_t ucBcast;
412
413 /* frame is multicast */
414 v_U8_t ucMcast;
415
416 /* frame type */
417 v_U8_t ucType;
418
419 /* timestamp */
420 v_U16_t usTimeStamp;
421
422 /* STA has more packets to send */
423 v_BOOL_t bMorePackets;
424}WLANTL_MetaInfoType;
425
426/*---------------------------------------------------------------------------
427 Meta information provided by TL to HDD on rx path
428---------------------------------------------------------------------------*/
429typedef struct
430{
431 /* UP of the packet being sent */
432 v_U8_t ucUP;
433 /* Address 3 Index of the received packet */
434 v_U16_t ucDesSTAId;
435}WLANTL_RxMetaInfoType;
436
437
438/*---------------------------------------------------------------------------
439 Handoff support and statistics defines and enum types
440---------------------------------------------------------------------------*/
441/* Threshold crossed event type definitions */
442#define WLANTL_HO_THRESHOLD_NA 0x00
443#define WLANTL_HO_THRESHOLD_DOWN 0x01
444#define WLANTL_HO_THRESHOLD_UP 0x02
445#define WLANTL_HO_THRESHOLD_CROSS 0x04
446
447/* Realtime traffic status */
448typedef enum
449{
450 WLANTL_HO_RT_TRAFFIC_STATUS_OFF,
451 WLANTL_HO_RT_TRAFFIC_STATUS_ON
452} WLANTL_HO_RT_TRAFFIC_STATUS_TYPE;
453
454/* Non-Realtime traffic status */
455typedef enum
456{
457 WLANTL_HO_NRT_TRAFFIC_STATUS_OFF,
458 WLANTL_HO_NRT_TRAFFIC_STATUS_ON
459} WLANTL_HO_NRT_TRAFFIC_STATUS_TYPE;
460
461/* Statistics type TL supported */
462typedef enum
463{
464 WLANTL_STATIC_TX_UC_FCNT,
465 WLANTL_STATIC_TX_MC_FCNT,
466 WLANTL_STATIC_TX_BC_FCNT,
467 WLANTL_STATIC_TX_UC_BCNT,
468 WLANTL_STATIC_TX_MC_BCNT,
469 WLANTL_STATIC_TX_BC_BCNT,
470 WLANTL_STATIC_RX_UC_FCNT,
471 WLANTL_STATIC_RX_MC_FCNT,
472 WLANTL_STATIC_RX_BC_FCNT,
473 WLANTL_STATIC_RX_UC_BCNT,
474 WLANTL_STATIC_RX_MC_BCNT,
475 WLANTL_STATIC_RX_BC_BCNT,
476 WLANTL_STATIC_RX_BCNT,
477 WLANTL_STATIC_RX_BCNT_CRC_OK,
478 WLANTL_STATIC_RX_RATE
479} WLANTL_TRANSFER_STATIC_TYPE;
480
481/*---------------------------------------------------------------------------
482 Handoff support and statistics structures
483---------------------------------------------------------------------------*/
484typedef struct
485{
486 WLANTL_HO_RT_TRAFFIC_STATUS_TYPE rtTrafficStatus;
487 WLANTL_HO_NRT_TRAFFIC_STATUS_TYPE nrtTrafficStatus;
488} WLANTL_HO_TRAFFIC_STATUS_TYPE;
489
490#ifdef WLAN_SOFTAP_FEATURE
491typedef tSap_SoftapStats WLANTL_TRANSFER_STA_TYPE;
492#else
493typedef struct
494{
495 v_U32_t txUCFcnt;
496 v_U32_t txMCFcnt;
497 v_U32_t txBCFcnt;
498 v_U32_t txUCBcnt;
499 v_U32_t txMCBcnt;
500 v_U32_t txBCBcnt;
501 v_U32_t rxUCFcnt;
502 v_U32_t rxMCFcnt;
503 v_U32_t rxBCFcnt;
504 v_U32_t rxUCBcnt;
505 v_U32_t rxMCBcnt;
506 v_U32_t rxBCBcnt;
507 v_U32_t rxBcnt;
508 v_U32_t rxBcntCRCok;
509 v_U32_t rxRate;
510}WLANTL_TRANSFER_STA_TYPE;
511#endif
512
513/* Under here not public items, just use for internal */
514/* 3 SME 1 HDD */
515#define WLANTL_MAX_AVAIL_THRESHOLD 5
516#define WLANTL_HS_NUM_CLIENT 2
517#define WLANTL_SINGLE_CLNT_THRESHOLD 4
518
519/*----------------------------------------------------------------------------
520 * TL callback types
521 *--------------------------------------------------------------------------*/
522
523/*----------------------------------------------------------------------------
524
525 DESCRIPTION
526 Type of the tx complete callback registered with TL.
527
528 TL will call this to notify the client when a transmission for a
529 packet has ended.
530
531 PARAMETERS
532
533 IN
534 pvosGCtx: pointer to the global vos context; a handle to
535 TL/HAL/PE/BAP/HDD control block can be extracted from
536 its context
537 vosDataBuff: pointer to the VOSS data buffer that was transmitted
538 wTxSTAtus: status of the transmission
539
540
541 RETURN VALUE
542 The result code associated with performing the operation
543
544----------------------------------------------------------------------------*/
545typedef VOS_STATUS (*WLANTL_TxCompCBType)( v_PVOID_t pvosGCtx,
546 vos_pkt_t* pFrameDataBuff,
547 VOS_STATUS wTxSTAtus );
548
549
550/*----------------------------------------------------------------------------
551 INTERACTION WITH HDD
552 ---------------------------------------------------------------------------*/
553/*----------------------------------------------------------------------------
554
555 DESCRIPTION
556 Type of the fetch packet callback registered with TL.
557
558 It is called by the TL when the scheduling algorithms allows for
559 transmission of another packet to the module.
560 It will be called in the context of the BAL fetch transmit packet
561 function, initiated by the bus lower layer.
562
563
564 PARAMETERS
565
566 IN
567 pvosGCtx: pointer to the global vos context; a handle
568 to TL's or HDD's control block can be extracted
569 from its context
570
571 IN/OUT
572 pucSTAId: the Id of the station for which TL is requesting a
573 packet, in case HDD does not maintain per station
574 queues it can give the next packet in its queue
575 and put in the right value for the
576 pucAC: access category requested by TL, if HDD does not have
577 packets on this AC it can choose to service another AC
578 queue in the order of priority
579
580 OUT
581 vosDataBuff: pointer to the VOSS data buffer that was transmitted
582 tlMetaInfo: meta info related to the data frame
583
584
585
586 RETURN VALUE
587 The result code associated with performing the operation
588
589----------------------------------------------------------------------------*/
590typedef VOS_STATUS (*WLANTL_STAFetchPktCBType)(
591 v_PVOID_t pvosGCtx,
592 v_U8_t* pucSTAId,
593 WLANTL_ACEnumType ucAC,
594 vos_pkt_t** vosDataBuff,
595 WLANTL_MetaInfoType* tlMetaInfo);
596
597/*----------------------------------------------------------------------------
598
599 DESCRIPTION
600 Type of the receive callback registered with TL.
601
602 TL will call this to notify the client when a packet was received
603 for a registered STA.
604
605 PARAMETERS
606
607 IN
608 pvosGCtx: pointer to the global vos context; a handle to
609 TL's or HDD's control block can be extracted from
610 its context
611 vosDataBuff: pointer to the VOSS data buffer that was received
612 (it may be a linked list)
613 ucSTAId: station id
614 pRxMetaInfo: meta info for the received packet(s)
615
616 RETURN VALUE
617 The result code associated with performing the operation
618
619----------------------------------------------------------------------------*/
620typedef VOS_STATUS (*WLANTL_STARxCBType)( v_PVOID_t pvosGCtx,
621 vos_pkt_t* vosDataBuff,
622 v_U8_t ucSTAId,
623 WLANTL_RxMetaInfoType* pRxMetaInfo);
624
625
626/*----------------------------------------------------------------------------
627 INTERACTION WITH BAP
628 ---------------------------------------------------------------------------*/
629
630/*----------------------------------------------------------------------------
631
632 DESCRIPTION
633 Type of the receive callback registered with TL for BAP.
634
635 The registered reception callback is being triggered by TL whenever a
636 frame was received and it was filtered as a non-data BT AMP packet.
637
638 PARAMETERS
639
640 IN
641 pvosGCtx: pointer to the global vos context; a handle to TL's
642 or SME's control block can be extracted from its context
643 vosDataBuff: pointer to the vOSS buffer containing the received packet;
644 no chaining will be done on this path
645 frameType: type of the frame to be indicated to BAP.
646
647 RETURN VALUE
648 The result code associated with performing the operation
649
650----------------------------------------------------------------------------*/
651typedef VOS_STATUS (*WLANTL_BAPRxCBType)( v_PVOID_t pvosGCtx,
652 vos_pkt_t* vosDataBuff,
653 WLANTL_BAPFrameEnumType frameType);
654
655/*----------------------------------------------------------------------------
656
657 DESCRIPTION
658 Callback registered with TL for BAP, this is required inorder for
659 TL to inform BAP, that the flush operation requested has been completed.
660
661 The registered reception callback is being triggered by TL whenever a
662 frame SIR_TL_HAL_FLUSH_AC_RSP is received by TL from HAL.
663
664 PARAMETERS
665
666 IN
667 pvosGCtx: pointer to the global vos context; a handle to TL's
668 or SME's control block can be extracted from its context
669 vosDataBuff: pointer to the vOSS buffer containing the received packet;
670 no chaining will be done on this path
671
672 RETURN VALUE
673 The result code associated with performing the operation
674
675----------------------------------------------------------------------------*/
676typedef VOS_STATUS (*WLANTL_FlushOpCompCBType)( v_PVOID_t pvosGCtx,
677 v_U8_t ucStaId,
678 v_U8_t ucTID,
679 v_U8_t status);
680/*----------------------------------------------------------------------------
681 INTERACTION WITH PE
682 ---------------------------------------------------------------------------*/
683
684/*----------------------------------------------------------------------------
685
686 DESCRIPTION
687 Type of the receive callback registered with TL for PE.
688
689 Upon receipt of a management frame TL will call the registered receive
690 callback and forward this frame to the interested module, in our case PE.
691
692 PARAMETERS
693
694 IN
695 pvosGCtx: pointer to the global vos context; a handle to TL's
696 control block can be extracted from its context
697 vosFrmBuf: pointer to a vOSS buffer containing the management frame
698 received
699
700 RETURN VALUE
701 The result code associated with performing the operation
702
703----------------------------------------------------------------------------*/
704typedef VOS_STATUS (*WLANTL_MgmtFrmRxCBType)( v_PVOID_t pvosGCtx,
705 v_PVOID_t vosBuff);
706
707
708/*----------------------------------------------------------------------------
709 INTERACTION WITH HAL
710 ---------------------------------------------------------------------------*/
711
712/*----------------------------------------------------------------------------
713
714 DESCRIPTION
715 Type of the fetch packet callback registered with TL.
716
717 HAL calls this API when it wishes to suspend transmission for a
718 particular STA.
719
720 PARAMETERS
721
722 IN
723 pvosGCtx: pointer to the global vos context; a handle to TL's
724 control block can be extracted from its context
725 ucSTAId: identifier of the station for which the request is made;
726 a value of 0 assumes suspend on all active station
727 pfnSuspendTxCB: pointer to the suspend result notification in case the
728 call is asynchronous
729
730 RETURN VALUE
731 The result code associated with performing the operation
732
733----------------------------------------------------------------------------*/
734typedef VOS_STATUS (*WLANTL_SuspendCBType)( v_PVOID_t pvosGCtx,
735 v_U8_t* ucSTAId,
736 VOS_STATUS vosStatus);
737
738
739/*==========================================================================
740
741 DESCRIPTION
742 Traffic status changed callback function
743 Should be registered to let client know that traffic status is changed
744 REF WLANTL_RegGetTrafficStatus
745
746 PARAMETERS
747 pAdapter Global handle pointer
748 trafficStatus RT and NRT current traffic status
749 pUserCtxt pre registered client context
750
751 RETURN VALUE
752 VOS_STATUS
753
754 SIDE EFFECTS
755 NONE
756
757============================================================================*/
758/* IF traffic status is changed, send notification to SME */
759typedef VOS_STATUS (*WLANTL_TrafficStatusChangedCBType)
760(
761 v_PVOID_t pAdapter,
762 WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus,
763 v_PVOID_t pUserCtxt
764);
765
766/*==========================================================================
767
768 DESCRIPTION
769 RSSI threshold crossed notification callback function
770 REF WLANTL_RegRSSIIndicationCB
771
772 PARAMETERS
773 pAdapter Global handle pointer
774 rssiNotification Notification event type
775 pUserCtxt pre registered client context
776
777 RETURN VALUE
778
779 SIDE EFFECTS
780
781============================================================================*/
782/* If RSSI realm is changed, send notification to Clients, SME, HDD */
783typedef VOS_STATUS (*WLANTL_RSSICrossThresholdCBType)
784(
785 v_PVOID_t pAdapter,
786 v_U8_t rssiNotification,
787 v_PVOID_t pUserCtxt
788);
789
Jeff Johnsone7245742012-09-05 17:12:55 -0700790typedef struct
791{
792 // Common for all types are requests
793 v_U16_t msgType; // message type is same as the request type
794 v_U16_t msgLen; // length of the entire request
795 v_U8_t sessionId; //sme Session Id
796 v_U8_t rssiNotification;
797 v_PVOID_t tlCallback;
798 v_PVOID_t pAdapter;
799 v_PVOID_t pUserCtxt;
800} WLANTL_TlIndicationReq;
801
Jeff Johnson295189b2012-06-20 16:38:30 -0700802/*----------------------------------------------------------------------------
803 * Function Declarations and Documentation
804 * -------------------------------------------------------------------------*/
805
806/*==========================================================================
807
808 FUNCTION WLANTL_Open
809
810 DESCRIPTION
811 Called by HDD at driver initialization. TL will initialize all its
812 internal resources and will wait for the call to start to register
813 with the other modules.
814
815 DEPENDENCIES
816
817 PARAMETERS
818
819 IN
820 pvosGCtx: pointer to the global vos context; a handle to TL's
821 control block can be extracted from its context
822 pTLConfig: TL Configuration
823
824 RETURN VALUE
825 The result code associated with performing the operation
826
827 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
828 fault
829 VOS_STATUS_SUCCESS: Everything is good :)
830
831 SIDE EFFECTS
832
833============================================================================*/
834VOS_STATUS
835WLANTL_Open
836(
837 v_PVOID_t pvosGCtx,
838 WLANTL_ConfigInfoType* pTLConfig
839);
840
841/*==========================================================================
842
843 FUNCTION WLANTL_Start
844
845 DESCRIPTION
846 Called by HDD as part of the overall start procedure. TL will use this
847 call to register with BAL as a transport layer entity.
848
849 DEPENDENCIES
850
851 PARAMETERS
852
853 IN
854 pvosGCtx: pointer to the global vos context; a handle to TL's
855 control block can be extracted from its context
856
857 RETURN VALUE
858 The result code associated with performing the operation
859
860 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
861 fault
862 VOS_STATUS_SUCCESS: Everything is good :)
863
864 Other codes can be returned as a result of a BAL failure; see BAL API
865 for more info
866
867 SIDE EFFECTS
868
869============================================================================*/
870VOS_STATUS
871WLANTL_Start
872(
873 v_PVOID_t pvosGCtx
874);
875
876/*==========================================================================
877
878 FUNCTION WLANTL_Stop
879
880 DESCRIPTION
881 Called by HDD to stop operation in TL, before close. TL will suspend all
882 frame transfer operation and will wait for the close request to clean up
883 its resources.
884
885 DEPENDENCIES
886
887 PARAMETERS
888
889 IN
890 pvosGCtx: pointer to the global vos context; a handle to TL's
891 control block can be extracted from its context
892
893 RETURN VALUE
894 The result code associated with performing the operation
895
896 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
897 fault
898 VOS_STATUS_SUCCESS: Everything is good :)
899
900 SIDE EFFECTS
901
902============================================================================*/
903VOS_STATUS
904WLANTL_Stop
905(
906 v_PVOID_t pvosGCtx
907);
908
909/*==========================================================================
910
911 FUNCTION WLANTL_Close
912
913 DESCRIPTION
914 Called by HDD during general driver close procedure. TL will clean up
915 all the internal resources.
916
917 DEPENDENCIES
918
919 PARAMETERS
920
921 IN
922 pvosGCtx: pointer to the global vos context; a handle to TL's
923 control block can be extracted from its context
924
925 RETURN VALUE
926 The result code associated with performing the operation
927
928 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
929 fault
930 VOS_STATUS_SUCCESS: Everything is good :)
931
932 SIDE EFFECTS
933
934============================================================================*/
935VOS_STATUS
936WLANTL_Close
937(
938 v_PVOID_t pvosGCtx
939);
940
941
942/*----------------------------------------------------------------------------
943 INTERACTION WITH HDD
944 ---------------------------------------------------------------------------*/
945/*==========================================================================
946
947 FUNCTION WLANTL_ConfigureSwFrameTXXlationForAll
948
949 DESCRIPTION
950 Function to disable/enable frame translation for all association stations.
951
952 DEPENDENCIES
953
954 PARAMETERS
955 IN
956 pvosGCtx: VOS context
957 EnableFrameXlation TRUE means enable SW translation for all stations.
958 .
959
960 RETURN VALUE
961
962 void.
963
964============================================================================*/
965void
966WLANTL_ConfigureSwFrameTXXlationForAll
967(
968 v_PVOID_t pvosGCtx,
969 v_BOOL_t enableFrameXlation
970);
971
972/*===========================================================================
973
974 FUNCTION WLANTL_RegisterSTAClient
975
976 DESCRIPTION
977
978 This function is used by HDD to register as a client for data services
979 with TL. HDD will call this API for each new station that it adds,
980 thus having the flexibility of registering different callback for each
981 STA it services.
982
983 DEPENDENCIES
984
985 TL must have been initialized before this gets called.
986
987 Restriction:
988 Main thread will have higher priority that Tx and Rx threads thus
989 guaranteeing that a station will be added before any data can be
990 received for it. (This enables TL to be lock free)
991
992 PARAMETERS
993
994 pvosGCtx: pointer to the global vos context; a handle to TL's
995 control block can be extracted from its context
996 pfnStARx: function pointer to the receive packet handler from HDD
997 pfnSTATxComp: function pointer to the transmit complete confirmation
998 handler from HDD
999 pfnSTAFetchPkt: function pointer to the packet retrieval routine in HDD
1000 wSTADescType: STA Descriptor, contains information related to the
1001 new added STA
1002
1003 RETURN VALUE
1004
1005 The result code associated with performing the operation
1006
1007 VOS_STATUS_E_INVAL: Input parameters are invalid
1008 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1009 TL cb is NULL ; access would cause a page fault
1010 VOS_STATUS_E_EXISTS: Station was already registered
1011 VOS_STATUS_SUCCESS: Everything is good :)
1012
1013 SIDE EFFECTS
1014
1015============================================================================*/
1016VOS_STATUS
1017WLANTL_RegisterSTAClient
1018(
1019 v_PVOID_t pvosGCtx,
1020 WLANTL_STARxCBType pfnSTARx,
1021 WLANTL_TxCompCBType pfnSTATxComp,
1022 WLANTL_STAFetchPktCBType pfnSTAFetchPkt,
1023 WLAN_STADescType* wSTADescType ,
1024 v_S7_t rssi
1025);
1026
1027/*===========================================================================
1028
1029 FUNCTION WLANTL_ClearSTAClient
1030
1031 DESCRIPTION
1032
1033 HDD will call this API when it no longer needs data services for the
1034 particular station.
1035
1036 DEPENDENCIES
1037
1038 A station must have been registered before the clear registration is
1039 called.
1040
1041 PARAMETERS
1042
1043 pvosGCtx: pointer to the global vos context; a handle to TL's
1044 control block can be extracted from its context
1045 ucSTAId: identifier for the STA to be cleared
1046
1047 RETURN VALUE
1048
1049 The result code associated with performing the operation
1050
1051 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1052 TL cb is NULL ; access would cause a page fault
1053 VOS_STATUS_E_EXISTS: Station was not registered
1054 VOS_STATUS_SUCCESS: Everything is good :)
1055
1056 SIDE EFFECTS
1057
1058============================================================================*/
1059VOS_STATUS
1060WLANTL_ClearSTAClient
1061(
1062 v_PVOID_t pvosGCtx,
1063 v_U8_t ucSTAId
1064);
1065
1066/*===========================================================================
1067
1068 FUNCTION WLANTL_ChangeSTAState
1069
1070 DESCRIPTION
1071
1072 HDD will make this notification whenever a change occurs in the
1073 connectivity state of a particular STA.
1074
1075 DEPENDENCIES
1076
1077 A station must have been registered before the change state can be
1078 called.
1079
1080 RESTRICTION: A station is being notified as authenticated before the
1081 keys are installed in HW. This way if a frame is received
1082 before the keys are installed DPU will drop that frame.
1083
1084 Main thread has higher priority that Tx and Rx threads thus guaranteeing
1085 the following:
1086 - a station will be in assoc state in TL before TL receives any data
1087 for it
1088
1089 PARAMETERS
1090
1091 pvosGCtx: pointer to the global vos context; a handle to TL's
1092 control block can be extracted from its context
1093 ucSTAId: identifier for the STA that is pending transmission
1094 tlSTAState: the new state of the connection to the given station
1095
1096
1097 RETURN VALUE
1098
1099 The result code associated with performing the operation
1100
1101 VOS_STATUS_E_INVAL: Input parameters are invalid
1102 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1103 TL cb is NULL ; access would cause a page fault
1104 VOS_STATUS_E_EXISTS: Station was not registered
1105 VOS_STATUS_SUCCESS: Everything is good :)
1106
1107 SIDE EFFECTS
1108
1109============================================================================*/
1110VOS_STATUS
1111WLANTL_ChangeSTAState
1112(
1113 v_PVOID_t pvosGCtx,
1114 v_U8_t ucSTAId,
1115 WLANTL_STAStateType tlSTAState
1116);
1117
1118/*===========================================================================
1119
Madan Mohan Koyyalamudifc1d1fe2012-10-18 15:07:12 -07001120 FUNCTION WLANTL_GetSTAState
1121
1122 DESCRIPTION
1123
1124 Returns connectivity state of a particular STA.
1125
1126 DEPENDENCIES
1127
1128 A station must have been registered before its state can be retrieved.
1129
1130
1131 PARAMETERS
1132
1133 IN
1134 pvosGCtx: pointer to the global vos context; a handle to TL's
1135 control block can be extracted from its context
1136 ucSTAId: identifier of the station
1137
1138 OUT
1139 ptlSTAState: the current state of the connection to the given station
1140
1141
1142 RETURN VALUE
1143
1144 The result code associated with performing the operation
1145
1146 VOS_STATUS_E_INVAL: Input parameters are invalid
1147 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1148 TL cb is NULL ; access would cause a page fault
1149 VOS_STATUS_E_EXISTS: Station was not registered
1150 VOS_STATUS_SUCCESS: Everything is good :)
1151
1152 SIDE EFFECTS
1153
1154============================================================================*/
1155VOS_STATUS
1156WLANTL_GetSTAState
1157(
1158 v_PVOID_t pvosGCtx,
1159 v_U8_t ucSTAId,
1160 WLANTL_STAStateType *ptlSTAState
1161);
1162
1163/*===========================================================================
1164
Jeff Johnson295189b2012-06-20 16:38:30 -07001165 FUNCTION WLANTL_STAPktPending
1166
1167 DESCRIPTION
1168
1169 HDD will call this API when a packet is pending transmission in its
1170 queues.
1171
1172 DEPENDENCIES
1173
1174 A station must have been registered before the packet pending
1175 notification can be sent.
1176
1177 RESTRICTION: TL will not count packets for pending notification.
1178 HDD is expected to send the notification only when
1179 non-empty event gets triggered. Worst case scenario
1180 is that TL might end up making a call when Hdds
1181 queues are actually empty.
1182
1183 PARAMETERS
1184
1185 pvosGCtx: pointer to the global vos context; a handle to TL's
1186 control block can be extracted from its context
1187 ucSTAId: identifier for the STA that is pending transmission
1188 ucAC: access category of the non-empty queue
1189
1190 RETURN VALUE
1191
1192 The result code associated with performing the operation
1193
1194 VOS_STATUS_E_INVAL: Input parameters are invalid
1195 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1196 to TL cb is NULL ; access would cause a page fault
1197 VOS_STATUS_E_EXISTS: Station was not registered
1198 VOS_STATUS_SUCCESS: Everything is good :)
1199
1200 SIDE EFFECTS
1201
1202============================================================================*/
1203VOS_STATUS
1204WLANTL_STAPktPending
1205(
1206 v_PVOID_t pvosGCtx,
1207 v_U8_t ucSTAId,
1208 WLANTL_ACEnumType ucAc
1209);
1210
1211/*==========================================================================
1212
1213 FUNCTION WLANTL_SetSTAPriority
1214
1215 DESCRIPTION
1216
1217 TL exposes this API to allow upper layers a rough control over the
1218 priority of transmission for a given station when supporting multiple
1219 connections.
1220
1221 DEPENDENCIES
1222
1223 A station must have been registered before the change in priority can be
1224 called.
1225
1226 PARAMETERS
1227
1228 pvosGCtx: pointer to the global vos context; a handle to TL's
1229 control block can be extracted from its context
1230 ucSTAId: identifier for the STA that has to change priority
1231
1232 RETURN VALUE
1233
1234 The result code associated with performing the operation
1235
1236 VOS_STATUS_E_INVAL: Input parameters are invalid
1237 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1238 to TL cb is NULL ; access would cause a page fault
1239 VOS_STATUS_E_EXISTS: Station was not registered
1240 VOS_STATUS_SUCCESS: Everything is good :)
1241
1242 SIDE EFFECTS
1243
1244============================================================================*/
1245VOS_STATUS
1246WLANTL_SetSTAPriority
1247(
1248 v_PVOID_t pvosGCtx,
1249 v_U8_t ucSTAId,
1250 WLANTL_STAPriorityType tlSTAPri
1251);
1252
1253/*----------------------------------------------------------------------------
1254 INTERACTION WITH BAP
1255 ---------------------------------------------------------------------------*/
1256
1257/*==========================================================================
1258
1259 FUNCTION WLANTL_RegisterBAPClient
1260
1261 DESCRIPTION
1262 Called by SME to register itself as client for non-data BT-AMP packets.
1263
1264 DEPENDENCIES
1265 TL must be initialized before this function can be called.
1266
1267 PARAMETERS
1268
1269 IN
1270 pvosGCtx: pointer to the global vos context; a handle to TL's
1271 or SME's control block can be extracted from its context
1272 pfnTlBAPRxFrm: pointer to the receive processing routine for non-data
1273 BT-AMP packets
1274 pfnFlushOpCompleteCb:
1275 pointer to the function that will inform BAP that the
1276 flush operation is complete.
1277
1278 RETURN VALUE
1279
1280 The result code associated with performing the operation
1281
1282 VOS_STATUS_E_INVAL: Input parameters are invalid
1283 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1284 to TL cb is NULL ; access would cause a page fault
1285 VOS_STATUS_E_EXISTS: BAL client was already registered
1286 VOS_STATUS_SUCCESS: Everything is good :)
1287
1288 SIDE EFFECTS
1289
1290============================================================================*/
1291VOS_STATUS
1292WLANTL_RegisterBAPClient
1293(
1294 v_PVOID_t pvosGCtx,
1295 WLANTL_BAPRxCBType pfnTlBAPRx,
1296 WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb
1297);
1298
1299
1300/*==========================================================================
1301
1302 FUNCTION WLANTL_TxBAPFrm
1303
1304 DESCRIPTION
1305 BAP calls this when it wants to send a frame to the module
1306
1307 DEPENDENCIES
1308 BAP must be registered with TL before this function can be called.
1309
1310 RESTRICTION: BAP CANNOT push any packets to TL until it did not receive
1311 a tx complete from the previous packet, that means BAP
1312 sends one packet, wait for tx complete and then
1313 sends another one
1314
1315 If BAP sends another packet before TL manages to process the
1316 previously sent packet call will end in failure
1317
1318 PARAMETERS
1319
1320 IN
1321 pvosGCtx: pointer to the global vos context; a handle to TL's
1322 or BAP's control block can be extracted from its context
1323 vosDataBuff: pointer to the vOSS buffer containing the packet to be
1324 transmitted
1325 pMetaInfo: meta information about the packet
1326 pfnTlBAPTxComp: pointer to a transmit complete routine for notifying
1327 the result of the operation over the bus
1328
1329 RETURN VALUE
1330 The result code associated with performing the operation
1331
1332 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1333 page fault
1334 VOS_STATUS_E_EXISTS: BAL client was not yet registered
1335 VOS_STATUS_E_BUSY: The previous BT-AMP packet was not yet transmitted
1336 VOS_STATUS_SUCCESS: Everything is good :)
1337
1338 Other failure messages may be returned from the BD header handling
1339 routines, please check apropriate API for more info.
1340
1341 SIDE EFFECTS
1342
1343============================================================================*/
1344VOS_STATUS
1345WLANTL_TxBAPFrm
1346(
1347 v_PVOID_t pvosGCtx,
1348 vos_pkt_t* vosDataBuff,
1349 WLANTL_MetaInfoType* pMetaInfo,
1350 WLANTL_TxCompCBType pfnTlBAPTxComp
1351);
1352
1353
1354/*----------------------------------------------------------------------------
1355 INTERACTION WITH SME
1356 ---------------------------------------------------------------------------*/
1357
1358/*==========================================================================
1359
1360 FUNCTION WLANTL_GetRssi
1361
1362 DESCRIPTION
1363 TL will extract the RSSI information from every data packet from the
1364 ongoing traffic and will store it. It will provide the result to SME
1365 upon request.
1366
1367 DEPENDENCIES
1368
1369 WARNING: the read and write of this value will not be protected
1370 by locks, therefore the information obtained after a read
1371 might not always be consistent.
1372
1373 PARAMETERS
1374
1375 IN
1376 pvosGCtx: pointer to the global vos context; a handle to TL's
1377 or SME's control block can be extracted from its context
1378 ucSTAId: station identifier for the requested value
1379
1380 OUT
1381 puRssi: the average value of the RSSI
1382
1383
1384 RETURN VALUE
1385 The result code associated with performing the operation
1386
1387 VOS_STATUS_E_INVAL: Input parameters are invalid
1388 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1389 to TL cb is NULL ; access would cause a page fault
1390 VOS_STATUS_E_EXISTS: STA was not yet registered
1391 VOS_STATUS_SUCCESS: Everything is good :)
1392
1393 SIDE EFFECTS
1394
1395============================================================================*/
1396VOS_STATUS
1397WLANTL_GetRssi
1398(
1399 v_PVOID_t pvosGCtx,
1400 v_U8_t ucSTAId,
1401 v_S7_t* puRssi
1402);
1403
1404/*==========================================================================
1405
1406 FUNCTION WLANTL_GetLinkQuality
1407
1408 DESCRIPTION
1409 TL will extract the LinkQuality information from every data packet from the
1410 ongoing traffic and will store it. It will provide the result to SME
1411 upon request.
1412
1413 DEPENDENCIES
1414
1415 WARNING: the read and write of this value will not be protected
1416 by locks, therefore the information obtained after a read
1417 might not always be consistent.
1418
1419 PARAMETERS
1420
1421 IN
1422 pvosGCtx: pointer to the global vos context; a handle to TL's
1423 or SME's control block can be extracted from its context
1424 ucSTAId: station identifier for the requested value
1425
1426 OUT
1427 puLinkQuality: the average value of the LinkQuality
1428
1429
1430 RETURN VALUE
1431 The result code associated with performing the operation
1432
1433 VOS_STATUS_E_INVAL: Input parameters are invalid
1434 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1435 to TL cb is NULL ; access would cause a page fault
1436 VOS_STATUS_E_EXISTS: STA was not yet registered
1437 VOS_STATUS_SUCCESS: Everything is good :)
1438
1439 SIDE EFFECTS
1440
1441============================================================================*/
1442VOS_STATUS
1443WLANTL_GetLinkQuality
1444(
1445 v_PVOID_t pvosGCtx,
1446 v_U8_t ucSTAId,
1447 v_U32_t* puLinkQuality
1448);
1449
1450/*==========================================================================
1451
1452 FUNCTION WLANTL_FlushStaTID
1453
1454 DESCRIPTION
1455 TL provides this API as an interface to SME (BAP) layer. TL inturn posts a
1456 message to HAL. This API is called by the SME inorder to perform a flush
1457 operation.
1458
1459 DEPENDENCIES
1460
1461 PARAMETERS
1462
1463 IN
1464 pvosGCtx: pointer to the global vos context; a handle to TL's
1465 or SME's control block can be extracted from its context
1466 ucSTAId: station identifier for the requested value
1467 ucTid: Tspec ID for the new BA session
1468
1469 OUT
1470 The response for this post is received in the main thread, via a response
1471 message from HAL to TL.
1472
1473 RETURN VALUE
1474 VOS_STATUS_SUCCESS: Everything is good :)
1475
1476 SIDE EFFECTS
1477============================================================================*/
1478VOS_STATUS
1479WLANTL_FlushStaTID
1480(
1481 v_PVOID_t pvosGCtx,
1482 v_U8_t ucSTAId,
1483 v_U8_t ucTid
1484);
1485
1486/*----------------------------------------------------------------------------
1487 INTERACTION WITH PE
1488 ---------------------------------------------------------------------------*/
1489
1490/*==========================================================================
1491
1492 FUNCTION WLANTL_RegisterMgmtFrmClient
1493
1494 DESCRIPTION
1495 Called by PE to register as a client for management frames delivery.
1496
1497 DEPENDENCIES
1498 TL must be initialized before this API can be called.
1499
1500 PARAMETERS
1501
1502 IN
1503 pvosGCtx: pointer to the global vos context; a handle to
1504 TL's control block can be extracted from its context
1505 pfnTlMgmtFrmRx: pointer to the receive processing routine for
1506 management frames
1507
1508 RETURN VALUE
1509 The result code associated with performing the operation
1510
1511 VOS_STATUS_E_INVAL: Input parameters are invalid
1512 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1513 page fault
1514 VOS_STATUS_E_EXISTS: Mgmt Frame client was already registered
1515 VOS_STATUS_SUCCESS: Everything is good :)
1516
1517 SIDE EFFECTS
1518
1519============================================================================*/
1520VOS_STATUS
1521WLANTL_RegisterMgmtFrmClient
1522(
1523 v_PVOID_t pvosGCtx,
1524 WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx
1525);
1526
1527/*==========================================================================
1528
1529 FUNCTION WLANTL_DeRegisterMgmtFrmClient
1530
1531 DESCRIPTION
1532 Called by PE to deregister as a client for management frames delivery.
1533
1534 DEPENDENCIES
1535 TL must be initialized before this API can be called.
1536
1537 PARAMETERS
1538
1539 IN
1540 pvosGCtx: pointer to the global vos context; a handle to
1541 TL's control block can be extracted from its context
1542 RETURN VALUE
1543 The result code associated with performing the operation
1544
1545 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1546 page fault
1547 VOS_STATUS_E_EXISTS: Mgmt Frame client was never registered
1548 VOS_STATUS_SUCCESS: Everything is good :)
1549
1550 SIDE EFFECTS
1551
1552============================================================================*/
1553VOS_STATUS
1554WLANTL_DeRegisterMgmtFrmClient
1555(
1556 v_PVOID_t pvosGCtx
1557);
1558
1559/*==========================================================================
1560
1561 FUNCTION WLANTL_TxMgmtFrm
1562
1563 DESCRIPTION
1564 Called by PE when it want to send out a management frame.
1565 HAL will also use this API for the few frames it sends out, they are not
1566 management frames howevere it is accepted that an exception will be
1567 allowed ONLY for the usage of HAL.
1568 Generic data frames SHOULD NOT travel through this function.
1569
1570 DEPENDENCIES
1571 TL must be initialized before this API can be called.
1572
1573 RESTRICTION: If PE sends another packet before TL manages to process the
1574 previously sent packet call will end in failure
1575
1576 Frames comming through here must be 802.11 frames, frame
1577 translation in UMA will be automatically disabled.
1578
1579 PARAMETERS
1580
1581 IN
1582 pvosGCtx: pointer to the global vos context;a handle to TL's
1583 control block can be extracted from its context
1584 vosFrmBuf: pointer to a vOSS buffer containing the management
1585 frame to be transmitted
1586 usFrmLen: the length of the frame to be transmitted; information
1587 is already included in the vOSS buffer
1588 wFrmType: the type of the frame being transmitted
1589 tid: tid used to transmit this frame
1590 pfnCompTxFunc: function pointer to the transmit complete routine
1591 pvBDHeader: pointer to the BD header, if NULL it means it was not
1592 yet constructed and it lies within TL's responsibility
1593 to do so; if not NULL it is expected that it was
1594 already packed inside the vos packet
1595 ucAckResponse: flag notifying it an interrupt is needed for the
1596 acknowledgement received when the frame is sent out
1597 the air and ; the interrupt will be processed by HAL,
1598 only one such frame can be pending in the system at
1599 one time.
1600
1601
1602 RETURN VALUE
1603 The result code associated with performing the operation
1604
1605 VOS_STATUS_E_INVAL: Input parameters are invalid
1606 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1607 page fault
1608 VOS_STATUS_E_EXISTS: Mgmt Frame client was not yet registered
1609 VOS_STATUS_E_BUSY: The previous Mgmt packet was not yet transmitted
1610 VOS_STATUS_SUCCESS: Everything is good :)
1611
1612 Other failure messages may be returned from the BD header handling
1613 routines, please check apropriate API for more info.
1614
1615 SIDE EFFECTS
1616
1617============================================================================*/
1618VOS_STATUS
1619WLANTL_TxMgmtFrm
1620(
1621 v_PVOID_t pvosGCtx,
1622 vos_pkt_t* vosFrmBuf,
1623 v_U16_t usFrmLen,
1624 v_U8_t ucFrmType,
1625 v_U8_t tid,
1626 WLANTL_TxCompCBType pfnCompTxFunc,
1627 v_PVOID_t voosBDHeader,
1628 v_U8_t ucAckResponse
1629);
1630
1631
1632/*----------------------------------------------------------------------------
1633 INTERACTION WITH HAL
1634 ---------------------------------------------------------------------------*/
1635
1636/*==========================================================================
1637
1638 FUNCTION WLANTL_ResetNotification
1639
1640 DESCRIPTION
1641 HAL notifies TL when the module is being reset.
1642 Currently not used.
1643
1644 DEPENDENCIES
1645
1646 PARAMETERS
1647
1648 IN
1649 pvosGCtx: pointer to the global vos context; a handle to TL's
1650 control block can be extracted from its context
1651
1652
1653 RETURN VALUE
1654 The result code associated with performing the operation
1655
1656 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1657 page fault
1658 VOS_STATUS_SUCCESS: Everything is good :)
1659
1660 SIDE EFFECTS
1661
1662============================================================================*/
1663VOS_STATUS
1664WLANTL_ResetNotification
1665(
1666 v_PVOID_t pvosGCtx
1667);
1668
1669/*==========================================================================
1670
1671 FUNCTION WLANTL_SuspendDataTx
1672
1673 DESCRIPTION
1674 HAL calls this API when it wishes to suspend transmission for a
1675 particular STA.
1676
1677 DEPENDENCIES
1678 The STA for which the request is made must be first registered with
1679 TL by HDD.
1680
1681 RESTRICTION: In case of a suspend, the flag write and read will not be
1682 locked: worst case scenario one more packet can get
1683 through before the flag gets updated (we can make this
1684 write atomic as well to guarantee consistency)
1685
1686 PARAMETERS
1687
1688 IN
1689 pvosGCtx: pointer to the global vos context; a handle to TL's
1690 control block can be extracted from its context
1691 pucSTAId: identifier of the station for which the request is made;
1692 a value of NULL assumes suspend on all active station
1693 pfnSuspendTxCB: pointer to the suspend result notification in case the
1694 call is asynchronous
1695
1696
1697 RETURN VALUE
1698 The result code associated with performing the operation
1699
1700 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1701 to TL cb is NULL ; access would cause a page fault
1702 VOS_STATUS_E_EXISTS: Station was not registered
1703 VOS_STATUS_SUCCESS: Everything is good :)
1704
1705 SIDE EFFECTS
1706
1707============================================================================*/
1708VOS_STATUS
1709WLANTL_SuspendDataTx
1710(
1711 v_PVOID_t pvosGCtx,
1712 v_U8_t* ucSTAId,
1713 WLANTL_SuspendCBType pfnSuspendTx
1714);
1715
1716/*==========================================================================
1717
1718 FUNCTION WLANTL_ResumeDataTx
1719
1720 DESCRIPTION
1721 Called by HAL to resume data transmission for a given STA.
1722
1723 WARNING: If a station was individually suspended a global resume will
1724 not resume that station
1725
1726 DEPENDENCIES
1727
1728 PARAMETERS
1729
1730 IN
1731 pvosGCtx: pointer to the global vos context; a handle to TL's
1732 control block can be extracted from its context
1733 pucSTAId: identifier of the station which is being resumed; NULL
1734 translates into global resume
1735
1736 RETURN VALUE
1737 The result code associated with performing the operation
1738
1739 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1740 to TL cb is NULL ; access would cause a page fault
1741 VOS_STATUS_E_EXISTS: Station was not registered
1742 VOS_STATUS_SUCCESS: Everything is good :)
1743
1744 SIDE EFFECTS
1745
1746============================================================================*/
1747VOS_STATUS
1748WLANTL_ResumeDataTx
1749(
1750 v_PVOID_t pvosGCtx,
1751 v_U8_t* pucSTAId
1752);
1753
1754
1755/*----------------------------------------------------------------------------
1756 CLIENT INDEPENDENT INTERFACE
1757 ---------------------------------------------------------------------------*/
1758
1759/*==========================================================================
1760
1761 FUNCTION WLANTL_GetTxPktCount
1762
1763 DESCRIPTION
1764 TL will provide the number of transmitted packets counted per
1765 STA per TID.
1766
1767 DEPENDENCIES
1768
1769 PARAMETERS
1770
1771 IN
1772 pvosGCtx: pointer to the global vos context; a handle to TL's
1773 control block can be extracted from its context
1774 ucSTAId: identifier of the station
1775 ucTid: identifier of the tspec
1776
1777 OUT
1778 puTxPktCount: the number of packets tx packet for this STA and TID
1779
1780 RETURN VALUE
1781 The result code associated with performing the operation
1782
1783 VOS_STATUS_E_INVAL: Input parameters are invalid
1784 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1785 to TL cb is NULL ; access would cause a page fault
1786 VOS_STATUS_E_EXISTS: Station was not registered
1787 VOS_STATUS_SUCCESS: Everything is good :)
1788
1789 SIDE EFFECTS
1790
1791============================================================================*/
1792VOS_STATUS
1793WLANTL_GetTxPktCount
1794(
1795 v_PVOID_t pvosGCtx,
1796 v_U8_t ucSTAId,
1797 v_U8_t ucTid,
1798 v_U32_t* puTxPktCount
1799);
1800
1801/*==========================================================================
1802
1803 FUNCTION WLANTL_GetRxPktCount
1804
1805 DESCRIPTION
1806 TL will provide the number of received packets counted per
1807 STA per TID.
1808
1809 DEPENDENCIES
1810
1811 PARAMETERS
1812
1813 IN
1814 pvosGCtx: pointer to the global vos context; a handle to TL's
1815 control block can be extracted from its context
1816 ucSTAId: identifier of the station
1817 ucTid: identifier of the tspec
1818
1819 OUT
1820 puTxPktCount: the number of packets rx packet for this STA and TID
1821
1822 RETURN VALUE
1823 The result code associated with performing the operation
1824
1825 VOS_STATUS_E_INVAL: Input parameters are invalid
1826 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1827 to TL cb is NULL ; access would cause a page fault
1828 VOS_STATUS_E_EXISTS: Station was not registered
1829 VOS_STATUS_SUCCESS: Everything is good :)
1830
1831 SIDE EFFECTS
1832
1833============================================================================*/
1834VOS_STATUS
1835WLANTL_GetRxPktCount
1836(
1837 v_PVOID_t pvosGCtx,
1838 v_U8_t ucSTAId,
1839 v_U8_t ucTid,
1840 v_U32_t* puRxPktCount
1841);
1842
1843/*==========================================================================
1844 VOSS SCHEDULER INTERACTION
1845 ==========================================================================*/
1846
1847/*==========================================================================
1848 FUNCTION WLANTL_McProcessMsg
1849
1850 DESCRIPTION
1851 Called by VOSS when a message was serialized for TL through the
1852 main thread/task.
1853
1854 DEPENDENCIES
1855 The TL must be initialized before this function can be called.
1856
1857 PARAMETERS
1858
1859 IN
1860 pvosGCtx: pointer to the global vos context; a handle to TL's
1861 control block can be extracted from its context
1862 message: type and content of the message
1863
1864
1865 RETURN VALUE
1866 The result code associated with performing the operation
1867
1868 VOS_STATUS_E_INVAL: invalid input parameters
1869 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1870 page fault
1871 VOS_STATUS_SUCCESS: Everything is good :)
1872
1873 SIDE EFFECTS
1874
1875============================================================================*/
1876VOS_STATUS
1877WLANTL_McProcessMsg
1878(
1879 v_PVOID_t pvosGCtx,
1880 vos_msg_t* message
1881);
1882
1883/*==========================================================================
1884 FUNCTION WLANTL_McFreeMsg
1885
1886 DESCRIPTION
1887 Called by VOSS to free a given TL message on the Main thread when there
1888 are messages pending in the queue when the whole system is been reset.
1889 For now, TL does not allocate any body so this function shout translate
1890 into a NOOP
1891
1892 DEPENDENCIES
1893 The TL must be initialized before this function can be called.
1894
1895 PARAMETERS
1896
1897 IN
1898 pvosGCtx: pointer to the global vos context; a handle to TL's
1899 control block can be extracted from its context
1900 message: type and content of the message
1901
1902
1903 RETURN VALUE
1904 The result code associated with performing the operation
1905
1906 VOS_STATUS_SUCCESS: Everything is good :)
1907
1908 SIDE EFFECTS
1909
1910============================================================================*/
1911VOS_STATUS
1912WLANTL_McFreeMsg
1913(
1914 v_PVOID_t pvosGCtx,
1915 vos_msg_t* message
1916);
1917
1918/*==========================================================================
1919 FUNCTION WLANTL_TxProcessMsg
1920
1921 DESCRIPTION
1922 Called by VOSS when a message was serialized for TL through the
1923 tx thread/task.
1924
1925 DEPENDENCIES
1926 The TL must be initialized before this function can be called.
1927
1928 PARAMETERS
1929
1930 IN
1931 pvosGCtx: pointer to the global vos context; a handle to TL's
1932 control block can be extracted from its context
1933 message: type and content of the message
1934
1935
1936 RETURN VALUE
1937 The result code associated with performing the operation
1938
1939 VOS_STATUS_E_INVAL: invalid input parameters
1940 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1941 page fault
1942 VOS_STATUS_SUCCESS: Everything is good :)
1943
1944 Other values can be returned as a result of a function call, please check
1945 corresponding API for more info.
1946 SIDE EFFECTS
1947
1948============================================================================*/
1949VOS_STATUS
1950WLANTL_TxProcessMsg
1951(
1952 v_PVOID_t pvosGCtx,
1953 vos_msg_t* message
1954);
1955
1956/*==========================================================================
1957 FUNCTION WLANTL_McFreeMsg
1958
1959 DESCRIPTION
1960 Called by VOSS to free a given TL message on the Main thread when there
1961 are messages pending in the queue when the whole system is been reset.
1962 For now, TL does not allocate any body so this function shout translate
1963 into a NOOP
1964
1965 DEPENDENCIES
1966 The TL must be initialized before this function can be called.
1967
1968 PARAMETERS
1969
1970 IN
1971 pvosGCtx: pointer to the global vos context; a handle to TL's
1972 control block can be extracted from its context
1973 message: type and content of the message
1974
1975
1976 RETURN VALUE
1977 The result code associated with performing the operation
1978
1979 VOS_STATUS_SUCCESS: Everything is good :)
1980
1981 SIDE EFFECTS
1982
1983============================================================================*/
1984VOS_STATUS
1985WLANTL_TxFreeMsg
1986(
1987 v_PVOID_t pvosGCtx,
1988 vos_msg_t* message
1989);
1990
1991
1992/*==========================================================================
1993 FUNCTION WLANTL_EnableUAPSDForAC
1994
1995 DESCRIPTION
1996 Called by HDD to enable UAPSD in TL. TL is in charge for sending trigger
1997 frames.
1998
1999 DEPENDENCIES
2000 The TL must be initialized before this function can be called.
2001
2002 PARAMETERS
2003
2004 IN
2005 pvosGCtx: pointer to the global vos context; a handle to TL's
2006 control block can be extracted from its context
2007 ucSTAId: station Id
2008 ucACId: AC for which U-APSD is being enabled
2009 ucTid TSpec Id
2010 uServiceInt: service interval used by TL to send trigger frames
2011 uSuspendInt: suspend interval used by TL to determine that an
2012 app is idle and should start sending trigg frms less often
2013 wTSDir: direction of TSpec
2014
2015 RETURN VALUE
2016 The result code associated with performing the operation
2017
2018 VOS_STATUS_SUCCESS: Everything is good :)
2019
2020 SIDE EFFECTS
2021
2022============================================================================*/
2023VOS_STATUS
2024WLANTL_EnableUAPSDForAC
2025(
2026 v_PVOID_t pvosGCtx,
2027 v_U8_t ucSTAId,
2028 WLANTL_ACEnumType ucACId,
2029 v_U8_t ucTid,
2030 v_U8_t ucUP,
2031 v_U32_t uServiceInt,
2032 v_U32_t uSuspendInt,
2033 WLANTL_TSDirType wTSDir
2034);
2035
2036
2037/*==========================================================================
2038 FUNCTION WLANTL_DisableUAPSDForAC
2039
2040 DESCRIPTION
2041 Called by HDD to disable UAPSD in TL. TL will stop sending trigger
2042 frames.
2043
2044 DEPENDENCIES
2045 The TL must be initialized before this function can be called.
2046
2047 PARAMETERS
2048
2049 IN
2050 pvosGCtx: pointer to the global vos context; a handle to TL's
2051 control block can be extracted from its context
2052 ucSTAId: station Id
2053 ucACId: AC for which U-APSD is being enabled
2054
2055
2056 RETURN VALUE
2057 The result code associated with performing the operation
2058
2059 VOS_STATUS_SUCCESS: Everything is good :)
2060
2061 SIDE EFFECTS
2062
2063============================================================================*/
2064VOS_STATUS
2065WLANTL_DisableUAPSDForAC
2066(
2067 v_PVOID_t pvosGCtx,
2068 v_U8_t ucSTAId,
2069 WLANTL_ACEnumType ucACId
2070);
2071
2072#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
2073/*==========================================================================
2074 FUNCTION WLANTL_RegRSSIIndicationCB
2075
2076 DESCRIPTION Registration function to get notification if RSSI cross
2077 threshold.
2078 Client should register threshold, direction, and notification
2079 callback function pointer
2080
2081 DEPENDENCIES NONE
2082
2083 PARAMETERS in pAdapter - Global handle
2084 in rssiValue - RSSI threshold value
2085 in triggerEvent - Cross direction should be notified
2086 UP, DOWN, and CROSS
2087 in crossCBFunction - Notification CB Function
2088 in usrCtxt - user context
2089
2090 RETURN VALUE VOS_STATUS
2091
2092 SIDE EFFECTS NONE
2093
2094============================================================================*/
2095VOS_STATUS WLANTL_RegRSSIIndicationCB
2096(
2097 v_PVOID_t pAdapter,
2098 v_S7_t rssiValue,
2099 v_U8_t triggerEvent,
2100 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2101 VOS_MODULE_ID moduleID,
2102 v_PVOID_t usrCtxt
2103);
2104
2105/*==========================================================================
2106 FUNCTION WLANTL_DeregRSSIIndicationCB
2107
2108 DESCRIPTION Remove specific threshold from list
2109
2110 DEPENDENCIES NONE
2111
2112 PARAMETERS in pAdapter - Global handle
2113 in rssiValue - RSSI threshold value
2114 in triggerEvent - Cross direction should be notified
2115 UP, DOWN, and CROSS
2116
2117 RETURN VALUE VOS_STATUS
2118
2119 SIDE EFFECTS NONE
2120
2121============================================================================*/
2122VOS_STATUS WLANTL_DeregRSSIIndicationCB
2123(
2124 v_PVOID_t pAdapter,
2125 v_S7_t rssiValue,
2126 v_U8_t triggerEvent,
2127 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2128 VOS_MODULE_ID moduleID
2129);
2130
2131/*==========================================================================
2132
2133 FUNCTION
2134
2135 DESCRIPTION
2136
2137 PARAMETERS
2138
2139 RETURN VALUE
2140
2141============================================================================*/
2142VOS_STATUS WLANTL_BMPSRSSIRegionChangedNotification
2143(
2144 v_PVOID_t pAdapter,
2145 tpSirRSSINotification pRSSINotification
2146);
2147
2148/*==========================================================================
2149 FUNCTION WLANTL_SetAlpha
2150
2151 DESCRIPTION ALPLA is weight value to calculate AVG RSSI
2152 avgRSSI = (ALPHA * historyRSSI) + ((10 - ALPHA) * newRSSI)
2153 avgRSSI has (ALPHA * 10)% of history RSSI weight and
2154 (10 - ALPHA)% of newRSSI weight
2155 This portion is dynamically configurable.
2156 Default is ?
2157
2158 DEPENDENCIES NONE
2159
2160 PARAMETERS in pAdapter - Global handle
2161 in valueAlpah - ALPHA
2162
2163 RETURN VALUE VOS_STATUS
2164
2165 SIDE EFFECTS NONE
2166
2167============================================================================*/
2168VOS_STATUS WLANTL_SetAlpha
2169(
2170 v_PVOID_t pAdapter,
2171 v_U8_t valueAlpha
2172);
2173
2174/*==========================================================================
2175 FUNCTION WLANTL_RegGetTrafficStatus
2176
2177 DESCRIPTION Registration function for traffic status monitoring
2178 During measure period count data frames.
2179 If frame count is larger then IDLE threshold set as traffic ON
2180 or OFF.
2181 And traffic status is changed send report to client with
2182 registered callback function
2183
2184 DEPENDENCIES NONE
2185
2186 PARAMETERS in pAdapter - Global handle
2187 in idleThreshold - Traffic on or off threshold
2188 in measurePeriod - Traffic state check period
2189 in trfficStatusCB - traffic status changed notification
2190 CB function
2191 in usrCtxt - user context
2192
2193 RETURN VALUE VOS_STATUS
2194
2195 SIDE EFFECTS NONE
2196
2197============================================================================*/
2198VOS_STATUS WLANTL_RegGetTrafficStatus
2199(
2200 v_PVOID_t pAdapter,
2201 v_U32_t idleThreshold,
2202 v_U32_t measurePeriod,
2203 WLANTL_TrafficStatusChangedCBType trfficStatusCB,
2204 v_PVOID_t usrCtxt
2205);
2206#endif
2207/*==========================================================================
2208 FUNCTION WLANTL_GetStatistics
2209
2210 DESCRIPTION Get traffic statistics for identified station
2211
2212 DEPENDENCIES NONE
2213
2214 PARAMETERS in pAdapter - Global handle
2215 in statType - specific statistics field to reset
2216 out statBuffer - traffic statistics buffer
2217
2218 RETURN VALUE VOS_STATUS
2219
2220 SIDE EFFECTS NONE
2221
2222============================================================================*/
2223VOS_STATUS WLANTL_GetStatistics
2224(
2225 v_PVOID_t pAdapter,
2226 WLANTL_TRANSFER_STA_TYPE *statBuffer,
2227 v_U8_t STAid
2228);
2229
2230/*==========================================================================
2231 FUNCTION WLANTL_ResetStatistics
2232
2233 DESCRIPTION Reset statistics structure for identified station ID
2234 Reset means set values as 0
2235
2236 DEPENDENCIES NONE
2237
2238 PARAMETERS in pAdapter - Global handle
2239 in statType - specific statistics field to reset
2240
2241 RETURN VALUE VOS_STATUS
2242
2243 SIDE EFFECTS NONE
2244
2245============================================================================*/
2246VOS_STATUS WLANTL_ResetStatistics
2247(
2248 v_PVOID_t pAdapter,
2249 v_U8_t STAid
2250);
2251
2252/*==========================================================================
2253 FUNCTION WLANTL_GetSpecStatistic
2254
2255 DESCRIPTION Get specific field within statistics structure for
2256 identified station ID
2257
2258 DEPENDENCIES NONE
2259
2260 PARAMETERS in pAdapter - Global handle
2261 in statType - specific statistics field to reset
2262 in STAid - Station ID
2263 out buffer - Statistic value
2264
2265 RETURN VALUE VOS_STATUS
2266
2267 SIDE EFFECTS NONE
2268
2269============================================================================*/
2270VOS_STATUS WLANTL_GetSpecStatistic
2271(
2272 v_PVOID_t pAdapter,
2273 WLANTL_TRANSFER_STATIC_TYPE statType,
2274 v_U32_t *buffer,
2275 v_U8_t STAid
2276);
2277
2278/*==========================================================================
2279 FUNCTION WLANTL_ResetSpecStatistic
2280
2281 DESCRIPTION Reset specific field within statistics structure for
2282 identified station ID
2283 Reset means set as 0
2284
2285 DEPENDENCIES NONE
2286
2287 PARAMETERS in pAdapter - Global handle
2288 in statType - specific statistics field to reset
2289 in STAid - Station ID
2290
2291 RETURN VALUE VOS_STATUS
2292
2293 SIDE EFFECTS NONE
2294
2295============================================================================*/
2296VOS_STATUS WLANTL_ResetSpecStatistic
2297(
2298 v_PVOID_t pAdapter,
2299 WLANTL_TRANSFER_STATIC_TYPE statType,
2300 v_U8_t STAid
2301);
2302#ifdef ANI_CHIPSET_VOLANS
2303/*===============================================================================
2304 FUNCTION WLANTL_IsReplayPacket
2305
2306 DESCRIPTION This function does replay check for valid stations
2307
2308 DEPENDENCIES Validity of replay check must be done before the function
2309 is called
2310
2311 PARAMETERS currentReplayCounter current replay counter taken from RX BD
2312 previousReplayCounter previous replay counter taken from TL CB
2313
2314 RETRUN VOS_TRUE packet is a replay packet
2315 VOS_FALSE packet is not a replay packet
2316
2317 SIDE EFFECTS none
2318 ===============================================================================*/
2319v_BOOL_t WLANTL_IsReplayPacket
2320(
2321 v_U64_t currentReplayCounter,
2322 v_U64_t previousReplayCounter
2323);
2324
2325/*===============================================================================
2326 FUNCTION WLANTL_GetReplayCounterFromRxBD
2327
2328 DESCRIPTION This function extracts 48-bit replay packet number from RX BD
2329
2330 DEPENDENCIES Validity of replay check must be done before the function
2331 is called
2332
2333 PARAMETERS pucRxHeader pointer to RX BD header
2334
2335 RETRUN v_U64_t Packet number extarcted from RX BD
2336
2337 SIDE EFFECTS none
2338 ===============================================================================*/
2339v_U64_t
2340WLANTL_GetReplayCounterFromRxBD
2341(
2342 v_U8_t *pucRxBDHeader
2343);
2344#endif /*End of #ifdef ANI_CHIPSET_VOLANS*/
2345
2346
2347
2348/*
2349 DESCRIPTION
2350 TL returns the weight currently maintained in TL.
2351 IN
2352 pvosGCtx: pointer to the global vos context; a handle to TL's
2353 or SME's control block can be extracted from its context
2354
2355 OUT
2356 pACWeights: Caller allocated memory for filling in weights
2357
2358 RETURN VALUE VOS_STATUS
2359*/
2360VOS_STATUS
2361WLANTL_GetACWeights
2362(
2363 v_PVOID_t pvosGCtx,
2364 v_U8_t* pACWeights
2365);
2366
2367
2368/*
2369 DESCRIPTION
2370 Change the weight currently maintained by TL.
2371 IN
2372 pvosGCtx: pointer to the global vos context; a handle to TL's
2373 or SME's control block can be extracted from its context
2374 pACWeights: Caller allocated memory contain the weights to use
2375
2376
2377 RETURN VALUE VOS_STATUS
2378*/
2379VOS_STATUS
2380WLANTL_SetACWeights
2381(
2382 v_PVOID_t pvosGCtx,
2383 v_U8_t* pACWeights
2384);
2385
2386#ifdef WLAN_SOFTAP_FEATURE
2387/*==========================================================================
2388 FUNCTION WLANTL_GetSoftAPStatistics
2389
2390 DESCRIPTION Collect the cumulative statistics for all Softap stations
2391
2392 DEPENDENCIES NONE
2393
2394 PARAMETERS in pvosGCtx - Pointer to the global vos context
2395 bReset - If set TL statistics will be cleared after reading
2396 out statsSum - pointer to collected statistics
2397
2398 RETURN VALUE VOS_STATUS_SUCCESS : if the Statistics are successfully extracted
2399
2400 SIDE EFFECTS NONE
2401
2402============================================================================*/
2403VOS_STATUS WLANTL_GetSoftAPStatistics(v_PVOID_t pAdapter, WLANTL_TRANSFER_STA_TYPE *statsSum, v_BOOL_t bReset);
2404#endif
2405
2406#ifdef __cplusplus
2407 }
2408#endif
2409
2410
2411 /*===========================================================================
2412
2413 FUNCTION WLANTL_AssocFailed
2414
2415 DESCRIPTION
2416
2417 This function is used by PE to notify TL that cache needs to flushed
2418 when association is not successfully completed
2419
2420 Internally, TL post a message to TX_Thread to serialize the request to
2421 keep lock-free mechanism.
2422
2423
2424 DEPENDENCIES
2425
2426 TL must have been initialized before this gets called.
2427
2428
2429 PARAMETERS
2430
2431 ucSTAId: station id
2432
2433 RETURN VALUE
2434
2435 none
2436
2437 SIDE EFFECTS
2438 There may be race condition that PE call this API and send another association
2439 request immediately with same staId before TX_thread can process the message.
2440
2441 To avoid this, we might need PE to wait for TX_thread process the message,
2442 but this is not currently implemented.
2443
2444============================================================================*/
2445void WLANTL_AssocFailed(v_U8_t staId);
2446
2447
2448/*===============================================================================
2449 FUNCTION WLANTL_PostResNeeded
2450
2451 DESCRIPTION This function posts message to TL to reserve BD/PDU memory
2452
2453 DEPENDENCIES None
2454
2455 PARAMETERS pvosGCtx
2456
2457 RETURN None
2458
2459 SIDE EFFECTS none
2460 ===============================================================================*/
2461
2462void WLANTL_PostResNeeded(v_PVOID_t pvosGCtx);
2463
2464/*===========================================================================
2465
2466 FUNCTION WLANTL_Finish_ULA
2467
2468 DESCRIPTION
2469 This function is used by HDD to notify TL to finish Upper layer authentication
2470 incase the last EAPOL packet is pending in the TL queue.
2471 To avoid the race condition between sme set key and the last EAPOL packet
2472 the HDD module calls this function just before calling the sme_RoamSetKey.
2473
2474 DEPENDENCIES
2475
2476 TL must have been initialized before this gets called.
2477
2478
2479 PARAMETERS
2480
2481 callbackRoutine: HDD Callback function.
2482 callbackContext : HDD userdata context.
2483
2484 RETURN VALUE
2485
2486 VOS_STATUS_SUCCESS/VOS_STATUS_FAILURE
2487
2488 SIDE EFFECTS
2489
2490============================================================================*/
2491
2492VOS_STATUS WLANTL_Finish_ULA( void (*callbackRoutine) (void *callbackContext),
2493 void *callbackContext);
2494
2495/*===============================================================================
2496 FUNCTION WLANTL_UpdateRssiBmps
2497
2498 DESCRIPTION This function updates the TL's RSSI (in BMPS mode)
2499
2500 DEPENDENCIES None
2501
2502 PARAMETERS
2503
2504 pvosGCtx VOS context VOS Global context
2505 staId Station ID Station ID
2506 rssi RSSI (BMPS mode) RSSI in BMPS mode
2507
2508 RETURN None
2509
2510 SIDE EFFECTS none
2511 ===============================================================================*/
2512
2513void WLANTL_UpdateRssiBmps(v_PVOID_t pvosGCtx, v_U8_t staId, v_S7_t rssi);
2514
2515#endif /* #ifndef WLAN_QCT_WLANTL_H */