blob: b309a1b499d1dc27c5e069ef2adfd7ff20a24a44 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhishek Singh00b71972016-01-07 10:51:04 +05302 * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
Kiet Lam1ed83fc2014-02-19 01:15:45 -08003 *
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 Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080026 */
Kiet Lam1ed83fc2014-02-19 01:15:45 -080027
28
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#ifndef WLAN_QCT_WLANTL_H
32#define WLAN_QCT_WLANTL_H
33
34/*===========================================================================
35
Jeff Johnson40b59aa2013-03-19 14:43:18 -070036 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 -070037 E X T E R N A L A P I
Jeff Johnson40b59aa2013-03-19 14:43:18 -070038
39
Jeff Johnson295189b2012-06-20 16:38:30 -070040DESCRIPTION
Jeff Johnson40b59aa2013-03-19 14:43:18 -070041 This file contains the external API exposed by the wlan transport layer
Jeff Johnson295189b2012-06-20 16:38:30 -070042 module.
Jeff Johnson295189b2012-06-20 16:38:30 -070043===========================================================================*/
44
45
46/*===========================================================================
47
48 EDIT HISTORY FOR FILE
49
50
51 This section contains comments describing changes made to the module.
52 Notice that changes are listed in reverse chronological order.
53
54
55 $Header:$ $DateTime: $ $Author: $
56
57
58when who what, where, why
59-------- --- ----------------------------------------------------------
6001/08/10 lti Added TL Data Caching
6110/15/09 rnair Modifying STADescType struct
6210/06/09 rnair Adding support for WAPI
6309/22/09 lti Add deregistration API for management client
6402/02/09 sch Add Handoff support
6512/09/08 lti Fixes for AMSS compilation
6609/05/08 lti Fixes after QOS unit testing
6708/06/08 lti Added QOS support
6805/01/08 lti Created module.
69
70===========================================================================*/
71
72
73
74/*===========================================================================
75
76 INCLUDE FILES FOR MODULE
77
78===========================================================================*/
79
80/*----------------------------------------------------------------------------
81 * Include Files
82 * -------------------------------------------------------------------------*/
83#include "vos_api.h"
84#include "vos_packet.h"
85#include "sirApi.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070086#include "csrApi.h"
87#include "sapApi.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070088/*----------------------------------------------------------------------------
89 * Preprocessor Definitions and Constants
90 * -------------------------------------------------------------------------*/
91 #ifdef __cplusplus
92 extern "C" {
93 #endif
94
95/*Offset of the OUI field inside the LLC/SNAP header*/
96#define WLANTL_LLC_OUI_OFFSET 3
97
98/*Size of the OUI type field inside the LLC/SNAP header*/
99#define WLANTL_LLC_OUI_SIZE 3
100
101/*Offset of the LLC/SNAP header*/
102#define WLANTL_LLC_SNAP_OFFSET 0
103
104/*Size of the LLC/SNAP header*/
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530105#define WLANTL_LLC_SNAP_SIZE 8
106
107/* Number of Tx Queues, this should be same as NUM_TX_QUEUES in HDD */
108#define WLANTL_NUM_TX_QUEUES 5
Jeff Johnson295189b2012-06-20 16:38:30 -0700109
110/*============================================================================
111 * GENERIC STRUCTURES - not belonging to TL
112 * TO BE MOVED TO A GLOBAL HEADER
113 ============================================================================*/
114/*Maximum number of ACs */
115#define WLANTL_MAX_AC 4
116
Jeff Johnson295189b2012-06-20 16:38:30 -0700117/* Maximum number of station supported by TL, including BC. */
118#define WLAN_MAX_STA_COUNT (HAL_NUM_STA)
Madan Mohan Koyylamudi3b8400c2013-01-24 17:47:01 +0530119#define WLAN_NON32_STA_COUNT 14
Jeff Johnson295189b2012-06-20 16:38:30 -0700120/* The symbolic station ID return to HDD to specify the packet is bc/mc */
121#define WLAN_RX_BCMC_STA_ID (WLAN_MAX_STA_COUNT + 1)
122
123/* The symbolic station ID return to HDD to specify the packet is to soft-AP itself */
124#define WLAN_RX_SAP_SELF_STA_ID (WLAN_MAX_STA_COUNT + 2)
125
126/* Used by HDS systme. This station ID is used by TL to tell upper layer that
127 this packet is for WDS and not for a loopback for an associated station. */
128#define WLANTL_RX_WDS_STAID WLAN_MAX_STA_COUNT
129
130/* Station ID used for BC traffic. This value will be used when upper layer registers
131 the broadcast client or allocate station strcuture to keep per-station info.*/
132//#define WLANTL_BC_STA_ID 0x00
133
Jeff Johnson295189b2012-06-20 16:38:30 -0700134
Jeff Johnson295189b2012-06-20 16:38:30 -0700135#define WLANTL_MAX_TID 15
Shailender Karmuchi13c0d082013-03-26 14:41:39 -0700136/* Default RSSI average Alpha */
137#define WLANTL_HO_DEFAULT_ALPHA 5
138#define WLANTL_HO_TDLS_ALPHA 7
139
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530140// Choose the largest possible value that can be accomodates in 8 bit signed
141// variable.
142#define SNR_HACK_BMPS (127)
Mahesh A Saptasagarbbdcf122014-10-28 20:57:11 +0530143#define IS_BROADCAST_ADD(_a) \
144 ((_a)[0] == 0xff && \
145 (_a)[1] == 0xff && \
146 (_a)[2] == 0xff && \
147 (_a)[3] == 0xff && \
148 (_a)[4] == 0xff && \
149 (_a)[5] == 0xff)
150
151#define IS_MULTICAST_ADD(_a) (*(_a) & 0x01)
152
Jeff Johnson295189b2012-06-20 16:38:30 -0700153/*--------------------------------------------------------------------------
154 Access category enum used by TL
155 - order must be kept as these values are used to setup the AC mask
156 --------------------------------------------------------------------------*/
157typedef enum
158{
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530159 /* The values from 0-3 correspond both to the TL tx queue
160 * id and the also the AC corresponding to the packets queued
161 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700162 WLANTL_AC_BK = 0,
163 WLANTL_AC_BE = 1,
164 WLANTL_AC_VI = 2,
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530165 WLANTL_AC_VO = 3,
166 /* WLANTL_AC_HIGH_PRIO corresponds to the new queue
167 * added for handling eapol/wapi/dhcp packets. The AC for the
168 * packets in this queue has to be extracted separately
169 */
170 WLANTL_AC_HIGH_PRIO = 4
Jeff Johnson295189b2012-06-20 16:38:30 -0700171}WLANTL_ACEnumType;
172
Siddharth Bhal4551b102014-10-09 21:36:36 +0530173typedef struct
174{
175 v_MACADDR_t selfMac;
176 v_MACADDR_t spoofMac;
177}WLANTL_SpoofMacAddr;
178
Jeff Johnson295189b2012-06-20 16:38:30 -0700179/*---------------------------------------------------------------------------
180 STA Type
181---------------------------------------------------------------------------*/
182typedef enum
183{
184 /* Indicates a link to an AP*/
185 WLAN_STA_INFRA = 0,
186
187 /* AD-hoc link*/
188 WLAN_STA_IBSS,
189
190 /* BT-AMP link*/
191 WLAN_STA_BT_AMP,
192
Jeff Johnson295189b2012-06-20 16:38:30 -0700193 /* SoftAP station */
194 WLAN_STA_SOFTAP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800195
196#ifdef FEATURE_WLAN_TDLS
197 /* TDLS direct link */
198 WLAN_STA_TDLS, /* 4 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700199#endif
200
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800201
Jeff Johnson295189b2012-06-20 16:38:30 -0700202 /* Invalid link*/
203 WLAN_STA_MAX
204
205}WLAN_STAType;
206
207/*---------------------------------------------------------------------------
208 BAP Management frame type
209---------------------------------------------------------------------------*/
210typedef enum
211{
212 /* BT-AMP packet of type data */
213 WLANTL_BT_AMP_TYPE_DATA = 0x0001,
214
215 /* BT-AMP packet of type activity report */
216 WLANTL_BT_AMP_TYPE_AR = 0x0002,
217
218 /* BT-AMP packet of type security frame */
219 WLANTL_BT_AMP_TYPE_SEC = 0x0003,
220
221 /* BT-AMP packet of type Link Supervision request frame */
222 WLANTL_BT_AMP_TYPE_LS_REQ = 0x0004,
223
224 /* BT-AMP packet of type Link Supervision reply frame */
225 WLANTL_BT_AMP_TYPE_LS_REP = 0x0005,
226
227 /* Invalid Frame */
228 WLANTL_BAP_INVALID_FRAME
229
230} WLANTL_BAPFrameEnumType;
231
Jeff Johnson295189b2012-06-20 16:38:30 -0700232/* Type used to specify LWM threshold unit */
233typedef enum {
234 WLAN_LWM_THRESHOLD_BYTE = 0,
235
236 WLAN_LWM_THRESHOLD_PACKET
237} WLAN_LWM_Threshold_Type;
Jeff Johnson295189b2012-06-20 16:38:30 -0700238
239/*---------------------------------------------------------------------------
240 TL States
241---------------------------------------------------------------------------*/
242typedef enum
243{
244 /* Transition in this state made upon creation*/
245 WLANTL_STA_INIT = 0,
246
247 /* Transition happens after Assoc success if second level authentication
248 is needed*/
249 WLANTL_STA_CONNECTED,
250
251 /* Transition happens when second level auth is successful and keys are
252 properly installed */
253 WLANTL_STA_AUTHENTICATED,
254
255 /* Transition happens when connectivity is lost*/
256 WLANTL_STA_DISCONNECTED,
257
258 WLANTL_STA_MAX_STATE
259}WLANTL_STAStateType;
260
261
262/*---------------------------------------------------------------------------
263 STA Descriptor Type
264---------------------------------------------------------------------------*/
265typedef struct
266{
267 /*STA unique identifier, originating from HAL*/
268 v_U8_t ucSTAId;
269
270 /*STA MAC Address*/
271 v_MACADDR_t vSTAMACAddress;
272
273 /*BSSID for IBSS*/
274 v_MACADDR_t vBSSIDforIBSS;
275
276 /*Self MAC Address*/
277 v_MACADDR_t vSelfMACAddress;
278
279 /*Type of the STA*/
280 WLAN_STAType wSTAType;
281
282 /*flag for setting the state of the QOS for the link*/
283 v_U8_t ucQosEnabled;
284
285 /*enable FT in TL */
286 v_U8_t ucSwFrameTXXlation;
287 v_U8_t ucSwFrameRXXlation;
288
289 /*Flag for signaling TL if LLC header needs to be added for outgoing
290 packets*/
291 v_U8_t ucAddRmvLLC;
292
293 /*Flag for signaling if the privacy bit needs to be set*/
294 v_U8_t ucProtectedFrame;
295
296 /*DPU Signature used for unicast data - used for data caching*/
297 v_U8_t ucUcastSig;
298 /*Flag to indicate if STA is a WAPI STA*/
299 v_U8_t ucIsWapiSta;
300
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800301#ifdef FEATURE_WLAN_ESE
302 /*Flag to indicate if STA is a ESE STA*/
303 v_U8_t ucIsEseSta;
Jeff Johnson295189b2012-06-20 16:38:30 -0700304#endif
305
306 /*DPU Signature used for broadcast data - used for data caching*/
307 v_U8_t ucBcastSig;
308
309 /*Initial state at which the STA should be brought up to*/
310 WLANTL_STAStateType ucInitState;
Jeff Johnson295189b2012-06-20 16:38:30 -0700311 /* 1 means replay check is needed for the station,
312 0 means replay check is not needed for the station*/
313 v_BOOL_t ucIsReplayCheckValid;
Jeff Johnson295189b2012-06-20 16:38:30 -0700314}WLAN_STADescType;
315
316/*---------------------------------------------------------------------------
317 TL Configuration
318---------------------------------------------------------------------------*/
319typedef struct
320{
321 /*AC weight for WFQ*/
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530322 v_U8_t ucAcWeights[WLANTL_NUM_TX_QUEUES];
Jeff Johnson295189b2012-06-20 16:38:30 -0700323
324 /*Delayed trigger frame timmer: - used by TL to send trigger frames less
325 often when it has established that the App is suspended*/
326 v_U32_t uDelayedTriggerFrmInt;
327
Jeff Johnson295189b2012-06-20 16:38:30 -0700328 /* Min Threshold for Processing Frames in TL */
329 v_U8_t uMinFramesProcThres;
Dhanashri Atred8c20a32014-01-03 17:20:55 -0800330
331 /* Re-order Aging Time */
332 v_U16_t ucReorderAgingTime[WLANTL_MAX_AC];
Jeff Johnson295189b2012-06-20 16:38:30 -0700333}WLANTL_ConfigInfoType;
334
335/*---------------------------------------------------------------------------
336 TSPEC Direction Enum Type
337---------------------------------------------------------------------------*/
338typedef enum
339{
340 /* uplink */
341 WLANTL_TX_DIR = 0,
342
343 /* downlink */
344 WLANTL_RX_DIR = 1,
345
346 /*bidirectional*/
347 WLANTL_BI_DIR = 2,
348}WLANTL_TSDirType;
349
350/*============================================================================
351 * GENERIC STRUCTURES - END
352 ============================================================================*/
353
354
355
356/*----------------------------------------------------------------------------
357 * Type Declarations
358 * -------------------------------------------------------------------------*/
359
360/*---------------------------------------------------------------------------
361 TL Error Type
362---------------------------------------------------------------------------*/
363typedef enum
364{
365 /* Generic error */
366 WLANTL_ERROR = 0,
367
368 /* No rx callback registered for data path */
369 WLANTL_NO_RX_DATA_CB,
370
371 /* No rx callback registered for management path*/
372 WLANTL_NO_RX_MGMT_CB,
373
374 /* Generic memory error*/
375 WLANTL_MEM_ERROR,
376
377 /* Bus error notified by BAL */
378 WLANTL_BUS_ERROR
379
380}WLANTL_ErrorType;
381
382/*---------------------------------------------------------------------------
383 STA priority type
384---------------------------------------------------------------------------*/
385typedef enum
386{
387 /* STA gets to tx every second round*/
388 WLANTL_STA_PRI_VERY_LOW = -2,
389
390 /* STA gets to tx every other round*/
391 WLANTL_STA_PRI_LOW = -1,
392
393 /* STA gets to tx each time */
394 WLANTL_STA_PRI_NORMAL = 0,
395
396 /* STA gets to tx twice each time*/
397 WLANTL_STA_PRI_HIGH = 1,
398
399 /* STA gets to tx three times each time*/
400 WLANTL_STA_PRI_VERY_HIGH = 2
401
402}WLANTL_STAPriorityType;
403
404/*---------------------------------------------------------------------------
405 Meta information requested from HDD by TL
406---------------------------------------------------------------------------*/
407typedef struct
408{
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530409 /* Save the AC of the packet */
410 WLANTL_ACEnumType ac;
411
Jeff Johnson295189b2012-06-20 16:38:30 -0700412 /* TID of the packet being sent */
413 v_U8_t ucTID;
414
415 /* UP of the packet being sent */
416 v_U8_t ucUP;
417
418 /* notifying TL if this is an EAPOL frame or not */
419 v_U8_t ucIsEapol;
420#ifdef FEATURE_WLAN_WAPI
421 /* notifying TL if this is a WAI frame or not */
422 v_U8_t ucIsWai;
423#endif
424 /* frame is 802.11 and it does not need translation */
425 v_U8_t ucDisableFrmXtl;
426
427 /* frame is broadcast */
428 v_U8_t ucBcast;
429
430 /* frame is multicast */
431 v_U8_t ucMcast;
432
433 /* frame type */
434 v_U8_t ucType;
435
436 /* timestamp */
437 v_U16_t usTimeStamp;
438
439 /* STA has more packets to send */
440 v_BOOL_t bMorePackets;
Abhishek Singhfa011222014-04-14 10:57:08 +0530441 /* notifying TL if this is an ARP frame or not */
442 v_U8_t ucIsArp;
Ganesh Kondabattini10e67352015-03-16 17:41:57 +0530443 v_U32_t ucTxBdToken;
Jeff Johnson295189b2012-06-20 16:38:30 -0700444}WLANTL_MetaInfoType;
445
446/*---------------------------------------------------------------------------
447 Meta information provided by TL to HDD on rx path
448---------------------------------------------------------------------------*/
449typedef struct
450{
451 /* UP of the packet being sent */
452 v_U8_t ucUP;
453 /* Address 3 Index of the received packet */
454 v_U16_t ucDesSTAId;
Shailender Karmuchi13c0d082013-03-26 14:41:39 -0700455 /*Rssi based on the received packet */
456 v_S7_t rssiAvg;
Gopichand Nakkala4a2fc1a2013-05-17 16:59:39 +0530457 #ifdef FEATURE_WLAN_TDLS
458 /* Packet received on direct link/AP link */
459 v_U8_t isStaTdls;
460 #endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700461}WLANTL_RxMetaInfoType;
462
Dino Mycle3b9536d2014-07-09 22:05:24 +0530463#ifdef WLAN_FEATURE_LINK_LAYER_STATS
464/* per interface per access category statistics */
465typedef PACKED_PRE struct PACKED_POST
466{
467 /* access category (VI, VO, BE, BK) */
468 v_U8_t ac;
469
470 /*Number of successfully transmitted unicast data pkts (ACK rcvd) */
471 v_U32_t txMpdu;
472
473 /* number of received unicast mpdu */
474 v_U32_t rxMpdu;
475
476 /* umber of succesfully transmitted multicast data packets
477 * STA case: implies ACK received from AP for the unicast packet in which mcast
478 * pkt was sent
479 */
480 v_U32_t txMcast;
481
482 /* number of received multicast data packets */
483 v_U32_t rxMcast;
484
485 /* number of received unicast a-mpdu */
486 v_U32_t rxAmpdu;
487
488 /* number of transmitted unicast a-mpdus */
489 v_U32_t txAmpdu;
490
491 /* number of data pkt losses (no ACK) */
492 v_U32_t mpduLost;
493
494 /* total number of data pkt retries */
495 v_U32_t retries;
496
497 /* number of short data pkt retries */
498 v_U32_t retriesShort;
499
500 /* number of long data pkt retries */
501 v_U32_t retriesLong;
502
503 /* data pkt min contention time (usecs) */
504 v_U32_t contentionTimeMin;
505
506 /* data pkt max contention time (usecs) */
507 v_U32_t contentionTimeMax;
508
509 /* data pkt avg contention time (usecs) */
510 v_U32_t contentionTimeAvg;
511
512 /* num of data pkts used for contention statistics */
513 v_U32_t contentionNumSamples;
514}WLANTL_AccessCategoryStatsType;
515
516/* per interface statistics */
517typedef PACKED_PRE struct PACKED_POST
518{
519 /* access point beacon received count from connected AP */
520 v_U32_t beaconRx;
521
522 /* access point mgmt frames received count from connected AP (including
523 * Beacon)
524 */
525 v_U32_t mgmtRx;
526
527 /* action frames received count */
528 v_U32_t mgmtActionRx;
529
530 /* action frames transmit count */
531 v_U32_t mgmtActionTx;
532
533 /* access Point Beacon and Management frames RSSI (averaged) */
534 v_U32_t rssiMgmt;
535
536 /* access Point Data Frames RSSI (averaged) from connected AP */
537 v_U32_t rssiData;
538
539 /* access Point ACK RSSI (averaged) from connected AP */
540 v_U32_t rssiAck;
541
542 WLANTL_AccessCategoryStatsType accessCategoryStats[WLANTL_MAX_AC];
543
544}WLANTL_InterfaceStatsType;
545
546
547#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700548
549/*---------------------------------------------------------------------------
550 Handoff support and statistics defines and enum types
551---------------------------------------------------------------------------*/
552/* Threshold crossed event type definitions */
553#define WLANTL_HO_THRESHOLD_NA 0x00
554#define WLANTL_HO_THRESHOLD_DOWN 0x01
555#define WLANTL_HO_THRESHOLD_UP 0x02
556#define WLANTL_HO_THRESHOLD_CROSS 0x04
557
558/* Realtime traffic status */
559typedef enum
560{
561 WLANTL_HO_RT_TRAFFIC_STATUS_OFF,
562 WLANTL_HO_RT_TRAFFIC_STATUS_ON
563} WLANTL_HO_RT_TRAFFIC_STATUS_TYPE;
564
565/* Non-Realtime traffic status */
566typedef enum
567{
568 WLANTL_HO_NRT_TRAFFIC_STATUS_OFF,
569 WLANTL_HO_NRT_TRAFFIC_STATUS_ON
570} WLANTL_HO_NRT_TRAFFIC_STATUS_TYPE;
571
572/* Statistics type TL supported */
573typedef enum
574{
575 WLANTL_STATIC_TX_UC_FCNT,
576 WLANTL_STATIC_TX_MC_FCNT,
577 WLANTL_STATIC_TX_BC_FCNT,
578 WLANTL_STATIC_TX_UC_BCNT,
579 WLANTL_STATIC_TX_MC_BCNT,
580 WLANTL_STATIC_TX_BC_BCNT,
581 WLANTL_STATIC_RX_UC_FCNT,
582 WLANTL_STATIC_RX_MC_FCNT,
583 WLANTL_STATIC_RX_BC_FCNT,
584 WLANTL_STATIC_RX_UC_BCNT,
585 WLANTL_STATIC_RX_MC_BCNT,
586 WLANTL_STATIC_RX_BC_BCNT,
587 WLANTL_STATIC_RX_BCNT,
588 WLANTL_STATIC_RX_BCNT_CRC_OK,
589 WLANTL_STATIC_RX_RATE
590} WLANTL_TRANSFER_STATIC_TYPE;
591
592/*---------------------------------------------------------------------------
593 Handoff support and statistics structures
594---------------------------------------------------------------------------*/
595typedef struct
596{
597 WLANTL_HO_RT_TRAFFIC_STATUS_TYPE rtTrafficStatus;
598 WLANTL_HO_NRT_TRAFFIC_STATUS_TYPE nrtTrafficStatus;
599} WLANTL_HO_TRAFFIC_STATUS_TYPE;
600
Jeff Johnson295189b2012-06-20 16:38:30 -0700601typedef tSap_SoftapStats WLANTL_TRANSFER_STA_TYPE;
Jeff Johnson295189b2012-06-20 16:38:30 -0700602
603/* Under here not public items, just use for internal */
604/* 3 SME 1 HDD */
605#define WLANTL_MAX_AVAIL_THRESHOLD 5
606#define WLANTL_HS_NUM_CLIENT 2
607#define WLANTL_SINGLE_CLNT_THRESHOLD 4
608
Mihir Shete327c2ab2014-11-13 15:17:02 +0530609typedef enum
610{
611 WLANTL_DEBUG_TX_SNAPSHOT = 1<<0,
Mihir Shete327c2ab2014-11-13 15:17:02 +0530612 WLANTL_DEBUG_FW_CLEANUP = 1<<1,
Sravan Kumar Kairame9d186c2015-11-27 23:37:02 +0530613 WLANTL_DEBUG_KICKDXE = 1<<2
Mihir Shete327c2ab2014-11-13 15:17:02 +0530614}WLANTL_DebugFlags;
615
Jeff Johnson295189b2012-06-20 16:38:30 -0700616/*----------------------------------------------------------------------------
617 * TL callback types
618 *--------------------------------------------------------------------------*/
619
620/*----------------------------------------------------------------------------
621
622 DESCRIPTION
623 Type of the tx complete callback registered with TL.
624
625 TL will call this to notify the client when a transmission for a
626 packet has ended.
627
628 PARAMETERS
629
630 IN
631 pvosGCtx: pointer to the global vos context; a handle to
632 TL/HAL/PE/BAP/HDD control block can be extracted from
633 its context
634 vosDataBuff: pointer to the VOSS data buffer that was transmitted
635 wTxSTAtus: status of the transmission
636
637
638 RETURN VALUE
639 The result code associated with performing the operation
640
641----------------------------------------------------------------------------*/
642typedef VOS_STATUS (*WLANTL_TxCompCBType)( v_PVOID_t pvosGCtx,
643 vos_pkt_t* pFrameDataBuff,
644 VOS_STATUS wTxSTAtus );
645
646
647/*----------------------------------------------------------------------------
648 INTERACTION WITH HDD
649 ---------------------------------------------------------------------------*/
650/*----------------------------------------------------------------------------
651
652 DESCRIPTION
653 Type of the fetch packet callback registered with TL.
654
655 It is called by the TL when the scheduling algorithms allows for
656 transmission of another packet to the module.
657 It will be called in the context of the BAL fetch transmit packet
658 function, initiated by the bus lower layer.
659
660
661 PARAMETERS
662
663 IN
664 pvosGCtx: pointer to the global vos context; a handle
665 to TL's or HDD's control block can be extracted
666 from its context
667
668 IN/OUT
669 pucSTAId: the Id of the station for which TL is requesting a
670 packet, in case HDD does not maintain per station
671 queues it can give the next packet in its queue
672 and put in the right value for the
673 pucAC: access category requested by TL, if HDD does not have
674 packets on this AC it can choose to service another AC
675 queue in the order of priority
676
677 OUT
678 vosDataBuff: pointer to the VOSS data buffer that was transmitted
679 tlMetaInfo: meta info related to the data frame
680
681
682
683 RETURN VALUE
684 The result code associated with performing the operation
685
686----------------------------------------------------------------------------*/
687typedef VOS_STATUS (*WLANTL_STAFetchPktCBType)(
688 v_PVOID_t pvosGCtx,
689 v_U8_t* pucSTAId,
690 WLANTL_ACEnumType ucAC,
691 vos_pkt_t** vosDataBuff,
692 WLANTL_MetaInfoType* tlMetaInfo);
693
Katya Nigame7b69a82015-04-28 15:24:06 +0530694typedef VOS_STATUS (*WLANTL_MonRxCBType)( v_PVOID_t pvosGCtx,
695 vos_pkt_t* vosDataBuff,
696 int conversion);
Jeff Johnson295189b2012-06-20 16:38:30 -0700697/*----------------------------------------------------------------------------
698
699 DESCRIPTION
700 Type of the receive callback registered with TL.
701
702 TL will call this to notify the client when a packet was received
703 for a registered STA.
704
705 PARAMETERS
706
707 IN
708 pvosGCtx: pointer to the global vos context; a handle to
709 TL's or HDD's control block can be extracted from
710 its context
711 vosDataBuff: pointer to the VOSS data buffer that was received
712 (it may be a linked list)
713 ucSTAId: station id
714 pRxMetaInfo: meta info for the received packet(s)
715
716 RETURN VALUE
717 The result code associated with performing the operation
718
719----------------------------------------------------------------------------*/
720typedef VOS_STATUS (*WLANTL_STARxCBType)( v_PVOID_t pvosGCtx,
721 vos_pkt_t* vosDataBuff,
722 v_U8_t ucSTAId,
723 WLANTL_RxMetaInfoType* pRxMetaInfo);
724
725
726/*----------------------------------------------------------------------------
727 INTERACTION WITH BAP
728 ---------------------------------------------------------------------------*/
729
730/*----------------------------------------------------------------------------
731
732 DESCRIPTION
733 Type of the receive callback registered with TL for BAP.
734
735 The registered reception callback is being triggered by TL whenever a
736 frame was received and it was filtered as a non-data BT AMP packet.
737
738 PARAMETERS
739
740 IN
741 pvosGCtx: pointer to the global vos context; a handle to TL's
742 or SME's control block can be extracted from its context
743 vosDataBuff: pointer to the vOSS buffer containing the received packet;
744 no chaining will be done on this path
745 frameType: type of the frame to be indicated to BAP.
746
747 RETURN VALUE
748 The result code associated with performing the operation
749
750----------------------------------------------------------------------------*/
751typedef VOS_STATUS (*WLANTL_BAPRxCBType)( v_PVOID_t pvosGCtx,
752 vos_pkt_t* vosDataBuff,
753 WLANTL_BAPFrameEnumType frameType);
754
755/*----------------------------------------------------------------------------
756
757 DESCRIPTION
758 Callback registered with TL for BAP, this is required inorder for
759 TL to inform BAP, that the flush operation requested has been completed.
760
761 The registered reception callback is being triggered by TL whenever a
762 frame SIR_TL_HAL_FLUSH_AC_RSP is received by TL from HAL.
763
764 PARAMETERS
765
766 IN
767 pvosGCtx: pointer to the global vos context; a handle to TL's
768 or SME's control block can be extracted from its context
769 vosDataBuff: pointer to the vOSS buffer containing the received packet;
770 no chaining will be done on this path
771
772 RETURN VALUE
773 The result code associated with performing the operation
774
775----------------------------------------------------------------------------*/
776typedef VOS_STATUS (*WLANTL_FlushOpCompCBType)( v_PVOID_t pvosGCtx,
777 v_U8_t ucStaId,
778 v_U8_t ucTID,
779 v_U8_t status);
780/*----------------------------------------------------------------------------
781 INTERACTION WITH PE
782 ---------------------------------------------------------------------------*/
783
784/*----------------------------------------------------------------------------
785
786 DESCRIPTION
787 Type of the receive callback registered with TL for PE.
788
789 Upon receipt of a management frame TL will call the registered receive
790 callback and forward this frame to the interested module, in our case PE.
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 vosFrmBuf: pointer to a vOSS buffer containing the management frame
798 received
799
800 RETURN VALUE
801 The result code associated with performing the operation
802
803----------------------------------------------------------------------------*/
804typedef VOS_STATUS (*WLANTL_MgmtFrmRxCBType)( v_PVOID_t pvosGCtx,
805 v_PVOID_t vosBuff);
806
807
808/*----------------------------------------------------------------------------
809 INTERACTION WITH HAL
810 ---------------------------------------------------------------------------*/
811
812/*----------------------------------------------------------------------------
813
814 DESCRIPTION
815 Type of the fetch packet callback registered with TL.
816
817 HAL calls this API when it wishes to suspend transmission for a
818 particular STA.
819
820 PARAMETERS
821
822 IN
823 pvosGCtx: pointer to the global vos context; a handle to TL's
824 control block can be extracted from its context
825 ucSTAId: identifier of the station for which the request is made;
826 a value of 0 assumes suspend on all active station
827 pfnSuspendTxCB: pointer to the suspend result notification in case the
828 call is asynchronous
829
830 RETURN VALUE
831 The result code associated with performing the operation
832
833----------------------------------------------------------------------------*/
834typedef VOS_STATUS (*WLANTL_SuspendCBType)( v_PVOID_t pvosGCtx,
835 v_U8_t* ucSTAId,
836 VOS_STATUS vosStatus);
837
838
839/*==========================================================================
840
841 DESCRIPTION
842 Traffic status changed callback function
843 Should be registered to let client know that traffic status is changed
844 REF WLANTL_RegGetTrafficStatus
845
846 PARAMETERS
847 pAdapter Global handle pointer
848 trafficStatus RT and NRT current traffic status
849 pUserCtxt pre registered client context
850
851 RETURN VALUE
852 VOS_STATUS
853
854 SIDE EFFECTS
855 NONE
856
857============================================================================*/
858/* IF traffic status is changed, send notification to SME */
859typedef VOS_STATUS (*WLANTL_TrafficStatusChangedCBType)
860(
861 v_PVOID_t pAdapter,
862 WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus,
863 v_PVOID_t pUserCtxt
864);
865
866/*==========================================================================
867
868 DESCRIPTION
869 RSSI threshold crossed notification callback function
870 REF WLANTL_RegRSSIIndicationCB
871
872 PARAMETERS
873 pAdapter Global handle pointer
874 rssiNotification Notification event type
875 pUserCtxt pre registered client context
876
877 RETURN VALUE
878
879 SIDE EFFECTS
880
881============================================================================*/
882/* If RSSI realm is changed, send notification to Clients, SME, HDD */
883typedef VOS_STATUS (*WLANTL_RSSICrossThresholdCBType)
884(
885 v_PVOID_t pAdapter,
886 v_U8_t rssiNotification,
Srinivasdaaec712012-12-12 15:59:44 -0800887 v_PVOID_t pUserCtxt,
888 v_S7_t avgRssi
Jeff Johnson295189b2012-06-20 16:38:30 -0700889);
890
Jeff Johnsone7245742012-09-05 17:12:55 -0700891typedef struct
892{
893 // Common for all types are requests
894 v_U16_t msgType; // message type is same as the request type
895 v_U16_t msgLen; // length of the entire request
896 v_U8_t sessionId; //sme Session Id
897 v_U8_t rssiNotification;
Srinivasdaaec712012-12-12 15:59:44 -0800898 v_U8_t avgRssi;
Jeff Johnsone7245742012-09-05 17:12:55 -0700899 v_PVOID_t tlCallback;
900 v_PVOID_t pAdapter;
901 v_PVOID_t pUserCtxt;
902} WLANTL_TlIndicationReq;
903
Jeff Johnson295189b2012-06-20 16:38:30 -0700904/*----------------------------------------------------------------------------
905 * Function Declarations and Documentation
906 * -------------------------------------------------------------------------*/
907
908/*==========================================================================
909
910 FUNCTION WLANTL_Open
911
912 DESCRIPTION
913 Called by HDD at driver initialization. TL will initialize all its
914 internal resources and will wait for the call to start to register
915 with the other modules.
916
917 DEPENDENCIES
918
919 PARAMETERS
920
921 IN
922 pvosGCtx: pointer to the global vos context; a handle to TL's
923 control block can be extracted from its context
924 pTLConfig: TL Configuration
925
926 RETURN VALUE
927 The result code associated with performing the operation
928
929 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
930 fault
931 VOS_STATUS_SUCCESS: Everything is good :)
932
933 SIDE EFFECTS
934
935============================================================================*/
936VOS_STATUS
937WLANTL_Open
938(
939 v_PVOID_t pvosGCtx,
940 WLANTL_ConfigInfoType* pTLConfig
941);
942
943/*==========================================================================
944
945 FUNCTION WLANTL_Start
946
947 DESCRIPTION
948 Called by HDD as part of the overall start procedure. TL will use this
949 call to register with BAL as a transport layer entity.
950
951 DEPENDENCIES
952
953 PARAMETERS
954
955 IN
956 pvosGCtx: pointer to the global vos context; a handle to TL's
957 control block can be extracted from its context
958
959 RETURN VALUE
960 The result code associated with performing the operation
961
962 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
963 fault
964 VOS_STATUS_SUCCESS: Everything is good :)
965
966 Other codes can be returned as a result of a BAL failure; see BAL API
967 for more info
968
969 SIDE EFFECTS
970
971============================================================================*/
972VOS_STATUS
973WLANTL_Start
974(
975 v_PVOID_t pvosGCtx
976);
977
978/*==========================================================================
979
980 FUNCTION WLANTL_Stop
981
982 DESCRIPTION
983 Called by HDD to stop operation in TL, before close. TL will suspend all
984 frame transfer operation and will wait for the close request to clean up
985 its resources.
986
987 DEPENDENCIES
988
989 PARAMETERS
990
991 IN
992 pvosGCtx: pointer to the global vos context; a handle to TL's
993 control block can be extracted from its context
994
995 RETURN VALUE
996 The result code associated with performing the operation
997
998 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
999 fault
1000 VOS_STATUS_SUCCESS: Everything is good :)
1001
1002 SIDE EFFECTS
1003
1004============================================================================*/
1005VOS_STATUS
1006WLANTL_Stop
1007(
1008 v_PVOID_t pvosGCtx
1009);
1010
1011/*==========================================================================
1012
1013 FUNCTION WLANTL_Close
1014
1015 DESCRIPTION
1016 Called by HDD during general driver close procedure. TL will clean up
1017 all the internal resources.
1018
1019 DEPENDENCIES
1020
1021 PARAMETERS
1022
1023 IN
1024 pvosGCtx: pointer to the global vos context; a handle to TL's
1025 control block can be extracted from its context
1026
1027 RETURN VALUE
1028 The result code associated with performing the operation
1029
1030 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a page
1031 fault
1032 VOS_STATUS_SUCCESS: Everything is good :)
1033
1034 SIDE EFFECTS
1035
1036============================================================================*/
1037VOS_STATUS
1038WLANTL_Close
1039(
1040 v_PVOID_t pvosGCtx
1041);
1042
Mihir Shete2ab1d492014-06-04 14:21:05 +05301043/*===========================================================================
1044
1045 FUNCTION WLANTL_StartForwarding
1046
1047 DESCRIPTION
1048
1049 This function is used to ask serialization through TX thread of the
1050 cached frame forwarding (if statation has been registered in the mean while)
1051 or flushing (if station has not been registered by the time)
1052
1053 In case of forwarding, upper layer is only required to call WLANTL_RegisterSTAClient()
1054 and doesn't need to call this function explicitly. TL will handle this inside
1055 WLANTL_RegisterSTAClient().
1056
1057 In case of flushing, upper layer is required to call this function explicitly
1058
1059 DEPENDENCIES
1060
1061 TL must have been initialized before this gets called.
1062
1063
1064 PARAMETERS
1065
1066 ucSTAId: station id
1067
1068 RETURN VALUE
1069
1070 The result code associated with performing the operation
1071 Please check return values of vos_tx_mq_serialize.
1072
1073 SIDE EFFECTS
1074 If TL was asked to perform WLANTL_CacheSTAFrame() in WLANTL_RxFrames(),
1075 either WLANTL_RegisterSTAClient() or this function must be called
1076 within reasonable time. Otherwise, TL will keep cached vos buffer until
1077 one of this function is called, and may end up with system buffer exhasution.
1078
1079 It's an upper layer's responsibility to call this function in case of
1080 flushing
1081
1082============================================================================*/
1083VOS_STATUS
1084WLANTL_StartForwarding
1085(
1086 v_U8_t ucSTAId,
1087 v_U8_t ucUcastSig,
1088 v_U8_t ucBcastSig
1089);
Jeff Johnson295189b2012-06-20 16:38:30 -07001090
1091/*----------------------------------------------------------------------------
1092 INTERACTION WITH HDD
1093 ---------------------------------------------------------------------------*/
1094/*==========================================================================
1095
1096 FUNCTION WLANTL_ConfigureSwFrameTXXlationForAll
1097
1098 DESCRIPTION
1099 Function to disable/enable frame translation for all association stations.
1100
1101 DEPENDENCIES
1102
1103 PARAMETERS
1104 IN
1105 pvosGCtx: VOS context
1106 EnableFrameXlation TRUE means enable SW translation for all stations.
1107 .
1108
1109 RETURN VALUE
1110
1111 void.
1112
1113============================================================================*/
1114void
1115WLANTL_ConfigureSwFrameTXXlationForAll
1116(
1117 v_PVOID_t pvosGCtx,
1118 v_BOOL_t enableFrameXlation
1119);
1120
Katya Nigame7b69a82015-04-28 15:24:06 +05301121VOS_STATUS WLANTL_SetMonRxCbk(v_PVOID_t pvosGCtx, WLANTL_MonRxCBType pfnMonRx);
1122void WLANTL_SetIsConversionReq(v_PVOID_t pvosGCtx, v_BOOL_t isConversionReq);
Jeff Johnson295189b2012-06-20 16:38:30 -07001123/*===========================================================================
1124
1125 FUNCTION WLANTL_RegisterSTAClient
1126
1127 DESCRIPTION
1128
1129 This function is used by HDD to register as a client for data services
1130 with TL. HDD will call this API for each new station that it adds,
1131 thus having the flexibility of registering different callback for each
1132 STA it services.
1133
1134 DEPENDENCIES
1135
1136 TL must have been initialized before this gets called.
1137
1138 Restriction:
1139 Main thread will have higher priority that Tx and Rx threads thus
1140 guaranteeing that a station will be added before any data can be
1141 received for it. (This enables TL to be lock free)
1142
1143 PARAMETERS
1144
1145 pvosGCtx: pointer to the global vos context; a handle to TL's
1146 control block can be extracted from its context
1147 pfnStARx: function pointer to the receive packet handler from HDD
1148 pfnSTATxComp: function pointer to the transmit complete confirmation
1149 handler from HDD
1150 pfnSTAFetchPkt: function pointer to the packet retrieval routine in HDD
1151 wSTADescType: STA Descriptor, contains information related to the
1152 new added STA
1153
1154 RETURN VALUE
1155
1156 The result code associated with performing the operation
1157
1158 VOS_STATUS_E_INVAL: Input parameters are invalid
1159 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1160 TL cb is NULL ; access would cause a page fault
1161 VOS_STATUS_E_EXISTS: Station was already registered
1162 VOS_STATUS_SUCCESS: Everything is good :)
1163
1164 SIDE EFFECTS
1165
1166============================================================================*/
1167VOS_STATUS
1168WLANTL_RegisterSTAClient
1169(
1170 v_PVOID_t pvosGCtx,
1171 WLANTL_STARxCBType pfnSTARx,
1172 WLANTL_TxCompCBType pfnSTATxComp,
1173 WLANTL_STAFetchPktCBType pfnSTAFetchPkt,
1174 WLAN_STADescType* wSTADescType ,
1175 v_S7_t rssi
1176);
1177
1178/*===========================================================================
1179
Agarwal Ashish16020c42014-12-29 22:01:11 +05301180 FUNCTION WLANTL_UpdateTdlsSTAClient
1181
1182 DESCRIPTION
1183
1184 HDD will call this API when ENABLE_LINK happens and HDD want to
1185 register QoS or other params for TDLS peers.
1186
1187 DEPENDENCIES
1188
1189 A station must have been registered before the WMM/QOS registration is
1190 called.
1191
1192 PARAMETERS
1193
1194 pvosGCtx: pointer to the global vos context; a handle to TL's
1195 control block can be extracted from its context
1196 wSTADescType: STA Descriptor, contains information related to the
1197 new added STA
1198
1199 RETURN VALUE
1200
1201 The result code associated with performing the operation
1202
1203 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1204 TL cb is NULL ; access would cause a page fault
1205 VOS_STATUS_E_EXISTS: Station was not registered
1206 VOS_STATUS_SUCCESS: Everything is good :)
1207
1208 SIDE EFFECTS
1209
1210============================================================================*/
1211
1212VOS_STATUS
1213WLANTL_UpdateTdlsSTAClient
1214(
1215 v_PVOID_t pvosGCtx,
1216 WLAN_STADescType* wSTADescType
1217);
1218
1219
1220/*===========================================================================
1221
Jeff Johnson295189b2012-06-20 16:38:30 -07001222 FUNCTION WLANTL_ClearSTAClient
1223
1224 DESCRIPTION
1225
1226 HDD will call this API when it no longer needs data services for the
1227 particular station.
1228
1229 DEPENDENCIES
1230
1231 A station must have been registered before the clear registration is
1232 called.
1233
1234 PARAMETERS
1235
1236 pvosGCtx: pointer to the global vos context; a handle to TL's
1237 control block can be extracted from its context
1238 ucSTAId: identifier for the STA to be cleared
1239
1240 RETURN VALUE
1241
1242 The result code associated with performing the operation
1243
1244 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1245 TL cb is NULL ; access would cause a page fault
1246 VOS_STATUS_E_EXISTS: Station was not registered
1247 VOS_STATUS_SUCCESS: Everything is good :)
1248
1249 SIDE EFFECTS
1250
1251============================================================================*/
1252VOS_STATUS
1253WLANTL_ClearSTAClient
1254(
1255 v_PVOID_t pvosGCtx,
1256 v_U8_t ucSTAId
1257);
1258
Dino Mycle3b9536d2014-07-09 22:05:24 +05301259#ifdef WLAN_FEATURE_LINK_LAYER_STATS
1260/*==========================================================================
1261
1262 FUNCTION WLANTL_CollectStats
1263
1264 DESCRIPTION
1265 Utility function used by TL to send the statitics
1266
1267 DEPENDENCIES
1268
1269
1270 PARAMETERS
1271
1272 IN
1273
1274 ucSTAId: station for which the statistics need to collected
1275
1276 vosDataBuff: it will contain the pointer to the corresponding
1277 structure
1278
1279 RETURN VALUE
1280 The result code associated with performing the operation
1281
1282 VOS_STATUS_E_INVAL: Input parameters are invalid
1283 VOS_STATUS_SUCCESS: Everything is good :)
1284
1285 SIDE EFFECTS
1286
1287============================================================================*/
1288VOS_STATUS
1289WLANTL_CollectInterfaceStats
1290(
1291 v_PVOID_t pvosGCtx,
1292 v_U8_t ucSTAId,
1293 WLANTL_InterfaceStatsType *vosDataBuff
1294);
Srinivas Dasari98947432014-11-07 19:41:24 +05301295
1296/*==========================================================================
1297
1298 FUNCTION WLANTL_ClearInterfaceStats
1299
1300 DESCRIPTION
1301 Utility function used by TL to clear the statitics
1302
1303 DEPENDENCIES
1304
1305
1306 PARAMETERS
1307
1308 IN
1309
1310 ucSTAId: station for which the statistics need to collected
1311
1312 RETURN VALUE
1313 The result code associated with performing the operation
1314
1315 VOS_STATUS_E_INVAL: Input parameters are invalid
1316 VOS_STATUS_SUCCESS: Everything is good :)
1317
1318 SIDE EFFECTS
1319
1320============================================================================*/
1321VOS_STATUS
1322WLANTL_ClearInterfaceStats
1323(
1324 v_PVOID_t pvosGCtx,
1325 v_U8_t ucSTAId,
1326 v_U8_t statsClearReqMask
1327);
Dino Mycle3b9536d2014-07-09 22:05:24 +05301328#endif
1329
Jeff Johnson295189b2012-06-20 16:38:30 -07001330/*===========================================================================
1331
1332 FUNCTION WLANTL_ChangeSTAState
1333
1334 DESCRIPTION
1335
1336 HDD will make this notification whenever a change occurs in the
1337 connectivity state of a particular STA.
1338
1339 DEPENDENCIES
1340
1341 A station must have been registered before the change state can be
1342 called.
1343
1344 RESTRICTION: A station is being notified as authenticated before the
1345 keys are installed in HW. This way if a frame is received
1346 before the keys are installed DPU will drop that frame.
1347
1348 Main thread has higher priority that Tx and Rx threads thus guaranteeing
1349 the following:
1350 - a station will be in assoc state in TL before TL receives any data
1351 for it
1352
1353 PARAMETERS
1354
1355 pvosGCtx: pointer to the global vos context; a handle to TL's
1356 control block can be extracted from its context
1357 ucSTAId: identifier for the STA that is pending transmission
1358 tlSTAState: the new state of the connection to the given station
1359
1360
1361 RETURN VALUE
1362
1363 The result code associated with performing the operation
1364
1365 VOS_STATUS_E_INVAL: Input parameters are invalid
1366 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1367 TL cb is NULL ; access would cause a page fault
1368 VOS_STATUS_E_EXISTS: Station was not registered
1369 VOS_STATUS_SUCCESS: Everything is good :)
1370
1371 SIDE EFFECTS
1372
1373============================================================================*/
1374VOS_STATUS
1375WLANTL_ChangeSTAState
1376(
1377 v_PVOID_t pvosGCtx,
1378 v_U8_t ucSTAId,
1379 WLANTL_STAStateType tlSTAState
1380);
1381
1382/*===========================================================================
1383
Gopichand Nakkala8b54e912013-03-11 10:44:21 +05301384 FUNCTION WLANTL_STAPtkInstalled
1385
1386 DESCRIPTION
1387
1388 HDD will make this notification whenever PTK is installed for the STA
1389
1390 DEPENDENCIES
1391
1392 A station must have been registered before the change state can be
1393 called.
1394
1395 PARAMETERS
1396
1397 pvosGCtx: pointer to the global vos context; a handle to TL's
1398 control block can be extracted from its context
1399 ucSTAId: identifier for the STA for which Pairwise key is
1400 installed
1401
1402 RETURN VALUE
1403
1404 The result code associated with performing the operation
1405
1406 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1407 TL cb is NULL ; access would cause a page fault
1408 VOS_STATUS_E_EXISTS: Station was not registered
1409 VOS_STATUS_SUCCESS: Everything is good :)
1410
1411 SIDE EFFECTS
1412
1413============================================================================*/
1414VOS_STATUS
1415WLANTL_STAPtkInstalled
1416(
1417 v_PVOID_t pvosGCtx,
1418 v_U8_t ucSTAId
1419);
1420/*===========================================================================
1421
Madan Mohan Koyyalamudifc1d1fe2012-10-18 15:07:12 -07001422 FUNCTION WLANTL_GetSTAState
1423
1424 DESCRIPTION
1425
1426 Returns connectivity state of a particular STA.
1427
1428 DEPENDENCIES
1429
1430 A station must have been registered before its state can be retrieved.
1431
1432
1433 PARAMETERS
1434
1435 IN
1436 pvosGCtx: pointer to the global vos context; a handle to TL's
1437 control block can be extracted from its context
1438 ucSTAId: identifier of the station
1439
1440 OUT
1441 ptlSTAState: the current state of the connection to the given station
1442
1443
1444 RETURN VALUE
1445
1446 The result code associated with performing the operation
1447
1448 VOS_STATUS_E_INVAL: Input parameters are invalid
1449 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
1450 TL cb is NULL ; access would cause a page fault
1451 VOS_STATUS_E_EXISTS: Station was not registered
1452 VOS_STATUS_SUCCESS: Everything is good :)
1453
1454 SIDE EFFECTS
1455
1456============================================================================*/
1457VOS_STATUS
1458WLANTL_GetSTAState
1459(
1460 v_PVOID_t pvosGCtx,
1461 v_U8_t ucSTAId,
1462 WLANTL_STAStateType *ptlSTAState
1463);
1464
1465/*===========================================================================
1466
Jeff Johnson295189b2012-06-20 16:38:30 -07001467 FUNCTION WLANTL_STAPktPending
1468
1469 DESCRIPTION
1470
1471 HDD will call this API when a packet is pending transmission in its
1472 queues.
1473
1474 DEPENDENCIES
1475
1476 A station must have been registered before the packet pending
1477 notification can be sent.
1478
1479 RESTRICTION: TL will not count packets for pending notification.
1480 HDD is expected to send the notification only when
1481 non-empty event gets triggered. Worst case scenario
1482 is that TL might end up making a call when Hdds
1483 queues are actually empty.
1484
1485 PARAMETERS
1486
1487 pvosGCtx: pointer to the global vos context; a handle to TL's
1488 control block can be extracted from its context
1489 ucSTAId: identifier for the STA that is pending transmission
1490 ucAC: access category of the non-empty queue
1491
1492 RETURN VALUE
1493
1494 The result code associated with performing the operation
1495
1496 VOS_STATUS_E_INVAL: Input parameters are invalid
1497 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1498 to TL cb is NULL ; access would cause a page fault
1499 VOS_STATUS_E_EXISTS: Station was not registered
1500 VOS_STATUS_SUCCESS: Everything is good :)
1501
1502 SIDE EFFECTS
1503
1504============================================================================*/
1505VOS_STATUS
1506WLANTL_STAPktPending
1507(
1508 v_PVOID_t pvosGCtx,
1509 v_U8_t ucSTAId,
1510 WLANTL_ACEnumType ucAc
1511);
1512
1513/*==========================================================================
1514
1515 FUNCTION WLANTL_SetSTAPriority
1516
1517 DESCRIPTION
1518
1519 TL exposes this API to allow upper layers a rough control over the
1520 priority of transmission for a given station when supporting multiple
1521 connections.
1522
1523 DEPENDENCIES
1524
1525 A station must have been registered before the change in priority can be
1526 called.
1527
1528 PARAMETERS
1529
1530 pvosGCtx: pointer to the global vos context; a handle to TL's
1531 control block can be extracted from its context
1532 ucSTAId: identifier for the STA that has to change priority
1533
1534 RETURN VALUE
1535
1536 The result code associated with performing the operation
1537
1538 VOS_STATUS_E_INVAL: Input parameters are invalid
1539 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1540 to TL cb is NULL ; access would cause a page fault
1541 VOS_STATUS_E_EXISTS: Station was not registered
1542 VOS_STATUS_SUCCESS: Everything is good :)
1543
1544 SIDE EFFECTS
1545
1546============================================================================*/
1547VOS_STATUS
1548WLANTL_SetSTAPriority
1549(
1550 v_PVOID_t pvosGCtx,
1551 v_U8_t ucSTAId,
1552 WLANTL_STAPriorityType tlSTAPri
1553);
1554
1555/*----------------------------------------------------------------------------
1556 INTERACTION WITH BAP
1557 ---------------------------------------------------------------------------*/
1558
1559/*==========================================================================
1560
1561 FUNCTION WLANTL_RegisterBAPClient
1562
1563 DESCRIPTION
1564 Called by SME to register itself as client for non-data BT-AMP packets.
1565
1566 DEPENDENCIES
1567 TL must be initialized before this function can be called.
1568
1569 PARAMETERS
1570
1571 IN
1572 pvosGCtx: pointer to the global vos context; a handle to TL's
1573 or SME's control block can be extracted from its context
1574 pfnTlBAPRxFrm: pointer to the receive processing routine for non-data
1575 BT-AMP packets
1576 pfnFlushOpCompleteCb:
1577 pointer to the function that will inform BAP that the
1578 flush operation is complete.
1579
1580 RETURN VALUE
1581
1582 The result code associated with performing the operation
1583
1584 VOS_STATUS_E_INVAL: Input parameters are invalid
1585 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1586 to TL cb is NULL ; access would cause a page fault
1587 VOS_STATUS_E_EXISTS: BAL client was already registered
1588 VOS_STATUS_SUCCESS: Everything is good :)
1589
1590 SIDE EFFECTS
1591
1592============================================================================*/
1593VOS_STATUS
1594WLANTL_RegisterBAPClient
1595(
1596 v_PVOID_t pvosGCtx,
1597 WLANTL_BAPRxCBType pfnTlBAPRx,
1598 WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb
1599);
1600
1601
1602/*==========================================================================
1603
1604 FUNCTION WLANTL_TxBAPFrm
1605
1606 DESCRIPTION
1607 BAP calls this when it wants to send a frame to the module
1608
1609 DEPENDENCIES
1610 BAP must be registered with TL before this function can be called.
1611
1612 RESTRICTION: BAP CANNOT push any packets to TL until it did not receive
1613 a tx complete from the previous packet, that means BAP
1614 sends one packet, wait for tx complete and then
1615 sends another one
1616
1617 If BAP sends another packet before TL manages to process the
1618 previously sent packet call will end in failure
1619
1620 PARAMETERS
1621
1622 IN
1623 pvosGCtx: pointer to the global vos context; a handle to TL's
1624 or BAP's control block can be extracted from its context
1625 vosDataBuff: pointer to the vOSS buffer containing the packet to be
1626 transmitted
1627 pMetaInfo: meta information about the packet
1628 pfnTlBAPTxComp: pointer to a transmit complete routine for notifying
1629 the result of the operation over the bus
1630
1631 RETURN VALUE
1632 The result code associated with performing the operation
1633
1634 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1635 page fault
1636 VOS_STATUS_E_EXISTS: BAL client was not yet registered
1637 VOS_STATUS_E_BUSY: The previous BT-AMP packet was not yet transmitted
1638 VOS_STATUS_SUCCESS: Everything is good :)
1639
1640 Other failure messages may be returned from the BD header handling
1641 routines, please check apropriate API for more info.
1642
1643 SIDE EFFECTS
1644
1645============================================================================*/
1646VOS_STATUS
1647WLANTL_TxBAPFrm
1648(
1649 v_PVOID_t pvosGCtx,
1650 vos_pkt_t* vosDataBuff,
1651 WLANTL_MetaInfoType* pMetaInfo,
1652 WLANTL_TxCompCBType pfnTlBAPTxComp
1653);
1654
1655
1656/*----------------------------------------------------------------------------
1657 INTERACTION WITH SME
1658 ---------------------------------------------------------------------------*/
1659
1660/*==========================================================================
1661
1662 FUNCTION WLANTL_GetRssi
1663
1664 DESCRIPTION
1665 TL will extract the RSSI information from every data packet from the
1666 ongoing traffic and will store it. It will provide the result to SME
1667 upon request.
1668
1669 DEPENDENCIES
1670
1671 WARNING: the read and write of this value will not be protected
1672 by locks, therefore the information obtained after a read
1673 might not always be consistent.
1674
1675 PARAMETERS
1676
1677 IN
1678 pvosGCtx: pointer to the global vos context; a handle to TL's
1679 or SME's control block can be extracted from its context
1680 ucSTAId: station identifier for the requested value
1681
1682 OUT
1683 puRssi: the average value of the RSSI
1684
1685
1686 RETURN VALUE
1687 The result code associated with performing the operation
1688
1689 VOS_STATUS_E_INVAL: Input parameters are invalid
1690 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1691 to TL cb is NULL ; access would cause a page fault
1692 VOS_STATUS_E_EXISTS: STA was not yet registered
1693 VOS_STATUS_SUCCESS: Everything is good :)
1694
1695 SIDE EFFECTS
1696
1697============================================================================*/
1698VOS_STATUS
1699WLANTL_GetRssi
1700(
1701 v_PVOID_t pvosGCtx,
1702 v_U8_t ucSTAId,
1703 v_S7_t* puRssi
1704);
1705
1706/*==========================================================================
1707
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301708 FUNCTION WLANTL_GetSnr
1709
1710 DESCRIPTION
1711 TL will extract the SNR information from every data packet from the
1712 ongoing traffic and will store it. It will provide the result to SME
1713 upon request.
1714
1715 DEPENDENCIES
1716
1717 WARNING: the read and write of this value will not be protected
1718 by locks, therefore the information obtained after a read
1719 might not always be consistent.
1720
1721 PARAMETERS
1722
1723 IN
1724 pvosGCtx: pointer to the global vos context; a handle to TL's
1725 or SME's control block can be extracted from its context
1726 ucSTAId: station identifier for the requested value
1727
1728 OUT
1729 puSnr: the average value of the SNR
1730
1731
1732 RETURN VALUE
1733 The result code associated with performing the operation
1734
1735 VOS_STATUS_E_INVAL: Input parameters are invalid
1736 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1737 to TL cb is NULL ; access would cause a page fault
1738 VOS_STATUS_E_EXISTS: STA was not yet registered
1739 VOS_STATUS_SUCCESS: Everything is good :)
1740
1741 SIDE EFFECTS
1742
1743============================================================================*/
1744VOS_STATUS
1745WLANTL_GetSnr
1746(
1747 tANI_U8 ucSTAId,
1748 tANI_S8* pSnr
1749);
1750
1751/*==========================================================================
1752
Jeff Johnson295189b2012-06-20 16:38:30 -07001753 FUNCTION WLANTL_GetLinkQuality
1754
1755 DESCRIPTION
1756 TL will extract the LinkQuality information from every data packet from the
1757 ongoing traffic and will store it. It will provide the result to SME
1758 upon request.
1759
1760 DEPENDENCIES
1761
1762 WARNING: the read and write of this value will not be protected
1763 by locks, therefore the information obtained after a read
1764 might not always be consistent.
1765
1766 PARAMETERS
1767
1768 IN
1769 pvosGCtx: pointer to the global vos context; a handle to TL's
1770 or SME's control block can be extracted from its context
1771 ucSTAId: station identifier for the requested value
1772
1773 OUT
1774 puLinkQuality: the average value of the LinkQuality
1775
1776
1777 RETURN VALUE
1778 The result code associated with performing the operation
1779
1780 VOS_STATUS_E_INVAL: Input parameters are invalid
1781 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
1782 to TL cb is NULL ; access would cause a page fault
1783 VOS_STATUS_E_EXISTS: STA was not yet registered
1784 VOS_STATUS_SUCCESS: Everything is good :)
1785
1786 SIDE EFFECTS
1787
1788============================================================================*/
1789VOS_STATUS
1790WLANTL_GetLinkQuality
1791(
1792 v_PVOID_t pvosGCtx,
1793 v_U8_t ucSTAId,
1794 v_U32_t* puLinkQuality
1795);
1796
1797/*==========================================================================
1798
1799 FUNCTION WLANTL_FlushStaTID
1800
1801 DESCRIPTION
1802 TL provides this API as an interface to SME (BAP) layer. TL inturn posts a
1803 message to HAL. This API is called by the SME inorder to perform a flush
1804 operation.
1805
1806 DEPENDENCIES
1807
1808 PARAMETERS
1809
1810 IN
1811 pvosGCtx: pointer to the global vos context; a handle to TL's
1812 or SME's control block can be extracted from its context
1813 ucSTAId: station identifier for the requested value
1814 ucTid: Tspec ID for the new BA session
1815
1816 OUT
1817 The response for this post is received in the main thread, via a response
1818 message from HAL to TL.
1819
1820 RETURN VALUE
1821 VOS_STATUS_SUCCESS: Everything is good :)
1822
1823 SIDE EFFECTS
1824============================================================================*/
1825VOS_STATUS
1826WLANTL_FlushStaTID
1827(
1828 v_PVOID_t pvosGCtx,
1829 v_U8_t ucSTAId,
1830 v_U8_t ucTid
1831);
1832
1833/*----------------------------------------------------------------------------
1834 INTERACTION WITH PE
1835 ---------------------------------------------------------------------------*/
1836
1837/*==========================================================================
1838
Siddharth Bhal4551b102014-10-09 21:36:36 +05301839 FUNCTION WLANTL_updateSpoofMacAddr
1840
1841 DESCRIPTION
1842 Called by HDD to update macaddr
1843
1844 DEPENDENCIES
1845 TL must be initialized before this API can be called.
1846
1847 PARAMETERS
1848
1849 IN
1850 pvosGCtx: pointer to the global vos context; a handle to
1851 TL's control block can be extracted from its context
1852 spoofMacAddr: spoofed mac adderess
1853 selfMacAddr: self Mac Address
1854
1855 RETURN VALUE
1856 The result code associated with performing the operation
1857
1858 VOS_STATUS_E_INVAL: Input parameters are invalid
1859 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1860 page fault
1861 VOS_STATUS_SUCCESS: Everything is good :)
1862
1863 SIDE EFFECTS
1864
1865============================================================================*/
1866VOS_STATUS
1867WLANTL_updateSpoofMacAddr
1868(
1869 v_PVOID_t pvosGCtx,
1870 v_MACADDR_t* spoofMacAddr,
1871 v_MACADDR_t* selfMacAddr
1872);
1873/*==========================================================================
1874
Jeff Johnson295189b2012-06-20 16:38:30 -07001875 FUNCTION WLANTL_RegisterMgmtFrmClient
1876
1877 DESCRIPTION
1878 Called by PE to register as a client for management frames delivery.
1879
1880 DEPENDENCIES
1881 TL must be initialized before this API can be called.
1882
1883 PARAMETERS
1884
1885 IN
1886 pvosGCtx: pointer to the global vos context; a handle to
1887 TL's control block can be extracted from its context
1888 pfnTlMgmtFrmRx: pointer to the receive processing routine for
1889 management frames
1890
1891 RETURN VALUE
1892 The result code associated with performing the operation
1893
1894 VOS_STATUS_E_INVAL: Input parameters are invalid
1895 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1896 page fault
1897 VOS_STATUS_E_EXISTS: Mgmt Frame client was already registered
1898 VOS_STATUS_SUCCESS: Everything is good :)
1899
1900 SIDE EFFECTS
1901
1902============================================================================*/
1903VOS_STATUS
1904WLANTL_RegisterMgmtFrmClient
1905(
1906 v_PVOID_t pvosGCtx,
1907 WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx
1908);
1909
1910/*==========================================================================
1911
1912 FUNCTION WLANTL_DeRegisterMgmtFrmClient
1913
1914 DESCRIPTION
1915 Called by PE to deregister as a client for management frames delivery.
1916
1917 DEPENDENCIES
1918 TL must be initialized before this API can be called.
1919
1920 PARAMETERS
1921
1922 IN
1923 pvosGCtx: pointer to the global vos context; a handle to
1924 TL's control block can be extracted from its context
1925 RETURN VALUE
1926 The result code associated with performing the operation
1927
1928 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1929 page fault
1930 VOS_STATUS_E_EXISTS: Mgmt Frame client was never registered
1931 VOS_STATUS_SUCCESS: Everything is good :)
1932
1933 SIDE EFFECTS
1934
1935============================================================================*/
1936VOS_STATUS
1937WLANTL_DeRegisterMgmtFrmClient
1938(
1939 v_PVOID_t pvosGCtx
1940);
1941
1942/*==========================================================================
1943
1944 FUNCTION WLANTL_TxMgmtFrm
1945
1946 DESCRIPTION
1947 Called by PE when it want to send out a management frame.
1948 HAL will also use this API for the few frames it sends out, they are not
1949 management frames howevere it is accepted that an exception will be
1950 allowed ONLY for the usage of HAL.
1951 Generic data frames SHOULD NOT travel through this function.
1952
1953 DEPENDENCIES
1954 TL must be initialized before this API can be called.
1955
1956 RESTRICTION: If PE sends another packet before TL manages to process the
1957 previously sent packet call will end in failure
1958
1959 Frames comming through here must be 802.11 frames, frame
1960 translation in UMA will be automatically disabled.
1961
1962 PARAMETERS
1963
1964 IN
1965 pvosGCtx: pointer to the global vos context;a handle to TL's
1966 control block can be extracted from its context
1967 vosFrmBuf: pointer to a vOSS buffer containing the management
1968 frame to be transmitted
1969 usFrmLen: the length of the frame to be transmitted; information
1970 is already included in the vOSS buffer
1971 wFrmType: the type of the frame being transmitted
1972 tid: tid used to transmit this frame
1973 pfnCompTxFunc: function pointer to the transmit complete routine
1974 pvBDHeader: pointer to the BD header, if NULL it means it was not
1975 yet constructed and it lies within TL's responsibility
1976 to do so; if not NULL it is expected that it was
1977 already packed inside the vos packet
1978 ucAckResponse: flag notifying it an interrupt is needed for the
1979 acknowledgement received when the frame is sent out
1980 the air and ; the interrupt will be processed by HAL,
1981 only one such frame can be pending in the system at
1982 one time.
1983
1984
1985 RETURN VALUE
1986 The result code associated with performing the operation
1987
1988 VOS_STATUS_E_INVAL: Input parameters are invalid
1989 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1990 page fault
1991 VOS_STATUS_E_EXISTS: Mgmt Frame client was not yet registered
1992 VOS_STATUS_E_BUSY: The previous Mgmt packet was not yet transmitted
1993 VOS_STATUS_SUCCESS: Everything is good :)
1994
1995 Other failure messages may be returned from the BD header handling
1996 routines, please check apropriate API for more info.
1997
1998 SIDE EFFECTS
1999
2000============================================================================*/
2001VOS_STATUS
2002WLANTL_TxMgmtFrm
2003(
2004 v_PVOID_t pvosGCtx,
2005 vos_pkt_t* vosFrmBuf,
2006 v_U16_t usFrmLen,
2007 v_U8_t ucFrmType,
2008 v_U8_t tid,
2009 WLANTL_TxCompCBType pfnCompTxFunc,
2010 v_PVOID_t voosBDHeader,
Ganesh Kondabattini10e67352015-03-16 17:41:57 +05302011 v_U32_t ucAckResponse,
2012 v_U32_t ucTxBdToken
Jeff Johnson295189b2012-06-20 16:38:30 -07002013);
2014
2015
2016/*----------------------------------------------------------------------------
2017 INTERACTION WITH HAL
2018 ---------------------------------------------------------------------------*/
2019
2020/*==========================================================================
2021
2022 FUNCTION WLANTL_ResetNotification
2023
2024 DESCRIPTION
2025 HAL notifies TL when the module is being reset.
2026 Currently not used.
2027
2028 DEPENDENCIES
2029
2030 PARAMETERS
2031
2032 IN
2033 pvosGCtx: pointer to the global vos context; a handle to TL's
2034 control block can be extracted from its context
2035
2036
2037 RETURN VALUE
2038 The result code associated with performing the operation
2039
2040 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
2041 page fault
2042 VOS_STATUS_SUCCESS: Everything is good :)
2043
2044 SIDE EFFECTS
2045
2046============================================================================*/
2047VOS_STATUS
2048WLANTL_ResetNotification
2049(
2050 v_PVOID_t pvosGCtx
2051);
2052
2053/*==========================================================================
2054
2055 FUNCTION WLANTL_SuspendDataTx
2056
2057 DESCRIPTION
2058 HAL calls this API when it wishes to suspend transmission for a
2059 particular STA.
2060
2061 DEPENDENCIES
2062 The STA for which the request is made must be first registered with
2063 TL by HDD.
2064
2065 RESTRICTION: In case of a suspend, the flag write and read will not be
2066 locked: worst case scenario one more packet can get
2067 through before the flag gets updated (we can make this
2068 write atomic as well to guarantee consistency)
2069
2070 PARAMETERS
2071
2072 IN
2073 pvosGCtx: pointer to the global vos context; a handle to TL's
2074 control block can be extracted from its context
2075 pucSTAId: identifier of the station for which the request is made;
2076 a value of NULL assumes suspend on all active station
2077 pfnSuspendTxCB: pointer to the suspend result notification in case the
2078 call is asynchronous
2079
2080
2081 RETURN VALUE
2082 The result code associated with performing the operation
2083
2084 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
2085 to TL cb is NULL ; access would cause a page fault
2086 VOS_STATUS_E_EXISTS: Station was not registered
2087 VOS_STATUS_SUCCESS: Everything is good :)
2088
2089 SIDE EFFECTS
2090
2091============================================================================*/
2092VOS_STATUS
2093WLANTL_SuspendDataTx
2094(
2095 v_PVOID_t pvosGCtx,
2096 v_U8_t* ucSTAId,
2097 WLANTL_SuspendCBType pfnSuspendTx
2098);
2099
2100/*==========================================================================
2101
2102 FUNCTION WLANTL_ResumeDataTx
2103
2104 DESCRIPTION
2105 Called by HAL to resume data transmission for a given STA.
2106
2107 WARNING: If a station was individually suspended a global resume will
2108 not resume that station
2109
2110 DEPENDENCIES
2111
2112 PARAMETERS
2113
2114 IN
2115 pvosGCtx: pointer to the global vos context; a handle to TL's
2116 control block can be extracted from its context
2117 pucSTAId: identifier of the station which is being resumed; NULL
2118 translates into global resume
2119
2120 RETURN VALUE
2121 The result code associated with performing the operation
2122
2123 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
2124 to TL cb is NULL ; access would cause a page fault
2125 VOS_STATUS_E_EXISTS: Station was not registered
2126 VOS_STATUS_SUCCESS: Everything is good :)
2127
2128 SIDE EFFECTS
2129
2130============================================================================*/
2131VOS_STATUS
2132WLANTL_ResumeDataTx
2133(
2134 v_PVOID_t pvosGCtx,
2135 v_U8_t* pucSTAId
2136);
2137
2138
2139/*----------------------------------------------------------------------------
2140 CLIENT INDEPENDENT INTERFACE
2141 ---------------------------------------------------------------------------*/
2142
2143/*==========================================================================
2144
2145 FUNCTION WLANTL_GetTxPktCount
2146
2147 DESCRIPTION
2148 TL will provide the number of transmitted packets counted per
2149 STA per TID.
2150
2151 DEPENDENCIES
2152
2153 PARAMETERS
2154
2155 IN
2156 pvosGCtx: pointer to the global vos context; a handle to TL's
2157 control block can be extracted from its context
2158 ucSTAId: identifier of the station
2159 ucTid: identifier of the tspec
2160
2161 OUT
2162 puTxPktCount: the number of packets tx packet for this STA and TID
2163
2164 RETURN VALUE
2165 The result code associated with performing the operation
2166
2167 VOS_STATUS_E_INVAL: Input parameters are invalid
2168 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
2169 to TL cb is NULL ; access would cause a page fault
2170 VOS_STATUS_E_EXISTS: Station was not registered
2171 VOS_STATUS_SUCCESS: Everything is good :)
2172
2173 SIDE EFFECTS
2174
2175============================================================================*/
2176VOS_STATUS
2177WLANTL_GetTxPktCount
2178(
2179 v_PVOID_t pvosGCtx,
2180 v_U8_t ucSTAId,
2181 v_U8_t ucTid,
2182 v_U32_t* puTxPktCount
2183);
2184
2185/*==========================================================================
2186
2187 FUNCTION WLANTL_GetRxPktCount
2188
2189 DESCRIPTION
2190 TL will provide the number of received packets counted per
2191 STA per TID.
2192
2193 DEPENDENCIES
2194
2195 PARAMETERS
2196
2197 IN
2198 pvosGCtx: pointer to the global vos context; a handle to TL's
2199 control block can be extracted from its context
2200 ucSTAId: identifier of the station
2201 ucTid: identifier of the tspec
2202
2203 OUT
2204 puTxPktCount: the number of packets rx packet for this STA and TID
2205
2206 RETURN VALUE
2207 The result code associated with performing the operation
2208
2209 VOS_STATUS_E_INVAL: Input parameters are invalid
2210 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer
2211 to TL cb is NULL ; access would cause a page fault
2212 VOS_STATUS_E_EXISTS: Station was not registered
2213 VOS_STATUS_SUCCESS: Everything is good :)
2214
2215 SIDE EFFECTS
2216
2217============================================================================*/
2218VOS_STATUS
2219WLANTL_GetRxPktCount
2220(
2221 v_PVOID_t pvosGCtx,
2222 v_U8_t ucSTAId,
2223 v_U8_t ucTid,
2224 v_U32_t* puRxPktCount
2225);
2226
2227/*==========================================================================
Karthick S79bbe822015-07-14 15:28:08 +05302228
2229 FUNCTION WLANTL_IsEAPOLPending
2230
2231 DESCRIPTION
2232
2233 HDD calls this function when hdd_tx_timeout occurs. This checks whether
2234 EAPOL is pending.
2235
2236 DEPENDENCIES
2237
2238 HDD must have registered with TL at least one STA before this function
2239 can be called.
2240
2241 PARAMETERS
2242
2243 IN
2244 pvosGCtx: pointer to the global vos context
2245
2246 RETURN VALUE
2247
2248 The result code associated with performing the operation
2249
2250 Success : Indicates EAPOL frame is pending and sta is in connected state
2251
2252 Failure : EAPOL frame is not pending
2253
2254 SIDE EFFECTS
2255============================================================================*/
2256VOS_STATUS
2257WLANTL_IsEAPOLPending
2258(
2259 v_PVOID_t pvosGCtx
2260);
2261
2262/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -07002263 VOSS SCHEDULER INTERACTION
2264 ==========================================================================*/
2265
2266/*==========================================================================
2267 FUNCTION WLANTL_McProcessMsg
2268
2269 DESCRIPTION
2270 Called by VOSS when a message was serialized for TL through the
2271 main thread/task.
2272
2273 DEPENDENCIES
2274 The TL must be initialized before this function can be called.
2275
2276 PARAMETERS
2277
2278 IN
2279 pvosGCtx: pointer to the global vos context; a handle to TL's
2280 control block can be extracted from its context
2281 message: type and content of the message
2282
2283
2284 RETURN VALUE
2285 The result code associated with performing the operation
2286
2287 VOS_STATUS_E_INVAL: invalid input parameters
2288 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
2289 page fault
2290 VOS_STATUS_SUCCESS: Everything is good :)
2291
2292 SIDE EFFECTS
2293
2294============================================================================*/
2295VOS_STATUS
2296WLANTL_McProcessMsg
2297(
2298 v_PVOID_t pvosGCtx,
2299 vos_msg_t* message
2300);
2301
2302/*==========================================================================
Katya Nigam664f5032014-05-05 12:24:32 +05302303 FUNCTION WLANTL_RxProcessMsg
2304
2305 DESCRIPTION
2306 Called by VOSS when a message was serialized for TL through the
2307 rx thread/task.
2308
2309 DEPENDENCIES
2310 The TL must be initialized before this function can be called.
2311
2312 PARAMETERS
2313
2314 IN
2315 pvosGCtx: pointer to the global vos context; a handle to TL's
2316 control block can be extracted from its context
2317 message: type and content of the message
2318
2319
2320 RETURN VALUE
2321 The result code associated with performing the operation
2322
2323 VOS_STATUS_E_INVAL: invalid input parameters
2324 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
2325 page fault
2326 VOS_STATUS_SUCCESS: Everything is good :)
2327
2328 Other values can be returned as a result of a function call, please check
2329 corresponding API for more info.
2330 SIDE EFFECTS
2331
2332============================================================================*/
2333VOS_STATUS
2334WLANTL_RxProcessMsg
2335(
2336 v_PVOID_t pvosGCtx,
2337 vos_msg_t* message
2338);
2339
2340/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -07002341 FUNCTION WLANTL_McFreeMsg
2342
2343 DESCRIPTION
2344 Called by VOSS to free a given TL message on the Main thread when there
2345 are messages pending in the queue when the whole system is been reset.
2346 For now, TL does not allocate any body so this function shout translate
2347 into a NOOP
2348
2349 DEPENDENCIES
2350 The TL must be initialized before this function can be called.
2351
2352 PARAMETERS
2353
2354 IN
2355 pvosGCtx: pointer to the global vos context; a handle to TL's
2356 control block can be extracted from its context
2357 message: type and content of the message
2358
2359
2360 RETURN VALUE
2361 The result code associated with performing the operation
2362
2363 VOS_STATUS_SUCCESS: Everything is good :)
2364
2365 SIDE EFFECTS
2366
2367============================================================================*/
2368VOS_STATUS
2369WLANTL_McFreeMsg
2370(
2371 v_PVOID_t pvosGCtx,
2372 vos_msg_t* message
2373);
2374
2375/*==========================================================================
2376 FUNCTION WLANTL_TxProcessMsg
2377
2378 DESCRIPTION
2379 Called by VOSS when a message was serialized for TL through the
2380 tx thread/task.
2381
2382 DEPENDENCIES
2383 The TL must be initialized before this function can be called.
2384
2385 PARAMETERS
2386
2387 IN
2388 pvosGCtx: pointer to the global vos context; a handle to TL's
2389 control block can be extracted from its context
2390 message: type and content of the message
2391
2392
2393 RETURN VALUE
2394 The result code associated with performing the operation
2395
2396 VOS_STATUS_E_INVAL: invalid input parameters
2397 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
2398 page fault
2399 VOS_STATUS_SUCCESS: Everything is good :)
2400
2401 Other values can be returned as a result of a function call, please check
2402 corresponding API for more info.
2403 SIDE EFFECTS
2404
2405============================================================================*/
2406VOS_STATUS
2407WLANTL_TxProcessMsg
2408(
2409 v_PVOID_t pvosGCtx,
2410 vos_msg_t* message
2411);
2412
2413/*==========================================================================
2414 FUNCTION WLANTL_McFreeMsg
2415
2416 DESCRIPTION
2417 Called by VOSS to free a given TL message on the Main thread when there
2418 are messages pending in the queue when the whole system is been reset.
2419 For now, TL does not allocate any body so this function shout translate
2420 into a NOOP
2421
2422 DEPENDENCIES
2423 The TL must be initialized before this function can be called.
2424
2425 PARAMETERS
2426
2427 IN
2428 pvosGCtx: pointer to the global vos context; a handle to TL's
2429 control block can be extracted from its context
2430 message: type and content of the message
2431
2432
2433 RETURN VALUE
2434 The result code associated with performing the operation
2435
2436 VOS_STATUS_SUCCESS: Everything is good :)
2437
2438 SIDE EFFECTS
2439
2440============================================================================*/
2441VOS_STATUS
2442WLANTL_TxFreeMsg
2443(
2444 v_PVOID_t pvosGCtx,
2445 vos_msg_t* message
2446);
2447
2448
2449/*==========================================================================
2450 FUNCTION WLANTL_EnableUAPSDForAC
2451
2452 DESCRIPTION
2453 Called by HDD to enable UAPSD in TL. TL is in charge for sending trigger
2454 frames.
2455
2456 DEPENDENCIES
2457 The TL must be initialized before this function can be called.
2458
2459 PARAMETERS
2460
2461 IN
2462 pvosGCtx: pointer to the global vos context; a handle to TL's
2463 control block can be extracted from its context
2464 ucSTAId: station Id
2465 ucACId: AC for which U-APSD is being enabled
2466 ucTid TSpec Id
2467 uServiceInt: service interval used by TL to send trigger frames
2468 uSuspendInt: suspend interval used by TL to determine that an
2469 app is idle and should start sending trigg frms less often
2470 wTSDir: direction of TSpec
2471
2472 RETURN VALUE
2473 The result code associated with performing the operation
2474
2475 VOS_STATUS_SUCCESS: Everything is good :)
2476
2477 SIDE EFFECTS
2478
2479============================================================================*/
2480VOS_STATUS
2481WLANTL_EnableUAPSDForAC
2482(
2483 v_PVOID_t pvosGCtx,
2484 v_U8_t ucSTAId,
2485 WLANTL_ACEnumType ucACId,
2486 v_U8_t ucTid,
2487 v_U8_t ucUP,
2488 v_U32_t uServiceInt,
2489 v_U32_t uSuspendInt,
2490 WLANTL_TSDirType wTSDir
2491);
2492
2493
2494/*==========================================================================
2495 FUNCTION WLANTL_DisableUAPSDForAC
2496
2497 DESCRIPTION
2498 Called by HDD to disable UAPSD in TL. TL will stop sending trigger
2499 frames.
2500
2501 DEPENDENCIES
2502 The TL must be initialized before this function can be called.
2503
2504 PARAMETERS
2505
2506 IN
2507 pvosGCtx: pointer to the global vos context; a handle to TL's
2508 control block can be extracted from its context
2509 ucSTAId: station Id
2510 ucACId: AC for which U-APSD is being enabled
2511
2512
2513 RETURN VALUE
2514 The result code associated with performing the operation
2515
2516 VOS_STATUS_SUCCESS: Everything is good :)
2517
2518 SIDE EFFECTS
2519
2520============================================================================*/
2521VOS_STATUS
2522WLANTL_DisableUAPSDForAC
2523(
2524 v_PVOID_t pvosGCtx,
2525 v_U8_t ucSTAId,
2526 WLANTL_ACEnumType ucACId
2527);
2528
2529#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
2530/*==========================================================================
2531 FUNCTION WLANTL_RegRSSIIndicationCB
2532
2533 DESCRIPTION Registration function to get notification if RSSI cross
2534 threshold.
2535 Client should register threshold, direction, and notification
2536 callback function pointer
2537
2538 DEPENDENCIES NONE
2539
2540 PARAMETERS in pAdapter - Global handle
2541 in rssiValue - RSSI threshold value
2542 in triggerEvent - Cross direction should be notified
2543 UP, DOWN, and CROSS
2544 in crossCBFunction - Notification CB Function
2545 in usrCtxt - user context
2546
2547 RETURN VALUE VOS_STATUS
2548
2549 SIDE EFFECTS NONE
2550
2551============================================================================*/
2552VOS_STATUS WLANTL_RegRSSIIndicationCB
2553(
2554 v_PVOID_t pAdapter,
2555 v_S7_t rssiValue,
2556 v_U8_t triggerEvent,
2557 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2558 VOS_MODULE_ID moduleID,
2559 v_PVOID_t usrCtxt
2560);
2561
2562/*==========================================================================
2563 FUNCTION WLANTL_DeregRSSIIndicationCB
2564
2565 DESCRIPTION Remove specific threshold from list
2566
2567 DEPENDENCIES NONE
2568
2569 PARAMETERS in pAdapter - Global handle
2570 in rssiValue - RSSI threshold value
2571 in triggerEvent - Cross direction should be notified
2572 UP, DOWN, and CROSS
2573
2574 RETURN VALUE VOS_STATUS
2575
2576 SIDE EFFECTS NONE
2577
2578============================================================================*/
2579VOS_STATUS WLANTL_DeregRSSIIndicationCB
2580(
2581 v_PVOID_t pAdapter,
2582 v_S7_t rssiValue,
2583 v_U8_t triggerEvent,
2584 WLANTL_RSSICrossThresholdCBType crossCBFunction,
2585 VOS_MODULE_ID moduleID
2586);
2587
2588/*==========================================================================
2589
2590 FUNCTION
2591
2592 DESCRIPTION
2593
2594 PARAMETERS
2595
2596 RETURN VALUE
2597
2598============================================================================*/
2599VOS_STATUS WLANTL_BMPSRSSIRegionChangedNotification
2600(
2601 v_PVOID_t pAdapter,
2602 tpSirRSSINotification pRSSINotification
2603);
2604
2605/*==========================================================================
2606 FUNCTION WLANTL_SetAlpha
2607
2608 DESCRIPTION ALPLA is weight value to calculate AVG RSSI
2609 avgRSSI = (ALPHA * historyRSSI) + ((10 - ALPHA) * newRSSI)
2610 avgRSSI has (ALPHA * 10)% of history RSSI weight and
2611 (10 - ALPHA)% of newRSSI weight
2612 This portion is dynamically configurable.
2613 Default is ?
2614
2615 DEPENDENCIES NONE
2616
2617 PARAMETERS in pAdapter - Global handle
2618 in valueAlpah - ALPHA
2619
2620 RETURN VALUE VOS_STATUS
2621
2622 SIDE EFFECTS NONE
2623
2624============================================================================*/
2625VOS_STATUS WLANTL_SetAlpha
2626(
2627 v_PVOID_t pAdapter,
2628 v_U8_t valueAlpha
2629);
2630
2631/*==========================================================================
2632 FUNCTION WLANTL_RegGetTrafficStatus
2633
2634 DESCRIPTION Registration function for traffic status monitoring
2635 During measure period count data frames.
2636 If frame count is larger then IDLE threshold set as traffic ON
2637 or OFF.
2638 And traffic status is changed send report to client with
2639 registered callback function
2640
2641 DEPENDENCIES NONE
2642
2643 PARAMETERS in pAdapter - Global handle
2644 in idleThreshold - Traffic on or off threshold
2645 in measurePeriod - Traffic state check period
2646 in trfficStatusCB - traffic status changed notification
2647 CB function
2648 in usrCtxt - user context
2649
2650 RETURN VALUE VOS_STATUS
2651
2652 SIDE EFFECTS NONE
2653
2654============================================================================*/
2655VOS_STATUS WLANTL_RegGetTrafficStatus
2656(
2657 v_PVOID_t pAdapter,
2658 v_U32_t idleThreshold,
2659 v_U32_t measurePeriod,
2660 WLANTL_TrafficStatusChangedCBType trfficStatusCB,
2661 v_PVOID_t usrCtxt
2662);
2663#endif
2664/*==========================================================================
2665 FUNCTION WLANTL_GetStatistics
2666
2667 DESCRIPTION Get traffic statistics for identified station
2668
2669 DEPENDENCIES NONE
2670
2671 PARAMETERS in pAdapter - Global handle
2672 in statType - specific statistics field to reset
2673 out statBuffer - traffic statistics buffer
2674
2675 RETURN VALUE VOS_STATUS
2676
2677 SIDE EFFECTS NONE
2678
2679============================================================================*/
2680VOS_STATUS WLANTL_GetStatistics
2681(
2682 v_PVOID_t pAdapter,
2683 WLANTL_TRANSFER_STA_TYPE *statBuffer,
2684 v_U8_t STAid
2685);
2686
2687/*==========================================================================
2688 FUNCTION WLANTL_ResetStatistics
2689
2690 DESCRIPTION Reset statistics structure for identified station ID
2691 Reset means set values as 0
2692
2693 DEPENDENCIES NONE
2694
2695 PARAMETERS in pAdapter - Global handle
2696 in statType - specific statistics field to reset
2697
2698 RETURN VALUE VOS_STATUS
2699
2700 SIDE EFFECTS NONE
2701
2702============================================================================*/
2703VOS_STATUS WLANTL_ResetStatistics
2704(
2705 v_PVOID_t pAdapter,
2706 v_U8_t STAid
2707);
2708
2709/*==========================================================================
2710 FUNCTION WLANTL_GetSpecStatistic
2711
2712 DESCRIPTION Get specific field within statistics structure for
2713 identified station ID
2714
2715 DEPENDENCIES NONE
2716
2717 PARAMETERS in pAdapter - Global handle
2718 in statType - specific statistics field to reset
2719 in STAid - Station ID
2720 out buffer - Statistic value
2721
2722 RETURN VALUE VOS_STATUS
2723
2724 SIDE EFFECTS NONE
2725
2726============================================================================*/
2727VOS_STATUS WLANTL_GetSpecStatistic
2728(
2729 v_PVOID_t pAdapter,
2730 WLANTL_TRANSFER_STATIC_TYPE statType,
2731 v_U32_t *buffer,
2732 v_U8_t STAid
2733);
2734
2735/*==========================================================================
2736 FUNCTION WLANTL_ResetSpecStatistic
2737
2738 DESCRIPTION Reset specific field within statistics structure for
2739 identified station ID
2740 Reset means set as 0
2741
2742 DEPENDENCIES NONE
2743
2744 PARAMETERS in pAdapter - Global handle
2745 in statType - specific statistics field to reset
2746 in STAid - Station ID
2747
2748 RETURN VALUE VOS_STATUS
2749
2750 SIDE EFFECTS NONE
2751
2752============================================================================*/
2753VOS_STATUS WLANTL_ResetSpecStatistic
2754(
2755 v_PVOID_t pAdapter,
2756 WLANTL_TRANSFER_STATIC_TYPE statType,
2757 v_U8_t STAid
2758);
Jeff Johnson295189b2012-06-20 16:38:30 -07002759/*===============================================================================
2760 FUNCTION WLANTL_IsReplayPacket
2761
2762 DESCRIPTION This function does replay check for valid stations
2763
2764 DEPENDENCIES Validity of replay check must be done before the function
2765 is called
2766
2767 PARAMETERS currentReplayCounter current replay counter taken from RX BD
2768 previousReplayCounter previous replay counter taken from TL CB
2769
2770 RETRUN VOS_TRUE packet is a replay packet
2771 VOS_FALSE packet is not a replay packet
2772
2773 SIDE EFFECTS none
2774 ===============================================================================*/
2775v_BOOL_t WLANTL_IsReplayPacket
2776(
2777 v_U64_t currentReplayCounter,
2778 v_U64_t previousReplayCounter
2779);
2780
2781/*===============================================================================
2782 FUNCTION WLANTL_GetReplayCounterFromRxBD
2783
2784 DESCRIPTION This function extracts 48-bit replay packet number from RX BD
2785
2786 DEPENDENCIES Validity of replay check must be done before the function
2787 is called
2788
2789 PARAMETERS pucRxHeader pointer to RX BD header
2790
2791 RETRUN v_U64_t Packet number extarcted from RX BD
2792
2793 SIDE EFFECTS none
2794 ===============================================================================*/
2795v_U64_t
2796WLANTL_GetReplayCounterFromRxBD
2797(
2798 v_U8_t *pucRxBDHeader
2799);
Jeff Johnson295189b2012-06-20 16:38:30 -07002800
2801
2802
2803/*
2804 DESCRIPTION
2805 TL returns the weight currently maintained in TL.
2806 IN
2807 pvosGCtx: pointer to the global vos context; a handle to TL's
2808 or SME's control block can be extracted from its context
2809
2810 OUT
2811 pACWeights: Caller allocated memory for filling in weights
2812
2813 RETURN VALUE VOS_STATUS
2814*/
2815VOS_STATUS
2816WLANTL_GetACWeights
2817(
2818 v_PVOID_t pvosGCtx,
2819 v_U8_t* pACWeights
2820);
2821
2822
2823/*
2824 DESCRIPTION
2825 Change the weight currently maintained by TL.
2826 IN
2827 pvosGCtx: pointer to the global vos context; a handle to TL's
2828 or SME's control block can be extracted from its context
2829 pACWeights: Caller allocated memory contain the weights to use
2830
2831
2832 RETURN VALUE VOS_STATUS
2833*/
2834VOS_STATUS
2835WLANTL_SetACWeights
2836(
2837 v_PVOID_t pvosGCtx,
2838 v_U8_t* pACWeights
2839);
2840
Jeff Johnson295189b2012-06-20 16:38:30 -07002841/*==========================================================================
2842 FUNCTION WLANTL_GetSoftAPStatistics
2843
2844 DESCRIPTION Collect the cumulative statistics for all Softap stations
2845
2846 DEPENDENCIES NONE
2847
2848 PARAMETERS in pvosGCtx - Pointer to the global vos context
2849 bReset - If set TL statistics will be cleared after reading
2850 out statsSum - pointer to collected statistics
2851
2852 RETURN VALUE VOS_STATUS_SUCCESS : if the Statistics are successfully extracted
2853
2854 SIDE EFFECTS NONE
2855
2856============================================================================*/
2857VOS_STATUS WLANTL_GetSoftAPStatistics(v_PVOID_t pAdapter, WLANTL_TRANSFER_STA_TYPE *statsSum, v_BOOL_t bReset);
Jeff Johnson295189b2012-06-20 16:38:30 -07002858
2859#ifdef __cplusplus
2860 }
2861#endif
2862
Katya Nigam63902932014-06-26 19:04:23 +05302863/*===========================================================================
2864
2865 FUNCTION WLANTL_EnableCaching
2866
2867 DESCRIPTION
2868
2869 This function is used to enable caching only when assoc/reassoc req is send.
2870 that is cache packets only for such STA ID.
2871
2872
2873 DEPENDENCIES
2874
2875 TL must have been initialized before this gets called.
2876
2877
2878 PARAMETERS
2879
2880 staId: station id.
2881
2882 RETURN VALUE
2883
2884 none
2885
2886============================================================================*/
2887void WLANTL_EnableCaching(v_U8_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002888
2889 /*===========================================================================
2890
2891 FUNCTION WLANTL_AssocFailed
2892
2893 DESCRIPTION
2894
2895 This function is used by PE to notify TL that cache needs to flushed
2896 when association is not successfully completed
2897
2898 Internally, TL post a message to TX_Thread to serialize the request to
2899 keep lock-free mechanism.
2900
2901
2902 DEPENDENCIES
2903
2904 TL must have been initialized before this gets called.
2905
2906
2907 PARAMETERS
2908
2909 ucSTAId: station id
2910
2911 RETURN VALUE
2912
2913 none
2914
2915 SIDE EFFECTS
2916 There may be race condition that PE call this API and send another association
2917 request immediately with same staId before TX_thread can process the message.
2918
2919 To avoid this, we might need PE to wait for TX_thread process the message,
2920 but this is not currently implemented.
2921
2922============================================================================*/
2923void WLANTL_AssocFailed(v_U8_t staId);
2924
2925
2926/*===============================================================================
2927 FUNCTION WLANTL_PostResNeeded
2928
2929 DESCRIPTION This function posts message to TL to reserve BD/PDU memory
2930
2931 DEPENDENCIES None
2932
2933 PARAMETERS pvosGCtx
2934
2935 RETURN None
2936
2937 SIDE EFFECTS none
2938 ===============================================================================*/
2939
2940void WLANTL_PostResNeeded(v_PVOID_t pvosGCtx);
2941
2942/*===========================================================================
2943
2944 FUNCTION WLANTL_Finish_ULA
2945
2946 DESCRIPTION
Nirav Shah4b53d4b2015-05-08 05:35:00 -07002947 This function is used by HDD to notify TL to finish Upper layer authentication
2948 incase the last EAPOL packet is pending in the TL queue.
Nirav Shah4f765af2015-01-21 19:51:30 +05302949 To avoid the race condition between sme set key and the last EAPOL packet
Jeff Johnson295189b2012-06-20 16:38:30 -07002950 the HDD module calls this function just before calling the sme_RoamSetKey.
Nirav Shah4f765af2015-01-21 19:51:30 +05302951
Jeff Johnson295189b2012-06-20 16:38:30 -07002952 DEPENDENCIES
2953
2954 TL must have been initialized before this gets called.
2955
Nirav Shah4f765af2015-01-21 19:51:30 +05302956
Jeff Johnson295189b2012-06-20 16:38:30 -07002957 PARAMETERS
2958
2959 callbackRoutine: HDD Callback function.
2960 callbackContext : HDD userdata context.
2961
2962 RETURN VALUE
2963
2964 VOS_STATUS_SUCCESS/VOS_STATUS_FAILURE
Nirav Shah4f765af2015-01-21 19:51:30 +05302965
Jeff Johnson295189b2012-06-20 16:38:30 -07002966 SIDE EFFECTS
Nirav Shah4f765af2015-01-21 19:51:30 +05302967
Jeff Johnson295189b2012-06-20 16:38:30 -07002968============================================================================*/
2969
2970VOS_STATUS WLANTL_Finish_ULA( void (*callbackRoutine) (void *callbackContext),
Nirav Shah4b53d4b2015-05-08 05:35:00 -07002971 void *callbackContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07002972
2973/*===============================================================================
2974 FUNCTION WLANTL_UpdateRssiBmps
2975
2976 DESCRIPTION This function updates the TL's RSSI (in BMPS mode)
2977
2978 DEPENDENCIES None
2979
2980 PARAMETERS
2981
2982 pvosGCtx VOS context VOS Global context
2983 staId Station ID Station ID
2984 rssi RSSI (BMPS mode) RSSI in BMPS mode
2985
2986 RETURN None
2987
2988 SIDE EFFECTS none
2989 ===============================================================================*/
2990
2991void WLANTL_UpdateRssiBmps(v_PVOID_t pvosGCtx, v_U8_t staId, v_S7_t rssi);
2992
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05302993/*===============================================================================
2994 FUNCTION WLANTL_UpdateSnrBmps
2995
2996 DESCRIPTION This function updates the TL's SNR (in BMPS mode)
2997
2998 DEPENDENCIES None
2999
3000 PARAMETERS
3001
3002 pvosGCtx VOS context VOS Global context
3003 staId Station ID Station ID
3004 snr SNR (BMPS mode) SNR in BMPS mode
3005
3006 RETURN None
3007
3008 SIDE EFFECTS none
3009 ===============================================================================*/
3010
3011void WLANTL_UpdateSnrBmps(v_PVOID_t pvosGCtx, v_U8_t staId, v_S7_t snr);
3012
Gopichand Nakkala11acd112012-12-31 16:04:04 -08003013/*==========================================================================
3014 FUNCTION WLANTL_SetTxXmitPending
3015
3016 DESCRIPTION
3017 Called by the WDA when it wants to indicate that WDA_DS_TX_START_XMIT msg
3018 is pending in TL msg queue
3019
3020 DEPENDENCIES
3021 The TL must be registered with WDA before this function can be called.
3022
3023 PARAMETERS
3024
3025 IN
3026 pvosGCtx: pointer to the global vos context; a handle to TL's
3027 or WDA's control block can be extracted from its context
3028
3029 RETURN VALUE None
3030
3031 SIDE EFFECTS
3032
3033============================================================================*/
3034
3035v_VOID_t
3036WLANTL_SetTxXmitPending
3037(
3038 v_PVOID_t pvosGCtx
3039);
3040
3041/*==========================================================================
3042 FUNCTION WLANTL_IsTxXmitPending
3043
3044 DESCRIPTION
3045 Called by the WDA when it wants to know whether WDA_DS_TX_START_XMIT msg
3046 is pending in TL msg queue
3047
3048 DEPENDENCIES
3049 The TL must be registered with WDA before this function can be called.
3050
3051 PARAMETERS
3052
3053 IN
3054 pvosGCtx: pointer to the global vos context; a handle to TL's
3055 or WDA's control block can be extracted from its context
3056
3057 RETURN VALUE
3058 The result code associated with performing the operation
3059
3060 0: No WDA_DS_TX_START_XMIT msg pending
3061 1: Msg WDA_DS_TX_START_XMIT already pending in TL msg queue
3062
3063 SIDE EFFECTS
3064
3065============================================================================*/
3066
3067v_BOOL_t
3068WLANTL_IsTxXmitPending
3069(
3070 v_PVOID_t pvosGCtx
3071);
3072
3073/*==========================================================================
3074 FUNCTION WLANTL_ClearTxXmitPending
3075
3076 DESCRIPTION
3077 Called by the WDA when it wants to indicate that no WDA_DS_TX_START_XMIT msg
3078 is pending in TL msg queue
3079
3080 DEPENDENCIES
3081 The TL must be registered with WDA before this function can be called.
3082
3083 PARAMETERS
3084
3085 IN
3086 pvosGCtx: pointer to the global vos context; a handle to TL's
3087 or WDA's control block can be extracted from its context
3088
3089 RETURN VALUE None
3090
3091 SIDE EFFECTS
3092
3093============================================================================*/
3094
3095v_VOID_t
3096WLANTL_ClearTxXmitPending
3097(
3098 v_PVOID_t pvosGCtx
3099);
3100
Shailender Karmuchia734f332013-04-19 14:02:48 -07003101/*==========================================================================
3102 FUNCTION WLANTL_UpdateSTABssIdforIBSS
3103
3104 DESCRIPTION
3105 HDD will call this API to update the BSSID for this Station.
3106
3107 DEPENDENCIES
3108 The HDD Should registered the staID with TL before calling this function.
3109
3110 PARAMETERS
3111
3112 IN
3113 pvosGCtx: Pointer to the global vos context; a handle to TL's
3114 or WDA's control block can be extracted from its context
3115 IN
3116 ucSTAId The Station ID for Bssid to be updated
3117 IN
3118 pBssid BSSID to be updated
3119
3120 RETURN VALUE
3121 The result code associated with performing the operation
3122
3123 VOS_STATUS_E_INVAL: Input parameters are invalid
3124 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
3125 TL cb is NULL ; access would cause a page fault
3126 VOS_STATUS_E_EXISTS: Station was not registered
3127 VOS_STATUS_SUCCESS: Everything is good :)
3128
Madan Mohan Koyyalamudia96f5442013-05-10 11:32:06 +05303129 SIDE EFFECTS
Shailender Karmuchia734f332013-04-19 14:02:48 -07003130============================================================================*/
3131
3132VOS_STATUS
3133WLANTL_UpdateSTABssIdforIBSS
3134(
3135 v_PVOID_t pvosGCtx,
3136 v_U8_t ucSTAId,
3137 v_U8_t *pBssid
3138);
3139
3140
3141
Gopichand Nakkala8a2b1442013-05-29 15:33:14 +05303142/*===============================================================================
3143 FUNCTION WLANTL_UpdateLinkCapacity
3144
3145 DESCRIPTION This function updates the STA's Link Capacity in TL
3146
3147 DEPENDENCIES None
3148
3149 PARAMETERS
3150
3151 pvosGCtx VOS context VOS Global context
3152 staId Station ID Station ID
3153 linkCapacity linkCapacity Link Capacity
3154
3155 RETURN None
3156
3157 SIDE EFFECTS none
3158 ===============================================================================*/
3159
3160void
3161WLANTL_UpdateLinkCapacity
3162(
3163 v_PVOID_t pvosGCtx,
3164 v_U8_t staId,
3165 v_U32_t linkCapacity);
3166
3167/*===========================================================================
3168
3169 FUNCTION WLANTL_GetSTALinkCapacity
3170
3171 DESCRIPTION
3172
3173 Returns Link Capacity of a particular STA.
3174
3175 DEPENDENCIES
3176
3177 A station must have been registered before its state can be retrieved.
3178
Gopichand Nakkala8a2b1442013-05-29 15:33:14 +05303179 PARAMETERS
3180
3181 IN
3182 pvosGCtx: pointer to the global vos context; a handle to TL's
3183 control block can be extracted from its context
3184 ucSTAId: identifier of the station
3185
3186 OUT
3187 plinkCapacity: the current link capacity the connection to
3188 the given station
3189
3190
3191 RETURN VALUE
3192
3193 The result code associated with performing the operation
3194
3195 VOS_STATUS_E_INVAL: Input parameters are invalid
3196 VOS_STATUS_E_FAULT: Station ID is outside array boundaries or pointer to
3197 TL cb is NULL ; access would cause a page fault
3198 VOS_STATUS_E_EXISTS: Station was not registered
3199 VOS_STATUS_SUCCESS: Everything is good :)
3200
3201 SIDE EFFECTS
3202
3203============================================================================*/
Madan Mohan Koyyalamudia96f5442013-05-10 11:32:06 +05303204
Gopichand Nakkala8a2b1442013-05-29 15:33:14 +05303205VOS_STATUS
3206WLANTL_GetSTALinkCapacity
3207(
3208 v_PVOID_t pvosGCtx,
3209 v_U8_t ucSTAId,
3210 v_U32_t *plinkCapacity
3211);
Madan Mohan Koyyalamudia96f5442013-05-10 11:32:06 +05303212
3213/*===========================================================================
3214 FUNCTION WLANTL_TxThreadDebugHandler
3215
3216 DESCRIPTION
3217 Printing TL Snapshot dump, processed under TxThread context, currently
3218 information regarding the global TlCb struture. Dumps information related
3219 to per active STA connection currently in use by TL.
3220
3221 DEPENDENCIES
3222 The TL must be initialized before this gets called.
3223
3224 PARAMETERS
3225
3226 IN
3227 pvosGCtx: Pointer to the global vos context; a handle to TL's
3228 or WDA's control block can be extracted from its context
3229
3230 RETURN VALUE None
3231
3232 SIDE EFFECTS
3233============================================================================*/
3234
3235v_VOID_t
3236WLANTL_TxThreadDebugHandler
3237(
3238 v_PVOID_t *pvosGCtx
3239);
3240
3241/*==========================================================================
3242 FUNCTION WLANTL_TLDebugMessage
3243
3244 DESCRIPTION
3245 Post a TL Snapshot request, posts message in TxThread.
3246
3247 DEPENDENCIES
3248 The TL must be initialized before this gets called.
3249
3250 PARAMETERS
3251
3252 IN
3253 displaySnapshot Boolean showing whether to dump the snapshot or not.
3254
3255 RETURN VALUE None
3256
3257 SIDE EFFECTS
3258
3259============================================================================*/
3260
3261v_VOID_t
3262WLANTL_TLDebugMessage
3263(
Mihir Shete327c2ab2014-11-13 15:17:02 +05303264 v_U32_t debugFlags
Madan Mohan Koyyalamudia96f5442013-05-10 11:32:06 +05303265);
3266
Mihir Shetefd62d9d2014-08-06 15:08:21 +05303267/*==========================================================================
3268 FUNCTION WLANTL_FatalError
3269
3270 DESCRIPTION
3271 Fatal error reported in TX path, post an event to TX Thread for further
3272 handling
3273
3274 DEPENDENCIES
3275 The TL must be initialized before this gets called.
3276
3277 PARAMETERS
3278
3279 VOID
3280
3281 RETURN VALUE None
3282
3283 SIDE EFFECTS
3284
3285============================================================================*/
3286v_VOID_t
3287WLANTL_FatalError
3288(
3289 v_VOID_t
3290);
Kapil Guptad90b3862016-06-25 00:42:49 +05303291
3292#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3293void WLANTL_StartRxRateMonitor(v_PVOID_t pvosGCtx, wpt_uint8 staId,
3294 wpt_uint16 minRate,
3295 wpt_uint16 maxRate, wpt_uint8 minPercentage,
3296 wpt_uint16 minPktRequired, void *hHal,
3297 wpt_uint64 timeToWait,
3298 void (*triggerRoamScanfn) (void *, wpt_uint8));
3299
3300void WLANTL_StopRxRateMonitor(v_PVOID_t pvosGCtx);
3301#endif
Abhishek Singh00b71972016-01-07 10:51:04 +05303302#ifdef WLAN_FEATURE_RMC
3303VOS_STATUS
3304WLANTL_EnableRMC
3305(
3306 v_PVOID_t pvosGCtx,
3307 v_MACADDR_t *pMcastAddr
3308);
3309
3310
3311VOS_STATUS
3312WLANTL_DisableRMC
3313(
3314 v_PVOID_t pvosGCtx,
3315 v_MACADDR_t *pMcastAddr
3316);
3317
3318/*=============================================================================
3319 FUNCTION WLANTL_SetMcastDuplicateDetection
3320
3321 DESCRIPTION
3322 This function sets multicate duplicate detection operation.
3323 If enable is 1, the detection is enabled, else it is disabled.
3324
3325 DEPENDENCIES
3326
3327 PARAMETERS
3328
3329 IN
3330
3331 pvosGCtx : Pointer to VOS global context
3332 enable : Boolean to enable or disable
3333
3334 RETURN VALUE
3335 The result code associated with performing the operation
3336
3337 VOS_STATUS_E_FAULT: Sanity check on input failed
3338
3339 VOS_STATUS_SUCCESS: Everything is good :)
3340
3341 Other return values are possible coming from the called functions.
3342 Please check API for additional info.
3343
3344 SIDE EFFECTS
3345
3346==============================================================================*/
3347VOS_STATUS
3348WLANTL_SetMcastDuplicateDetection
3349(
3350 v_PVOID_t pvosGCtx,
3351 v_U8_t enable
3352);
3353#endif /* WLAN_FEATURE_RMC */
Mihir Shetefd62d9d2014-08-06 15:08:21 +05303354
Jeff Johnson295189b2012-06-20 16:38:30 -07003355#endif /* #ifndef WLAN_QCT_WLANTL_H */