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