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