blob: f9263a90fe7a436d8d66b48d33ccf2d14781d557 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam1ed83fc2014-02-19 01:15:45 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -080023 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
Kiet Lam1ed83fc2014-02-19 01:15:45 -080026 *
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080027 */
Kiet Lam1ed83fc2014-02-19 01:15:45 -080028
29
Jeff Johnson295189b2012-06-20 16:38:30 -070030#ifndef WLAN_QCT_HAL_H
31#define WLAN_QCT_HAL_H
32#include "vos_status.h"
33#include "halTypes.h"
34#ifndef PALTYPES_H__
35
36
37/// unsigned 8-bit types
38#define tANI_U8 v_U8_t
39
40/// unsigned 16-bit types
41#define tANI_U16 v_U16_t
42
43/// unsigned 32-bit types
44#define tANI_U32 v_U32_t
45
46/// signed 8-bit types
47#define tANI_S8 v_S7_t
48
49/// signed 16-bit types
50#define tANI_S16 v_S15_t
51
52/// signed 32-bit types
53#define tANI_S32 v_S31_t
54
55#define eHalStatus VOS_STATUS
56
57#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070058#define QWLAN_HAL_DXE0_MASTERID 5
59
60typedef struct sHalBdGeneric {
61 /* 0x00 */
62 // ENDIAN BEGIN
63 tANI_U32 dpuRF : 8;
64 tANI_U32 dpuSignature:3; /* Signature on RA's DPU descriptor */
65 tANI_U32 staSignature:3;
66 tANI_U32 reserved : 14;
67 tANI_U32 dpuNE : 1;
68 tANI_U32 dpuNC : 1;
69 tANI_U32 bdt : 2; /* BD type */
70 // ENDIAN END
71
72 /* 0x04 */
73 // ENDIAN BEGIN
74 tANI_U32 reserved1:32;
75 // ENDIAN END
76
77
78 /* 0x08 */
79 // ENDIAN BEGIN
80 tANI_U32 headPduIdx : 16; /* Head PDU index */
81 tANI_U32 tailPduIdx : 16; /* Tail PDU index */
82 // ENDIAN END
83
84 /* 0x0c */
85 // ENDIAN BEGIN
86 tANI_U32 mpduHeaderLength : 8; /* MPDU header length */
87 tANI_U32 mpduHeaderOffset : 8; /* MPDU header start offset */
88 tANI_U32 mpduDataOffset : 9; /* MPDU data start offset */
89 tANI_U32 pduCount : 7; /* PDU count */
90 // ENDIAN END
91
92 /* 0x10 */
93 // ENDIAN BEGIN
94 tANI_U32 mpduLength : 16; /* MPDU length */
95 tANI_U32 reserved3:4; /* DPU compression feedback */
96 tANI_U32 tid : 4; /* Traffic identifier, tid */
97 tANI_U32 rateIndex : 8;
98 // ENDIAN END
99
100 /* 0x14 */
101 // ENDIAN BEGIN
102 tANI_U32 dpuDescIdx : 8;
103 tANI_U32 addr1Index : 8; //A1 index after RxP binary search
104 tANI_U32 addr2Index : 8; //A2 index after RxP binary search
105 tANI_U32 addr3Index : 8; //A3 index after RxP binary search
106 // ENDIAN END
107//}__ani_attr_packed __ani_attr_aligned_4 tHalBdGeneric, *tpHalBdGeneric;
108} tHalBdGeneric, *tpHalBdGeneric;
109
110
111/*
112 * PDU without BD
113 */
114
115typedef struct sHalPdu {
116 tANI_U8 payload[124];
117 tANI_U32 nextPduIdx; /* LSB 16 bits */
118//} __ani_attr_packed __ani_attr_aligned_4 tHalPdu, *tpHalPdu;
119} tHalPdu, *tpHalPdu;
120
Jeff Johnson295189b2012-06-20 16:38:30 -0700121/* UAPSD parameters passed per AC to HAL from TL */
122typedef struct sUapsdInfo {
123 tANI_U8 staidx; // STA index
124 tANI_U8 ac; // Access Category
125 tANI_U8 up; // User Priority
126 tANI_U32 srvInterval; // Service Interval
127 tANI_U32 susInterval; // Suspend Interval
128 tANI_U32 delayInterval; // Delay Interval
129} tUapsdInfo, tpUapsdInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700130
131#define HAL_TXBD_BDRATE_DEFAULT 0
132#define HAL_TXBD_BDRATE_FIRST 1
133#define HAL_TXBD_BDRATE_SECOND 2
134#define HAL_TXBD_BDRATE_THIRD 3
135
136#define HAL_FRAME_TYPE_MASK 0x30
137#define HAL_FRAME_TYPE_OFFSET 0x4
138#define HAL_FRAME_SUBTYPE_MASK 0x0F
139
140#define HAL_TXBD_BD_SSN_FILL_HOST 0
141#define HAL_TXBD_BD_SSN_FILL_DPU_NON_QOS 1
142#define HAL_TXBD_BD_SSN_FILL_DPU_QOS 2
143
144#define HAL_ACKPOLICY_ACK_REQUIRED 0
145#define HAL_ACKPOLICY_ACK_NOTREQUIRED 1
146
147#define HAL_BDRATE_BCDATA_FRAME 1
148#define HAL_BDRATE_BCMGMT_FRAME 2
149#define HAL_BDRATE_CTRL_FRAME 3
150
151/* Default values for FillTx BD */
152#define HAL_DEFAULT_UNICAST_ENABLED 1
153#define HAL_RMF_DISABLED 0
154#define HAL_RMF_ENABLED 1
155#define HAL_NO_ENCRYPTION_DISABLED 0
156#define HAL_NO_ENCRYPTION_ENABLED 1
157
158#define WLANHAL_RX_BD_ADDR3_SELF_IDX 0
159
Jeff Johnson295189b2012-06-20 16:38:30 -0700160// Should not use tHalTxBd nor tHalRxBd. UMAC doesn't know these HAL structure.
161#define WLANHAL_TX_BD_HEADER_SIZE 40
162#define WLANHAL_RX_BD_HEADER_SIZE 76
Jeff Johnson295189b2012-06-20 16:38:30 -0700163
164
165#define WLANHAL_RX_BD_HEADER_OFFSET 0
166
167#define WLANHAL_RX_BD_GET_MPDU_H_OFFSET( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduHeaderOffset)
168
169#define WLANHAL_RX_BD_GET_MPDU_D_OFFSET( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduDataOffset)
170
171#define WLANHAL_RX_BD_GET_MPDU_LEN( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduLength)
172
173#define WLANHAL_RX_BD_GET_MPDU_H_LEN( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduHeaderLength)
174
175#define WLANHAL_RX_BD_GET_FT( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->ft)
176
177#define WLANHAL_RX_BD_GET_LLC( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->llc)
178
179#define WLANHAL_RX_BD_GET_TID( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->tid)
180
181#define WLANHAL_RX_BD_GET_ASF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->asf)
182
183#define WLANHAL_RX_BD_GET_AEF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->aef)
184
185#define WLANHAL_RX_BD_GET_LSF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->lsf)
186
187#define WLANHAL_RX_BD_GET_ESF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->esf)
188
189#define WLANHAL_RX_BD_GET_STA_ID( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr2Index)
190#define WLANHAL_RX_BD_GET_ADDR3_IDX( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr3Index)
191#define WLANHAL_RX_BD_GET_ADDR1_IDX( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr1Index)
192
193#define WLANHAL_TX_BD_GET_TID( _pvBDHeader ) (((tpHalTxBd)_pvBDHeader)->tid)
194#define WLANHAL_TX_BD_GET_STA_ID( _pvBDHeader ) (((tpHalTxBd)_pvBDHeader)->staIndex)
195
196#define WLANHAL_RX_BD_GET_DPU_SIG( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->dpuSignature)
197
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800198#define WLANHAL_FC_RX_BD_REPORT_CONTENT_SIZE (2 * HAL_NUM_STA * sizeof(tANI_U8)) // size of fcSTATxQLen[HAL_NUM_STA]+fcSTACurTxRate[HAL_NUM_STA]
Jeff Johnson295189b2012-06-20 16:38:30 -0700199#define WLANHAL_FC_TX_BD_HEADER_SIZE sizeof(tHalFcTxBd)
200#define WLANHAL_RX_BD_GET_FC( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fc)
201#define WLANHAL_RX_BD_GET_RX_TIME_STAMP( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->mclkRxTimestamp)
202#define WLANHAL_RX_BD_GET_STA_VALID_MASK( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAValidMask)
203#define WLANHAL_RX_BD_GET_STA_PS_STATE( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAPwrSaveStateMask)
204#define WLANHAL_RX_BD_GET_STA_TH_IND( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAThreshIndMask)
205#define WLANHAL_RX_BD_GET_STA_TXQ_STATUS( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTATxQStatus)
206#define WLANHAL_RX_BD_GET_STA_TXQ_LEN( _pvBDHeader, staIdx ) (((tpHalFcRxBd)_pvBDHeader)->fcSTATxQLen[staIdx])
207#define WLANHAL_RX_BD_GET_STA_CUR_TX_RATE( _pvBDHeader, staIdx ) (((tpHalFcRxBd)_pvBDHeader)->fcSTACurTxRate[staIdx])
208
209#define WLANHAL_TX_BD_GET_RMF(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rmf)
210
211#define WLANHAL_TX_BD_GET_UB(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->ub)
212
213#define WLANHAL_RX_BD_GET_RMF(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rmf)
214
215#define WLANHAL_RX_BD_GET_UB(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->ub)
216
217#define WLANHAL_RX_BD_GET_RATEINDEX(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rateIndex)
218
219#define WLANHAL_RX_BD_GET_TIMESTAMP(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->mclkRxTimestamp)
220
221#define tHalFcRxBd halFcRxBd_type
222#define tpHalFcRxBd phalFcRxBd_type
223#define tHalFcTxBd halFcTxBd_type
224#define tpHalFcTxBd pHalFcTxBd_type
225#define tHalFcTxParams tFcTxParams_type
226#define tHalFcRxParams tFcRxParams_type
227#define tpHalFcTxParams pFcTxParams_type
228#define tpHalFcRxParams pFcRxParams_type
Jeff Johnson295189b2012-06-20 16:38:30 -0700229
230/*------------ RSSI and SNR Information extraction -------------*/
231#define WLANHAL_RX_BD_GET_RSSI0( _pvBDHeader ) \
232 (((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 24) & 0xff)
233#define WLANHAL_RX_BD_GET_RSSI1( _pvBDHeader ) \
234 (((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 16) & 0xff)
235#define WLANHAL_RX_BD_GET_RSSI2( _pvBDHeader ) \
236 (((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 0) & 0xff)
237#define WLANHAL_RX_BD_GET_RSSI3( _pvBDHeader ) \
238 ((((tpHalRxBd)_pvBDHeader)->phyStats0) & 0xff)
239
240// Get the average of the 4 values.
241#define WLANHAL_GET_RSSI_AVERAGE( _pvBDHeader ) \
242 (((WLANHAL_RX_BD_GET_RSSI0(_pvBDHeader)) + \
243 (WLANHAL_RX_BD_GET_RSSI1(_pvBDHeader)) + \
244 (WLANHAL_RX_BD_GET_RSSI2(_pvBDHeader)) + \
245 (WLANHAL_RX_BD_GET_RSSI3(_pvBDHeader))) / 4)
246
247// Get the SNR value from PHY Stats
248#define WLANHAL_RX_BD_GET_SNR( _pvBDHeader ) \
249 (((((tpHalRxBd)_pvBDHeader)->phyStats1) >> 24) & 0xff)
250/*-----------------------------------------------------------------*/
251#define WLANHAL_RX_BD_GET_DPU_SIG( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->dpuSignature)
252
253
254#define WLANHAL_TX_BD_SET_MPDU_DATA_OFFSET( _bd, _off ) (((tpHalTxBd)_bd)->mpduDataOffset = _off)
255
256#define WLANHAL_TX_BD_SET_MPDU_HEADER_OFFSET( _bd, _off ) (((tpHalTxBd)_bd)->mpduHeaderOffset = _off)
257
258#define WLANHAL_TX_BD_SET_MPDU_HEADER_LEN( _bd, _len ) (((tpHalTxBd)_bd)->mpduHeaderLength = _len)
259
260#define WLANHAL_TX_BD_SET_MPDU_LEN( _bd, _len ) (((tpHalTxBd)_bd)->mpduLength = _len)
261
262#define WLANHAL_RX_BD_GET_BA_OPCODE(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderOpcode)
263
264#define WLANHAL_RX_BD_GET_BA_FI(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderFwdIdx)
265
266#define WLANHAL_RX_BD_GET_BA_SI(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderSlotIdx)
267
268#define WLANHAL_RX_BD_GET_BA_CSN(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->currentPktSeqNo)
269
270#define WLANHAL_RX_BD_GET_BA_ESN(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->expectedPktSeqNo)
271
272#define WLANHAL_RX_BD_GET_RXP_FLAGS(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rxpFlags)
273
274#define WLANHAL_RX_BD_GET_TYPE_SUBTYPE(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->frameTypeSubtype)
275#define WLANHAL_RX_BD_SET_TYPE_SUBTYPE( _bd, _typeSubtype ) (((tpHalRxBd)_bd)->frameTypeSubtype = _typeSubtype)
276
Jeff Johnson295189b2012-06-20 16:38:30 -0700277
278#define WLANHAL_RX_BD_ASF_SET 1 /*The value of the field when set and pkt is AMSDU*/
279
280#define WLANHAL_RX_BD_FSF_SET 1
281
282#define WLANHAL_RX_BD_LSF_SET 1
283
284#define WLANHAL_RX_BD_AEF_SET 1
285
286
287#define WLANHAL_RX_BD_LLC_PRESENT 0 /*The value of the field when LLC is present*/
288
289#define WLANHAL_RX_BD_FT_DONE 1 /* The value of the field when frame xtl was done*/
290
Jeff Johnson295189b2012-06-20 16:38:30 -0700291/*DPU_FEEDBACK_WPI_UNPROTECTED macro defined in volansdefs.h which is not available
292 for UMAC in prima so declared it here */
293#define DPU_FEEDBACK_WPI_UNPROTECTED 0x20
294#define WLANHAL_RX_IS_UNPROTECTED_WPI_FRAME(_pvBDHeader) \
295 (DPU_FEEDBACK_WPI_UNPROTECTED == ((WDI_RxBdType *)_pvBDHeader)->dpuFeedback)
Jeff Johnson295189b2012-06-20 16:38:30 -0700296
297/*==========================================================================
298
299 FUNCTION WLANHAL_RxBD_GetFrameTypeSubType
300
301 DESCRIPTION
302 Called by TL to retrieve the type/subtype of the received frame.
303
304 DEPENDENCIES
305 TL should pass a valid RxBD buffer pointer.
306
307 PARAMETERS
308
309 IN
310 pvBDHeader: Void pointer to the RxBD buffer.
311 usFrmCtrl:the frame ctrl of the 802.11 header
312
313 RETURN VALUE
314 A byte which contains both type and subtype info. LSB four bytes (b0 to b3)
315 is subtype and b5-b6 is type info.
316
317 SIDE EFFECTS
318
319============================================================================*/
320
321tANI_U8 WLANHAL_RxBD_GetFrameTypeSubType(v_PVOID_t _pvBDHeader, tANI_U16 usFrmCtrl);
322
323
324#define HAL_TXCOMP_REQUESTED_MASK 0x1 //bit 0 for TxComp intr requested.
325#define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 //bit 1 for STA overwrite with selfSta Requested.
326#define HAL_TX_NO_ENCRYPTION_MASK 0x4 //bit 2. If set, the frame is not to be encrypted
327#if defined(LIBRA_WAPI_SUPPORT)
328#define HAL_WAPI_STA_MASK 0x8 //bit 3. If set, this frame is for WAPI station
329#endif
330
Jeff Johnson295189b2012-06-20 16:38:30 -0700331#define HAL_TRIGGER_ENABLED_AC_MASK 0x10 //bit 4 for data frames belonging to trigger enabled AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700332#define HAL_USE_NO_ACK_REQUESTED_MASK 0x20
333
334#define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 // Bit 6 will be used to control BD rate for Management frames
Madan Mohan Koyyalamudi7ff89c12012-11-28 15:50:13 -0800335#define HAL_USE_PEER_STA_REQUESTED_MASK 0x80 //bit 7 will be used to control frames for p2p interface
Jeff Johnson295189b2012-06-20 16:38:30 -0700336
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800337#ifdef FEATURE_WLAN_TDLS
338#define HAL_TDLS_PEER_STA_MASK 0x80 //bit 7 set for TDLS peer station
339#endif
Kanchanapally, Vidyullathaf9426e52013-12-24 17:28:54 +0530340
Abhishek Singhfa011222014-04-14 10:57:08 +0530341#define HAL_USE_BD_RATE_MASK 0x1000
Kanchanapally, Vidyullathaf9426e52013-12-24 17:28:54 +0530342#define HAL_USE_FW_IN_TX_PATH 0x200 //bit 9 to send via WQ5
Jeff Johnson295189b2012-06-20 16:38:30 -0700343/*==========================================================================
344
345 FUNCTION WLANHAL_FillTxBd
346
347 DESCRIPTION
348 Called by PE to register as a client for management frames delivery.
349
350 DEPENDENCIES
351 TL must be initialized before this API can be called.
352
353 PARAMETERS
354
355 IN
356 pAdapter: pointer to the global adapter context;a handle to TL's
357 control block can be extracted from its context
358 vosFrmBuf: pointer to a vOSS buffer containing the management
359 frame to be transmitted
360 usFrmLen: the length of the frame to be transmitted; information
361 is already included in the vOSS buffer
362 wFrmType: the type of the frame being transmitted
363 tid: tid used to transmit this frame
364 pfnCompTxFunc: function pointer to the transmit complete routine
365 voosBDHeader: pointer to the BD header
366 txFlag: can have appropriate bit setting as required
367
368 #define HAL_TXCOMP_REQUESTED_MASK 0x1 //bit 0 for TxComp intr requested.
369 #define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 //bit 1 for STA overwrite with selfSta Requested.
370 #define HAL_TX_NO_ENCRYPTION_MASK 0x4 //bit 2. If set, the frame is not to be encrypted
371#if defined(FEATURE_WLAN_WAPI)
372 #define HAL_WAPI_STA_MASK 0x8 //bit 3. If set, this frame is for WAPI station
373#endif
374
375 uTimestamp: pkt timestamp
376
377
378 RETURN VALUE
379 The result code associated with performing the operation
380
381 SIDE EFFECTS
382
383============================================================================*/
Jeff Johnsona8a1a482012-12-12 16:49:33 -0800384VOS_STATUS WLANHAL_FillTxBd(void *pAdapter, tANI_U8 typeSubtype, void *pDestMacAddr, void *pAddr2,
Kiet Lamaa8e15a2014-02-11 23:30:06 -0800385 tANI_U8* ptid, tANI_U8 disableFrmXtl, void *pTxBd, tANI_U32 txFlag, tANI_U32 timeStamp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700386
Jeff Johnson295189b2012-06-20 16:38:30 -0700387VOS_STATUS WLANHAL_FillFcTxBd(void *pVosGCtx, void *pFcParams, void *pFcTxBd);
388/** To swap the report part of FC RxBD */
389void WLANHAL_SwapFcRxBd(tANI_U8 *pBd);
Jeff Johnson295189b2012-06-20 16:38:30 -0700390
391/* To swap the data */
392void WLANHAL_Swap32Bytes(tANI_U8* pData, tANI_U32 size);
393
394/** To swap the RxBD */
395void WLANHAL_SwapRxBd(tANI_U8 *pBd);
396void WLANHAL_RxAmsduBdFix(void *pVosGCtx,v_PVOID_t _pvBDHeader);
397
398#ifdef WLAN_PERF
Jeff Johnsona8a1a482012-12-12 16:49:33 -0800399tANI_U32 WLANHAL_TxBdFastFwd(void *pAdapter, tANI_U8 *pDestMac, tANI_U8 tid, tANI_U8 unicastDst, void *pTxBd, tANI_U16);
Jeff Johnson295189b2012-06-20 16:38:30 -0700400#endif
401
Jeff Johnson295189b2012-06-20 16:38:30 -0700402VOS_STATUS WLANHAL_EnableUapsdAcParams(void* pVosGCtx, tANI_U8 staIdx, tUapsdInfo *pUapsdInfo);
403VOS_STATUS WLANHAL_DisableUapsdAcParams(void* pVosGCtx, tANI_U8 staIdx, tANI_U8 ac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700404
405VOS_STATUS WLANHAL_EnableIdleBdPduInterrupt(void* pVosGCtx, tANI_U8 idleBdPduThreshold);
406
407#ifdef FEATURE_ON_CHIP_REORDERING
408tANI_U8 WLANHAL_IsOnChipReorderingEnabledForTID(void* pVosGCtx, tANI_U8 staIdx, tANI_U8 tid);
409#endif
410
411#ifdef WLAN_SOFTAP_VSTA_FEATURE
412v_BOOL_t WLANHAL_IsHwFrameTxTranslationCapable(v_PVOID_t pVosGCtx, tANI_U8 staIdx);
413#endif
414
415#define tHalRxBd halRxBd_type
416#define tpHalRxBd phalRxBd_type
417
418#define tHalTxBd halTxBd_type
419#define tpHalTxBd pHalTxBd_type
420
421#ifdef BA_PARAM_STRUCTURE
422#else
423#define BA_PARAM_STRUCTURE
424//
425// HAL --> TL
426// Messages indicating the setup and/or teardown of
427// A-MPDU/BA sessions with a given peer HT MAC entity
428//
429
430//
431// A data structure identifying all of the variables
432// in a typical A-MPDU/BA setup
433//
434typedef struct sBAParams
435{
436
437 // A unique BA Session ID that has been assigned by HAL
438 // for the curent BA Session
439 tANI_U16 baSessionID;
440
441 // TID for which the BA session has been setup
442 tANI_U8 baTID;
443
444 // BA Buffer Size allocated for the current BA session //Should be deleted. needs TL change. use winSize instead
445 tANI_U8 baBufferSize;
446
447 tANI_U16 SSN;
448 tANI_U8 winSize;
449 tANI_U8 STAID;
450
451} tBAParams, *tpBAParams;
452
453//
454// TL -> HAL
455// tSirMsgQ.type = SIR_HAL_HDD_ADDBA_RSP
456//
457typedef struct sAddBARsp
458{
459 // Message Type
460 tANI_U16 mesgType;
461
462 // Message Length
463 tANI_U16 mesgLen;
464
465 //BA session ID
466 tANI_U16 baSessionID;
467
468 tANI_U16 replyWinSize;
469}tAddBARsp, *tpAddBARsp;
470
471//
472// HAL -> TL
473// tSirMsgQ.type = SIR_HAL_ADDBA_IND
474// tSirMsgQ.reserved = 0
475// tSirMsgQ.body = "allocated" instance of tpAddBAInd
476//
477typedef struct sAddBAInd
478{
479
480 // Message Type
481 tANI_U16 mesgType;
482
483 // Message Length
484 tANI_U16 mesgLen;
485
486 tBAParams baSession;
487
488} tAddBAInd, *tpAddBAInd;
489
490//
491// HAL -> TL
492// tSirMsgQ.type = SIR_HAL_DELBA_IND
493// tSirMsgQ.reserved = 0
494// tSirMsgQ.body = "allocated" instance of tpDelBAInd
495//
496// TL -> HAL
497// tSirMsgQ.type = SIR_HAL_BA_FAIL_IND
498// tSirMsgQ.reserved = 0
499// tSirMsgQ.body = "allocated" instance of tpDelBAInd
500//
501typedef struct sDelBAInd
502{
503 tANI_U8 staIdx;
504
505 tANI_U8 baTID;
506 // Message Type
507 tANI_U16 mesgType;
508
509 // Message Length
510 tANI_U16 mesgLen;
511
512} tDelBAInd, *tpDelBAInd;
513#endif
514
515/*===============================================
516 *
517 * TL <-> HAL structures
518 *
519 *===============================================
520 */
521//
522// TL -> HAL
523// tSirMsgQ.type = SIR_HAL_TL_FLUSH_AC_REQ
524//
525typedef struct sFlushACReq
526{
527 // Message Type
528 tANI_U16 mesgType;
529
530 // Message Length
531 tANI_U16 mesgLen;
532
533 // Station Index. originates from HAL
534 tANI_U8 ucSTAId;
535
536 // TID for which the transmit queue is being flushed
537 tANI_U8 ucTid;
538
539} tFlushACReq, *tpFlushACReq;
540
541//
542//
543// HAL -> TL
544// tSirMsgQ.type = SIR_HAL_TL_FLUSH_AC_RSP
545//
546typedef struct sFlushACRsp
547{
548 // Message Type
549 tANI_U16 mesgType;
550
551 // Message Length
552 tANI_U16 mesgLen;
553
554 // Station Index. originates from HAL
555 tANI_U8 ucSTAId;
556
557 // TID for which the transmit queue is being flushed
558 tANI_U8 ucTid;
559
560 // status of the Flush operation
561 tANI_U8 status;
562} tFlushACRsp, *tpFlushACRsp;
563
564#endif
565