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