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