blob: 599a840977fde861de9dc5b8768a9a166059be71 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/*
43 * */
44#ifndef _HALMSGAPI_H_
45#define _HALMSGAPI_H_
46
47#include "halTypes.h"
48#include "sirApi.h"
49#include "sirParams.h"
50#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
51#include "halPhy.h"
52#include "halPhyApi.h"
53#endif
54
55#define HAL_NUM_BSSID 2
56/* operMode in ADD BSS message */
57#define BSS_OPERATIONAL_MODE_AP 0
58#define BSS_OPERATIONAL_MODE_STA 1
59
60/* STA entry type in add sta message */
61#define STA_ENTRY_SELF 0
62#define STA_ENTRY_OTHER 1
63#define STA_ENTRY_BSSID 2
64#define STA_ENTRY_BCAST 3 //Special station id for transmitting broadcast frames.
65#define STA_ENTRY_PEER STA_ENTRY_OTHER
Mohit Khanna698ba2a2012-12-04 15:08:18 -080066#ifdef FEATURE_WLAN_TDLS
67#define STA_ENTRY_TDLS_PEER 4
68#endif /* FEATURE_WLAN_TDLS */
Jeff Johnson295189b2012-06-20 16:38:30 -070069
70#define STA_ENTRY_TRANSMITTER STA_ENTRY_SELF
71#define STA_ENTRY_RECEIVER STA_ENTRY_OTHER
72
73#define HAL_STA_INVALID_IDX 0xFF
74#define HAL_BSS_INVALID_IDX 0xFF
75
76#define HAL_BSSPERSONA_INVALID_IDX 0xFF
77
78#define WLAN_BSS_PROTECTION_ON 1
79#define WLAN_BSS_PROTECTION_OFF 0
80
81/* Station index allocation after Broadcast station */
82#define HAL_MAX_NUM_BCAST_STATIONS 1
83#define HAL_MIN_BCAST_STA_INDEX ((HAL_MAX_NUM_BCAST_STATIONS>0)?0:HAL_STA_INVALID_IDX)
84#define HAL_MAX_BCAST_STA_INDEX ((HAL_MAX_NUM_BCAST_STATIONS>0)?(HAL_MAX_NUM_BCAST_STATIONS - 1):HAL_STA_INVALID_IDX)
85#define HAL_MIN_STA_INDEX ((HAL_MAX_BCAST_STA_INDEX!=HAL_STA_INVALID_IDX)?(HAL_MAX_BCAST_STA_INDEX+1):0)
86#define HAL_MAX_STA_INDEX (HAL_NUM_STA)
87
88/* Compilation flags for enabling disabling selfSta and bcastSta per BSS */
89#define HAL_SELF_STA_PER_BSS 1
90#define HAL_BCAST_STA_PER_BSS 1
91
92//invalid channel id.
93#define HAL_INVALID_CHANNEL_ID 0
94
95/* BSS index used when no BSS is associated with the station. For example,
96 * driver creates only one self station without valid BSS while scanning.
97 * Then this index is used to tell softmac that BSS is not valid.
98 */
99#define BSSIDX_INVALID 254
100
101#define HAL_IS_VALID_BSS_INDEX(pMac, bssIdx) ((BSSIDX_INVALID != (bssIdx)) && ((bssIdx) < (pMac)->hal.memMap.maxBssids))
102
103// Beacon structure
104typedef __ani_attr_pre_packed struct sAniBeaconStruct
105{
106 tANI_U32 beaconLength; // Indicates the beacon length
107 tSirMacMgmtHdr macHdr; // MAC Header for beacon
108 // Beacon body follows here
109} __ani_attr_packed tAniBeaconStruct, *tpAniBeaconStruct;
110
111// probeRsp template structure
112typedef __ani_attr_pre_packed struct sAniProbeRspStruct
113{
114 tSirMacMgmtHdr macHdr; // MAC Header for probeRsp
115 // probeRsp body follows here
116} __ani_attr_packed tAniProbeRspStruct, *tpAniProbeRspStruct;
117
118
119// Per TC parameters
120typedef struct
121{
122 tANI_U8 disableTx;
123 tANI_U8 disableRx;
124 tANI_U8 rxCompBA; // 1: expect to see frames with compressed BA coming from this peer MAC
125 tANI_U8 rxBApolicy; // immediate ACK or delayed ACK for frames from this peer MAC
126 tANI_U8 txCompBA; // 1: using compressed BA to send to this peer MAC
127 tANI_U8 txBApolicy; // immediate ACK or delayed ACK for frames to this peer MAC
128 tANI_U8 rxUseBA;
129 tANI_U8 txUseBA;
130 tANI_U8 rxBufferSize;
131 tANI_U8 txBufferSize;
132 tANI_U16 txBAWaitTimeout;
133 tANI_U16 rxBAWaitTimeout;
134} tTCParams;
135
136
137typedef enum eRxpMode {
138 eRXP_IDLE_MODE = 0x0,
139 eRXP_SCAN_MODE = 0x1,
140 eRXP_PRE_ASSOC_MODE = 0x2,
141 eRXP_POST_ASSOC_MODE = 0x4,
142 eRXP_AP_MODE = 0x8,
143 eRXP_PROMISCUOUS_MODE = 0x10,
144 eRXP_LEARN_MODE = 0x20,
145 eRXP_POWER_SAVE_MODE = 0x40,
146 eRXP_IBSS_MODE = 0x80,
147 eRXP_BTAMP_PREASSOC_MODE = 0x100,
148 eRXP_BTAMP_POSTASSOC_MODE = 0x200,
149 eRXP_BTAMP_AP_MODE = 0x400,
150 eRXP_BTAMP_STA_MODE = 0x800,
151 eRXP_MULTI_BSS_MODE = 0x1000
Jeff Johnsone7245742012-09-05 17:12:55 -0700152#ifdef FEATURE_OEM_DATA_SUPPORT
153 ,eRXP_OEM_DATA_MODE = 0x2000
154#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700155#ifndef WLAN_FTM_STUB
156 ,eRXP_FTM_MODE = 0x4000
157#endif
158 ,eRXP_LISTEN_MODE = 0x8000
159} tRxpMode;
160
161
162typedef struct
163{
164 // First two fields bssid and assocId are used to find staid for sta.
165 // BSSID of STA
166 tSirMacAddr bssId;
167
168 // ASSOC ID, as assigned by PE/LIM. This needs to be assigned
169 // on a per BSS basis
170 tANI_U16 assocId;
171
172 // Field to indicate if this is sta entry for itself STA adding entry for itself
173 // or remote (AP adding STA after successful association.
174 // This may or may not be required in production driver.
175 tANI_U8 staType; // 0 - Self, 1 other/remote, 2 - bssid
176
177 tANI_U8 shortPreambleSupported;
178
179 // MAC Address of STA
180 tSirMacAddr staMac;
181
182 // Listen interval.
183 tANI_U16 listenInterval;
184
185 // Support for 11e/WMM
186 tANI_U8 wmmEnabled;
187
188 //
189 // U-APSD Flags: 1b per AC
190 // Encoded as follows:
191 // b7 b6 b5 b4 b3 b2 b1 b0
192 // X X X X BE BK VI VO
193 //
194 tANI_U8 uAPSD;
195
196 // Max SP Length
197 tANI_U8 maxSPLen;
198
199 // 11n HT capable STA
200 tANI_U8 htCapable;
201
202 // 11n Green Field preamble support
203 // 0 - Not supported, 1 - Supported
204 // Add it to RA related fields of sta entry in HAL
205 tANI_U8 greenFieldCapable;
206
207 // TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz
208 tANI_U8 txChannelWidthSet;
209
210 // MIMO Power Save
211 tSirMacHTMIMOPowerSaveState mimoPS;
212
213 // RIFS mode: 0 - NA, 1 - Allowed
214 tANI_U8 rifsMode;
215
216 // L-SIG TXOP Protection mechanism
217 // 0 - No Support, 1 - Supported
218 // SG - there is global field.
219 tANI_U8 lsigTxopProtection;
220
221 // delayed ba support
222 tANI_U8 delBASupport;
223 // delayed ba support... TBD
224
225#ifdef ANI_DVT_DEBUG
226 //These 6 fields are used only by DVT driver to pass selected
227 //rates to Softmac through HAL.
228 tANI_U8 primaryRateIndex, secondaryRateIndex, tertiaryRateIndex;
229 tANI_U8 primaryRateIndex40, secondaryRateIndex40, tertiaryRateIndex40;
230#endif
231
232 // FIXME
233 //Add these fields to message
234 tANI_U8 us32MaxAmpduDuration; //in units of 32 us.
235 tANI_U8 maxAmpduSize; // 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
236 tANI_U8 maxAmpduDensity; // 3 : 0~7 : 2^(11nAMPDUdensity -4)
237 tANI_U8 maxAmsduSize; // 1 : 3839 bytes, 0 : 7935 bytes
238
239 // TC parameters
240 tTCParams staTCParams[STACFG_MAX_TC];
241
242 // Compression and Concat parameters for DPU
243 tANI_U16 deCompEnable;
244 tANI_U16 compEnable;
245 tANI_U16 concatSeqRmv;
246 tANI_U16 concatSeqIns;
247
248
249 //11n Parameters
250
251 /**
252 HT STA should set it to 1 if it is enabled in BSS
253 HT STA should set it to 0 if AP does not support it.
254 This indication is sent to HAL and HAL uses this flag
255 to pickup up appropriate 40Mhz rates.
256 */
257 tANI_U8 fDsssCckMode40Mhz;
258
259
260 //short GI support for 40Mhz packets
261 tANI_U8 fShortGI40Mhz;
262
263 //short GI support for 20Mhz packets
264 tANI_U8 fShortGI20Mhz;
265
266
267
268 /*
269 * All the legacy and airgo supported rates.
270 * These rates are the intersection of peer and self capabilities.
271 */
272 tSirSupportedRates supportedRates;
273
274
275
276
277
278 /*
279 * Following parameters are for returning status and station index from HAL to PE
280 * via response message. HAL does not read them.
281 */
282 // The return status of SIR_HAL_ADD_STA_REQ is reported here
283 eHalStatus status;
284 // Station index; valid only when 'status' field value is eHAL_STATUS_SUCCESS
285 tANI_U8 staIdx;
286
287 //BSSID of BSS to which the station is associated.
288 //This should be filled back in by HAL, and sent back to LIM as part of
289 //the response message, so LIM can cache it in the station entry of hash table.
290 //When station is deleted, LIM will make use of this bssIdx to delete
291 //BSS from hal tables and from softmac.
292 tANI_U8 bssIdx;
293
294 /* this requires change in testDbg. I will change it later after coordinating with Diag team.
295 tANI_U8 fFwdTrigerSOSPtoHost; //trigger to start service period
296 tANI_U8 fFwdTrigerEOSPtoHost; //trigger to end service period
297 */
298
299 //HAL should update the existing STA entry, if this flag is set.
300 //PE will set this flag in case of reassoc, where we want to resue the
301 //the old staID and still return success.
302 tANI_U8 updateSta;
303 //A flag to indicate to HAL if the response message is required.
304 tANI_U8 respReqd;
305
306 /* Robust Management Frame (RMF) enabled/disabled */
307 tANI_U8 rmfEnabled;
308
309 /* The unicast encryption type in the association */
310 tANI_U32 encryptType;
311
312 /*The DPU signatures will be sent eventually to TL to help it determine the
313 association to which a packet belongs to*/
314 /*Unicast DPU index*/
315 tANI_U8 ucUcastSig;
316
317 /*Broadcast DPU index*/
318 tANI_U8 ucBcastSig;
319
320 tANI_U8 sessionId; //PE session id for PE<->HAL interface
321 // HAL just sends back what it receives.
322
323#ifdef WLAN_FEATURE_P2P
324 /*if this is a P2P Capable Sta*/
325 tANI_U8 p2pCapableSta;
326#endif
327
Jeff Johnsone7245742012-09-05 17:12:55 -0700328#ifdef WLAN_FEATURE_11AC
329 tANI_U8 vhtCapable;
330 tANI_U8 vhtTxChannelWidthSet;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800331 tANI_U8 vhtTxBFCapable;
Jeff Johnsone7245742012-09-05 17:12:55 -0700332#endif
333
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800334 tANI_U8 htLdpcCapable;
335 tANI_U8 vhtLdpcCapable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700336} tAddStaParams, *tpAddStaParams;
337
338
339typedef struct
340{
341 // Station index
342 tANI_U16 staIdx;
343 tANI_U16 templIdx;
344 tANI_U8 rateIdx;
345
346 // The return status of SIR_HAL_UPDATE_STARATEINFO_REQ is reported here
347 eHalStatus status;
348
349 //A flag to indicate to HAL if the response message is required.
350 tANI_U8 respReqd;
351
352} tUpdateTxCmdTemplParams, *tpUpdateTxCmdTemplParams;
353//FIXME: change the structure name
354
355
356
357
358
359
360
361
362typedef struct
363{
364 // index of STA to delete - this should be the same as the index returned
365 // as part of the AddSta
366 tANI_U16 staIdx;
367 tANI_U16 assocId;
368 eHalStatus status; // Status of SIR_HAL_DELETE_STA_REQ is reported here
369 tANI_U8 respReqd;
370 tANI_U8 sessionId; // PE session id for PE<->HAL interface
371 // PE session id now added to all HAL<->PE transacations
372 // HAL sends it back unmodified.
373} tDeleteStaParams, * tpDeleteStaParams;
374
375/*
376 * This is used by PE to configure the key information on a given station.
377 * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
378 * a preconfigured key from a BSS the station assoicated with; otherwise
379 * a new key descriptor is created based on the key field.
380 */
381typedef struct
382{
383 tANI_U16 staIdx;
384 tAniEdType encType; // Encryption/Decryption type
385 tAniWepType wepType; // valid only for WEP
386 tANI_U8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
387#ifdef WLAN_SOFTAP_FEATURE
388 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
389#else
390 tSirKeys key;
391#endif
392 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
393 /*
394 * Following parameter is for returning status
395 * via response message. HAL does not read them.
396 */
397 eHalStatus status; // status of SIR_HAL_SET_STAKEY_REQ is reported here
398 tANI_U8 sessionId; // PE session id for PE<->HAL interface
399
400 // PE session id now added to all HAL<->PE transacations
401 // HAL sends back response with no modification
402} tSetStaKeyParams, *tpSetStaKeyParams;
403
404//
405// Mesg header is used from tSirMsgQ
406// Mesg Type = SIR_HAL_ADD_BSS_REQ
407//
408typedef struct
409{
410 // MAC Address/BSSID
411 tSirMacAddr bssId;
412#ifdef HAL_SELF_STA_PER_BSS
413 // Self Mac Address
414 tSirMacAddr selfMacAddr;
415#endif
416 // BSS type
417 // FIXME - Is this reqd? Do we want to isolate BSS/IBSS parameters?
418 tSirBssType bssType;
419
420 // AP - 0; STA - 1 ;
421 tANI_U8 operMode;
422
423 // Network type - b/g/a/MixedMode/GreenField/Legacy
424 // TODO - This enum to be updated for HT support
425 // Review FIXME - Why is this needed?
426 tSirNwType nwType;
427
428 tANI_U8 shortSlotTimeSupported;
429 tANI_U8 llaCoexist;
430 tANI_U8 llbCoexist;
431 tANI_U8 llgCoexist;
432 tANI_U8 ht20Coexist;
433 tANI_U8 llnNonGFCoexist;
434 tANI_U8 fLsigTXOPProtectionFullSupport;
435 tANI_U8 fRIFSMode;
436
437 // Beacon Interval
438 tSirMacBeaconInterval beaconInterval;
439
440 // DTIM period
441 tANI_U8 dtimPeriod;
442
443 // CF Param Set
444 // Review FIXME - Does HAL need this?
445 tSirMacCfParamSet cfParamSet;
446
447 // MAC Rate Set
448 // Review FIXME - Does HAL need this?
449 tSirMacRateSet rateSet;
450
451 // 802.11n related HT parameters that are dynamic
452
453 // Enable/Disable HT capabilities
454 tANI_U8 htCapable;
455
456 // Enable/Disable OBSS protection
457 tANI_U8 obssProtEnabled;
458
459 // RMF enabled/disabled
460 tANI_U8 rmfEnabled;
461
462 // HT Operating Mode
463 // Review FIXME - Does HAL need this?
464 tSirMacHTOperatingMode htOperMode;
465
466 // Dual CTS Protection: 0 - Unused, 1 - Used
467 tANI_U8 dualCTSProtection;
468
469 // TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz
470 tANI_U8 txChannelWidthSet;
471
472 // Current Operating Channel
473 tANI_U8 currentOperChannel;
474
475 // Current Extension Channel, if applicable
476 tANI_U8 currentExtChannel;
477
478 // Add a STA entry for "itself" -
479 // On AP - Add the AP itself in an "STA context"
480 // On STA - Add the AP to which this STA is joining in an "STA context"
481 tAddStaParams staContext;
482
483 /*
484 * Following parameters are for returning status and station index from HAL to PE
485 * via response message. HAL does not read them.
486 */
487 // The return status of SIR_HAL_ADD_BSS_REQ is reported here
488 eHalStatus status;
489 // BSS index allocated by HAL.
490 // valid only when 'status' field is eHAL_STATUS_SUCCESS
491 tANI_U16 bssIdx;
492
493 // Broadcast DPU descriptor index allocated by HAL and used for broadcast/multicast packets.
494 // valid only when 'status' field is eHAL_STATUS_SUCCESS
495 tANI_U8 bcastDpuDescIndx;
496
497 // DPU signature to be used for broadcast/multicast packets
498 // valid only when 'status' field is eHAL_STATUS_SUCCESS
499 tANI_U8 bcastDpuSignature;
500
501 // DPU descriptor index allocated by HAL, used for bcast/mcast management packets
502 tANI_U8 mgmtDpuDescIndx;
503
504 // DPU signature to be used for bcast/mcast management packets
505 tANI_U8 mgmtDpuSignature;
506
507 //HAL should update the existing BSS entry, if this flag is set.
508 //PE will set this flag in case of reassoc, where we want to resue the
509 //the old bssID and still return success.
510 tANI_U8 updateBss;
511
512 // Add BSSID info for rxp filter in IBSS mode
513 tSirMacSSid ssId;
514
515 //HAL will send the response message to LIM only when this flag is set.
516 //LIM will set this flag, whereas DVT will not set this flag.
517 tANI_U8 respReqd;
518 tANI_U8 sessionId; // PE session id for PE<->HAL interface
519 // PE session id now added to all HAL<->PE transacations
520 // HAL Sends the sessionId unmodified.
521
522#if defined WLAN_FEATURE_VOWIFI
523 tPowerdBm txMgmtPower; //HAL fills in the tx power used for mgmt frames in this field.
524 tPowerdBm maxTxPower; //max power to be used after applying the power constraint, if any
525#endif
526
527#if defined WLAN_FEATURE_VOWIFI_11R
528 tANI_U8 extSetStaKeyParamValid; //Ext Bss Config Msg if set
529 tSetStaKeyParams extSetStaKeyParam; //SetStaKeyParams for ext bss msg
530#endif
531
532 tANI_U8 ucMaxProbeRespRetryLimit; //probe Response Max retries
533 tANI_U8 bHiddenSSIDEn; //To Enable Hidden ssid.
534 tANI_U8 bProxyProbeRespEn; //To Enable Disable FW Proxy Probe Resp
535 tANI_U8 halPersona; //Persona for the BSS can be STA,AP,GO,CLIENT value same as tVOS_CON_MODE
536
537 //Spectrum Management Capability, 1 - Enabled, 0 - Disabled.
538 tANI_U8 bSpectrumMgtEnabled;
Jeff Johnsone7245742012-09-05 17:12:55 -0700539#ifdef WLAN_FEATURE_11AC
540 tANI_U8 vhtCapable;
541 tANI_U8 vhtTxChannelWidthSet;
542#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700543} tAddBssParams, * tpAddBssParams;
544
545typedef struct
546{
547 tANI_U8 bssIdx;
548 // The return status of SIR_HAL_DELETE_BSS_REQ is reported here
549 eHalStatus status;
550 //HAL will send the response message to LIM only when this flag is set.
551 //LIM will set this flag, whereas DVT will not set this flag.
552 tANI_U8 respReqd;
553 tANI_U8 sessionId; // PE session id for PE<->HAL interface
554 // HAL sends it back unmodified.
555 tSirMacAddr bssid; // Will be removed for PE-HAL integration
556} tDeleteBssParams, * tpDeleteBssParams;
557
558//
559// UAPSD AC mask: 1b per AC
560// LSB 4 bits for delivery enabled setting. msb 4 bits for trigger enabled settings.
561// Encoded as follows:
562// b7 b6 b5 b4 b3 b2 b1 b0
563// BE BK VI VO BE BK VI VO
564
565typedef struct
566{
567 tANI_U8 staIdx;
568 tANI_U8 uapsdACMask;
569 tANI_U8 maxSpLen;
570} tUpdateUapsdParams, * tpUpdateUapsdParams;
571
572typedef struct sSirScanEntry
573{
574 tANI_U8 bssIdx[HAL_NUM_BSSID];
575 tANI_U8 activeBSScnt;
576}tSirScanEntry, *ptSirScanEntry;
577
578//
579// Mesg header is used from tSirMsgQ
580// Mesg Type = SIR_HAL_INIT_SCAN_REQ
581//
582typedef struct {
583
584 eHalSysMode scanMode;
585
586 tSirMacAddr bssid;
587
588 tANI_U8 notifyBss;
589
590#ifdef WLAN_FEATURE_P2P
591 tANI_U8 useNoA;
592#endif
593
594 // If this flag is set HAL notifies PE when SMAC returns status.
595 tANI_U8 notifyHost;
596
597 tANI_U8 frameLength;
598 tANI_U8 frameType; // Data NULL or CTS to self
599
600 // Indicates the scan duration (in ms)
601 tANI_U16 scanDuration;
602
603 // For creation of CTS-to-Self and Data-NULL MAC packets
604 tSirMacMgmtHdr macMgmtHdr;
605
606 tSirScanEntry scanEntry;
607
608 // when this flag is set, HAL should check for link traffic prior to scan
609 tSirLinkTrafficCheck checkLinkTraffic;
610
611 /*
612 * Following parameters are for returning status and station index from HAL to PE
613 * via response message. HAL does not read them.
614 */
615 // The return status of SIR_HAL_INIT_SCAN_REQ is reported here
616 eHalStatus status;
617
618} tInitScanParams, * tpInitScanParams;
619
620#ifdef WLAN_SOFTAP_FEATURE
621typedef enum eDelStaReasonCode{
622 HAL_DEL_STA_REASON_CODE_KEEP_ALIVE = 0x1,
623 HAL_DEL_STA_REASON_CODE_TIM_BASED = 0x2,
624 HAL_DEL_STA_REASON_CODE_RA_BASED = 0x3,
625 HAL_DEL_STA_REASON_CODE_UNKNOWN_A2 = 0x4
626}tDelStaReasonCode;
627#endif
628
629//
630// Msg header is used from tSirMsgQ
631// Msg Type = SIR_LIM_DELETE_STA_CONTEXT_IND
632//
633typedef struct {
634 tANI_U16 assocId;
635 tANI_U16 staId;
636 tSirMacAddr bssId; // TO SUPPORT BT-AMP
637 // HAL copies bssid from the sta table.
638#ifdef WLAN_SOFTAP_FEATURE
639 tSirMacAddr addr2; //
640 tANI_U16 reasonCode; // To unify the keepalive / unknown A2 / tim-based disa
641#endif
642} tDeleteStaContext, * tpDeleteStaContext;
643
644
645//
646// Mesg header is used from tSirMsgQ
647// Mesg Type = SIR_HAL_START_SCAN_REQ
648// FIXME - Can we just use tSirMsgQ directly, instead of using this structure?
649//
650typedef struct {
651
652 // Indicates the current scan channel
653 tANI_U8 scanChannel;
654
655 /*
656 * Following parameters are for returning status and station index from HAL to PE
657 * via response message. HAL does not read them.
658 */
659 // The return status of SIR_HAL_START_SCAN_REQ is reported here
660 eHalStatus status;
661
662#if defined WLAN_FEATURE_VOWIFI
663 tANI_U32 startTSF[2];
664 tPowerdBm txMgmtPower; //HAL fills in the tx power used for mgmt frames in this field.
665#endif
666} tStartScanParams, * tpStartScanParams;
667
668//
669// Mesg header is used from tSirMsgQ
670// Mesg Type = SIR_HAL_END_SCAN_REQ
671// FIXME - Can we just use tSirMsgQ directly, instead of using this structure?
672//
673typedef struct {
674
675 // Indicates the current scan channel
676 tANI_U8 scanChannel;
677
678 /*
679 * Following parameters are for returning status and station index from HAL to PE
680 * via response message. HAL does not read them.
681 */
682 // The return status of SIR_HAL_END_SCAN_REQ is reported here
683 eHalStatus status;
684
685} tEndScanParams, * tpEndScanParams;
686
687//
688// Mesg header is used from tSirMsgQ
689// Mesg Type = SIR_HAL_FINISH_SCAN_REQ
690//
691typedef struct {
692
693 // Identifies the operational state of the AP/STA.
694 // In case of the STA, only if the operState is non-zero will the rest of
695 // the parameters that follow be decoded
696 // In case of the AP, all parameters are valid
697 //
698 // 0 - Idle state, 1 - Link Established
699
700 eHalSysMode scanMode;
701
702 tSirMacAddr bssid;
703
704 // Current operating channel
705 tANI_U8 currentOperChannel;
706
707 // If 20/40 MHz is operational, this will indicate the 40 MHz extension
708 // channel in combination with the control channel
709 ePhyChanBondState cbState;
710
711 // For an STA, indicates if a Data NULL frame needs to be sent
712 // to the AP with FrameControl.PwrMgmt bit set to 0
713 tANI_U8 notifyBss;
714
715 tANI_U8 notifyHost;
716
717 tANI_U8 frameLength;
718 tANI_U8 frameType; // Data NULL or CTS to self
719
720 // For creation of CTS-to-Self and Data-NULL MAC packets
721 tSirMacMgmtHdr macMgmtHdr;
722
723 tSirScanEntry scanEntry;
724
725 /*
726 * Following parameters are for returning status and station index from HAL to PE
727 * via response message. HAL does not read them.
728 */
729 // The return status of SIR_HAL_FINISH_SCAN_REQ is reported here
730 eHalStatus status;
731
732} tFinishScanParams, * tpFinishScanParams;
733
734#ifdef FEATURE_WLAN_INTEGRATED_SOC
Jeff Johnsone7245742012-09-05 17:12:55 -0700735#ifdef FEATURE_OEM_DATA_SUPPORT
736
737#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800738#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700739#endif
740#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800741#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700742#endif
743
744typedef struct
745{
746 tSirMacAddr selfMacAddr;
747 eHalStatus status;
748 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
749} tStartOemDataReq, *tpStartOemDataReq;
750
751typedef struct
752{
753 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
754} tStartOemDataRsp, *tpStartOemDataRsp;
755#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700756#endif
757
758typedef struct sBeaconGenStaInfo {
759 tANI_U16 assocId;
760 tANI_U32 staTxAckCnt;
761}tBeaconGenStaInfo, *tpBeaconGenStaInfo;
762//
763// Mesg header is used from tSirMsgQ
764// Mesg Type = SIR_LIM_BEACON_GEN_IND
765//
766
767typedef struct sBeaconGenParams {
768 // Identifies the BSSID for which it is time to generate a beacon
769 tANI_U8 bssIdx;
770 tSirMacAddr bssId;
771#ifdef FIXME_VOLANS
772 tANI_U8 numOfSta; /* Number of stations in power save, who have data pending*/
773 tANI_U8 numOfStaWithoutData; /* Number of stations in power save, who don't have any data pending*/
774 tANI_U8 fBroadcastTrafficPending ;
775 tANI_U8 dtimCount;
776#endif
777 tANI_U8 rsvd[3]; /** Align the Structure to 4 bytes as unalligned access will happen if
778 the staInfo is being Accessed */
779/** NOTE: tBeaconGenStaInfo staInfo[xx]; Depending on the Number of STA in PS, Every time
780 this array is being allocated and piled up at the End*/
781} tBeaconGenParams, * tpBeaconGenParams;
782
783typedef struct {
784 tSirMacAddr bssId;
785 tANI_U8 *beacon; // Beacon data.
786 tANI_U32 beaconLength; //length of the template.
787#ifdef WLAN_SOFTAP_FEATURE
788 tANI_U32 timIeOffset; //TIM IE offset from the beginning of the template.
789#ifdef WLAN_FEATURE_P2P
790 tANI_U16 p2pIeOffset; //P2P IE offset from the begining of the template
791#endif
792#endif
793} tSendbeaconParams, * tpSendbeaconParams;
794
795#ifdef WLAN_SOFTAP_FEATURE
796typedef struct sSendProbeRespParams {
797 tSirMacAddr bssId;
798 tANI_U8 *pProbeRespTemplate;
799 tANI_U32 probeRespTemplateLen;
800 tANI_U32 ucProxyProbeReqValidIEBmap[8];
801} tSendProbeRespParams, * tpSendProbeRespParams;
802#endif
803
804/*
805 * This is used by PE to create a set of WEP keys for a given BSS.
806 */
807typedef struct
808{
809 tANI_U8 bssIdx;
810 tAniEdType encType;
811 tANI_U8 numKeys;
812 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
813 tANI_U8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
814 /*
815 * Following parameter is for returning status
816 * via response message. HAL does not read them.
817 */
818 eHalStatus status; // status of SIR_HAL_SET_BSSKEY_REQ is reported here
819 tANI_U8 sessionId; // PE session id for PE<->HAL interface
820 // HAL sends this unmodified in the response
821} tSetBssKeyParams, *tpSetBssKeyParams;
822
823/*
824 * This is used by PE to Remove the key information on a given station.
825 */
826typedef struct
827{
828 tANI_U16 staIdx;
829 tAniEdType encType; // Encryption/Decryption type
830 tANI_U8 keyId;
831 tANI_BOOLEAN unicast;
832 /*
833 * Following parameter is for returning status
834 * via response message. HAL does not read them.
835 */
836 eHalStatus status; // return status of SIR_HAL_REMOVE_STAKEY_REQ
837 tANI_U8 sessionId; // PE session id for PE<->HAL interface
838 // HAL Sends back the PE session
839 // id unmodified
840} tRemoveStaKeyParams, *tpRemoveStaKeyParams;
841
842/*
843 * This is used by PE to remove keys for a given BSS.
844 */
845typedef struct
846{
847 tANI_U8 bssIdx;
848 tAniEdType encType;
849 tANI_U8 keyId;
850 tANI_U8 wepType;
851 /*
852 * Following parameter is for returning status
853 * via response message. HAL does not read them.
854 */
855 eHalStatus status; // return status of SIR_HAL_REMOVE_BSSKEY_REQ
856 tANI_U8 sessionId; // PE session id for PE<->HAL interface
857 // HAL Sends back the PE session
858 // id unmodified
859} tRemoveBssKeyParams, *tpRemoveBssKeyParams;
860
861typedef struct
862{
863 // index of STA to get the statistics from
864 tANI_U16 staIdx;
865 tANI_U8 encMode;
866 // The return status of SIR_HAL_DPU_STATS_REQ is reported here
867 eHalStatus status;
868 // The return statistics
869 tANI_U32 sendBlocks;
870 tANI_U32 recvBlocks;
871 tANI_U32 replays;
872 tANI_U8 micErrorCnt;
873 tANI_U32 protExclCnt;
874 tANI_U16 formatErrCnt;
875 tANI_U16 unDecryptableCnt;
876 tANI_U32 decryptErrCnt;
877 tANI_U32 decryptOkCnt;
878
879} tDpuStatsParams, * tpDpuStatsParams;
880
881
882/*
883 * Get the DPU signature based on a given staId
884 */
885typedef struct
886{
887 tANI_U16 staIdx;
888 /*
889 * Following parameter is for returning status
890 * via response message. HAL does not read them.
891 */
892 // The return status of SIR_HAL_SET_BSSKEY_REQ is reported here
893 eHalStatus status;
894 tANI_U8 dpuDescIndx;
895 tANI_U8 dpuSignature;
896} tGetDpuParams, *tpGetDpuParams;
897
898
899
900//HAL MSG: SIR_HAL_UPDATE_BEACON_IND
901typedef struct
902{
903
904 tANI_U8 bssIdx;
905
906 //shortPreamble mode. HAL should update all the STA rates when it
907 //receives this message
908 tANI_U8 fShortPreamble;
909 //short Slot time.
910 tANI_U8 fShortSlotTime;
911 //Beacon Interval
912 tANI_U16 beaconInterval;
913 //Protection related
914 tANI_U8 llaCoexist;
915 tANI_U8 llbCoexist;
916 tANI_U8 llgCoexist;
917 tANI_U8 ht20MhzCoexist;
918 tANI_U8 llnNonGFCoexist;
919 tANI_U8 fLsigTXOPProtectionFullSupport;
920 tANI_U8 fRIFSMode;
921
922 tANI_U16 paramChangeBitmap;
923}tUpdateBeaconParams, *tpUpdateBeaconParams;
924
Mohit Khanna4a70d262012-09-11 16:30:12 -0700925#ifdef WLAN_FEATURE_11AC
926typedef struct
927{
928 tANI_U16 opMode;
929 tANI_U16 staId;
930}tUpdateVHTOpMode, *tpUpdateVHTOpMode;
931#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700932
933//HAL MSG: SIR_HAL_UPDATE_CF_IND
934typedef struct
935{
936
937 tANI_U8 bssIdx;
938
939 /*
940 * cfpCount indicates how many DTIMs (including the current frame) appear before the next CFP start.
941 * A CFPCount of 0 indicates that the current DTIM marks the start of the CFP.
942 */
943 tANI_U8 cfpCount;
944
945 /* cfpPeriod indicates the number of DTIM intervals between the start of CFPs. */
946 tANI_U8 cfpPeriod;
947
948}tUpdateCFParams, *tpUpdateCFParams;
949
950
951
952//HAL MSG: SIR_HAL_UPDATE_DTIM_IND
953//This message not required, as Softmac is supposed to read these values from the beacon.
954//PE should not look at TIM element
955
956/*
957typedef struct
958{
959 tANI_U8 bssIdx;
960
961
962 //The DTIM Count field indicates how many beacons (including the current frame) appear before the next
963 // DTIM. A DTIM Count of 0 indicates that the current TIM is a DTIM.
964 //
965 tANI_U8 dtimCount;
966
967
968 // The DTIM Period field indicates the number of Beacon intervals between successive DTIMs. If all TIMs are
969 // DTIMs, the DTIM Period field has the value 1. The DTIM Period value 0 is reserved.
970 //
971 tANI_U8 dtimPeriod;
972
973}tUpdateDtimParams, *tpUpdateDtimParams;
974*/
975
976
977//HAL MSG: SIR_HAL_CHNL_SWITCH_REQ
978typedef struct
979{
980 tANI_U8 channelNumber;
981#ifndef WLAN_FEATURE_VOWIFI
982 tANI_U8 localPowerConstraint;
983#endif /* WLAN_FEATURE_VOWIFI */
Jeff Johnsone7245742012-09-05 17:12:55 -0700984 ePhyChanBondState secondaryChannelOffset;
Jeff Johnson295189b2012-06-20 16:38:30 -0700985 tANI_U8 peSessionId;
986#if defined WLAN_FEATURE_VOWIFI
987 tPowerdBm txMgmtPower; //HAL fills in the tx power used for mgmt frames in this field.
988 tPowerdBm maxTxPower;
989 tSirMacAddr selfStaMacAddr;
990 //the request has power constraints, this should be applied only to that session
991#endif
992 /* VO Wifi comment: BSSID is needed to identify which session issued this request. As the
993 request has power constraints, this should be applied only to that session */
994 /* V IMP: Keep bssId field at the end of this msg. It is used to mantain backward compatbility
995 * by way of ignoring if using new host/old FW or old host/new FW since it is at the end of this struct
996 */
997 tSirMacAddr bssId;
998
999 eHalStatus status;
1000
1001}tSwitchChannelParams, *tpSwitchChannelParams;
1002
1003typedef void (*tpSetLinkStateCallback)(tpAniSirGlobal pMac, void *msgParam );
1004
1005typedef struct sLinkStateParams
1006{
1007 // SIR_HAL_SET_LINK_STATE
1008 tSirMacAddr bssid;
1009 tSirMacAddr selfMacAddr;
1010 tSirLinkState state;
1011 tpSetLinkStateCallback callback;
1012 void *callbackArg;
1013#ifdef WLAN_FEATURE_VOWIFI_11R
1014 int ft;
1015 void * session;
1016#endif
1017} tLinkStateParams, * tpLinkStateParams;
1018
1019
1020typedef struct
1021{
1022 tANI_U16 staIdx;
1023 tANI_U16 tspecIdx; //TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
1024 tSirMacTspecIE tspec;
1025 eHalStatus status;
1026 tANI_U8 sessionId; //PE session id for PE<->HAL interface
1027} tAddTsParams, *tpAddTsParams;
1028
1029typedef struct
1030{
1031 tANI_U16 staIdx;
1032 tANI_U16 tspecIdx; //TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
1033 tSirMacAddr bssId; //TO SUPPORT BT-AMP
1034
1035} tDelTsParams, *tpDelTsParams;
1036
1037#ifdef WLAN_FEATURE_VOWIFI_11R
1038
1039#define HAL_QOS_NUM_TSPEC_MAX 2
1040#define HAL_QOS_NUM_AC_MAX 4
1041
1042typedef struct
1043{
1044 tANI_U16 staIdx;
1045 tANI_U16 tspecIdx; //TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
1046 tSirMacTspecIE tspec[HAL_QOS_NUM_AC_MAX];
1047 eHalStatus status[HAL_QOS_NUM_AC_MAX];
1048 tANI_U8 sessionId; //PE session id for PE<->HAL interface
1049}tAggrAddTsParams, *tpAggrAddTsParams;
1050
1051#endif /* WLAN_FEATURE_VOWIFI_11R */
1052
1053
1054typedef tSirRetStatus (*tHalMsgCallback)(tpAniSirGlobal pMac, tANI_U32 mesgId, void *mesgParam );
1055
1056
1057typedef struct
1058{
1059 tANI_U16 bssIdx;
1060 tANI_BOOLEAN highPerformance;
1061 tSirMacEdcaParamRecord acbe; // best effort
1062 tSirMacEdcaParamRecord acbk; // background
1063 tSirMacEdcaParamRecord acvi; // video
1064 tSirMacEdcaParamRecord acvo; // voice
1065} tEdcaParams, *tpEdcaParams;
1066
1067/*
1068* Function Prototypes
1069*/
1070
1071eHalStatus halMsg_setPromiscMode(tpAniSirGlobal pMac);
1072
1073
1074//
1075// Mesg header is used from tSirMsgQ
1076// Mesg Type = SIR_HAL_ADDBA_REQ
1077//
1078typedef struct sAddBAParams
1079{
1080
1081 // Station Index
1082 tANI_U16 staIdx;
1083
1084 // Peer MAC Address
1085 tSirMacAddr peerMacAddr;
1086
1087 // ADDBA Action Frame dialog token
1088 // HAL will not interpret this object
1089 tANI_U8 baDialogToken;
1090
1091 // TID for which the BA is being setup
1092 // This identifies the TC or TS of interest
1093 tANI_U8 baTID;
1094
1095 // 0 - Delayed BA (Not supported)
1096 // 1 - Immediate BA
1097 tANI_U8 baPolicy;
1098
1099 // Indicates the number of buffers for this TID (baTID)
1100 // NOTE - This is the requested buffer size. When this
1101 // is processed by HAL and subsequently by HDD, it is
1102 // possible that HDD may change this buffer size. Any
1103 // change in the buffer size should be noted by PE and
1104 // advertized appropriately in the ADDBA response
1105 tANI_U16 baBufferSize;
1106
1107 // BA timeout in TU's
1108 // 0 means no timeout will occur
1109 tANI_U16 baTimeout;
1110
1111 // b0..b3 - Fragment Number - Always set to 0
1112 // b4..b15 - Starting Sequence Number of first MSDU
1113 // for which this BA is setup
1114 tANI_U16 baSSN;
1115
1116 // ADDBA direction
1117 // 1 - Originator
1118 // 0 - Recipient
1119 tANI_U8 baDirection;
1120
1121 //
1122 // Following parameters are for returning status from
1123 // HAL to PE via response message. HAL does not read them
1124 //
1125 // The return status of SIR_HAL_ADDBA_REQ is reported
1126 // in the SIR_HAL_ADDBA_RSP message
1127 eHalStatus status;
1128
1129 // Indicating to HAL whether a response message is required.
1130 tANI_U8 respReqd;
1131 tANI_U8 sessionId; // PE session id for PE<->HAL interface
1132 // HAL Sends back the PE session
1133 // id unmodified
1134
1135} tAddBAParams, * tpAddBAParams;
1136
1137
1138//
1139// Mesg header is used from tSirMsgQ
1140// Mesg Type = SIR_HAL_DELBA_IND
1141//
1142typedef struct sDelBAParams
1143{
1144
1145 // Station Index
1146 tANI_U16 staIdx;
1147
1148 // TID for which the BA session is being deleted
1149 tANI_U8 baTID;
1150
1151 // DELBA direction
1152 // 1 - Originator
1153 // 0 - Recipient
1154 tANI_U8 baDirection;
1155
1156 // FIXME - Do we need a response for this?
1157 // Maybe just the IND/REQ will suffice?
1158 //
1159 // Following parameters are for returning status from
1160 // HAL to PE via response message. HAL does not read them
1161 //
1162 // The return status of SIR_HAL_DELBA_REQ is reported
1163 // in the SIR_HAL_DELBA_RSP message
1164 //eHalStatus status;
1165
1166} tDelBAParams, * tpDelBAParams;
1167
1168
1169//
1170// Mesg header is used from tSirMsgQ
1171// Mesg Type = SIR_HAL_SET_MIMOPS_REQ
1172//
1173typedef struct sSet_MIMOPS
1174{
1175 // Station Index
1176 tANI_U16 staIdx;
1177
1178 // MIMO Power Save State
1179 tSirMacHTMIMOPowerSaveState htMIMOPSState;
1180 // The return status of SIR_HAL_SET_MIMOPS_REQ is reported
1181 // in the SIR_HAL_SET_MIMOPS_RSP message
1182 eHalStatus status;
1183 tANI_U8 fsendRsp;
1184
1185} tSetMIMOPS, * tpSetMIMOPS;
1186
1187
1188//
1189// Mesg header is used from tSirMsgQ
1190// Mesg Type = SIR_HAL_EXIT_BMPS_REQ
1191//
1192typedef struct sExitBmpsParams
1193{
1194 tANI_U8 sendDataNull;
1195 eHalStatus status;
Jeff Johnsone7245742012-09-05 17:12:55 -07001196 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001197} tExitBmpsParams, *tpExitBmpsParams;
1198
1199//
1200// Mesg header is used from tSirMsgQ
1201// Mesg Type = SIR_HAL_ENTER_UAPSD_REQ
1202//
1203typedef struct sUapsdParams
1204{
1205 tANI_U8 bkDeliveryEnabled:1;
1206 tANI_U8 beDeliveryEnabled:1;
1207 tANI_U8 viDeliveryEnabled:1;
1208 tANI_U8 voDeliveryEnabled:1;
1209 tANI_U8 bkTriggerEnabled:1;
1210 tANI_U8 beTriggerEnabled:1;
1211 tANI_U8 viTriggerEnabled:1;
1212 tANI_U8 voTriggerEnabled:1;
1213 eHalStatus status;
Jeff Johnsone7245742012-09-05 17:12:55 -07001214 tANI_U8 bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001215}tUapsdParams, *tpUapsdParams;
1216
1217//
1218// Mesg header is used from tSirMsgQ
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001219// Mesg Type = SIR_HAL_EXIT_UAPSD_REQ
1220//
1221typedef struct sExitUapsdParams
1222{
1223 eHalStatus status;
1224 tANI_U8 bssIdx;
1225}tExitUapsdParams, *tpExitUapsdParams;
1226
1227//
1228// Mesg header is used from tSirMsgQ
Jeff Johnson295189b2012-06-20 16:38:30 -07001229// Mesg Type = SIR_LIM_DEL_BA_IND
1230//
1231typedef struct sBADeleteParams
1232{
1233
1234 // Station Index
1235 tANI_U16 staIdx;
1236
1237 // Peer MAC Address, whose BA session has timed out
1238 tSirMacAddr peerMacAddr;
1239
1240 // TID for which a BA session timeout is being triggered
1241 tANI_U8 baTID;
1242
1243 // DELBA direction
1244 // 1 - Originator
1245 // 0 - Recipient
1246 tANI_U8 baDirection;
1247
1248 tANI_U32 reasonCode;
1249
1250 tSirMacAddr bssId; // TO SUPPORT BT-AMP
1251 // HAL copies the sta bssid to this.
1252} tBADeleteParams, * tpBADeleteParams;
1253
1254
1255// Mesg Type = SIR_LIM_ADD_BA_IND
1256typedef struct sBaActivityInd
1257{
1258 tANI_U16 baCandidateCnt;
1259 //baCandidateCnt is followed by BA Candidate List ( tAddBaCandidate)
1260
1261 tSirMacAddr bssId; // TO SUPPORT BT-AMP
1262} tBaActivityInd, * tpBaActivityInd;
1263
1264
1265typedef struct tHalIndCB
1266{
1267
1268 tHalMsgCallback pHalIndCB;
1269
1270}tHalIndCB,*tpHalIndCB;
1271
1272/** Max number of bytes required for stations bitmap aligned at 4 bytes boundary */
1273#define HALMSG_NUMBYTES_STATION_BITMAP(x) (((x / 32) + ((x % 32)?1:0)) * 4)
1274
1275typedef struct sControlTxParams
1276{
1277 tANI_BOOLEAN stopTx;
1278 /* Master flag to stop or resume all transmission, Once this flag is set,
1279 * softmac doesnt look for any other details.
1280 */
1281 tANI_U8 fCtrlGlobal;
1282 /* If this flag is set, staBitmap[] is valid */
1283 tANI_U8 ctrlSta;
1284 /* If this flag is set, bssBitmap and beaconBitmap is valid */
1285 tANI_U8 ctrlBss;
1286
1287 /* When ctrlBss is set, this bitmap contains bitmap of BSS indices to be
1288 * stopped for resumed for transmission.
1289 * This is 32 bit bitmap, not array of bytes.
1290 */
1291 tANI_U32 bssBitmap;
1292 /* When ctrlBss is set, this bitmap contains bitmap of BSS indices to be
1293 * stopped for resumed for beacon transmission.
1294 */
1295 tANI_U32 beaconBitmap;
1296
1297 /**
1298 * Memory for the station bitmap will be allocated later based on
1299 * the number of station supported.
1300 */
1301} tTxControlParams, * tpTxControlParams;
1302
1303typedef struct sEnterBmpsParams
1304{
1305 //TBTT value derived from the last beacon
1306 tANI_U8 bssIdx;
1307 tANI_U64 tbtt;
1308 tANI_U8 dtimCount;
1309 //DTIM period given to HAL during association may not be valid,
1310 //if association is based on ProbeRsp instead of beacon.
1311 tANI_U8 dtimPeriod;
1312
1313 // For CCX and 11R Roaming
1314 tANI_U8 bRssiFilterEnable;
1315 tANI_U32 rssiFilterPeriod;
1316 tANI_U32 numBeaconPerRssiAverage;
1317
1318 eHalStatus status;
1319 tANI_U8 respReqd;
1320}tEnterBmpsParams, *tpEnterBmpsParams;
1321
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001322//BMPS response
1323typedef struct sEnterBmpsRspParams
1324{
1325 /* success or failure */
1326 tANI_U32 status;
1327 tANI_U8 bssIdx;
1328}tEnterBmpsRspParams, *tpEnterBmpsRspParams;
Jeff Johnson295189b2012-06-20 16:38:30 -07001329//
1330// Mesg header is used from tSirMsgQ
1331// Mesg Type = SIR_HAL_SET_MAX_TX_POWER_REQ
1332//
1333typedef struct sMaxTxPowerParams
1334{
1335 tSirMacAddr bssId; // BSSID is needed to identify which session issued this request. As
1336 //the request has power constraints, this should be applied only to that session
1337 tSirMacAddr selfStaMacAddr;
1338 //In request,
1339 //power == MaxTx power to be used.
1340 //In response,
1341 //power == tx power used for management frames.
1342 tPowerdBm power;
1343}tMaxTxPowerParams, *tpMaxTxPowerParams;
1344
1345typedef struct sAddStaSelfParams
1346{
1347 tSirMacAddr selfMacAddr;
1348
1349 tANI_U32 status;
1350}tAddStaSelfParams, *tpAddStaSelfParams;
1351
1352typedef struct sDelStaSelfParams
1353{
1354 tSirMacAddr selfMacAddr;
1355
1356 tANI_U32 status;
1357}tDelStaSelfParams, *tpDelStaSelfParams;
1358
1359#ifdef WLAN_FEATURE_P2P
1360typedef struct sP2pPsParams
1361{
1362 tANI_U8 opp_ps;
1363 tANI_U32 ctWindow;
1364 tANI_U8 count;
1365 tANI_U32 duration;
1366 tANI_U32 interval;
1367 tANI_U32 single_noa_duration;
1368 tANI_U8 psSelection;
1369}tP2pPsParams, *tpP2pPsParams;
1370#endif
1371
1372#ifdef FEATURE_WLAN_INTEGRATED_SOC
1373static inline void halGetTxTSFtimer(tpAniSirGlobal pMac,
1374 tSirMacTimeStamp *pTime)
1375{
1376}
1377
1378extern void SysProcessMmhMsg(tpAniSirGlobal pMac, tSirMsgQ* pMsg);
1379
1380/* Beacon Filtering data structures */
1381typedef __ani_attr_pre_packed struct sBeaconFilterMsg
1382{
1383 tANI_U16 capabilityInfo;
1384 tANI_U16 capabilityMask;
1385 tANI_U16 beaconInterval;
1386 tANI_U16 ieNum;
Madan Mohan Koyyalamudia84edda2012-10-15 14:58:25 -07001387 tANI_U8 bssIdx;
1388 tANI_U8 reserved;
Jeff Johnson295189b2012-06-20 16:38:30 -07001389} __ani_attr_packed tBeaconFilterMsg, *tpBeaconFilterMsg;
1390
1391typedef __ani_attr_pre_packed struct sEidByteInfo
1392{
1393 tANI_U8 offset;
1394 tANI_U8 value;
1395 tANI_U8 bitMask;
1396 tANI_U8 ref;
1397} __ani_attr_packed tEidByteInfo, *tpEidByteInfo;
1398
1399
1400/* The above structure would be followed by multiple of below mentioned
1401structure */
1402typedef __ani_attr_pre_packed struct sBeaconFilterIe
1403{
1404 tANI_U8 elementId;
1405 tANI_U8 checkIePresence;
1406 tEidByteInfo byte;
1407} __ani_attr_packed tBeaconFilterIe, *tpBeaconFilterIe;
1408
1409typedef __ani_attr_pre_packed struct sRemBeaconFilterMsg
1410{
1411 tANI_U8 ucIeCount;
1412 tANI_U8 ucRemIeId[1];
1413} __ani_attr_packed tRemBeaconFilterMsg, *tpRemBeaconFilterMsg;
1414
1415#endif
1416#endif /* _HALMSGAPI_H_ */
1417