blob: e97e38c5357d9d80d29e6510d1cfe383ef325bd4 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Sravan Kumar Kairamfb0b19d2018-02-01 12:25:28 +05302 * Copyright (c) 2012-2018 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_TLI_H
32#define WLAN_QCT_TLI_H
33
34/*===========================================================================
35
36 W L A N T R A N S P O R T L A Y E R
37 I N T E R N A L A P I
38
39
40DESCRIPTION
41 This file contains the internal declarations used within wlan transport
42 layer module.
43
Jeff Johnson295189b2012-06-20 16:38:30 -070044===========================================================================*/
45
46
47/*===========================================================================
48
49 EDIT HISTORY FOR FILE
50
51
52 This section contains comments describing changes made to the module.
53 Notice that changes are listed in reverse chronological order.
54
55
56 $Header:$ $DateTime: $ $Author: $
57
58
59when who what, where, why
60-------- --- ----------------------------------------------------------
Abhishek Singh00b71972016-01-07 10:51:04 +05306108/19/13 rajekuma Added RMC support in TL
Jeff Johnson295189b2012-06-20 16:38:30 -07006202/19/10 bad Fixed 802.11 to 802.3 ft issues with WAPI
6301/14/10 rnair Fixed the byte order for the WAI packet type.
6401/08/10 lti Added TL Data Caching
6510/09/09 rnair Add support for WAPI
6602/02/09 sch Add Handoff support
6712/09/08 lti Fixes for AMSS compilation
6812/02/08 lti Fix fo trigger frame generation
6910/31/08 lti Fix fo TL tx suspend
7010/01/08 lti Merged in fixes from reordering
7109/05/08 lti Fixes following QOS unit testing
7208/06/08 lti Added QOS support
7307/18/08 lti Fixes following integration
74 Added frame translation
7506/26/08 lti Fixes following unit testing
7605/05/08 lti Created module.
77
78===========================================================================*/
79
80
81
82/*===========================================================================
83
84 INCLUDE FILES FOR MODULE
85
86===========================================================================*/
87
88/*----------------------------------------------------------------------------
89 * Include Files
90 * -------------------------------------------------------------------------*/
91#include "vos_packet.h"
92#include "vos_api.h"
93#include "vos_timer.h"
94#include "vos_mq.h"
95#include "vos_list.h"
96#include "wlan_qct_tl.h"
97#include "pmcApi.h"
98#include "wlan_qct_hal.h"
99
100
101#define STATIC static
Jeff Johnson295189b2012-06-20 16:38:30 -0700102/*----------------------------------------------------------------------------
103 * Preprocessor Definitions and Constants
104 * -------------------------------------------------------------------------*/
105
106/*Maximum number of TIDs */
107#define WLAN_MAX_TID 8
108
Jeff Johnson295189b2012-06-20 16:38:30 -0700109/*Offset of the OUI field inside the LLC/SNAP header*/
110#define WLANTL_LLC_OUI_OFFSET 3
111
112/*Size of the OUI type field inside the LLC/SNAP header*/
113#define WLANTL_LLC_OUI_SIZE 3
114
115/*Offset of the protocol type field inside the LLC/SNAP header*/
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800116#define WLANTL_LLC_PROTO_TYPE_OFFSET (WLANTL_LLC_OUI_OFFSET + WLANTL_LLC_OUI_SIZE)
Jeff Johnson295189b2012-06-20 16:38:30 -0700117
118/*Size of the protocol type field inside the LLC/SNAP header*/
119#define WLANTL_LLC_PROTO_TYPE_SIZE 2
120
121/*802.1x protocol type */
122#define WLANTL_LLC_8021X_TYPE 0x888E
123
124/*WAPI protocol type */
125#define WLANTL_LLC_WAI_TYPE 0x88b4
Hanumantha Reddy Pothulaee001fc2015-05-26 15:21:53 +0530126#define WLANTL_ETHERTYPE_ARP 0x0806
Jeff Johnson295189b2012-06-20 16:38:30 -0700127
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800128#ifdef FEATURE_WLAN_TDLS
129#define WLANTL_LLC_TDLS_TYPE 0x890d
130#endif
131
Jeff Johnson295189b2012-06-20 16:38:30 -0700132/*Length offset inside the AMSDU sub-frame header*/
133#define WLANTL_AMSDU_SUBFRAME_LEN_OFFSET 12
134
135/*802.3 header definitions*/
136#define WLANTL_802_3_HEADER_LEN 14
137
138/* Offset of DA field in a 802.3 header*/
139#define WLANTL_802_3_HEADER_DA_OFFSET 0
140
141/*802.11 header definitions - header len without QOS ctrl field*/
142#define WLANTL_802_11_HEADER_LEN 24
143
144/*802.11 header length + QOS ctrl field*/
145#define WLANTL_MPDU_HEADER_LEN 32
146
147/*802.11 header definitions*/
148#define WLANTL_802_11_MAX_HEADER_LEN 40
149
150/*802.11 header definitions - qos ctrl field len*/
151#define WLANTL_802_11_HEADER_QOS_CTL 2
152
153/*802.11 header definitions - ht ctrl field len*/
154#define WLANTL_802_11_HEADER_HT_CTL 4
155
156/* Offset of Addr1 field in a 802.11 header*/
157#define WLANTL_802_11_HEADER_ADDR1_OFFSET 4
158
159/*802.11 ADDR4 MAC addr field len */
160#define WLANTL_802_11_HEADER_ADDR4_LEN VOS_MAC_ADDR_SIZE
161
162/* Length of an AMSDU sub-frame */
163#define TL_AMSDU_SUBFRM_HEADER_LEN 14
164
165/* Length of the LLC header*/
166#define WLANTL_LLC_HEADER_LEN 8
167
168/*As per 802.11 spec */
169#define WLANTL_MGMT_FRAME_TYPE 0x00
170#define WLANTL_CTRL_FRAME_TYPE 0x10
171#define WLANTL_DATA_FRAME_TYPE 0x20
172
Siddharth Bhal4551b102014-10-09 21:36:36 +0530173#define WLANTL_MGMT_PROBE_REQ_FRAME_TYPE 0x04
174
Jeff Johnson295189b2012-06-20 16:38:30 -0700175/*Value of the data type field in the 802.11 frame */
176#define WLANTL_80211_DATA_TYPE 0x02
177#define WLANTL_80211_DATA_QOS_SUBTYPE 0x08
178#define WLANTL_80211_NULL_QOS_SUBTYPE 0x0C
Dino Mycle3b9536d2014-07-09 22:05:24 +0530179#define WLANTL_80211_MGMT_ACTION_SUBTYPE 0x0D
180#define WLANTL_80211_MGMT_ACTION_NO_ACK_SUBTYPE 0x0E
Jeff Johnson295189b2012-06-20 16:38:30 -0700181
Madan Mohan Koyyalamudia148e1e2012-11-30 14:52:59 -0800182/*Defines for internal utility functions */
183#define WLANTL_FRAME_TYPE_BCAST 0xff
184#define WLANTL_FRAME_TYPE_MCAST 0x01
185#define WLANTL_FRAME_TYPE_UCAST 0x00
186
Dino Mycle3b9536d2014-07-09 22:05:24 +0530187#define WLANTL_FRAME_TYPESUBTYPE_MASK 0x3F
Jeff Johnson295189b2012-06-20 16:38:30 -0700188
Abhishek Singh00b71972016-01-07 10:51:04 +0530189#ifdef WLAN_FEATURE_RMC
190#define WLANTL_RMC_HASH_TABLE_SIZE (32)
191#endif
192
Sravan Kumar Kairam60b8cf02016-12-12 16:22:09 +0530193#define WLANTL_SAMPLE_INTERVAL 50
194#define WLANTL_SAMPLE_COUNT 2
195
Jeff Johnson295189b2012-06-20 16:38:30 -0700196/*-------------------------------------------------------------------------
197 BT-AMP related definition - !!! should probably be moved to BT-AMP header
198---------------------------------------------------------------------------*/
199
200/*-------------------------------------------------------------------------
201 Helper macros
202---------------------------------------------------------------------------*/
Alok Kumarda6c8882017-12-08 11:11:59 +0530203 /*Checks STAID for MONITOR interface*/
204#define WLANTL_STA_ID_MONIFACE( _staid )( _staid == 253 || _staid == 254 || _staid == 255 )
205
Jeff Johnson295189b2012-06-20 16:38:30 -0700206 /*Checks STA index validity*/
207#define WLANTL_STA_ID_INVALID( _staid )( _staid >= WLAN_MAX_STA_COUNT )
208
209/*As per Libra behavior */
210#define WLANTL_STA_ID_BCAST 0xFF
211
212/*Checks TID validity*/
213#define WLANTL_TID_INVALID( _tid ) ( _tid >= WLAN_MAX_TID )
214
215/*Checks AC validity*/
216#define WLANTL_AC_INVALID( _tid ) ( _tid >= WLANTL_MAX_AC )
217
218/*Determines the addr field offset based on the frame xtl bit*/
219#define WLANTL_MAC_ADDR_ALIGN( _dxtl ) \
220 ( ( 0 == _dxtl ) ? \
221 WLANTL_802_3_HEADER_DA_OFFSET: WLANTL_802_11_HEADER_ADDR1_OFFSET )
222
223/*Determines the header len based on the disable xtl field*/
224#define WLANTL_MAC_HEADER_LEN( _dxtl) \
225 ( ( 0 == _dxtl )? \
226 WLANTL_802_3_HEADER_LEN:WLANTL_802_11_HEADER_LEN )
227
228/*Determines the necesary length of the BD header - in case
229 UMA translation is enabled enough room needs to be left in front of the
230 packet for the 802.11 header to be inserted*/
231#define WLANTL_BD_HEADER_LEN( _dxtl ) \
232 ( ( 0 == _dxtl )? \
233 (WLANHAL_TX_BD_HEADER_SIZE+WLANTL_802_11_MAX_HEADER_LEN): WLANHAL_TX_BD_HEADER_SIZE )
234
235
236#define WLAN_TL_CEIL( _a, _b) (( 0 != (_a)%(_b))? (_a)/(_b) + 1: (_a)/(_b))
237
238/*get TL control block from vos global context */
239#define VOS_GET_TL_CB(_pvosGCtx) \
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800240 ((WLANTL_CbType*)vos_get_context( VOS_MODULE_ID_TL, _pvosGCtx))
Jeff Johnson295189b2012-06-20 16:38:30 -0700241
242/* Check whether Rx frame is LS or EAPOL packet (other than data) */
243#define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800244 ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \
245 (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType))
Jeff Johnson295189b2012-06-20 16:38:30 -0700246
247/*get RSSI0 from a RX BD*/
248/* 7 bits in phystats represent -100dBm to +27dBm */
249#define WLAN_TL_RSSI_CORRECTION 100
250#define WLANTL_GETRSSI0(pBD) (WDA_GETRSSI0(pBD) - WLAN_TL_RSSI_CORRECTION)
251
252/*get RSSI1 from a RX BD*/
253#define WLANTL_GETRSSI1(pBD) (WDA_GETRSSI1(pBD) - WLAN_TL_RSSI_CORRECTION)
254
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530255#define WLANTL_GETSNR(pBD) WDA_GET_RX_SNR(pBD)
256
Jeff Johnson295189b2012-06-20 16:38:30 -0700257/* Check whether Rx frame is LS or EAPOL packet (other than data) */
258#define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800259 ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \
260 (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType))
Jeff Johnson295189b2012-06-20 16:38:30 -0700261
Mihir Sheteb7337272014-04-11 15:53:08 +0530262#define WLANTL_CACHE_TRACE_WATERMARK 100
Sravan Kumar Kairame0e78442017-09-18 18:00:53 +0530263
264#define WLANTL_RSSI_SAMPLE_CNT 20
265
Jeff Johnson295189b2012-06-20 16:38:30 -0700266/*---------------------------------------------------------------------------
267 TL signals for TX thread
268---------------------------------------------------------------------------*/
269typedef enum
270{
271 /*Suspend signal - following serialization of a HAL suspend request*/
272 WLANTL_TX_SIG_SUSPEND = 0,
273
274 /*Res need signal - triggered when all pending TxComp have been received
275 and TL is low on resources*/
276 WLANTL_TX_RES_NEEDED = 1,
277
Katya Nigam664f5032014-05-05 12:24:32 +0530278 /* Forwarding RX cached frames. This is not used anymore as it is
279 replaced by WLANTL_RX_FWD_CACHED in RX thread*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700280 WLANTL_TX_FWD_CACHED = 2,
281
282 /* Serialized STAID AC Indication */
283 WLANTL_TX_STAID_AC_IND = 3,
284
285 /* Serialzie TX transmit request */
286 WLANTL_TX_START_XMIT = 4,
287
288 /* Serialzie Finish UL Authentication request */
289 WLANTL_FINISH_ULA = 5,
290
Madan Mohan Koyyalamudia96f5442013-05-10 11:32:06 +0530291 /* Serialized Snapshot request indication */
292 WLANTL_TX_SNAPSHOT = 6,
293
Mihir Shetefd62d9d2014-08-06 15:08:21 +0530294 /* Detected a fatal error issue SSR */
295 WLANTL_TX_FATAL_ERROR = 7,
296
Mihir Shete327c2ab2014-11-13 15:17:02 +0530297 WLANTL_TX_FW_DEBUG = 8,
298
Sravan Kumar Kairame9d186c2015-11-27 23:37:02 +0530299 WLANTL_TX_KICKDXE = 9,
300
Jeff Johnson295189b2012-06-20 16:38:30 -0700301 WLANTL_TX_MAX
302}WLANTL_TxSignalsType;
303
Katya Nigam664f5032014-05-05 12:24:32 +0530304
305/*---------------------------------------------------------------------------
306 TL signals for RX thread
307---------------------------------------------------------------------------*/
308typedef enum
309{
310
311 /* Forwarding RX cached frames */
312 WLANTL_RX_FWD_CACHED = 0,
313
Sravan Kumar Kairam091e5b62017-01-23 14:14:20 +0530314 /* Forward pre assoc cached frames */
315 WLANTL_RX_FWD_PRE_ASSOC_CACHED = 1,
Katya Nigam664f5032014-05-05 12:24:32 +0530316}WLANTL_RxSignalsType;
317
Jeff Johnson295189b2012-06-20 16:38:30 -0700318/*---------------------------------------------------------------------------
319 STA Event type
320---------------------------------------------------------------------------*/
321typedef enum
322{
323 /* Transmit frame event */
324 WLANTL_TX_EVENT = 0,
325
326 /* Receive frame event */
327 WLANTL_RX_EVENT = 1,
328
329 WLANTL_MAX_EVENT
330}WLANTL_STAEventType;
331
332/*---------------------------------------------------------------------------
333
334 DESCRIPTION
335 State machine used by transport layer for receiving or transmitting
336 packets.
337
338 PARAMETERS
339
340 IN
341 pAdapter: pointer to the global adapter context; a handle to TL's
342 control block can be extracted from its context
343 ucSTAId: identifier of the station being processed
344 vosDataBuff: pointer to the tx/rx vos buffer
345
346 RETURN VALUE
347 The result code associated with performing the operation
348
349---------------------------------------------------------------------------*/
350typedef VOS_STATUS (*WLANTL_STAFuncType)( v_PVOID_t pAdapter,
351 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700352 vos_pkt_t** pvosDataBuff,
353 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700354
355/*---------------------------------------------------------------------------
356 STA FSM Entry type
357---------------------------------------------------------------------------*/
358typedef struct
359{
360 WLANTL_STAFuncType pfnSTATbl[WLANTL_MAX_EVENT];
361} WLANTL_STAFsmEntryType;
362
363/* Receive in connected state - only EAPOL or WAI*/
364VOS_STATUS WLANTL_STARxConn( v_PVOID_t pAdapter,
365 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700366 vos_pkt_t** pvosDataBuff,
367 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700368
369/* Transmit in connected state - only EAPOL or WAI*/
370VOS_STATUS WLANTL_STATxConn( v_PVOID_t pAdapter,
371 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700372 vos_pkt_t** pvosDataBuff,
373 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700374
375/* Receive in authenticated state - all data allowed*/
376VOS_STATUS WLANTL_STARxAuth( v_PVOID_t pAdapter,
377 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700378 vos_pkt_t** pvosDataBuff,
379 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700380
381/* Transmit in authenticated state - all data allowed*/
382VOS_STATUS WLANTL_STATxAuth( v_PVOID_t pAdapter,
383 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700384 vos_pkt_t** pvosDataBuff,
385 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700386
387/* Receive in disconnected state - no data allowed*/
388VOS_STATUS WLANTL_STARxDisc( v_PVOID_t pAdapter,
389 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700390 vos_pkt_t** pvosDataBuff,
391 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700392
393/* Transmit in disconnected state - no data allowed*/
394VOS_STATUS WLANTL_STATxDisc( v_PVOID_t pAdapter,
395 v_U8_t ucSTAId,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700396 vos_pkt_t** pvosDataBuff,
397 v_BOOL_t bForwardIAPPwithLLC);
Jeff Johnson295189b2012-06-20 16:38:30 -0700398
399/* TL State Machine */
400STATIC const WLANTL_STAFsmEntryType tlSTAFsm[WLANTL_STA_MAX_STATE] =
401{
402 /* WLANTL_STA_INIT */
403 { {
404 NULL, /* WLANTL_TX_EVENT - no packets should get transmitted*/
405 NULL, /* WLANTL_RX_EVENT - no packets should be received - drop*/
406 } },
407
408 /* WLANTL_STA_CONNECTED */
409 { {
410 WLANTL_STATxConn, /* WLANTL_TX_EVENT - only EAPoL or WAI frames are allowed*/
411 WLANTL_STARxConn, /* WLANTL_RX_EVENT - only EAPoL or WAI frames can be rx*/
412 } },
413
414 /* WLANTL_STA_AUTHENTICATED */
415 { {
416 WLANTL_STATxAuth, /* WLANTL_TX_EVENT - all data frames allowed*/
417 WLANTL_STARxAuth, /* WLANTL_RX_EVENT - all data frames can be rx */
418 } },
419
420 /* WLANTL_STA_DISCONNECTED */
421 { {
422 WLANTL_STATxDisc, /* WLANTL_TX_EVENT - do nothing */
423 WLANTL_STARxDisc, /* WLANTL_RX_EVENT - frames will still be fwd-ed*/
424 } }
425};
426
427/*---------------------------------------------------------------------------
428 Reordering information
429---------------------------------------------------------------------------*/
430
431#define WLANTL_MAX_WINSIZE 64
432#define WLANTL_MAX_BA_SESSION 40
433
434typedef struct
435{
436 v_BOOL_t isAvailable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700437 v_U64_t ullReplayCounter[WLANTL_MAX_WINSIZE];
Jeff Johnson295189b2012-06-20 16:38:30 -0700438 v_PVOID_t arrayBuffer[WLANTL_MAX_WINSIZE];
439} WLANTL_REORDER_BUFFER_T;
440
441
442/* To handle Frame Q aging, timer is needed
443 * After timer expired, Qed frames have to be routed to upper layer
444 * WLANTL_TIMER_EXPIER_UDATA_T is user data type for timer callback
445 */
446typedef struct
447{
448 /* Global contect, HAL, HDD need this */
449 v_PVOID_t pAdapter;
450
451 /* TL context handle */
452 v_PVOID_t pTLHandle;
453
454 /* Current STAID, to know STA context */
455 v_U32_t STAID;
456
457 v_U8_t TID;
458} WLANTL_TIMER_EXPIER_UDATA_T;
459
460typedef struct
461{
462 /*specifies if re-order session exists*/
463 v_U8_t ucExists;
464
465 /* Current Index */
466 v_U32_t ucCIndex;
467
468 /* Count of the total packets in list*/
469 v_U16_t usCount;
470
471 /* vos ttimer to handle Qed frames aging */
472 vos_timer_t agingTimer;
473
474 /* Q windoe size */
475 v_U32_t winSize;
476
477 /* Available RX frame buffer size */
478 v_U32_t bufferSize;
479
480 /* Start Sequence number */
481 v_U32_t SSN;
482
483 /* BA session ID, generate by HAL */
484 v_U32_t sessionID;
485
486 v_U32_t currentESN;
487
488 v_U32_t pendingFramesCount;
489
490 vos_lock_t reorderLock;
491
492 /* Aging timer callback user data */
493 WLANTL_TIMER_EXPIER_UDATA_T timerUdata;
494
495 WLANTL_REORDER_BUFFER_T *reorderBuffer;
Madan Mohan Koyyalamudi31e4cad2013-08-21 20:21:14 +0530496
497 v_U16_t LastSN;
Sravan Kumar Kairama97e2372016-11-11 17:20:03 +0530498 bool set_data_filter;
Jeff Johnson295189b2012-06-20 16:38:30 -0700499}WLANTL_BAReorderType;
500
501
502/*---------------------------------------------------------------------------
503 UAPSD information
504---------------------------------------------------------------------------*/
505typedef struct
506{
507 /* flag set when a UAPSD session with triggers generated in fw is being set*/
508 v_U8_t ucSet;
509}WLANTL_UAPSDInfoType;
510
Abhishek Singh00b71972016-01-07 10:51:04 +0530511#ifdef WLAN_FEATURE_RMC
512struct tTL_RMCList
513{
514 struct tTL_RMCList *next;
515 v_MACADDR_t rmcAddr;
516 v_U16_t mcSeqCtl;
517 v_U32_t rxMCDupcnt;
518};
519
520typedef struct tTL_RMCList WLANTL_RMC_SESSION;
521#endif
522
Jeff Johnson295189b2012-06-20 16:38:30 -0700523/*---------------------------------------------------------------------------
Mihir Sheteb7337272014-04-11 15:53:08 +0530524 per-STA cache info
525---------------------------------------------------------------------------*/
526typedef struct
527{
528 v_U16_t cacheSize;
529 v_TIME_t cacheInitTime;
530 v_TIME_t cacheDoneTime;
531 v_TIME_t cacheClearTime;
532}WLANTL_CacheInfoType;
533
Dino Mycle3b9536d2014-07-09 22:05:24 +0530534
Mihir Sheteb7337272014-04-11 15:53:08 +0530535/*---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700536 STA Client type
537---------------------------------------------------------------------------*/
538typedef struct
539{
540 /* Flag that keeps track of registration; only one STA with unique
541 ID allowed */
542 v_U8_t ucExists;
543
Jeff Johnson295189b2012-06-20 16:38:30 -0700544 /* Function pointer to the receive packet handler from HDD */
545 WLANTL_STARxCBType pfnSTARx;
546
547 /* Function pointer to the transmit complete confirmation handler
548 from HDD */
549 WLANTL_TxCompCBType pfnSTATxComp;
550
551 /* Function pointer to the packet retrieval routine in HDD */
552 WLANTL_STAFetchPktCBType pfnSTAFetchPkt;
553
554 /* Reordering information for the STA */
555 WLANTL_BAReorderType atlBAReorderInfo[WLAN_MAX_TID];
556
557 /* STA Descriptor, contains information related to the new added STA */
558 WLAN_STADescType wSTADesc;
559
560 /* Current connectivity state of the STA */
561 WLANTL_STAStateType tlState;
562
563 /* Station priority */
564 WLANTL_STAPriorityType tlPri;
565
566 /* Value of the averaged RSSI for this station */
567 v_S7_t rssiAvg;
568
569 /* Value of the averaged RSSI for this station in BMPS */
570 v_S7_t rssiAvgBmps;
571
Shailender Karmuchi13c0d082013-03-26 14:41:39 -0700572 /* Value of the Alpha to calculate RSSI average */
573 v_S7_t rssiAlpha;
574
Jeff Johnson295189b2012-06-20 16:38:30 -0700575 /* Value of the averaged RSSI for this station */
576 v_U32_t uLinkQualityAvg;
577
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530578 /* Sum of SNR for snrIdx number of consecutive frames */
579 v_U32_t snrSum;
580
581 /* Number of consecutive frames over which snrSum is calculated */
582 v_S7_t snrIdx;
583
584 /* Average SNR of previous 20 frames */
585 v_S7_t prevSnrAvg;
586
587 /* Average SNR returned by fw */
588 v_S7_t snrAvgBmps;
589
Jeff Johnson295189b2012-06-20 16:38:30 -0700590 /* Tx packet count per station per TID */
591 v_U32_t auTxCount[WLAN_MAX_TID];
592
593 /* Rx packet count per station per TID */
594 v_U32_t auRxCount[WLAN_MAX_TID];
595
596 /* Suspend flag */
597 v_U8_t ucTxSuspended;
598
599 /* Pointer to the AMSDU chain maintained by the AMSDU de-aggregation
600 completion sub-module */
601 vos_pkt_t* vosAMSDUChainRoot;
602
603 /* Pointer to the root of the chain */
604 vos_pkt_t* vosAMSDUChain;
605
Dundi Raviteja09daf5f2021-03-05 21:03:57 +0530606 /* Drop any invalid amsdu */
607 bool drop_amsdu;
608
Jeff Johnson295189b2012-06-20 16:38:30 -0700609 /* Used for saving/restoring frame header for 802.3/11 AMSDU sub-frames */
610 v_U8_t aucMPDUHeader[WLANTL_MPDU_HEADER_LEN];
611
612 /* length of the header */
613 v_U8_t ucMPDUHeaderLen;
614
615 /* Enabled ACs currently serviced by TL (automatic setup in TL)*/
Kanchanapally, Vidyullathaed969c62015-02-18 11:39:11 +0530616 v_U8_t aucACMask[WLANTL_NUM_TX_QUEUES];
Jeff Johnson295189b2012-06-20 16:38:30 -0700617
618 /* Current AC to be retrieved */
619 WLANTL_ACEnumType ucCurrentAC;
620
621 /*Packet pending flag - set if tx is pending for the station*/
622 v_U8_t ucPktPending;
Jeff Johnson017fdc32013-02-27 09:22:30 -0800623
Madan Mohan Koyyalamudi1541a5b2012-10-29 16:18:21 -0700624 /*EAPOL Packet pending flag - set if EAPOL packet is pending for the station*/
625 v_U8_t ucEapolPktPending;
626
Jeff Johnson017fdc32013-02-27 09:22:30 -0800627 /*used on tx packet to signal when there is no more data to tx for the
Jeff Johnson295189b2012-06-20 16:38:30 -0700628 moment=> packets can be passed to BAL */
629 v_U8_t ucNoMoreData;
630
631 /* Last serviced AC to be retrieved */
632 WLANTL_ACEnumType ucServicedAC;
633
634 /* Current weight for the AC */
635 v_U8_t ucCurrentWeight;
636
637 /* Info used for UAPSD trigger frame generation */
638 WLANTL_UAPSDInfoType wUAPSDInfo[WLANTL_MAX_AC];
639
640 /* flag to signal if a trigger frames is pending */
641 v_U8_t ucPendingTrigFrm;
642
643 WLANTL_TRANSFER_STA_TYPE trafficStatistics;
644
645 /*Members needed for packet caching in TL*/
646 /*Begining of the cached packets chain*/
647 vos_pkt_t* vosBegCachedFrame;
648
649 /*Begining of the cached packets chain*/
650 vos_pkt_t* vosEndCachedFrame;
651
Mihir Sheteb7337272014-04-11 15:53:08 +0530652 WLANTL_CacheInfoType tlCacheInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700653 /* LWM related fields */
654
Katya Nigam63902932014-06-26 19:04:23 +0530655 v_BOOL_t enableCaching;
656
Jeff Johnson295189b2012-06-20 16:38:30 -0700657 //current station is slow. LWM mode is enabled.
658 v_BOOL_t ucLwmModeEnabled;
659 //LWM events is reported when LWM mode is on. Able to send more traffic
660 //under the constraints of uBuffThresholdMax
661 v_BOOL_t ucLwmEventReported;
662
663 //v_U8_t uLwmEventReported;
664
665 /* Flow control fields */
666 //memory used in previous round
667 v_U8_t bmuMemConsumed;
668
669 //the number packets injected in this round
670 v_U32_t uIngress_length;
671
672 //number of packets allowed in current round beforing receiving new FW memory updates
673 v_U32_t uBuffThresholdMax;
674
675
676 // v_U32_t uEgress_length;
677
678 // v_U32_t uIngress_length;
679
680 // v_U32_t uBuffThresholdMax;
681
682 // v_U32_t uBuffThresholdUsed;
683
684 /* Value used to set LWM in FW. Initialized to 1/3* WLAN_STA_BMU_THRESHOLD_MAX
685 In the future, it can be dynamically adjusted if we find the reason to implement
686 such algorithm. */
687 v_U32_t uLwmThreshold;
688
689 //tx disable forced by Riva software
690 v_U16_t fcStaTxDisabled;
691
692 /** HDD buffer status for packet scheduling. Once HDD
693 * stores a new packet in a previously empty queue, it
694 * will call TL interface to set the fields. The fields
695 * will be cleaned by TL when TL can't fetch more packets
696 * from the queue. */
697 // the fields are ucPktPending and ucACMask;
698
699 /* Queue to keep unicast station management frame */
700 vos_list_t pStaManageQ;
Jeff Johnson295189b2012-06-20 16:38:30 -0700701
Jeff Johnson295189b2012-06-20 16:38:30 -0700702 /* 1 means replay check is needed for the station,
703 * 0 means replay check is not needed for the station*/
704 v_BOOL_t ucIsReplayCheckValid;
705
706 /* It contains 48-bit replay counter per TID*/
707 v_U64_t ullReplayCounter[WLANTL_MAX_TID];
708
Sravan Kumar Kairamfb0b19d2018-02-01 12:25:28 +0530709 /* Last seq number received on Tid */
710 v_U16_t last_seq_no[WLANTL_MAX_TID];
711
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 /* It contains no of replay packets found per STA.
713 It is for debugging purpose only.*/
714 v_U32_t ulTotalReplayPacketsDetected;
Jeff Johnson295189b2012-06-20 16:38:30 -0700715
Gopichand Nakkala8b54e912013-03-11 10:44:21 +0530716 /* Set when pairwise key is installed, if ptkInstalled is
717 1 then we have to encrypt the data irrespective of TL
718 state (CONNECTED/AUTHENTICATED) */
719 v_U8_t ptkInstalled;
Gopichand Nakkala8a2b1442013-05-29 15:33:14 +0530720
721 v_U32_t linkCapacity;
Dino Mycle3b9536d2014-07-09 22:05:24 +0530722
Abhishek Singh00b71972016-01-07 10:51:04 +0530723#ifdef WLAN_FEATURE_RMC
724 WLANTL_RMC_SESSION *mcastSession[WLANTL_RMC_HASH_TABLE_SIZE];
725 vos_lock_t mcLock;
726#endif
727
Dino Mycle3b9536d2014-07-09 22:05:24 +0530728#ifdef WLAN_FEATURE_LINK_LAYER_STATS
729
730 /* Value of the averaged Data RSSI for this station */
731 v_S7_t rssiDataAvg;
732
733 /* Value of the averaged Data RSSI for this station in BMPS */
734 v_S7_t rssiDataAvgBmps;
735
736 /* Value of the Alpha to calculate Data RSSI average */
737 v_S7_t rssiDataAlpha;
738
739 WLANTL_InterfaceStatsType interfaceStats;
740#endif
Hanumantha Reddy Pothulaee001fc2015-05-26 15:21:53 +0530741 /* BD Rate for transmitting ARP packets */
742 v_U8_t arpRate;
Hanumantha Reddy Pothulae5ab23d2015-09-14 18:08:24 +0530743 v_BOOL_t arpOnWQ5;
Bhargav Shahfbaeca22016-07-13 10:27:35 +0530744
745 /* Disassoc in progress */
746 v_BOOL_t disassoc_progress;
Sravan Kumar Kairam60b8cf02016-12-12 16:22:09 +0530747
748 /* sample timer Tx frames */
749 uint64_t tx_frames;
750 uint32_t tx_sample[WLANTL_SAMPLE_COUNT];
751 uint64_t tx_samples_sum;
752
Sravan Kumar Kairamb0edc612016-10-26 13:55:24 +0530753 /* flow control */
754 uint8_t weight;
755 uint8_t weight_count;
756 uint8_t per;
757 uint8_t set_flag;
758 uint16_t queue;
759 uint16_t trate;
760
Sravan Kumar Kairame0e78442017-09-18 18:00:53 +0530761 /* RSSI sample avg */
762 s8 rssi_sample[WLANTL_RSSI_SAMPLE_CNT];
763 s16 rssi_sample_sum;
764 uint8_t rssi_sample_cnt;
765 uint8_t rssi_stale_idx;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +0530766 uint16_t rate_idx;
Jeff Johnson295189b2012-06-20 16:38:30 -0700767}WLANTL_STAClientType;
768
769/*---------------------------------------------------------------------------
770 BAP Client type
771---------------------------------------------------------------------------*/
772typedef struct
773{
774 /* flag that keeps track of registration; only one non-data BT-AMP client
775 allowed */
776 v_U8_t ucExists;
777
778 /* pointer to the receive processing routine for non-data BT-AMP frames */
779 WLANTL_BAPRxCBType pfnTlBAPRx;
780
781 /* pointer to the flush call back complete function */
782 WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb;
783
784 /* pointer to the non-data BT-AMP frame pending transmission */
785 vos_pkt_t* vosPendingDataBuff;
786
787 /* BAP station ID */
788 v_U8_t ucBAPSTAId;
789}WLANTL_BAPClientType;
790
791
792/*---------------------------------------------------------------------------
793 Management Frame Client type
794---------------------------------------------------------------------------*/
795typedef struct
796{
797 /* flag that keeps track of registration; only one management frame
798 client allowed */
799 v_U8_t ucExists;
800
801 /* pointer to the receive processing routine for management frames */
802 WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx;
803
804 /* pointer to the management frame pending transmission */
805 vos_pkt_t* vosPendingDataBuff;
806}WLANTL_MgmtFrmClientType;
807
808typedef struct
809{
810 WLANTL_TrafficStatusChangedCBType trafficCB;
811 WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus;
812 v_U32_t idleThreshold;
813 v_U32_t measurePeriod;
814 v_U32_t rtRXFrameCount;
815 v_U32_t rtTXFrameCount;
816 v_U32_t nrtRXFrameCount;
817 v_U32_t nrtTXFrameCount;
818 vos_timer_t trafficTimer;
819 v_PVOID_t usrCtxt;
820} WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE;
821
822typedef struct
823{
824 v_S7_t rssiValue;
825 v_U8_t triggerEvent[WLANTL_HS_NUM_CLIENT];
826 v_PVOID_t usrCtxt[WLANTL_HS_NUM_CLIENT];
827 v_U8_t whoIsClient[WLANTL_HS_NUM_CLIENT];
828 WLANTL_RSSICrossThresholdCBType crossCBFunction[WLANTL_HS_NUM_CLIENT];
829 v_U8_t numClient;
830} WLANTL_HO_RSSI_INDICATION_TYPE;
831
832typedef struct
833{
834 v_U8_t numThreshold;
835 v_U8_t regionNumber;
836 v_S7_t historyRSSI;
837 v_U8_t alpha;
838 v_U32_t sampleTime;
839 v_U32_t fwNotification;
840} WLANTL_CURRENT_HO_STATE_TYPE;
841
842typedef struct
843{
844 WLANTL_HO_RSSI_INDICATION_TYPE registeredInd[WLANTL_MAX_AVAIL_THRESHOLD];
845 WLANTL_CURRENT_HO_STATE_TYPE currentHOState;
846 WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE currentTraffic;
847 v_PVOID_t macCtxt;
848 vos_lock_t hosLock;
849} WLANTL_HO_SUPPORT_TYPE;
850
Sravan Kumar Kairamb0edc612016-10-26 13:55:24 +0530851typedef struct {
852 uint8 sta_id;
853 uint8 avg_per;
854 uint16 queue_len;
855 uint16_t rate;
856 uint16_t reserved;
857} WLANTL_PerStaFlowControlParam;
858
859typedef struct {
860 uint8 num_stas;
861 WLANTL_PerStaFlowControlParam *sta_fc_info;
862} WLANTL_FlowControlInfo;
863
Kapil Guptad90b3862016-06-25 00:42:49 +0530864#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
865#define ROAM_MAX_INDEX_NUM 50
866#define ROAM_PER_INDEX_TIME 500 /* (msec) */
867#define MIN_PKTS_TO_START_MONTIOR 10
868
869typedef struct
870{
871 v_U64_t lowRateRxPacketsRcvd;
872 v_U64_t totalPktRcvd;
873 v_U64_t time;
874}WLANTL_RoamTrafficStatsType;
875
876typedef struct {
877 v_U8_t running;
878 v_U8_t staId;
879 v_S7_t index;
880 v_U8_t intialPktToStart;
881 v_U8_t minPercentage;
882 v_U16_t minRate;
883 v_U16_t maxRate;
884 v_U32_t minPktRequired;
885 v_U64_t totalPkt;
886 v_U64_t timeToWait;
887 v_U64_t lowRatePkt;
888 v_U64_t lastTriggerTime;
889 WLANTL_RoamTrafficStatsType rxRoamStats[ROAM_MAX_INDEX_NUM];
890 void (*triggerRoamScanfn) (void *, v_U8_t);
891 void *hHal;
892}WLANTL_RoamMonitorType;
893#endif
894
Jeff Johnson295189b2012-06-20 16:38:30 -0700895/*---------------------------------------------------------------------------
896 TL control block type
897---------------------------------------------------------------------------*/
898typedef struct
899{
900 /* TL configuration information */
901 WLANTL_ConfigInfoType tlConfigInfo;
902
903 /* list of the active stations */
Madan Mohan Koyylamudi3b8400c2013-01-24 17:47:01 +0530904 WLANTL_STAClientType* atlSTAClients[WLAN_MAX_STA_COUNT];
905
Jeff Johnson295189b2012-06-20 16:38:30 -0700906
907 /* information on the management frame client */
908 WLANTL_MgmtFrmClientType tlMgmtFrmClient;
909
910 /* information on the BT AMP client */
911 WLANTL_BAPClientType tlBAPClient;
912
913 /* number of packets sent to BAL waiting for tx complete confirmation */
914 v_U16_t usPendingTxCompleteCount;
915
916 /* global suspend flag */
917 v_U8_t ucTxSuspended;
918
919 /* resource flag */
920 v_U32_t uResCount;
921
922 /* dummy vos buffer - used for chains */
923 vos_pkt_t* vosDummyBuf;
924
925 /* temporary buffer for storing the packet that no longer fits */
926 vos_pkt_t* vosTempBuf;
927
928 /* The value of the station id and AC for the cached buffer */
929 v_U8_t ucCachedSTAId;
930 v_U8_t ucCachedAC;
931
932 /* Last registered STA - until multiple sta support is added this will
933 be used always for tx */
934 v_U8_t ucRegisteredStaId;
935
936 /*Current TL STA used for TX*/
937 v_U8_t ucCurrentSTA;
938
939 WLANTL_REORDER_BUFFER_T *reorderBufferPool; /* Allocate memory for [WLANTL_MAX_BA_SESSION] sessions */
940
941 WLANTL_HO_SUPPORT_TYPE hoSupport;
942
943 v_BOOL_t bUrgent;
944
Jeff Johnson295189b2012-06-20 16:38:30 -0700945
946 /* resource flag */
947 v_U32_t bd_pduResCount;
948
949 /* time interval to evaluate LWM mode*/
950 //vos_timer_t tThresholdSamplingTimer;
951
952#if 0
953 //information fields for flow control
954 tFcTxParams_type tlFCInfo;
955#endif
956
957 vos_pkt_t* vosTxFCBuf;
958
959 /* LWM mode is enabled or not for each station. Bit-wise operation.32 station maximum. */
960 // v_U32_t uStaLwmMask;
961
962 /* LWM event is reported by FW. */
963 // v_U32_t uStaLwmEventReported;
964
965 /** Multiple Station Scheduling and TL queue management.
966 4 HDD BC/MC data packet queue status is specified as Station 0's status. Weights used
967 in WFQ algorith are initialized in WLANTL_OPEN and contained in tlConfigInfo field.
968 Each station has fields of ucPktPending and AC mask to tell whether a AC has traffic
969 or not.
970
971 Stations are served in a round-robin fashion from highest priority to lowest priority.
972 The number of round-robin times of each prioirty equals to the WFQ weights and differetiates
973 the traffic of different prioirty. As such, stations can not provide low priority packets if
974 high priority packets are all served.
975 */
976
977 /* Currently served station id. Reuse ucCurrentSTA field. */
978 //v_U8_t uCurStaId;
979
980 /* Current served station ID in round-robin method to traverse all stations.*/
981 WLANTL_ACEnumType uCurServedAC;
982
Siddharth Bhal4551b102014-10-09 21:36:36 +0530983 WLANTL_SpoofMacAddr spoofMacAddr;
984
Jeff Johnson295189b2012-06-20 16:38:30 -0700985 /* How many weights have not been served in current AC. */
986 v_U8_t ucCurLeftWeight;
987
988 /* BC/MC management queue. Current implementation uses queue size 1. Will check whether
989 size N is supported. */
990 vos_list_t pMCBCManageQ;
991
992 v_U32_t sendFCFrame;
993
994 v_U8_t done_once;
995 v_U8_t uFramesProcThres;
Sunil Ravid5406f22013-01-22 00:18:31 -0800996#ifdef FEATURE_WLAN_TDLS
997 /*number of total TDLS peers registered to TL
998 Incremented at WLANTL_RegisterSTAClient(staType == WLAN_STA_TDLS)
999 Decremented at WLANTL_ClearSTAClient(staType == WLAN_STA_TDLS) */
1000 v_U8_t ucTdlsPeerCount;
1001#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001002 /*whether we are in BMPS/UAPSD/WOWL mode, since the latter 2 need to be BMPS first*/
1003 v_BOOL_t isBMPS;
Gopichand Nakkala11acd112012-12-31 16:04:04 -08001004 /* Whether WDA_DS_TX_START_XMIT msg is pending or not */
1005 v_BOOL_t isTxTranmitMsgPending;
Abhishek Singh00b71972016-01-07 10:51:04 +05301006
1007#ifdef WLAN_FEATURE_RMC
1008 WLANTL_RMC_SESSION *rmcSession[WLANTL_RMC_HASH_TABLE_SIZE];
1009 vos_lock_t rmcLock;
1010 v_U8_t multicastDuplicateDetectionEnabled;
1011 v_U8_t rmcDataPathEnabled;
1012 v_U32_t mcastDupCnt;
1013#endif
Katya Nigame7b69a82015-04-28 15:24:06 +05301014 WLANTL_MonRxCBType pfnMonRx;
1015 v_BOOL_t isConversionReq;
Kapil Guptad90b3862016-06-25 00:42:49 +05301016#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1017 WLANTL_RoamMonitorType gDsRxRoamStats;
1018#endif
Katya Nigame7b69a82015-04-28 15:24:06 +05301019
Sravan Kumar Kairam60b8cf02016-12-12 16:22:09 +05301020 /* TX sample data timer */
1021 vos_timer_t tx_frames_timer;
1022 uint8_t sample_count;
1023
Sravan Kumar Kairam091e5b62017-01-23 14:14:20 +05301024 bool preassoc_caching;
1025 vos_pkt_t* vosEapolCachedFrame;
1026 WLANTL_FwdEapolCBType pfnEapolFwd;
Sravan Kumar Kairamd9e8cbb2017-01-17 12:17:28 +05301027
1028 uint8_t track_arp;
1029 uint32_t txbd_token;
1030
Jeff Johnson295189b2012-06-20 16:38:30 -07001031}WLANTL_CbType;
1032
Kapil Guptad90b3862016-06-25 00:42:49 +05301033
Jeff Johnson295189b2012-06-20 16:38:30 -07001034/*==========================================================================
1035
1036 FUNCTION WLANTL_GetFrames
1037
1038 DESCRIPTION
1039
1040 BAL calls this function at the request of the lower bus interface.
1041 When this request is being received TL will retrieve packets from HDD
1042 in accordance with the priority rules and the count supplied by BAL.
1043
1044 DEPENDENCIES
1045
1046 HDD must have registered with TL at least one STA before this function
1047 can be called.
1048
1049 PARAMETERS
1050
1051 IN
1052 pAdapter: pointer to the global adapter context; a handle to TL's
1053 or BAL's control block can be extracted from its context
1054 uSize: maximum size accepted by the lower layer
Jeff Johnson017fdc32013-02-27 09:22:30 -08001055 uFlowMask TX flow control mask. Each bit is defined as
Jeff Johnson295189b2012-06-20 16:38:30 -07001056 WDA_TXFlowEnumType
1057
1058 OUT
1059 vosDataBuff: it will contain a pointer to the first buffer supplied
1060 by TL, if there is more than one packet supplied, TL
1061 will chain them through vOSS buffers
1062
1063 RETURN VALUE
1064
1065 The result code associated with performing the operation
1066
1067 1 or more: number of required resources if there are still frames to fetch
1068 For Volans, it's BD/PDU numbers. For Prima, it's free DXE descriptors.
1069 0 : error or HDD queues are drained
1070
1071 SIDE EFFECTS
1072
1073============================================================================*/
1074v_U32_t
1075WLANTL_GetFrames
1076(
1077 v_PVOID_t pAdapter,
1078 vos_pkt_t **ppFrameDataBuff,
1079 v_U32_t uSize,
Jeff Johnson295189b2012-06-20 16:38:30 -07001080 v_U8_t uFlowMask,
Jeff Johnson295189b2012-06-20 16:38:30 -07001081 v_BOOL_t* pbUrgent
1082);
1083
1084/*==========================================================================
1085
1086 FUNCTION WLANTL_TxComp
1087
1088 DESCRIPTION
1089 It is being called by BAL upon asynchronous notification of the packet
1090 or packets being sent over the bus.
1091
1092 DEPENDENCIES
1093 Tx complete cannot be called without a previous transmit.
1094
1095 PARAMETERS
1096
1097 IN
1098 pAdapter: pointer to the global adapter context; a handle to TL's
1099 or BAL's control block can be extracted from its context
1100 vosDataBuff: it will contain a pointer to the first buffer for which
1101 the BAL report is being made, if there is more then one
1102 packet they will be chained using vOSS buffers.
1103 wTxSTAtus: the status of the transmitted packet, see above chapter
1104 on HDD interaction for a list of possible values
1105
1106 RETURN VALUE
1107 The result code associated with performing the operation
1108
1109 SIDE EFFECTS
1110
1111============================================================================*/
1112VOS_STATUS
1113WLANTL_TxComp
1114(
1115 v_PVOID_t pAdapter,
1116 vos_pkt_t *pFrameDataBuff,
1117 VOS_STATUS wTxStatus
1118);
1119
1120/*==========================================================================
1121
1122 FUNCTION WLANTL_RxFrames
1123
1124 DESCRIPTION
1125 Callback registered by TL and called by BAL when a packet is received
1126 over the bus. Upon the call of this function TL will make the necessary
1127 decision with regards to the forwarding or queuing of this packet and
1128 the layer it needs to be delivered to.
1129
1130 DEPENDENCIES
1131 TL must be initiailized before this function gets called.
1132 If the frame carried is a data frame then the station for which it is
1133 destined to must have been previously registered with TL.
1134
1135 PARAMETERS
1136
1137 IN
1138 pAdapter: pointer to the global adapter context; a handle to TL's
1139 or BAL's control block can be extracted from its context
1140
1141 vosDataBuff: it will contain a pointer to the first buffer received,
1142 if there is more then one packet they will be chained
1143 using vOSS buffers.
1144
1145 RETURN VALUE
1146 The result code associated with performing the operation
1147
1148 SIDE EFFECTS
1149
1150============================================================================*/
1151VOS_STATUS
1152WLANTL_RxFrames
1153(
1154 v_PVOID_t pAdapter,
1155 vos_pkt_t *pFrameDataBuff
1156);
1157
1158/*==========================================================================
1159
1160 FUNCTION WLANTL_RxCachedFrames
1161
1162 DESCRIPTION
1163 Utility function used by TL to forward the cached frames to a particular
1164 station;
1165
1166 DEPENDENCIES
1167 TL must be initiailized before this function gets called.
1168 If the frame carried is a data frame then the station for which it is
1169 destined to must have been previously registered with TL.
1170
1171 PARAMETERS
1172
1173 IN
1174 pTLCb: pointer to TL handle
1175
1176 ucSTAId: station for which we need to forward the packets
1177
1178 vosDataBuff: it will contain a pointer to the first cached buffer
1179 received, if there is more then one packet they will be
1180 chained using vOSS buffers.
1181
1182 RETURN VALUE
1183 The result code associated with performing the operation
1184
1185 VOS_STATUS_E_INVAL: Input parameters are invalid
1186 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1187 page fault
1188 VOS_STATUS_SUCCESS: Everything is good :)
1189
1190 SIDE EFFECTS
1191
1192============================================================================*/
1193VOS_STATUS
1194WLANTL_RxCachedFrames
1195(
1196 WLANTL_CbType* pTLCb,
1197 v_U8_t ucSTAId,
1198 vos_pkt_t* vosDataBuff
1199);
1200
1201/*==========================================================================
1202 FUNCTION WLANTL_ResourceCB
1203
1204 DESCRIPTION
1205 Called by the TL when it has packets available for transmission.
1206
1207 DEPENDENCIES
1208 The TL must be registered with BAL before this function can be called.
1209
1210 PARAMETERS
1211
1212 IN
1213 pAdapter: pointer to the global adapter context; a handle to TL's
1214 or BAL's control block can be extracted from its context
1215 uCount: avail resource count obtained from hw
1216
1217 RETURN VALUE
1218 The result code associated with performing the operation
1219
1220 SIDE EFFECTS
1221
1222============================================================================*/
1223VOS_STATUS
1224WLANTL_ResourceCB
1225(
1226 v_PVOID_t pAdapter,
1227 v_U32_t uCount
1228);
1229
1230
1231/*==========================================================================
1232 FUNCTION WLANTL_ProcessMainMessage
1233
1234 DESCRIPTION
1235 Called by VOSS when a message was serialized for TL through the
1236 main thread/task.
1237
1238 DEPENDENCIES
1239 The TL must be initialized before this function can be called.
1240
1241 PARAMETERS
1242
1243 IN
1244 pAdapter: pointer to the global adapter context; a handle to TL's
1245 control block can be extracted from its context
1246 message: type and content of the message
1247
1248
1249 RETURN VALUE
1250 The result code associated with performing the operation
1251
1252 SIDE EFFECTS
1253
1254============================================================================*/
1255VOS_STATUS
1256WLANTL_ProcessMainMessage
1257(
1258 v_PVOID_t pAdapter,
1259 vos_msg_t* message
1260);
1261
1262/*==========================================================================
1263 FUNCTION WLANTL_ProcessTxMessage
1264
1265 DESCRIPTION
1266 Called by VOSS when a message was serialized for TL through the
1267 tx thread/task.
1268
1269 DEPENDENCIES
1270 The TL must be initialized before this function can be called.
1271
1272 PARAMETERS
1273
1274 IN
1275 pAdapter: pointer to the global adapter context; a handle to TL's
1276 control block can be extracted from its context
1277 message: type and content of the message
1278
1279
1280 RETURN VALUE
1281
1282 The result code associated with performing the operation
1283 VOS_STATUS_SUCCESS: Everything is good :)
1284
1285
1286 SIDE EFFECTS
1287
1288============================================================================*/
1289VOS_STATUS
1290WLANTL_ProcessTxMessage
1291(
1292 v_PVOID_t pAdapter,
1293 vos_msg_t* message
1294);
1295
1296/*==========================================================================
1297 FUNCTION WLAN_TLGetNextTxIds
1298
1299 DESCRIPTION
1300 Gets the next station and next AC in the list
1301
1302 DEPENDENCIES
1303
1304 PARAMETERS
1305
1306 OUT
1307 pucSTAId: STAtion ID
1308
1309 RETURN VALUE
1310 The result code associated with performing the operation
1311
1312 SIDE EFFECTS
1313
1314============================================================================*/
1315VOS_STATUS
1316WLAN_TLGetNextTxIds
1317(
1318 v_PVOID_t pAdapter,
1319 v_U8_t* pucSTAId
1320);
1321
1322/*==========================================================================
1323
1324 FUNCTION WLANTL_CleanCb
1325
1326 DESCRIPTION
1327 Cleans TL control block
1328
1329 DEPENDENCIES
1330
1331 PARAMETERS
1332
1333 IN
1334 pTLCb: pointer to TL's control block
1335 ucEmpty: set if TL has to clean up the queues and release pedning pkts
1336
1337 RETURN VALUE
1338 The result code associated with performing the operation
1339
1340 SIDE EFFECTS
1341
1342============================================================================*/
1343VOS_STATUS
1344WLANTL_CleanCB
1345(
1346 WLANTL_CbType* pTLCb,
1347 v_U8_t ucEmpty
1348);
1349
1350/*==========================================================================
1351
1352 FUNCTION WLANTL_CleanSTA
1353
1354 DESCRIPTION
1355 Cleans a station control block.
1356
1357 DEPENDENCIES
1358
1359 PARAMETERS
1360
1361 IN
1362 pAdapter: pointer to the global adapter context; a handle to TL's
1363 control block can be extracted from its context
1364 ucEmpty: if set the queues and pending pkts will be emptyed
1365
1366 RETURN VALUE
1367 The result code associated with performing the operation
1368
1369 SIDE EFFECTS
1370
1371============================================================================*/
1372VOS_STATUS
1373WLANTL_CleanSTA
1374(
1375 WLANTL_STAClientType* ptlSTAClient,
1376 v_U8_t ucEmpty
1377);
1378
1379/*==========================================================================
1380 FUNCTION WLANTL_GetTxResourcesCB
1381
1382 DESCRIPTION
1383 Processing function for Resource needed signal. A request will be issued
1384 to BAL to get mor tx resources.
1385
1386 DEPENDENCIES
1387 The TL must be initialized before this function can be called.
1388
1389 PARAMETERS
1390
1391 IN
1392 pvosGCtx: pointer to the global vos context; a handle to TL's
1393 control block can be extracted from its context
1394
1395
1396 RETURN VALUE
1397 The result code associated with performing the operation
1398
1399 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1400 page fault
1401 VOS_STATUS_SUCCESS: Everything is good :)
1402
1403 Other values can be returned as a result of a function call, please check
1404 corresponding API for more info.
1405 SIDE EFFECTS
1406
1407============================================================================*/
1408VOS_STATUS
1409WLANTL_GetTxResourcesCB
1410(
1411 v_PVOID_t pvosGCtx
1412);
1413
1414/*==========================================================================
1415 FUNCTION WLANTL_PrepareBDHeader
1416
1417 DESCRIPTION
1418 Callback function for serializing Suspend signal through Tx thread
1419
1420 DEPENDENCIES
1421 Just notify HAL that suspend in TL is complete.
1422
1423 PARAMETERS
1424
1425 IN
1426 pAdapter: pointer to the global adapter context; a handle to TL's
1427 control block can be extracted from its context
1428 pUserData: user data sent with the callback
1429
1430 RETURN VALUE
1431 The result code associated with performing the operation
1432
1433 SIDE EFFECTS
1434
1435============================================================================*/
1436void
1437WLANTL_PrepareBDHeader
1438(
1439 vos_pkt_t* vosDataBuff,
1440 v_PVOID_t* ppvBDHeader,
1441 v_MACADDR_t* pvDestMacAdddr,
1442 v_U8_t ucDisableFrmXtl,
1443 VOS_STATUS* pvosSTAtus,
1444 v_U16_t* usPktLen,
1445 v_U8_t ucQosEnabled,
1446 v_U8_t ucWDSEnabled,
1447 v_U8_t extraHeadSpace
1448);
1449
1450/*==========================================================================
1451 FUNCTION WLANTL_Translate8023To80211Header
1452
1453 DESCRIPTION
1454 Inline function for translating and 802.3 header into an 802.11 header.
1455
1456 DEPENDENCIES
1457
1458
1459 PARAMETERS
1460
1461 IN
1462 pTLCb: TL control block
Kiran Venkatappaa044eb92012-12-17 15:48:49 -08001463
1464 *pucStaId Station ID. In case of TDLS, this return the actual
1465 station index used to transmit.
Jeff Johnson295189b2012-06-20 16:38:30 -07001466
1467 IN/OUT
1468 vosDataBuff: vos data buffer, will contain the new header on output
1469
1470 OUT
1471 pvosStatus: status of the operation
1472
1473 RETURN VALUE
1474 No return.
1475
1476 SIDE EFFECTS
1477
1478============================================================================*/
Kiran Venkatappacab0d352012-12-17 13:09:22 -08001479VOS_STATUS
1480WLANTL_Translate8023To80211Header
1481(
1482 vos_pkt_t* vosDataBuff,
1483 VOS_STATUS* pvosStatus,
1484 WLANTL_CbType* pTLCb,
1485 v_U8_t *pucStaId,
Ravi Joshid0699502013-07-08 15:48:47 -07001486 WLANTL_MetaInfoType* pTlMetaInfo,
Kiran Venkatappacab0d352012-12-17 13:09:22 -08001487 v_U8_t *ucWDSEnabled,
1488 v_U8_t *extraHeadSpace
1489);
Jeff Johnson295189b2012-06-20 16:38:30 -07001490/*==========================================================================
1491 FUNCTION WLANTL_Translate80211To8023Header
1492
1493 DESCRIPTION
1494 Inline function for translating and 802.11 header into an 802.3 header.
1495
1496 DEPENDENCIES
1497
1498
1499 PARAMETERS
1500
1501 IN
1502 pTLCb: TL control block
1503 ucStaId: station ID
1504 ucHeaderLen: Length of the header from BD
1505 ucActualHLen: Length of header including padding or any other trailers
1506
1507 IN/OUT
1508 vosDataBuff: vos data buffer, will contain the new header on output
1509
1510 OUT
1511 pvosStatus: status of the operation
1512
1513 RETURN VALUE
1514 Status of the operation
1515
1516 SIDE EFFECTS
1517
1518============================================================================*/
1519VOS_STATUS
1520WLANTL_Translate80211To8023Header
1521(
1522 vos_pkt_t* vosDataBuff,
1523 VOS_STATUS* pvosStatus,
Jeff Johnson017fdc32013-02-27 09:22:30 -08001524 v_U16_t usActualHLen,
Jeff Johnson295189b2012-06-20 16:38:30 -07001525 v_U8_t ucHeaderLen,
1526 WLANTL_CbType* pTLCb,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001527 v_U8_t ucSTAId,
Katya Nigame7b69a82015-04-28 15:24:06 +05301528 v_BOOL_t bForwardIAPPwithLLC
Jeff Johnson295189b2012-06-20 16:38:30 -07001529);
1530
Katya Nigame7b69a82015-04-28 15:24:06 +05301531VOS_STATUS
1532WLANTL_MonTranslate80211To8023Header
1533(
1534 vos_pkt_t* vosDataBuff,
1535 WLANTL_CbType* pTLCb
1536);
Jeff Johnson295189b2012-06-20 16:38:30 -07001537/*==========================================================================
Madan Mohan Koyyalamudia148e1e2012-11-30 14:52:59 -08001538 FUNCTION WLANTL_FindFrameTypeBcMcUc
1539
1540 DESCRIPTION
1541 Utility function to find whether received frame is broadcast, multicast
1542 or unicast.
1543
1544 DEPENDENCIES
1545 The STA must be registered with TL before this function can be called.
1546
1547 PARAMETERS
1548
1549 IN
1550 pTLCb: pointer to the TL's control block
1551 ucSTAId: identifier of the station being processed
1552 vosDataBuff: pointer to the vos buffer
1553
1554 IN/OUT
1555 pucBcMcUc: pointer to buffer, will contain frame type on return
1556
1557 RETURN VALUE
1558 The result code associated with performing the operation
1559
1560 VOS_STATUS_E_INVAL: invalid input parameters
1561 VOS_STATUS_E_BADMSG: failed to extract info from data buffer
1562 VOS_STATUS_SUCCESS: success
1563
1564 SIDE EFFECTS
1565 None.
1566============================================================================*/
1567VOS_STATUS
1568WLANTL_FindFrameTypeBcMcUc
1569(
1570 WLANTL_CbType *pTLCb,
1571 v_U8_t ucSTAId,
1572 vos_pkt_t *vosDataBuff,
1573 v_U8_t *pucBcMcUc
1574);
1575
1576/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -07001577
1578 FUNCTION WLANTL_MgmtFrmRxDefaultCb
1579
1580 DESCRIPTION
1581 Default Mgmt Frm rx callback: asserts all the time. If this function gets
1582 called it means there is no registered rx cb pointer for Mgmt Frm.
1583
1584 DEPENDENCIES
1585
1586 PARAMETERS
1587
1588 Not used.
1589
1590 RETURN VALUE
1591 Always FAILURE.
1592
1593============================================================================*/
1594VOS_STATUS
1595WLANTL_MgmtFrmRxDefaultCb
1596(
1597 v_PVOID_t pAdapter,
1598 v_PVOID_t vosBuff
1599);
1600
1601/*==========================================================================
1602
1603 FUNCTION WLANTL_STARxDefaultCb
1604
1605 DESCRIPTION
1606 Default BAP rx callback: asserts all the time. If this function gets
1607 called it means there is no registered rx cb pointer for BAP.
1608
1609 DEPENDENCIES
1610
1611 PARAMETERS
1612
1613 Not used.
1614
1615 RETURN VALUE
1616 Always FAILURE.
1617
1618============================================================================*/
1619VOS_STATUS
1620WLANTL_BAPRxDefaultCb
1621(
1622 v_PVOID_t pAdapter,
1623 vos_pkt_t* vosDataBuff,
1624 WLANTL_BAPFrameEnumType frameType
1625);
1626
1627/*==========================================================================
1628
1629 FUNCTION WLANTL_STARxDefaultCb
1630
1631 DESCRIPTION
1632 Default STA rx callback: asserts all the time. If this function gets
1633 called it means there is no registered rx cb pointer for station.
1634 (Mem corruption most likely, it should never happen)
1635
1636 DEPENDENCIES
1637
1638 PARAMETERS
1639
1640 Not used.
1641
1642 RETURN VALUE
1643 Always FAILURE.
1644
1645============================================================================*/
1646VOS_STATUS
1647WLANTL_STARxDefaultCb
1648(
1649 v_PVOID_t pAdapter,
1650 vos_pkt_t* vosDataBuff,
1651 v_U8_t ucSTAId,
1652 WLANTL_RxMetaInfoType* pRxMetaInfo
1653);
1654
1655/*==========================================================================
1656
1657 FUNCTION WLANTL_STAFetchPktDefaultCb
1658
1659 DESCRIPTION
1660 Default fetch callback: asserts all the time. If this function gets
1661 called it means there is no registered fetch cb pointer for station.
1662 (Mem corruption most likely, it should never happen)
1663
1664 DEPENDENCIES
1665
1666 PARAMETERS
1667
1668 Not used.
1669
1670 RETURN VALUE
1671 Always FAILURE.
1672
1673============================================================================*/
1674VOS_STATUS
1675WLANTL_STAFetchPktDefaultCb
1676(
1677 v_PVOID_t pAdapter,
1678 v_U8_t* pucSTAId,
1679 WLANTL_ACEnumType ucAC,
1680 vos_pkt_t** vosDataBuff,
1681 WLANTL_MetaInfoType* tlMetaInfo
1682);
1683
1684/*==========================================================================
1685
1686 FUNCTION WLANTL_TxCompDefaultCb
1687
1688 DESCRIPTION
1689 Default tx complete handler. It will release the completed pkt to
1690 prevent memory leaks.
1691
1692 PARAMETERS
1693
1694 IN
1695 pAdapter: pointer to the global adapter context; a handle to
1696 TL/HAL/PE/BAP/HDD control block can be extracted from
1697 its context
1698 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1699 wTxSTAtus: status of the transmission
1700
1701
1702 RETURN VALUE
1703 The result code associated with performing the operation; please
1704 check vos_pkt_return_pkt for possible error codes.
1705
1706============================================================================*/
1707VOS_STATUS
1708WLANTL_TxCompDefaultCb
1709(
1710 v_PVOID_t pAdapter,
1711 vos_pkt_t* vosDataBuff,
1712 VOS_STATUS wTxSTAtus
1713);
1714
1715/*==========================================================================
1716
1717 FUNCTION WLANTL_PackUpTriggerFrame
1718
1719 DESCRIPTION
1720 Packs up a trigger frame and places it in TL's cache for tx and notifies
1721 BAL
1722
1723 DEPENDENCIES
1724
1725 PARAMETERS
1726
1727 IN
1728 pTLCb: pointer to the TL control block
1729 pfnSTATxComp: Tx Complete Cb to be used when frame is received
1730 ucSTAId: station id
1731 ucAC: access category
1732
1733 RETURN VALUE
1734 None
1735
1736 SIDE EFFECTS
1737
1738============================================================================*/
1739VOS_STATUS
1740WLANTL_PackUpTriggerFrame
1741(
1742 WLANTL_CbType* pTLCb,
1743 WLANTL_TxCompCBType pfnSTATxComp,
1744 v_U8_t ucSTAId,
1745 WLANTL_ACEnumType ucAC
1746);
1747
1748/*==========================================================================
1749
1750 FUNCTION WLANTL_TxCompTriggFrameSI
1751
1752 DESCRIPTION
1753 Tx complete handler for the service interval trigger frame.
1754 It will restart the SI timer.
1755
1756 PARAMETERS
1757
1758 IN
1759 pvosGCtx: pointer to the global vos context; a handle to
1760 TL/HAL/PE/BAP/HDD control block can be extracted from
1761 its context
1762 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1763 wTxSTAtus: status of the transmission
1764
1765
1766 RETURN VALUE
1767 The result code associated with performing the operation
1768
1769 ============================================================================*/
1770VOS_STATUS
1771WLANTL_TxCompTriggFrameSI
1772(
1773 v_PVOID_t pvosGCtx,
1774 vos_pkt_t* vosDataBuff,
1775 VOS_STATUS wTxSTAtus
1776);
1777
1778/*==========================================================================
1779
1780 FUNCTION WLANTL_TxCompTriggFrameSI
1781
1782 DESCRIPTION
1783 Tx complete handler for the service interval trigger frame.
1784 It will restart the SI timer.
1785
1786 PARAMETERS
1787
1788 IN
1789 pvosGCtx: pointer to the global vos context; a handle to
1790 TL/HAL/PE/BAP/HDD control block can be extracted from
1791 its context
1792 vosDataBuff: pointer to the VOSS data buffer that was transmitted
1793 wTxSTAtus: status of the transmission
1794
1795
1796 RETURN VALUE
1797 The result code associated with performing the operation
1798
1799============================================================================*/
1800VOS_STATUS
1801WLANTL_TxCompTriggFrameDI
1802(
1803 v_PVOID_t pvosGCtx,
1804 vos_pkt_t* vosDataBuff,
1805 VOS_STATUS wTxSTAtus
1806);
1807
1808/*==========================================================================
1809
1810 FUNCTION
1811
1812 DESCRIPTION Read RSSI value out of a RX BD
1813
1814 PARAMETERS: Caller must validate all parameters
1815
1816 RETURN VALUE
1817
1818============================================================================*/
1819VOS_STATUS WLANTL_ReadRSSI
1820(
1821 v_PVOID_t pAdapter,
1822 v_PVOID_t pBDHeader,
1823 v_U8_t STAid
1824);
1825
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301826/*==========================================================================
1827
1828 FUNCTION
1829
1830 DESCRIPTION Read SNR value out of a RX BD
1831
1832 PARAMETERS: Caller must validate all parameters
1833
1834 RETURN VALUE
1835
1836============================================================================*/
1837VOS_STATUS WLANTL_ReadSNR
1838(
1839 v_PVOID_t pAdapter,
1840 v_PVOID_t pBDHeader,
1841 v_U8_t STAid
1842);
Jeff Johnson295189b2012-06-20 16:38:30 -07001843
1844
1845void WLANTL_PowerStateChangedCB
1846(
1847 v_PVOID_t pAdapter,
1848 tPmcState newState
1849);
1850
Jeff Johnson295189b2012-06-20 16:38:30 -07001851/*==========================================================================
Jeff Johnson017fdc32013-02-27 09:22:30 -08001852 FUNCTION WLANTL_FwdPktToHDD
Jeff Johnson295189b2012-06-20 16:38:30 -07001853
1854 DESCRIPTION
1855 Determine the Destation Station ID and route the Frame to Upper Layer
1856
1857 DEPENDENCIES
1858
1859 PARAMETERS
1860
1861 IN
1862 pvosGCtx: pointer to the global vos context; a handle to TL's
1863 control block can be extracted from its context
1864 ucSTAId: identifier of the station being processed
1865 vosDataBuff: pointer to the rx vos buffer
1866
1867 RETURN VALUE
1868 The result code associated with performing the operation
1869
1870 VOS_STATUS_E_INVAL: invalid input parameters
1871 VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a
1872 page fault
1873 VOS_STATUS_SUCCESS: Everything is good :)
1874
1875 SIDE EFFECTS
1876
1877============================================================================*/
1878
1879VOS_STATUS
1880WLANTL_FwdPktToHDD
1881(
1882 v_PVOID_t pvosGCtx,
1883 vos_pkt_t* pvosDataBuff,
1884 v_U8_t ucSTAId
1885);
1886
Abhishek Singh00b71972016-01-07 10:51:04 +05301887#ifdef WLAN_FEATURE_RMC
1888VOS_STATUS WLANTL_RmcInit
1889(
1890 v_PVOID_t pAdapter
1891);
1892
1893VOS_STATUS WLANTL_RmcDeInit
1894(
1895 v_PVOID_t pAdapter
1896);
1897
1898
1899tANI_U8 WLANTL_RmcHashRmcSession ( v_MACADDR_t *pMcastAddr );
1900
1901
1902WLANTL_RMC_SESSION *WLANTL_RmcLookUpRmcSession
1903(
1904 WLANTL_RMC_SESSION *rmcSession[],
1905 v_MACADDR_t *pMcastAddr
1906);
1907
1908WLANTL_RMC_SESSION *WLANTL_RmcAddRmcSession
1909(
1910 WLANTL_RMC_SESSION *rmcSession[],
1911 v_MACADDR_t *pMcastAddr
1912);
1913
1914tANI_U8
1915WLANTL_RmcDeleteRmcSession
1916(
1917 WLANTL_RMC_SESSION *rmcSession[],
1918 v_MACADDR_t *pMcastAddr
1919);
1920
1921VOS_STATUS
1922WLANTL_ProcessRmcCommand
1923(
1924 WLANTL_CbType* pTLCb,
1925 v_MACADDR_t *pMcastAddr,
1926 tANI_U32 command
1927);
1928
1929/*=============================================================================
1930 FUNCTION WLANTL_IsDuplicateMcastFrm
1931
1932 DESCRIPTION
1933 This function checks for duplicast multicast frames and drops them.
1934
1935 DEPENDENCIES
1936
1937 PARAMETERS
1938
1939 IN
1940
1941 pClientSTA : Pointer to WLANTL_STAClientType
1942 aucBDHeader : Pointer to BD header
1943
1944 RETURN VALUE
1945
1946 VOS_FALSE: This frame is not a duplicate
1947
1948 VOS_TRUE: This frame is a duplicate
1949
1950==============================================================================*/
1951v_U8_t
1952WLANTL_IsDuplicateMcastFrm
1953(
1954 WLANTL_STAClientType *pClientSTA,
1955 vos_pkt_t* vosDataBuff
1956);
1957
1958/*=============================================================================
1959 FUNCTION WLANTL_McastDeleteAllEntries
1960
1961 DESCRIPTION
1962 This function removes all multicast entries used for duplicate detection
1963
1964 DEPENDENCIES
1965
1966 PARAMETERS
1967
1968 IN
1969
1970 pClientSTA : Pointer to WLANTL_STAClientType
1971
1972 RETURN VALUE
1973
1974 None
1975
1976==============================================================================*/
1977void
1978WLANTL_McastDeleteAllEntries(WLANTL_STAClientType * pClientSTA);
1979
1980#endif /*WLAN_FEATURE_RMC*/
1981
Jeff Johnson295189b2012-06-20 16:38:30 -07001982#endif /* #ifndef WLAN_QCT_TLI_H */