blob: 1e1efbda2598b65203535e46e2bb53fdffc1f184 [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,
Srinivasdaaec712012-12-12 15:59:44 -0800787 v_PVOID_t pUserCtxt,
788 v_S7_t avgRssi
Jeff Johnson295189b2012-06-20 16:38:30 -0700789);
790
Jeff Johnsone7245742012-09-05 17:12:55 -0700791typedef struct
792{
793 // Common for all types are requests
794 v_U16_t msgType; // message type is same as the request type
795 v_U16_t msgLen; // length of the entire request
796 v_U8_t sessionId; //sme Session Id
797 v_U8_t rssiNotification;
Srinivasdaaec712012-12-12 15:59:44 -0800798 v_U8_t avgRssi;
Jeff Johnsone7245742012-09-05 17:12:55 -0700799 v_PVOID_t tlCallback;
800 v_PVOID_t pAdapter;
801 v_PVOID_t pUserCtxt;
802} WLANTL_TlIndicationReq;
803
Jeff Johnson295189b2012-06-20 16:38:30 -0700804/*----------------------------------------------------------------------------
805 * Function Declarations and Documentation
806 * -------------------------------------------------------------------------*/
807
808/*==========================================================================
809
810 FUNCTION WLANTL_Open
811
812 DESCRIPTION
813 Called by HDD at driver initialization. TL will initialize all its
814 internal resources and will wait for the call to start to register
815 with the other modules.
816
817 DEPENDENCIES
818
819 PARAMETERS
820
821 IN
822 pvosGCtx: pointer to the global vos context; a handle to TL's
823 control block can be extracted from its context
824 pTLConfig: TL Configuration
825
826 RETURN VALUE
827 The result code associated with performing the operation
828
829 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
830 fault
831 VOS_STATUS_SUCCESS: Everything is good :)
832
833 SIDE EFFECTS
834
835============================================================================*/
836VOS_STATUS
837WLANTL_Open
838(
839 v_PVOID_t pvosGCtx,
840 WLANTL_ConfigInfoType* pTLConfig
841);
842
843/*==========================================================================
844
845 FUNCTION WLANTL_Start
846
847 DESCRIPTION
848 Called by HDD as part of the overall start procedure. TL will use this
849 call to register with BAL as a transport layer entity.
850
851 DEPENDENCIES
852
853 PARAMETERS
854
855 IN
856 pvosGCtx: pointer to the global vos context; a handle to TL's
857 control block can be extracted from its context
858
859 RETURN VALUE
860 The result code associated with performing the operation
861
862 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
863 fault
864 VOS_STATUS_SUCCESS: Everything is good :)
865
866 Other codes can be returned as a result of a BAL failure; see BAL API
867 for more info
868
869 SIDE EFFECTS
870
871============================================================================*/
872VOS_STATUS
873WLANTL_Start
874(
875 v_PVOID_t pvosGCtx
876);
877
878/*==========================================================================
879
880 FUNCTION WLANTL_Stop
881
882 DESCRIPTION
883 Called by HDD to stop operation in TL, before close. TL will suspend all
884 frame transfer operation and will wait for the close request to clean up
885 its resources.
886
887 DEPENDENCIES
888
889 PARAMETERS
890
891 IN
892 pvosGCtx: pointer to the global vos context; a handle to TL's
893 control block can be extracted from its context
894
895 RETURN VALUE
896 The result code associated with performing the operation
897
898 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
899 fault
900 VOS_STATUS_SUCCESS: Everything is good :)
901
902 SIDE EFFECTS
903
904============================================================================*/
905VOS_STATUS
906WLANTL_Stop
907(
908 v_PVOID_t pvosGCtx
909);
910
911/*==========================================================================
912
913 FUNCTION WLANTL_Close
914
915 DESCRIPTION
916 Called by HDD during general driver close procedure. TL will clean up
917 all the internal resources.
918
919 DEPENDENCIES
920
921 PARAMETERS
922
923 IN
924 pvosGCtx: pointer to the global vos context; a handle to TL's
925 control block can be extracted from its context
926
927 RETURN VALUE
928 The result code associated with performing the operation
929
930 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
931 fault
932 VOS_STATUS_SUCCESS: Everything is good :)
933
934 SIDE EFFECTS
935
936============================================================================*/
937VOS_STATUS
938WLANTL_Close
939(
940 v_PVOID_t pvosGCtx
941);
942
943
944/*----------------------------------------------------------------------------
945 INTERACTION WITH HDD
946 ---------------------------------------------------------------------------*/
947/*==========================================================================
948
949 FUNCTION WLANTL_ConfigureSwFrameTXXlationForAll
950
951 DESCRIPTION
952 Function to disable/enable frame translation for all association stations.
953
954 DEPENDENCIES
955
956 PARAMETERS
957 IN
958 pvosGCtx: VOS context
959 EnableFrameXlation TRUE means enable SW translation for all stations.
960 .
961
962 RETURN VALUE
963
964 void.
965
966============================================================================*/
967void
968WLANTL_ConfigureSwFrameTXXlationForAll
969(
970 v_PVOID_t pvosGCtx,
971 v_BOOL_t enableFrameXlation
972);
973
974/*===========================================================================
975
976 FUNCTION WLANTL_RegisterSTAClient
977
978 DESCRIPTION
979
980 This function is used by HDD to register as a client for data services
981 with TL. HDD will call this API for each new station that it adds,
982 thus having the flexibility of registering different callback for each
983 STA it services.
984
985 DEPENDENCIES
986
987 TL must have been initialized before this gets called.
988
989 Restriction:
990 Main thread will have higher priority that Tx and Rx threads thus
991 guaranteeing that a station will be added before any data can be
992 received for it. (This enables TL to be lock free)
993
994 PARAMETERS
995
996 pvosGCtx: pointer to the global vos context; a handle to TL's
997 control block can be extracted from its context
998 pfnStARx: function pointer to the receive packet handler from HDD
999 pfnSTATxComp: function pointer to the transmit complete confirmation
1000 handler from HDD
1001 pfnSTAFetchPkt: function pointer to the packet retrieval routine in HDD
1002 wSTADescType: STA Descriptor, contains information related to the
1003 new added STA
1004
1005 RETURN VALUE
1006
1007 The result code associated with performing the operation
1008
1009 VOS_STATUS_E_INVAL: Input parameters are invalid
1010 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1011 TL cb is NULL ; access would cause a page fault
1012 VOS_STATUS_E_EXISTS: Station was already registered
1013 VOS_STATUS_SUCCESS: Everything is good :)
1014
1015 SIDE EFFECTS
1016
1017============================================================================*/
1018VOS_STATUS
1019WLANTL_RegisterSTAClient
1020(
1021 v_PVOID_t pvosGCtx,
1022 WLANTL_STARxCBType pfnSTARx,
1023 WLANTL_TxCompCBType pfnSTATxComp,
1024 WLANTL_STAFetchPktCBType pfnSTAFetchPkt,
1025 WLAN_STADescType* wSTADescType ,
1026 v_S7_t rssi
1027);
1028
1029/*===========================================================================
1030
1031 FUNCTION WLANTL_ClearSTAClient
1032
1033 DESCRIPTION
1034
1035 HDD will call this API when it no longer needs data services for the
1036 particular station.
1037
1038 DEPENDENCIES
1039
1040 A station must have been registered before the clear registration is
1041 called.
1042
1043 PARAMETERS
1044
1045 pvosGCtx: pointer to the global vos context; a handle to TL's
1046 control block can be extracted from its context
1047 ucSTAId: identifier for the STA to be cleared
1048
1049 RETURN VALUE
1050
1051 The result code associated with performing the operation
1052
1053 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1054 TL cb is NULL ; access would cause a page fault
1055 VOS_STATUS_E_EXISTS: Station was not registered
1056 VOS_STATUS_SUCCESS: Everything is good :)
1057
1058 SIDE EFFECTS
1059
1060============================================================================*/
1061VOS_STATUS
1062WLANTL_ClearSTAClient
1063(
1064 v_PVOID_t pvosGCtx,
1065 v_U8_t ucSTAId
1066);
1067
1068/*===========================================================================
1069
1070 FUNCTION WLANTL_ChangeSTAState
1071
1072 DESCRIPTION
1073
1074 HDD will make this notification whenever a change occurs in the
1075 connectivity state of a particular STA.
1076
1077 DEPENDENCIES
1078
1079 A station must have been registered before the change state can be
1080 called.
1081
1082 RESTRICTION: A station is being notified as authenticated before the
1083 keys are installed in HW. This way if a frame is received
1084 before the keys are installed DPU will drop that frame.
1085
1086 Main thread has higher priority that Tx and Rx threads thus guaranteeing
1087 the following:
1088 - a station will be in assoc state in TL before TL receives any data
1089 for it
1090
1091 PARAMETERS
1092
1093 pvosGCtx: pointer to the global vos context; a handle to TL's
1094 control block can be extracted from its context
1095 ucSTAId: identifier for the STA that is pending transmission
1096 tlSTAState: the new state of the connection to the given station
1097
1098
1099 RETURN VALUE
1100
1101 The result code associated with performing the operation
1102
1103 VOS_STATUS_E_INVAL: Input parameters are invalid
1104 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1105 TL cb is NULL ; access would cause a page fault
1106 VOS_STATUS_E_EXISTS: Station was not registered
1107 VOS_STATUS_SUCCESS: Everything is good :)
1108
1109 SIDE EFFECTS
1110
1111============================================================================*/
1112VOS_STATUS
1113WLANTL_ChangeSTAState
1114(
1115 v_PVOID_t pvosGCtx,
1116 v_U8_t ucSTAId,
1117 WLANTL_STAStateType tlSTAState
1118);
1119
1120/*===========================================================================
1121
Madan Mohan Koyyalamudifc1d1fe2012-10-18 15:07:12 -07001122 FUNCTION WLANTL_GetSTAState
1123
1124 DESCRIPTION
1125
1126 Returns connectivity state of a particular STA.
1127
1128 DEPENDENCIES
1129
1130 A station must have been registered before its state can be retrieved.
1131
1132
1133 PARAMETERS
1134
1135 IN
1136 pvosGCtx: pointer to the global vos context; a handle to TL's
1137 control block can be extracted from its context
1138 ucSTAId: identifier of the station
1139
1140 OUT
1141 ptlSTAState: the current state of the connection to the given station
1142
1143
1144 RETURN VALUE
1145
1146 The result code associated with performing the operation
1147
1148 VOS_STATUS_E_INVAL: Input parameters are invalid
1149 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1150 TL cb is NULL ; access would cause a page fault
1151 VOS_STATUS_E_EXISTS: Station was not registered
1152 VOS_STATUS_SUCCESS: Everything is good :)
1153
1154 SIDE EFFECTS
1155
1156============================================================================*/
1157VOS_STATUS
1158WLANTL_GetSTAState
1159(
1160 v_PVOID_t pvosGCtx,
1161 v_U8_t ucSTAId,
1162 WLANTL_STAStateType *ptlSTAState
1163);
1164
1165/*===========================================================================
1166
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 FUNCTION WLANTL_STAPktPending
1168
1169 DESCRIPTION
1170
1171 HDD will call this API when a packet is pending transmission in its
1172 queues.
1173
1174 DEPENDENCIES
1175
1176 A station must have been registered before the packet pending
1177 notification can be sent.
1178
1179 RESTRICTION: TL will not count packets for pending notification.
1180 HDD is expected to send the notification only when
1181 non-empty event gets triggered. Worst case scenario
1182 is that TL might end up making a call when Hdds
1183 queues are actually empty.
1184
1185 PARAMETERS
1186
1187 pvosGCtx: pointer to the global vos context; a handle to TL's
1188 control block can be extracted from its context
1189 ucSTAId: identifier for the STA that is pending transmission
1190 ucAC: access category of the non-empty queue
1191
1192 RETURN VALUE
1193
1194 The result code associated with performing the operation
1195
1196 VOS_STATUS_E_INVAL: Input parameters are invalid
1197 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1198 to TL cb is NULL ; access would cause a page fault
1199 VOS_STATUS_E_EXISTS: Station was not registered
1200 VOS_STATUS_SUCCESS: Everything is good :)
1201
1202 SIDE EFFECTS
1203
1204============================================================================*/
1205VOS_STATUS
1206WLANTL_STAPktPending
1207(
1208 v_PVOID_t pvosGCtx,
1209 v_U8_t ucSTAId,
1210 WLANTL_ACEnumType ucAc
1211);
1212
1213/*==========================================================================
1214
1215 FUNCTION WLANTL_SetSTAPriority
1216
1217 DESCRIPTION
1218
1219 TL exposes this API to allow upper layers a rough control over the
1220 priority of transmission for a given station when supporting multiple
1221 connections.
1222
1223 DEPENDENCIES
1224
1225 A station must have been registered before the change in priority can be
1226 called.
1227
1228 PARAMETERS
1229
1230 pvosGCtx: pointer to the global vos context; a handle to TL's
1231 control block can be extracted from its context
1232 ucSTAId: identifier for the STA that has to change priority
1233
1234 RETURN VALUE
1235
1236 The result code associated with performing the operation
1237
1238 VOS_STATUS_E_INVAL: Input parameters are invalid
1239 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1240 to TL cb is NULL ; access would cause a page fault
1241 VOS_STATUS_E_EXISTS: Station was not registered
1242 VOS_STATUS_SUCCESS: Everything is good :)
1243
1244 SIDE EFFECTS
1245
1246============================================================================*/
1247VOS_STATUS
1248WLANTL_SetSTAPriority
1249(
1250 v_PVOID_t pvosGCtx,
1251 v_U8_t ucSTAId,
1252 WLANTL_STAPriorityType tlSTAPri
1253);
1254
1255/*----------------------------------------------------------------------------
1256 INTERACTION WITH BAP
1257 ---------------------------------------------------------------------------*/
1258
1259/*==========================================================================
1260
1261 FUNCTION WLANTL_RegisterBAPClient
1262
1263 DESCRIPTION
1264 Called by SME to register itself as client for non-data BT-AMP packets.
1265
1266 DEPENDENCIES
1267 TL must be initialized before this function can be called.
1268
1269 PARAMETERS
1270
1271 IN
1272 pvosGCtx: pointer to the global vos context; a handle to TL's
1273 or SME's control block can be extracted from its context
1274 pfnTlBAPRxFrm: pointer to the receive processing routine for non-data
1275 BT-AMP packets
1276 pfnFlushOpCompleteCb:
1277 pointer to the function that will inform BAP that the
1278 flush operation is complete.
1279
1280 RETURN VALUE
1281
1282 The result code associated with performing the operation
1283
1284 VOS_STATUS_E_INVAL: Input parameters are invalid
1285 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1286 to TL cb is NULL ; access would cause a page fault
1287 VOS_STATUS_E_EXISTS: BAL client was already registered
1288 VOS_STATUS_SUCCESS: Everything is good :)
1289
1290 SIDE EFFECTS
1291
1292============================================================================*/
1293VOS_STATUS
1294WLANTL_RegisterBAPClient
1295(
1296 v_PVOID_t pvosGCtx,
1297 WLANTL_BAPRxCBType pfnTlBAPRx,
1298 WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb
1299);
1300
1301
1302/*==========================================================================
1303
1304 FUNCTION WLANTL_TxBAPFrm
1305
1306 DESCRIPTION
1307 BAP calls this when it wants to send a frame to the module
1308
1309 DEPENDENCIES
1310 BAP must be registered with TL before this function can be called.
1311
1312 RESTRICTION: BAP CANNOT push any packets to TL until it did not receive
1313 a tx complete from the previous packet, that means BAP
1314 sends one packet, wait for tx complete and then
1315 sends another one
1316
1317 If BAP sends another packet before TL manages to process the
1318 previously sent packet call will end in failure
1319
1320 PARAMETERS
1321
1322 IN
1323 pvosGCtx: pointer to the global vos context; a handle to TL's
1324 or BAP's control block can be extracted from its context
1325 vosDataBuff: pointer to the vOSS buffer containing the packet to be
1326 transmitted
1327 pMetaInfo: meta information about the packet
1328 pfnTlBAPTxComp: pointer to a transmit complete routine for notifying
1329 the result of the operation over the bus
1330
1331 RETURN VALUE
1332 The result code associated with performing the operation
1333
1334 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1335 page fault
1336 VOS_STATUS_E_EXISTS: BAL client was not yet registered
1337 VOS_STATUS_E_BUSY: The previous BT-AMP packet was not yet transmitted
1338 VOS_STATUS_SUCCESS: Everything is good :)
1339
1340 Other failure messages may be returned from the BD header handling
1341 routines, please check apropriate API for more info.
1342
1343 SIDE EFFECTS
1344
1345============================================================================*/
1346VOS_STATUS
1347WLANTL_TxBAPFrm
1348(
1349 v_PVOID_t pvosGCtx,
1350 vos_pkt_t* vosDataBuff,
1351 WLANTL_MetaInfoType* pMetaInfo,
1352 WLANTL_TxCompCBType pfnTlBAPTxComp
1353);
1354
1355
1356/*----------------------------------------------------------------------------
1357 INTERACTION WITH SME
1358 ---------------------------------------------------------------------------*/
1359
1360/*==========================================================================
1361
1362 FUNCTION WLANTL_GetRssi
1363
1364 DESCRIPTION
1365 TL will extract the RSSI information from every data packet from the
1366 ongoing traffic and will store it. It will provide the result to SME
1367 upon request.
1368
1369 DEPENDENCIES
1370
1371 WARNING: the read and write of this value will not be protected
1372 by locks, therefore the information obtained after a read
1373 might not always be consistent.
1374
1375 PARAMETERS
1376
1377 IN
1378 pvosGCtx: pointer to the global vos context; a handle to TL's
1379 or SME's control block can be extracted from its context
1380 ucSTAId: station identifier for the requested value
1381
1382 OUT
1383 puRssi: the average value of the RSSI
1384
1385
1386 RETURN VALUE
1387 The result code associated with performing the operation
1388
1389 VOS_STATUS_E_INVAL: Input parameters are invalid
1390 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1391 to TL cb is NULL ; access would cause a page fault
1392 VOS_STATUS_E_EXISTS: STA was not yet registered
1393 VOS_STATUS_SUCCESS: Everything is good :)
1394
1395 SIDE EFFECTS
1396
1397============================================================================*/
1398VOS_STATUS
1399WLANTL_GetRssi
1400(
1401 v_PVOID_t pvosGCtx,
1402 v_U8_t ucSTAId,
1403 v_S7_t* puRssi
1404);
1405
1406/*==========================================================================
1407
1408 FUNCTION WLANTL_GetLinkQuality
1409
1410 DESCRIPTION
1411 TL will extract the LinkQuality information from every data packet from the
1412 ongoing traffic and will store it. It will provide the result to SME
1413 upon request.
1414
1415 DEPENDENCIES
1416
1417 WARNING: the read and write of this value will not be protected
1418 by locks, therefore the information obtained after a read
1419 might not always be consistent.
1420
1421 PARAMETERS
1422
1423 IN
1424 pvosGCtx: pointer to the global vos context; a handle to TL's
1425 or SME's control block can be extracted from its context
1426 ucSTAId: station identifier for the requested value
1427
1428 OUT
1429 puLinkQuality: the average value of the LinkQuality
1430
1431
1432 RETURN VALUE
1433 The result code associated with performing the operation
1434
1435 VOS_STATUS_E_INVAL: Input parameters are invalid
1436 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1437 to TL cb is NULL ; access would cause a page fault
1438 VOS_STATUS_E_EXISTS: STA was not yet registered
1439 VOS_STATUS_SUCCESS: Everything is good :)
1440
1441 SIDE EFFECTS
1442
1443============================================================================*/
1444VOS_STATUS
1445WLANTL_GetLinkQuality
1446(
1447 v_PVOID_t pvosGCtx,
1448 v_U8_t ucSTAId,
1449 v_U32_t* puLinkQuality
1450);
1451
1452/*==========================================================================
1453
1454 FUNCTION WLANTL_FlushStaTID
1455
1456 DESCRIPTION
1457 TL provides this API as an interface to SME (BAP) layer. TL inturn posts a
1458 message to HAL. This API is called by the SME inorder to perform a flush
1459 operation.
1460
1461 DEPENDENCIES
1462
1463 PARAMETERS
1464
1465 IN
1466 pvosGCtx: pointer to the global vos context; a handle to TL's
1467 or SME's control block can be extracted from its context
1468 ucSTAId: station identifier for the requested value
1469 ucTid: Tspec ID for the new BA session
1470
1471 OUT
1472 The response for this post is received in the main thread, via a response
1473 message from HAL to TL.
1474
1475 RETURN VALUE
1476 VOS_STATUS_SUCCESS: Everything is good :)
1477
1478 SIDE EFFECTS
1479============================================================================*/
1480VOS_STATUS
1481WLANTL_FlushStaTID
1482(
1483 v_PVOID_t pvosGCtx,
1484 v_U8_t ucSTAId,
1485 v_U8_t ucTid
1486);
1487
1488/*----------------------------------------------------------------------------
1489 INTERACTION WITH PE
1490 ---------------------------------------------------------------------------*/
1491
1492/*==========================================================================
1493
1494 FUNCTION WLANTL_RegisterMgmtFrmClient
1495
1496 DESCRIPTION
1497 Called by PE to register as a client for management frames delivery.
1498
1499 DEPENDENCIES
1500 TL must be initialized before this API can be called.
1501
1502 PARAMETERS
1503
1504 IN
1505 pvosGCtx: pointer to the global vos context; a handle to
1506 TL's control block can be extracted from its context
1507 pfnTlMgmtFrmRx: pointer to the receive processing routine for
1508 management frames
1509
1510 RETURN VALUE
1511 The result code associated with performing the operation
1512
1513 VOS_STATUS_E_INVAL: Input parameters are invalid
1514 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1515 page fault
1516 VOS_STATUS_E_EXISTS: Mgmt Frame client was already registered
1517 VOS_STATUS_SUCCESS: Everything is good :)
1518
1519 SIDE EFFECTS
1520
1521============================================================================*/
1522VOS_STATUS
1523WLANTL_RegisterMgmtFrmClient
1524(
1525 v_PVOID_t pvosGCtx,
1526 WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx
1527);
1528
1529/*==========================================================================
1530
1531 FUNCTION WLANTL_DeRegisterMgmtFrmClient
1532
1533 DESCRIPTION
1534 Called by PE to deregister as a client for management frames delivery.
1535
1536 DEPENDENCIES
1537 TL must be initialized before this API can be called.
1538
1539 PARAMETERS
1540
1541 IN
1542 pvosGCtx: pointer to the global vos context; a handle to
1543 TL's control block can be extracted from its context
1544 RETURN VALUE
1545 The result code associated with performing the operation
1546
1547 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1548 page fault
1549 VOS_STATUS_E_EXISTS: Mgmt Frame client was never registered
1550 VOS_STATUS_SUCCESS: Everything is good :)
1551
1552 SIDE EFFECTS
1553
1554============================================================================*/
1555VOS_STATUS
1556WLANTL_DeRegisterMgmtFrmClient
1557(
1558 v_PVOID_t pvosGCtx
1559);
1560
1561/*==========================================================================
1562
1563 FUNCTION WLANTL_TxMgmtFrm
1564
1565 DESCRIPTION
1566 Called by PE when it want to send out a management frame.
1567 HAL will also use this API for the few frames it sends out, they are not
1568 management frames howevere it is accepted that an exception will be
1569 allowed ONLY for the usage of HAL.
1570 Generic data frames SHOULD NOT travel through this function.
1571
1572 DEPENDENCIES
1573 TL must be initialized before this API can be called.
1574
1575 RESTRICTION: If PE sends another packet before TL manages to process the
1576 previously sent packet call will end in failure
1577
1578 Frames comming through here must be 802.11 frames, frame
1579 translation in UMA will be automatically disabled.
1580
1581 PARAMETERS
1582
1583 IN
1584 pvosGCtx: pointer to the global vos context;a handle to TL's
1585 control block can be extracted from its context
1586 vosFrmBuf: pointer to a vOSS buffer containing the management
1587 frame to be transmitted
1588 usFrmLen: the length of the frame to be transmitted; information
1589 is already included in the vOSS buffer
1590 wFrmType: the type of the frame being transmitted
1591 tid: tid used to transmit this frame
1592 pfnCompTxFunc: function pointer to the transmit complete routine
1593 pvBDHeader: pointer to the BD header, if NULL it means it was not
1594 yet constructed and it lies within TL's responsibility
1595 to do so; if not NULL it is expected that it was
1596 already packed inside the vos packet
1597 ucAckResponse: flag notifying it an interrupt is needed for the
1598 acknowledgement received when the frame is sent out
1599 the air and ; the interrupt will be processed by HAL,
1600 only one such frame can be pending in the system at
1601 one time.
1602
1603
1604 RETURN VALUE
1605 The result code associated with performing the operation
1606
1607 VOS_STATUS_E_INVAL: Input parameters are invalid
1608 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1609 page fault
1610 VOS_STATUS_E_EXISTS: Mgmt Frame client was not yet registered
1611 VOS_STATUS_E_BUSY: The previous Mgmt packet was not yet transmitted
1612 VOS_STATUS_SUCCESS: Everything is good :)
1613
1614 Other failure messages may be returned from the BD header handling
1615 routines, please check apropriate API for more info.
1616
1617 SIDE EFFECTS
1618
1619============================================================================*/
1620VOS_STATUS
1621WLANTL_TxMgmtFrm
1622(
1623 v_PVOID_t pvosGCtx,
1624 vos_pkt_t* vosFrmBuf,
1625 v_U16_t usFrmLen,
1626 v_U8_t ucFrmType,
1627 v_U8_t tid,
1628 WLANTL_TxCompCBType pfnCompTxFunc,
1629 v_PVOID_t voosBDHeader,
1630 v_U8_t ucAckResponse
1631);
1632
1633
1634/*----------------------------------------------------------------------------
1635 INTERACTION WITH HAL
1636 ---------------------------------------------------------------------------*/
1637
1638/*==========================================================================
1639
1640 FUNCTION WLANTL_ResetNotification
1641
1642 DESCRIPTION
1643 HAL notifies TL when the module is being reset.
1644 Currently not used.
1645
1646 DEPENDENCIES
1647
1648 PARAMETERS
1649
1650 IN
1651 pvosGCtx: pointer to the global vos context; a handle to TL's
1652 control block can be extracted from its context
1653
1654
1655 RETURN VALUE
1656 The result code associated with performing the operation
1657
1658 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1659 page fault
1660 VOS_STATUS_SUCCESS: Everything is good :)
1661
1662 SIDE EFFECTS
1663
1664============================================================================*/
1665VOS_STATUS
1666WLANTL_ResetNotification
1667(
1668 v_PVOID_t pvosGCtx
1669);
1670
1671/*==========================================================================
1672
1673 FUNCTION WLANTL_SuspendDataTx
1674
1675 DESCRIPTION
1676 HAL calls this API when it wishes to suspend transmission for a
1677 particular STA.
1678
1679 DEPENDENCIES
1680 The STA for which the request is made must be first registered with
1681 TL by HDD.
1682
1683 RESTRICTION: In case of a suspend, the flag write and read will not be
1684 locked: worst case scenario one more packet can get
1685 through before the flag gets updated (we can make this
1686 write atomic as well to guarantee consistency)
1687
1688 PARAMETERS
1689
1690 IN
1691 pvosGCtx: pointer to the global vos context; a handle to TL's
1692 control block can be extracted from its context
1693 pucSTAId: identifier of the station for which the request is made;
1694 a value of NULL assumes suspend on all active station
1695 pfnSuspendTxCB: pointer to the suspend result notification in case the
1696 call is asynchronous
1697
1698
1699 RETURN VALUE
1700 The result code associated with performing the operation
1701
1702 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1703 to TL cb is NULL ; access would cause a page fault
1704 VOS_STATUS_E_EXISTS: Station was not registered
1705 VOS_STATUS_SUCCESS: Everything is good :)
1706
1707 SIDE EFFECTS
1708
1709============================================================================*/
1710VOS_STATUS
1711WLANTL_SuspendDataTx
1712(
1713 v_PVOID_t pvosGCtx,
1714 v_U8_t* ucSTAId,
1715 WLANTL_SuspendCBType pfnSuspendTx
1716);
1717
1718/*==========================================================================
1719
1720 FUNCTION WLANTL_ResumeDataTx
1721
1722 DESCRIPTION
1723 Called by HAL to resume data transmission for a given STA.
1724
1725 WARNING: If a station was individually suspended a global resume will
1726 not resume that station
1727
1728 DEPENDENCIES
1729
1730 PARAMETERS
1731
1732 IN
1733 pvosGCtx: pointer to the global vos context; a handle to TL's
1734 control block can be extracted from its context
1735 pucSTAId: identifier of the station which is being resumed; NULL
1736 translates into global resume
1737
1738 RETURN VALUE
1739 The result code associated with performing the operation
1740
1741 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1742 to TL cb is NULL ; access would cause a page fault
1743 VOS_STATUS_E_EXISTS: Station was not registered
1744 VOS_STATUS_SUCCESS: Everything is good :)
1745
1746 SIDE EFFECTS
1747
1748============================================================================*/
1749VOS_STATUS
1750WLANTL_ResumeDataTx
1751(
1752 v_PVOID_t pvosGCtx,
1753 v_U8_t* pucSTAId
1754);
1755
1756
1757/*----------------------------------------------------------------------------
1758 CLIENT INDEPENDENT INTERFACE
1759 ---------------------------------------------------------------------------*/
1760
1761/*==========================================================================
1762
1763 FUNCTION WLANTL_GetTxPktCount
1764
1765 DESCRIPTION
1766 TL will provide the number of transmitted packets counted per
1767 STA per TID.
1768
1769 DEPENDENCIES
1770
1771 PARAMETERS
1772
1773 IN
1774 pvosGCtx: pointer to the global vos context; a handle to TL's
1775 control block can be extracted from its context
1776 ucSTAId: identifier of the station
1777 ucTid: identifier of the tspec
1778
1779 OUT
1780 puTxPktCount: the number of packets tx packet for this STA and TID
1781
1782 RETURN VALUE
1783 The result code associated with performing the operation
1784
1785 VOS_STATUS_E_INVAL: Input parameters are invalid
1786 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1787 to TL cb is NULL ; access would cause a page fault
1788 VOS_STATUS_E_EXISTS: Station was not registered
1789 VOS_STATUS_SUCCESS: Everything is good :)
1790
1791 SIDE EFFECTS
1792
1793============================================================================*/
1794VOS_STATUS
1795WLANTL_GetTxPktCount
1796(
1797 v_PVOID_t pvosGCtx,
1798 v_U8_t ucSTAId,
1799 v_U8_t ucTid,
1800 v_U32_t* puTxPktCount
1801);
1802
1803/*==========================================================================
1804
1805 FUNCTION WLANTL_GetRxPktCount
1806
1807 DESCRIPTION
1808 TL will provide the number of received packets counted per
1809 STA per TID.
1810
1811 DEPENDENCIES
1812
1813 PARAMETERS
1814
1815 IN
1816 pvosGCtx: pointer to the global vos context; a handle to TL's
1817 control block can be extracted from its context
1818 ucSTAId: identifier of the station
1819 ucTid: identifier of the tspec
1820
1821 OUT
1822 puTxPktCount: the number of packets rx packet for this STA and TID
1823
1824 RETURN VALUE
1825 The result code associated with performing the operation
1826
1827 VOS_STATUS_E_INVAL: Input parameters are invalid
1828 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1829 to TL cb is NULL ; access would cause a page fault
1830 VOS_STATUS_E_EXISTS: Station was not registered
1831 VOS_STATUS_SUCCESS: Everything is good :)
1832
1833 SIDE EFFECTS
1834
1835============================================================================*/
1836VOS_STATUS
1837WLANTL_GetRxPktCount
1838(
1839 v_PVOID_t pvosGCtx,
1840 v_U8_t ucSTAId,
1841 v_U8_t ucTid,
1842 v_U32_t* puRxPktCount
1843);
1844
1845/*==========================================================================
1846 VOSS SCHEDULER INTERACTION
1847 ==========================================================================*/
1848
1849/*==========================================================================
1850 FUNCTION WLANTL_McProcessMsg
1851
1852 DESCRIPTION
1853 Called by VOSS when a message was serialized for TL through the
1854 main thread/task.
1855
1856 DEPENDENCIES
1857 The TL must be initialized before this function can be called.
1858
1859 PARAMETERS
1860
1861 IN
1862 pvosGCtx: pointer to the global vos context; a handle to TL's
1863 control block can be extracted from its context
1864 message: type and content of the message
1865
1866
1867 RETURN VALUE
1868 The result code associated with performing the operation
1869
1870 VOS_STATUS_E_INVAL: invalid input parameters
1871 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1872 page fault
1873 VOS_STATUS_SUCCESS: Everything is good :)
1874
1875 SIDE EFFECTS
1876
1877============================================================================*/
1878VOS_STATUS
1879WLANTL_McProcessMsg
1880(
1881 v_PVOID_t pvosGCtx,
1882 vos_msg_t* message
1883);
1884
1885/*==========================================================================
1886 FUNCTION WLANTL_McFreeMsg
1887
1888 DESCRIPTION
1889 Called by VOSS to free a given TL message on the Main thread when there
1890 are messages pending in the queue when the whole system is been reset.
1891 For now, TL does not allocate any body so this function shout translate
1892 into a NOOP
1893
1894 DEPENDENCIES
1895 The TL must be initialized before this function can be called.
1896
1897 PARAMETERS
1898
1899 IN
1900 pvosGCtx: pointer to the global vos context; a handle to TL's
1901 control block can be extracted from its context
1902 message: type and content of the message
1903
1904
1905 RETURN VALUE
1906 The result code associated with performing the operation
1907
1908 VOS_STATUS_SUCCESS: Everything is good :)
1909
1910 SIDE EFFECTS
1911
1912============================================================================*/
1913VOS_STATUS
1914WLANTL_McFreeMsg
1915(
1916 v_PVOID_t pvosGCtx,
1917 vos_msg_t* message
1918);
1919
1920/*==========================================================================
1921 FUNCTION WLANTL_TxProcessMsg
1922
1923 DESCRIPTION
1924 Called by VOSS when a message was serialized for TL through the
1925 tx thread/task.
1926
1927 DEPENDENCIES
1928 The TL must be initialized before this function can be called.
1929
1930 PARAMETERS
1931
1932 IN
1933 pvosGCtx: pointer to the global vos context; a handle to TL's
1934 control block can be extracted from its context
1935 message: type and content of the message
1936
1937
1938 RETURN VALUE
1939 The result code associated with performing the operation
1940
1941 VOS_STATUS_E_INVAL: invalid input parameters
1942 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1943 page fault
1944 VOS_STATUS_SUCCESS: Everything is good :)
1945
1946 Other values can be returned as a result of a function call, please check
1947 corresponding API for more info.
1948 SIDE EFFECTS
1949
1950============================================================================*/
1951VOS_STATUS
1952WLANTL_TxProcessMsg
1953(
1954 v_PVOID_t pvosGCtx,
1955 vos_msg_t* message
1956);
1957
1958/*==========================================================================
1959 FUNCTION WLANTL_McFreeMsg
1960
1961 DESCRIPTION
1962 Called by VOSS to free a given TL message on the Main thread when there
1963 are messages pending in the queue when the whole system is been reset.
1964 For now, TL does not allocate any body so this function shout translate
1965 into a NOOP
1966
1967 DEPENDENCIES
1968 The TL must be initialized before this function can be called.
1969
1970 PARAMETERS
1971
1972 IN
1973 pvosGCtx: pointer to the global vos context; a handle to TL's
1974 control block can be extracted from its context
1975 message: type and content of the message
1976
1977
1978 RETURN VALUE
1979 The result code associated with performing the operation
1980
1981 VOS_STATUS_SUCCESS: Everything is good :)
1982
1983 SIDE EFFECTS
1984
1985============================================================================*/
1986VOS_STATUS
1987WLANTL_TxFreeMsg
1988(
1989 v_PVOID_t pvosGCtx,
1990 vos_msg_t* message
1991);
1992
1993
1994/*==========================================================================
1995 FUNCTION WLANTL_EnableUAPSDForAC
1996
1997 DESCRIPTION
1998 Called by HDD to enable UAPSD in TL. TL is in charge for sending trigger
1999 frames.
2000
2001 DEPENDENCIES
2002 The TL must be initialized before this function can be called.
2003
2004 PARAMETERS
2005
2006 IN
2007 pvosGCtx: pointer to the global vos context; a handle to TL's
2008 control block can be extracted from its context
2009 ucSTAId: station Id
2010 ucACId: AC for which U-APSD is being enabled
2011 ucTid TSpec Id
2012 uServiceInt: service interval used by TL to send trigger frames
2013 uSuspendInt: suspend interval used by TL to determine that an
2014 app is idle and should start sending trigg frms less often
2015 wTSDir: direction of TSpec
2016
2017 RETURN VALUE
2018 The result code associated with performing the operation
2019
2020 VOS_STATUS_SUCCESS: Everything is good :)
2021
2022 SIDE EFFECTS
2023
2024============================================================================*/
2025VOS_STATUS
2026WLANTL_EnableUAPSDForAC
2027(
2028 v_PVOID_t pvosGCtx,
2029 v_U8_t ucSTAId,
2030 WLANTL_ACEnumType ucACId,
2031 v_U8_t ucTid,
2032 v_U8_t ucUP,
2033 v_U32_t uServiceInt,
2034 v_U32_t uSuspendInt,
2035 WLANTL_TSDirType wTSDir
2036);
2037
2038
2039/*==========================================================================
2040 FUNCTION WLANTL_DisableUAPSDForAC
2041
2042 DESCRIPTION
2043 Called by HDD to disable UAPSD in TL. TL will stop sending trigger
2044 frames.
2045
2046 DEPENDENCIES
2047 The TL must be initialized before this function can be called.
2048
2049 PARAMETERS
2050
2051 IN
2052 pvosGCtx: pointer to the global vos context; a handle to TL's
2053 control block can be extracted from its context
2054 ucSTAId: station Id
2055 ucACId: AC for which U-APSD is being enabled
2056
2057
2058 RETURN VALUE
2059 The result code associated with performing the operation
2060
2061 VOS_STATUS_SUCCESS: Everything is good :)
2062
2063 SIDE EFFECTS
2064
2065============================================================================*/
2066VOS_STATUS
2067WLANTL_DisableUAPSDForAC
2068(
2069 v_PVOID_t pvosGCtx,
2070 v_U8_t ucSTAId,
2071 WLANTL_ACEnumType ucACId
2072);
2073
2074#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
2075/*==========================================================================
2076 FUNCTION WLANTL_RegRSSIIndicationCB
2077
2078 DESCRIPTION Registration function to get notification if RSSI cross
2079 threshold.
2080 Client should register threshold, direction, and notification
2081 callback function pointer
2082
2083 DEPENDENCIES NONE
2084
2085 PARAMETERS in pAdapter - Global handle
2086 in rssiValue - RSSI threshold value
2087 in triggerEvent - Cross direction should be notified
2088 UP, DOWN, and CROSS
2089 in crossCBFunction - Notification CB Function
2090 in usrCtxt - user context
2091
2092 RETURN VALUE VOS_STATUS
2093
2094 SIDE EFFECTS NONE
2095
2096============================================================================*/
2097VOS_STATUS WLANTL_RegRSSIIndicationCB
2098(
2099 v_PVOID_t pAdapter,
2100 v_S7_t rssiValue,
2101 v_U8_t triggerEvent,
2102 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2103 VOS_MODULE_ID moduleID,
2104 v_PVOID_t usrCtxt
2105);
2106
2107/*==========================================================================
2108 FUNCTION WLANTL_DeregRSSIIndicationCB
2109
2110 DESCRIPTION Remove specific threshold from list
2111
2112 DEPENDENCIES NONE
2113
2114 PARAMETERS in pAdapter - Global handle
2115 in rssiValue - RSSI threshold value
2116 in triggerEvent - Cross direction should be notified
2117 UP, DOWN, and CROSS
2118
2119 RETURN VALUE VOS_STATUS
2120
2121 SIDE EFFECTS NONE
2122
2123============================================================================*/
2124VOS_STATUS WLANTL_DeregRSSIIndicationCB
2125(
2126 v_PVOID_t pAdapter,
2127 v_S7_t rssiValue,
2128 v_U8_t triggerEvent,
2129 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2130 VOS_MODULE_ID moduleID
2131);
2132
2133/*==========================================================================
2134
2135 FUNCTION
2136
2137 DESCRIPTION
2138
2139 PARAMETERS
2140
2141 RETURN VALUE
2142
2143============================================================================*/
2144VOS_STATUS WLANTL_BMPSRSSIRegionChangedNotification
2145(
2146 v_PVOID_t pAdapter,
2147 tpSirRSSINotification pRSSINotification
2148);
2149
2150/*==========================================================================
2151 FUNCTION WLANTL_SetAlpha
2152
2153 DESCRIPTION ALPLA is weight value to calculate AVG RSSI
2154 avgRSSI = (ALPHA * historyRSSI) + ((10 - ALPHA) * newRSSI)
2155 avgRSSI has (ALPHA * 10)% of history RSSI weight and
2156 (10 - ALPHA)% of newRSSI weight
2157 This portion is dynamically configurable.
2158 Default is ?
2159
2160 DEPENDENCIES NONE
2161
2162 PARAMETERS in pAdapter - Global handle
2163 in valueAlpah - ALPHA
2164
2165 RETURN VALUE VOS_STATUS
2166
2167 SIDE EFFECTS NONE
2168
2169============================================================================*/
2170VOS_STATUS WLANTL_SetAlpha
2171(
2172 v_PVOID_t pAdapter,
2173 v_U8_t valueAlpha
2174);
2175
2176/*==========================================================================
2177 FUNCTION WLANTL_RegGetTrafficStatus
2178
2179 DESCRIPTION Registration function for traffic status monitoring
2180 During measure period count data frames.
2181 If frame count is larger then IDLE threshold set as traffic ON
2182 or OFF.
2183 And traffic status is changed send report to client with
2184 registered callback function
2185
2186 DEPENDENCIES NONE
2187
2188 PARAMETERS in pAdapter - Global handle
2189 in idleThreshold - Traffic on or off threshold
2190 in measurePeriod - Traffic state check period
2191 in trfficStatusCB - traffic status changed notification
2192 CB function
2193 in usrCtxt - user context
2194
2195 RETURN VALUE VOS_STATUS
2196
2197 SIDE EFFECTS NONE
2198
2199============================================================================*/
2200VOS_STATUS WLANTL_RegGetTrafficStatus
2201(
2202 v_PVOID_t pAdapter,
2203 v_U32_t idleThreshold,
2204 v_U32_t measurePeriod,
2205 WLANTL_TrafficStatusChangedCBType trfficStatusCB,
2206 v_PVOID_t usrCtxt
2207);
2208#endif
2209/*==========================================================================
2210 FUNCTION WLANTL_GetStatistics
2211
2212 DESCRIPTION Get traffic statistics for identified station
2213
2214 DEPENDENCIES NONE
2215
2216 PARAMETERS in pAdapter - Global handle
2217 in statType - specific statistics field to reset
2218 out statBuffer - traffic statistics buffer
2219
2220 RETURN VALUE VOS_STATUS
2221
2222 SIDE EFFECTS NONE
2223
2224============================================================================*/
2225VOS_STATUS WLANTL_GetStatistics
2226(
2227 v_PVOID_t pAdapter,
2228 WLANTL_TRANSFER_STA_TYPE *statBuffer,
2229 v_U8_t STAid
2230);
2231
2232/*==========================================================================
2233 FUNCTION WLANTL_ResetStatistics
2234
2235 DESCRIPTION Reset statistics structure for identified station ID
2236 Reset means set values as 0
2237
2238 DEPENDENCIES NONE
2239
2240 PARAMETERS in pAdapter - Global handle
2241 in statType - specific statistics field to reset
2242
2243 RETURN VALUE VOS_STATUS
2244
2245 SIDE EFFECTS NONE
2246
2247============================================================================*/
2248VOS_STATUS WLANTL_ResetStatistics
2249(
2250 v_PVOID_t pAdapter,
2251 v_U8_t STAid
2252);
2253
2254/*==========================================================================
2255 FUNCTION WLANTL_GetSpecStatistic
2256
2257 DESCRIPTION Get specific field within statistics structure for
2258 identified station ID
2259
2260 DEPENDENCIES NONE
2261
2262 PARAMETERS in pAdapter - Global handle
2263 in statType - specific statistics field to reset
2264 in STAid - Station ID
2265 out buffer - Statistic value
2266
2267 RETURN VALUE VOS_STATUS
2268
2269 SIDE EFFECTS NONE
2270
2271============================================================================*/
2272VOS_STATUS WLANTL_GetSpecStatistic
2273(
2274 v_PVOID_t pAdapter,
2275 WLANTL_TRANSFER_STATIC_TYPE statType,
2276 v_U32_t *buffer,
2277 v_U8_t STAid
2278);
2279
2280/*==========================================================================
2281 FUNCTION WLANTL_ResetSpecStatistic
2282
2283 DESCRIPTION Reset specific field within statistics structure for
2284 identified station ID
2285 Reset means set as 0
2286
2287 DEPENDENCIES NONE
2288
2289 PARAMETERS in pAdapter - Global handle
2290 in statType - specific statistics field to reset
2291 in STAid - Station ID
2292
2293 RETURN VALUE VOS_STATUS
2294
2295 SIDE EFFECTS NONE
2296
2297============================================================================*/
2298VOS_STATUS WLANTL_ResetSpecStatistic
2299(
2300 v_PVOID_t pAdapter,
2301 WLANTL_TRANSFER_STATIC_TYPE statType,
2302 v_U8_t STAid
2303);
2304#ifdef ANI_CHIPSET_VOLANS
2305/*===============================================================================
2306 FUNCTION WLANTL_IsReplayPacket
2307
2308 DESCRIPTION This function does replay check for valid stations
2309
2310 DEPENDENCIES Validity of replay check must be done before the function
2311 is called
2312
2313 PARAMETERS currentReplayCounter current replay counter taken from RX BD
2314 previousReplayCounter previous replay counter taken from TL CB
2315
2316 RETRUN VOS_TRUE packet is a replay packet
2317 VOS_FALSE packet is not a replay packet
2318
2319 SIDE EFFECTS none
2320 ===============================================================================*/
2321v_BOOL_t WLANTL_IsReplayPacket
2322(
2323 v_U64_t currentReplayCounter,
2324 v_U64_t previousReplayCounter
2325);
2326
2327/*===============================================================================
2328 FUNCTION WLANTL_GetReplayCounterFromRxBD
2329
2330 DESCRIPTION This function extracts 48-bit replay packet number from RX BD
2331
2332 DEPENDENCIES Validity of replay check must be done before the function
2333 is called
2334
2335 PARAMETERS pucRxHeader pointer to RX BD header
2336
2337 RETRUN v_U64_t Packet number extarcted from RX BD
2338
2339 SIDE EFFECTS none
2340 ===============================================================================*/
2341v_U64_t
2342WLANTL_GetReplayCounterFromRxBD
2343(
2344 v_U8_t *pucRxBDHeader
2345);
2346#endif /*End of #ifdef ANI_CHIPSET_VOLANS*/
2347
2348
2349
2350/*
2351 DESCRIPTION
2352 TL returns the weight currently maintained in TL.
2353 IN
2354 pvosGCtx: pointer to the global vos context; a handle to TL's
2355 or SME's control block can be extracted from its context
2356
2357 OUT
2358 pACWeights: Caller allocated memory for filling in weights
2359
2360 RETURN VALUE VOS_STATUS
2361*/
2362VOS_STATUS
2363WLANTL_GetACWeights
2364(
2365 v_PVOID_t pvosGCtx,
2366 v_U8_t* pACWeights
2367);
2368
2369
2370/*
2371 DESCRIPTION
2372 Change the weight currently maintained by 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 pACWeights: Caller allocated memory contain the weights to use
2377
2378
2379 RETURN VALUE VOS_STATUS
2380*/
2381VOS_STATUS
2382WLANTL_SetACWeights
2383(
2384 v_PVOID_t pvosGCtx,
2385 v_U8_t* pACWeights
2386);
2387
2388#ifdef WLAN_SOFTAP_FEATURE
2389/*==========================================================================
2390 FUNCTION WLANTL_GetSoftAPStatistics
2391
2392 DESCRIPTION Collect the cumulative statistics for all Softap stations
2393
2394 DEPENDENCIES NONE
2395
2396 PARAMETERS in pvosGCtx - Pointer to the global vos context
2397 bReset - If set TL statistics will be cleared after reading
2398 out statsSum - pointer to collected statistics
2399
2400 RETURN VALUE VOS_STATUS_SUCCESS : if the Statistics are successfully extracted
2401
2402 SIDE EFFECTS NONE
2403
2404============================================================================*/
2405VOS_STATUS WLANTL_GetSoftAPStatistics(v_PVOID_t pAdapter, WLANTL_TRANSFER_STA_TYPE *statsSum, v_BOOL_t bReset);
2406#endif
2407
2408#ifdef __cplusplus
2409 }
2410#endif
2411
2412
2413 /*===========================================================================
2414
2415 FUNCTION WLANTL_AssocFailed
2416
2417 DESCRIPTION
2418
2419 This function is used by PE to notify TL that cache needs to flushed
2420 when association is not successfully completed
2421
2422 Internally, TL post a message to TX_Thread to serialize the request to
2423 keep lock-free mechanism.
2424
2425
2426 DEPENDENCIES
2427
2428 TL must have been initialized before this gets called.
2429
2430
2431 PARAMETERS
2432
2433 ucSTAId: station id
2434
2435 RETURN VALUE
2436
2437 none
2438
2439 SIDE EFFECTS
2440 There may be race condition that PE call this API and send another association
2441 request immediately with same staId before TX_thread can process the message.
2442
2443 To avoid this, we might need PE to wait for TX_thread process the message,
2444 but this is not currently implemented.
2445
2446============================================================================*/
2447void WLANTL_AssocFailed(v_U8_t staId);
2448
2449
2450/*===============================================================================
2451 FUNCTION WLANTL_PostResNeeded
2452
2453 DESCRIPTION This function posts message to TL to reserve BD/PDU memory
2454
2455 DEPENDENCIES None
2456
2457 PARAMETERS pvosGCtx
2458
2459 RETURN None
2460
2461 SIDE EFFECTS none
2462 ===============================================================================*/
2463
2464void WLANTL_PostResNeeded(v_PVOID_t pvosGCtx);
2465
2466/*===========================================================================
2467
2468 FUNCTION WLANTL_Finish_ULA
2469
2470 DESCRIPTION
2471 This function is used by HDD to notify TL to finish Upper layer authentication
2472 incase the last EAPOL packet is pending in the TL queue.
2473 To avoid the race condition between sme set key and the last EAPOL packet
2474 the HDD module calls this function just before calling the sme_RoamSetKey.
2475
2476 DEPENDENCIES
2477
2478 TL must have been initialized before this gets called.
2479
2480
2481 PARAMETERS
2482
2483 callbackRoutine: HDD Callback function.
2484 callbackContext : HDD userdata context.
2485
2486 RETURN VALUE
2487
2488 VOS_STATUS_SUCCESS/VOS_STATUS_FAILURE
2489
2490 SIDE EFFECTS
2491
2492============================================================================*/
2493
2494VOS_STATUS WLANTL_Finish_ULA( void (*callbackRoutine) (void *callbackContext),
2495 void *callbackContext);
2496
2497/*===============================================================================
2498 FUNCTION WLANTL_UpdateRssiBmps
2499
2500 DESCRIPTION This function updates the TL's RSSI (in BMPS mode)
2501
2502 DEPENDENCIES None
2503
2504 PARAMETERS
2505
2506 pvosGCtx VOS context VOS Global context
2507 staId Station ID Station ID
2508 rssi RSSI (BMPS mode) RSSI in BMPS mode
2509
2510 RETURN None
2511
2512 SIDE EFFECTS none
2513 ===============================================================================*/
2514
2515void WLANTL_UpdateRssiBmps(v_PVOID_t pvosGCtx, v_U8_t staId, v_S7_t rssi);
2516
2517#endif /* #ifndef WLAN_QCT_WLANTL_H */