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