blob: 48ba1ada604251b8a0ae3bb7d81601680fe55fbb [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#ifndef WLAN_QCT_WLANSAP_H
43#define WLAN_QCT_WLANSAP_H
44
45/*===========================================================================
46
47 W L A N S O F T A P P A L L A Y E R
48 E X T E R N A L A P I
49
50
51DESCRIPTION
52 This file contains the external API exposed by the wlan SAP PAL layer
53 module.
54
55
56 Copyright (c) 2010 QUALCOMM Incorporated. All Rights Reserved.
57 Qualcomm Confidential and Proprietary
58===========================================================================*/
59
60
61/*===========================================================================
62
63 EDIT HISTORY FOR FILE
64
65
66 This section contains comments describing changes made to the module.
67 Notice that changes are listed in reverse chronological order.
68
69
70 $Header: /cygdrive/d/Builds/M7201JSDCAAPAD52240B/WM/platform/msm7200/Src/Drivers/SD/ClientDrivers/WLAN/QCT_BTAMP_RSN/CORE/SAP/inc/sapApi.h,v 1.21 2009/03/09 08:58:26 jzmuda Exp jzmuda $ $DateTime: $ $Author: jzmuda $
71
72
73when who what, where, why
74-------- --- ----------------------------------------------------------
7507/01/08 SAP team Created module.
76
77===========================================================================*/
78
79
80
81/*===========================================================================
82
83 INCLUDE FILES FOR MODULE
84
85===========================================================================*/
86
87/*----------------------------------------------------------------------------
88 * Include Files
89 * -------------------------------------------------------------------------*/
90#include "vos_api.h"
91#include "vos_packet.h"
92#include "vos_types.h"
93
Jeff Johnson295189b2012-06-20 16:38:30 -070094#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070095
96/*----------------------------------------------------------------------------
97 * Preprocessor Definitions and Constants
98 * -------------------------------------------------------------------------*/
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102
103
104
105/*----------------------------------------------------------------------------
106 * Defines
107 * -------------------------------------------------------------------------*/
108
109/*--------------------------------------------------------------------------
110 defines and enum
111 ------------------------------------------------------------------------*/
Gopichand Nakkalac005b7c2013-05-14 16:04:14 +0530112
Jeff Johnson295189b2012-06-20 16:38:30 -0700113#define MAX_SSID_LEN 32
Gopichand Nakkalac005b7c2013-05-14 16:04:14 +0530114#define MAX_ACL_MAC_ADDRESS 16
Jeff Johnson295189b2012-06-20 16:38:30 -0700115#define AUTO_CHANNEL_SELECT 0
116#define MAX_ASSOC_IND_IE_LEN 255
117
118/* defines for WPS config states */
119#define SAP_WPS_DISABLED 0
120#define SAP_WPS_ENABLED_UNCONFIGURED 1
121#define SAP_WPS_ENABLED_CONFIGURED 2
122
123#define MAX_NAME_SIZE 64
124#define MAX_TEXT_SIZE 32
125
126
127/*--------------------------------------------------------------------------
128 reasonCode take form 802.11 standard Table 7-22 to be passed to WLANSAP_DisassocSta api.
129 ------------------------------------------------------------------------*/
130
131typedef enum{
132 eSAP_RC_RESERVED0, /*0*/
133 eSAP_RC_UNSPECIFIED, /*1*/
134 eSAP_RC_PREV_AUTH_INVALID, /*2*/
135 eSAP_RC_STA_LEFT_DEAUTH, /*3*/
136 eSAP_RC_INACTIVITY_DISASSOC, /*4*/
137 eSAP_RC_AP_CAPACITY_FULL, /*5*/
138 eSAP_RC_CLS2_FROM_NON_AUTH_STA, /*6*/
139 eSAP_RC_CLS3_FROM_NON_AUTH_STA, /*7*/
140 eSAP_RC_STA_LEFT_DISASSOC, /*8*/
141 eSAP_RC_STA_NOT_AUTH, /*9*/
142 eSAP_RC_PC_UNACCEPTABLE, /*10*/
143 eSAP_RC_SC_UNACCEPTABLE, /*11*/
144 eSAP_RC_RESERVED1, /*12*/
145 eSAP_RC_INVALID_IE, /*13*/
146 eSAP_RC_MIC_FAIL, /*14*/
147 eSAP_RC_4_WAY_HANDSHAKE_TO, /*15*/
148 eSAP_RC_GO_KEY_HANDSHAKE_TO, /*16*/
149 eSAP_RC_IE_MISMATCH, /*17*/
150 eSAP_RC_INVALID_GRP_CHIPHER, /*18*/
151 eSAP_RC_INVALID_PAIR_CHIPHER, /*19*/
152 eSAP_RC_INVALID_AKMP, /*20*/
153 eSAP_RC_UNSUPPORTED_RSN, /*21*/
154 eSAP_RC_INVALID_RSN, /*22*/
155 eSAP_RC_1X_AUTH_FAILED, /*23*/
156 eSAP_RC_CHIPER_SUITE_REJECTED, /*24*/
157}eSapReasonCode;
158
159typedef enum {
160 eSAP_DOT11_MODE_abg = 0x0001,
161 eSAP_DOT11_MODE_11a = 0x0002,
162 eSAP_DOT11_MODE_11b = 0x0004,
163 eSAP_DOT11_MODE_11g = 0x0008,
164 eSAP_DOT11_MODE_11n = 0x0010,
165 eSAP_DOT11_MODE_11g_ONLY = 0x0080,
166 eSAP_DOT11_MODE_11n_ONLY = 0x0100,
167 eSAP_DOT11_MODE_11b_ONLY = 0x0400,
Jeff Johnsone7245742012-09-05 17:12:55 -0700168#ifdef WLAN_FEATURE_11AC
169 eSAP_DOT11_MODE_11ac = 0x1000,
170 eSAP_DOT11_MODE_11ac_ONLY = 0x2000
171#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700172} eSapPhyMode;
173
174typedef enum {
175 eSAP_ACCEPT_UNLESS_DENIED = 0,
176 eSAP_DENY_UNLESS_ACCEPTED = 1,
177 eSAP_SUPPORT_ACCEPT_AND_DENY = 2, /* this type is added to support both accept and deny lists at the same time */
178 eSAP_ALLOW_ALL = 3, /*In this mode all MAC addresses are allowed to connect*/
179} eSapMacAddrACL;
180
181typedef enum {
182 eSAP_BLACK_LIST = 0, /* List of mac addresses NOT allowed to assoc */
183 eSAP_WHITE_LIST = 1, /* List of mac addresses allowed to assoc */
184} eSapACLType;
185
186typedef enum {
187 ADD_STA_TO_ACL = 0, /* cmd to add STA to access control list */
188 DELETE_STA_FROM_ACL = 1, /* cmd to delete STA from access control list */
189} eSapACLCmdType;
190
191typedef enum {
192 eSAP_START_BSS_EVENT = 0, /*Event sent when BSS is started*/
193 eSAP_STOP_BSS_EVENT, /*Event sent when BSS is stopped*/
194 eSAP_STA_ASSOC_IND, /* Indicate the association request to upper layers */
195 eSAP_STA_ASSOC_EVENT, /*Event sent when we have successfully associated a station and
196 upper layer neeeds to allocate a context*/
197 eSAP_STA_REASSOC_EVENT, /*Event sent when we have successfully reassociated a station and
198 upper layer neeeds to allocate a context*/
199 eSAP_STA_DISASSOC_EVENT, /*Event sent when associated a station has disassociated as a result of various conditions */
200 eSAP_STA_SET_KEY_EVENT, /*Event sent when user called WLANSAP_SetKeySta */
201 eSAP_STA_DEL_KEY_EVENT, /*Event sent when user called WLANSAP_DelKeySta */
202 eSAP_STA_MIC_FAILURE_EVENT, /*Event sent whenever there is MIC failure detected */
203 eSAP_ASSOC_STA_CALLBACK_EVENT, /*Event sent when user called WLANSAP_GetAssocStations */
204 eSAP_GET_WPSPBC_SESSION_EVENT, /* Event send when user call WLANSAP_getWpsSessionOverlap */
205 eSAP_WPS_PBC_PROBE_REQ_EVENT, /* Event send on WPS PBC probe request is received */
Jeff Johnson295189b2012-06-20 16:38:30 -0700206 eSAP_INDICATE_MGMT_FRAME,
207 eSAP_REMAIN_CHAN_READY,
208 eSAP_SEND_ACTION_CNF,
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800209 eSAP_DISCONNECT_ALL_P2P_CLIENT,
210 eSAP_MAC_TRIG_STOP_BSS_EVENT,
Jeff Johnson295189b2012-06-20 16:38:30 -0700211 eSAP_UNKNOWN_STA_JOIN, /* Event send when a STA in neither white list or black list tries to associate in softap mode */
212 eSAP_MAX_ASSOC_EXCEEDED, /* Event send when a new STA is rejected association since softAP max assoc limit has reached */
213} eSapHddEvent;
214
215typedef enum {
216 eSAP_OPEN_SYSTEM,
217 eSAP_SHARED_KEY,
218 eSAP_AUTO_SWITCH
219 } eSapAuthType;
220
221typedef enum {
222 eSAP_MAC_INITATED_DISASSOC = 0x10000, /*Disassociation was internally initated from CORE stack*/
223 eSAP_USR_INITATED_DISASSOC /*Disassociation was internally initated from host by invoking WLANSAP_DisassocSta call*/
224 } eSapDisassocReason;
225
226/*Handle boolean over here*/
227typedef enum {
228 eSAP_FALSE,
229 eSAP_TRUE,
230}eSapBool;
231
232/*---------------------------------------------------------------------------
233SAP PAL "status" and "reason" error code defines
234 ---------------------------------------------------------------------------*/
235typedef enum {
236 eSAP_STATUS_SUCCESS, /* Success. */
237 eSAP_STATUS_FAILURE, /* General Failure. */
238 eSAP_START_BSS_CHANNEL_NOT_SELECTED, /* Channel not selected during intial scan. */
239 eSAP_ERROR_MAC_START_FAIL, /* Failed to start Infra BSS */
240}eSapStatus;
241
242/*---------------------------------------------------------------------------
243SAP PAL "status" and "reason" error code defines
244 ---------------------------------------------------------------------------*/
245typedef enum {
246 eSAP_WPSPBC_OVERLAP_IN120S, /* Overlap */
247 eSAP_WPSPBC_NO_WPSPBC_PROBE_REQ_IN120S, /* no WPS probe request in 120 second */
248 eSAP_WPSPBC_ONE_WPSPBC_PROBE_REQ_IN120S, /* One WPS probe request in 120 second */
249}eWPSPBCOverlap;
250
251/*----------------------------------------------------------------------------
252 * Typedefs
253 * -------------------------------------------------------------------------*/
254typedef struct sap_StartBssCompleteEvent_s {
255 v_U8_t status;
256 v_U8_t operatingChannel;
257 v_U16_t staId; //self StaID
258} tSap_StartBssCompleteEvent;
259
260typedef struct sap_StopBssCompleteEvent_s {
261 v_U8_t status;
262} tSap_StopBssCompleteEvent;
263
264typedef struct sap_StationAssocIndication_s {
265 v_MACADDR_t staMac;
266 v_U8_t assoId;
267 v_U8_t staId;
268 v_U8_t status;
269 // Required for indicating the frames to upper layer
270 tANI_U32 beaconLength;
271 tANI_U8* beaconPtr;
272 tANI_U32 assocReqLength;
273 tANI_U8* assocReqPtr;
274 tANI_BOOLEAN fWmmEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700275 eCsrAuthType negotiatedAuthType;
276 eCsrEncryptionType negotiatedUCEncryptionType;
277 eCsrEncryptionType negotiatedMCEncryptionType;
278 tANI_BOOLEAN fAuthRequired;
Jeff Johnson295189b2012-06-20 16:38:30 -0700279} tSap_StationAssocIndication;
280
281typedef struct sap_StationAssocReassocCompleteEvent_s {
282 v_MACADDR_t staMac;
283 v_U8_t staId;
284 v_U8_t status;
285 v_U8_t ies[MAX_ASSOC_IND_IE_LEN];
286 v_U16_t iesLen;
287 v_U32_t statusCode;
288 eSapAuthType SapAuthType;
289 v_BOOL_t wmmEnabled;
290 // Required for indicating the frames to upper layer
291 tANI_U32 beaconLength;
292 tANI_U8* beaconPtr;
293 tANI_U32 assocReqLength;
294 tANI_U8* assocReqPtr;
295 tANI_U32 assocRespLength;
296 tANI_U8* assocRespPtr;
297} tSap_StationAssocReassocCompleteEvent;
298
299typedef struct sap_StationDisassocCompleteEvent_s {
300 v_MACADDR_t staMac;
301 v_U8_t staId; //STAID should not be used
302 v_U8_t status;
303 v_U32_t statusCode;
304 eSapDisassocReason reason;
305} tSap_StationDisassocCompleteEvent;
306
307typedef struct sap_StationSetKeyCompleteEvent_s {
308 v_U8_t status;
309 v_MACADDR_t peerMacAddr;
310} tSap_StationSetKeyCompleteEvent;
311
312/*struct corresponding to SAP_STA_DEL_KEY_EVENT */
313typedef struct sap_StationDeleteKeyCompleteEvent_s {
314 v_U8_t status;
315 v_U8_t keyId; /* Key index */
316} tSap_StationDeleteKeyCompleteEvent;
317
318/*struct corresponding to SAP_STA_MIC_FAILURE_EVENT */
319typedef struct sap_StationMICFailureEvent_s {
320 v_MACADDR_t srcMacAddr; //address used to compute MIC
321 v_MACADDR_t staMac; //taMacAddr transmitter address
322 v_MACADDR_t dstMacAddr;
323 eSapBool multicast;
324 v_U8_t IV1; // first byte of IV
325 v_U8_t keyId; // second byte of IV
326 v_U8_t TSC[SIR_CIPHER_SEQ_CTR_SIZE]; // sequence number
327
328} tSap_StationMICFailureEvent;
329/*Structure to return MAC address of associated stations */
330typedef struct sap_AssocMacAddr_s {
331 v_MACADDR_t staMac; /*MAC address of Station that is associated*/
332 v_U8_t assocId; /*Association ID for the station that is associated*/
333 v_U8_t staId; /*Station Id that is allocated to the station*/
Leo Chang614d2072013-08-22 14:59:44 -0700334 v_U8_t ShortGI40Mhz;
335 v_U8_t ShortGI20Mhz;
336 v_U8_t Support40Mhz;
337 v_U32_t requestedMCRate;
338 tSirSupportedRates supportedRates;
Jeff Johnson295189b2012-06-20 16:38:30 -0700339} tSap_AssocMacAddr, *tpSap_AssocMacAddr;
340
341/*struct corresponding to SAP_ASSOC_STA_CALLBACK_EVENT */
342typedef struct sap_AssocStaListEvent_s {
343 VOS_MODULE_ID module; /* module id that was passed in WLANSAP_GetAssocStations API*/
344 v_U8_t noOfAssocSta; /* Number of associated stations*/
345 tpSap_AssocMacAddr pAssocStas; /*Pointer to pre allocated memory to obtain list of associated
346 stations passed in WLANSAP_GetAssocStations API*/
347} tSap_AssocStaListEvent;
348
349typedef struct sap_GetWPSPBCSessionEvent_s {
350 v_U8_t status;
351 VOS_MODULE_ID module; /* module id that was passed in WLANSAP_GetAssocStations API*/
352 v_U8_t UUID_E[16]; // Unique identifier of the AP.
353 v_MACADDR_t addr;
354 eWPSPBCOverlap wpsPBCOverlap;
355} tSap_GetWPSPBCSessionEvent;
356
357typedef struct sap_WPSPBCProbeReqEvent_s {
358 v_U8_t status;
359 VOS_MODULE_ID module; /* module id that was passed in WLANSAP_GetAssocStations API*/
360 tSirWPSPBCProbeReq WPSPBCProbeReq;
361} tSap_WPSPBCProbeReqEvent;
362
Jeff Johnson295189b2012-06-20 16:38:30 -0700363typedef struct sap_ManagementFrameInfo_s {
364 tANI_U32 nFrameLength;
365 tANI_U8 frameType;
Jeff Johnson1250df42012-12-10 14:31:52 -0800366 tANI_U32 rxChan; //Channel of where packet is received
Jeff Johnson295189b2012-06-20 16:38:30 -0700367 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
368 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
369 //each frame starts and ends.
370} tSap_ManagementFrameInfo;
371
372typedef struct sap_SendActionCnf_s {
373 eSapStatus actionSendSuccess;
374} tSap_SendActionCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -0700375
376typedef struct sap_UnknownSTAJoinEvent_s {
377 v_MACADDR_t macaddr;
378} tSap_UnknownSTAJoinEvent;
379
380typedef struct sap_MaxAssocExceededEvent_s {
381 v_MACADDR_t macaddr;
382} tSap_MaxAssocExceededEvent;
383
384
385/*
386 This struct will be filled in and passed to tpWLAN_SAPEventCB that is provided during WLANSAP_StartBss call
387 The event id corresponding to structure in the union is defined in comment next to the structure
388*/
389
390typedef struct sap_Event_s {
391 eSapHddEvent sapHddEventCode;
392 union {
393 tSap_StartBssCompleteEvent sapStartBssCompleteEvent; /*SAP_START_BSS_EVENT*/
394 tSap_StopBssCompleteEvent sapStopBssCompleteEvent; /*SAP_STOP_BSS_EVENT*/
395 tSap_StationAssocIndication sapAssocIndication; /*SAP_ASSOC_INDICATION */
396 tSap_StationAssocReassocCompleteEvent sapStationAssocReassocCompleteEvent; /*SAP_STA_ASSOC_EVENT, SAP_STA_REASSOC_EVENT*/
397 tSap_StationDisassocCompleteEvent sapStationDisassocCompleteEvent;/*SAP_STA_DISASSOC_EVENT*/
398 tSap_StationSetKeyCompleteEvent sapStationSetKeyCompleteEvent;/*SAP_STA_SET_KEY_EVENT*/
399 tSap_StationDeleteKeyCompleteEvent sapStationDeleteKeyCompleteEvent;/*SAP_STA_DEL_KEY_EVENT*/
400 tSap_StationMICFailureEvent sapStationMICFailureEvent; /*SAP_STA_MIC_FAILURE_EVENT */
401 tSap_AssocStaListEvent sapAssocStaListEvent; /*SAP_ASSOC_STA_CALLBACK_EVENT */
402 tSap_GetWPSPBCSessionEvent sapGetWPSPBCSessionEvent; /*SAP_GET_WPSPBC_SESSION_EVENT */
403 tSap_WPSPBCProbeReqEvent sapPBCProbeReqEvent; /*eSAP_WPS_PBC_PROBE_REQ_EVENT */
Jeff Johnson295189b2012-06-20 16:38:30 -0700404 tSap_ManagementFrameInfo sapManagementFrameInfo; /*eSAP_INDICATE_MGMT_FRAME*/
405 tSap_SendActionCnf sapActionCnf; /* eSAP_SEND_ACTION_CNF */
Jeff Johnson295189b2012-06-20 16:38:30 -0700406 tSap_UnknownSTAJoinEvent sapUnknownSTAJoin; /* eSAP_UNKNOWN_STA_JOIN */
407 tSap_MaxAssocExceededEvent sapMaxAssocExceeded; /* eSAP_MAX_ASSOC_EXCEEDED */
408 } sapevt;
409} tSap_Event, *tpSap_Event;
410
411
412typedef __ani_attr_pre_packed struct sap_SSID {
413 v_U8_t length;
414 v_U8_t ssId[MAX_SSID_LEN];
415} __ani_attr_packed tSap_SSID_t;
416
417typedef __ani_attr_pre_packed struct sap_SSIDInfo {
418 tSap_SSID_t ssid; /*SSID of the AP*/
419 v_U8_t ssidHidden; /*SSID shouldn't/should be broadcast in probe RSP and beacon*/
420} __ani_attr_packed tSap_SSIDInfo_t;
421
422typedef struct sap_Config {
423 tSap_SSIDInfo_t SSIDinfo;
424 eSapPhyMode SapHw_mode; /* Wireless Mode */
425 eSapMacAddrACL SapMacaddr_acl;
Gopichand Nakkalac005b7c2013-05-14 16:04:14 +0530426 v_MACADDR_t accept_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */
Jeff Johnson295189b2012-06-20 16:38:30 -0700427 v_BOOL_t ieee80211d; /*Specify if 11D is enabled or disabled*/
428 v_BOOL_t protEnabled; /*Specify if protection is enabled or disabled*/
429 v_BOOL_t obssProtEnabled; /*Specify if OBSS protection is enabled or disabled*/
Gopichand Nakkalac005b7c2013-05-14 16:04:14 +0530430 v_MACADDR_t deny_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */
Jeff Johnson295189b2012-06-20 16:38:30 -0700431 v_MACADDR_t self_macaddr; //self macaddress or BSSID
432
433 v_U8_t channel; /* Operation channel */
434 v_U8_t max_num_sta; /* maximum number of STAs in station table */
435 v_U8_t dtim_period; /* dtim interval */
436 v_U8_t num_accept_mac;
437 v_U8_t num_deny_mac;
438 v_U8_t *pRSNWPAReqIE; //If not null, it has the IE byte stream for RSN /WPA
439
440 v_U8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
441 v_U8_t RSNAuthType;
442 v_U8_t RSNEncryptType;
443 v_U8_t mcRSNEncryptType;
444 eSapAuthType authType;
445 v_BOOL_t privacy;
446 v_BOOL_t UapsdEnable;
447 v_BOOL_t fwdWPSPBCProbeReq;
448 v_U8_t wps_state; // 0 - disabled, 1 - not configured , 2 - configured
449
450 v_U16_t ht_capab;
451 v_U16_t RSNWPAReqIELength; //The byte count in the pWPAReqIE
452
453 v_U32_t beacon_int; /* Beacon Interval */
454 v_U32_t ap_table_max_size;
455 v_U32_t ap_table_expiration_time;
456 v_U32_t ht_op_mode_fixed;
457 tVOS_CON_MODE persona; /*Tells us which persona it is GO or AP for now*/
458
459} tsap_Config_t;
460
461typedef enum {
462 eSAP_WPS_PROBE_RSP_IE,
463 eSAP_WPS_BEACON_IE,
464 eSAP_WPS_ASSOC_RSP_IE
465} eSapWPSIE_CODE;
466
467typedef struct sSapName {
468 v_U8_t num_name;
469 v_U8_t name[MAX_NAME_SIZE];
470} tSapName;
471
472typedef struct sSapText {
473 v_U8_t num_text;
474 v_U8_t text[MAX_TEXT_SIZE];
475} tSapText;
476
477#define WPS_PROBRSP_VER_PRESENT 0x00000001
478#define WPS_PROBRSP_STATE_PRESENT 0x00000002
479#define WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
480#define WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
481#define WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
482#define WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
483#define WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
484#define WPS_PROBRSP_UUIDE_PRESENT 0x00000080
485#define WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
486#define WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
487#define WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
488#define WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
489#define WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
490#define WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
491#define WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
492#define WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
493
494typedef struct sap_WPSProbeRspIE_s {
495 v_U32_t FieldPresent;
496 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
497 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
498 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
499 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
500 v_U16_t DevicePasswordID; // Device Password ID
501 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
502 v_U8_t ResponseType; // Response type
503 v_U8_t UUID_E[16]; // Unique identifier of the AP.
504 tSapName Manufacture;
505 tSapText ModelName;
506 tSapText ModelNumber;
507 tSapText SerialNumber;
508 v_U32_t PrimaryDeviceCategory ; // Device Category ID: 1Computer, 2Input Device, ...
509 v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category
510 v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer
511 tSapText DeviceName;
512 v_U16_t ConfigMethod; // Configuaration method
513 v_U8_t RFBand; // RF bands available on the AP
514} tSap_WPSProbeRspIE;
515
516#define WPS_BEACON_VER_PRESENT 0x00000001
517#define WPS_BEACON_STATE_PRESENT 0x00000002
518#define WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
519#define WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
520#define WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
521#define WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
522#define WPS_BEACON_UUIDE_PRESENT 0x00000080
523#define WPS_BEACON_RF_BANDS_PRESENT 0x00000100
524
525typedef struct sap_WPSBeaconIE_s {
526 v_U32_t FieldPresent;
527 v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
528 v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
529 v_BOOL_t APSetupLocked; // Must be included if value is TRUE
530 v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
531 v_U16_t DevicePasswordID; // Device Password ID
532 v_U16_t SelectedRegistraCfgMethod; // Selected Registrar config method
533 v_U8_t UUID_E[16]; // Unique identifier of the AP.
534 v_U8_t RFBand; // RF bands available on the AP
535} tSap_WPSBeaconIE;
536
537#define WPS_ASSOCRSP_VER_PRESENT 0x00000001
538#define WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
539
540typedef struct sap_WPSAssocRspIE_s {
541 v_U32_t FieldPresent;
542 v_U32_t Version;
543 v_U8_t ResposeType;
544} tSap_WPSAssocRspIE;
545
546typedef struct sap_WPSIE_s {
547 eSapWPSIE_CODE sapWPSIECode;
548 union {
549 tSap_WPSProbeRspIE sapWPSProbeRspIE; /*WPS Set Probe Respose IE*/
550 tSap_WPSBeaconIE sapWPSBeaconIE; /*WPS Set Beacon IE*/
551 tSap_WPSAssocRspIE sapWPSAssocRspIE; /*WPS Set Assoc Response IE*/
552 } sapwpsie;
553} tSap_WPSIE, *tpSap_WPSIE;
554
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -0800555#ifdef WLANTL_DEBUG
556#define MAX_RATE_INDEX 136
557#define MAX_NUM_RSSI 100
558#define MAX_RSSI_INTERVAL 5
559#endif
560
Jeff Johnson295189b2012-06-20 16:38:30 -0700561typedef struct sap_SoftapStats_s {
562 v_U32_t txUCFcnt;
563 v_U32_t txMCFcnt;
564 v_U32_t txBCFcnt;
565 v_U32_t txUCBcnt;
566 v_U32_t txMCBcnt;
567 v_U32_t txBCBcnt;
568 v_U32_t rxUCFcnt;
569 v_U32_t rxMCFcnt;
570 v_U32_t rxBCFcnt;
571 v_U32_t rxUCBcnt;
572 v_U32_t rxMCBcnt;
573 v_U32_t rxBCBcnt;
574 v_U32_t rxBcnt;
575 v_U32_t rxBcntCRCok;
576 v_U32_t rxRate;
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -0800577#ifdef WLANTL_DEBUG
578 v_U32_t pktCounterRateIdx[MAX_RATE_INDEX];
579 v_U32_t pktCounterRssi[MAX_NUM_RSSI];
580#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700581} tSap_SoftapStats, *tpSap_SoftapStats;
582
Leo Chang0b0e45a2013-12-15 15:18:55 -0800583#ifdef FEATURE_WLAN_CH_AVOID
584/* Store channel safty information */
585typedef struct
586{
587 v_U16_t channelNumber;
588 v_BOOL_t isSafe;
589} safeChannelType;
590#endif /* FEATURE_WLAN_CH_AVOID */
Jeff Johnson295189b2012-06-20 16:38:30 -0700591
Mahesh Kumar Kalikot Veetil2aad8d82013-02-07 12:31:28 -0800592int sapSetPreferredChannel(tANI_U8* ptr);
Madan Mohan Koyyalamudi5aef2af2012-10-05 11:56:27 -0700593void sapCleanupChannelList(void);
594
Jeff Johnson295189b2012-06-20 16:38:30 -0700595/*==========================================================================
596 FUNCTION WLANSAP_Set_WpsIe
597
598 DESCRIPTION
599 This api function provides for Ap App/HDD to set WPS IE.
600
601 DEPENDENCIES
602 NA.
603
604 PARAMETERS
605
606 IN
607 pvosGCtx: Pointer to vos global context structure
608 pWPSIE: tSap_WPSIE structure for the station
609
610 RETURN VALUE
611 The VOS_STATUS code associated with performing the operation
612
613 VOS_STATUS_SUCCESS: Success
614
615 SIDE EFFECTS
616============================================================================*/
617VOS_STATUS
618WLANSAP_Set_WpsIe
619(
620 v_PVOID_t pvosGCtx, tSap_WPSIE *pWPSIe
621);
622
623/*==========================================================================
624 FUNCTION WLANSAP_Update_WpsIe
625
626 DESCRIPTION
627 This api function provides for Ap App/HDD to start WPS session.
628
629 DEPENDENCIES
630 NA.
631
632 PARAMETERS
633
634 IN
635pvosGCtx: Pointer to vos global context structure
636
637 RETURN VALUE
638 The VOS_STATUS code associated with performing the operation
639
640 VOS_STATUS_SUCCESS: Success
641
642 SIDE EFFECTS
643============================================================================*/
644VOS_STATUS
645WLANSAP_Update_WpsIe
646(
647 v_PVOID_t pvosGCtx
648);
649
650/*==========================================================================
651 FUNCTION WLANSAP_Stop_Wps
652
653 DESCRIPTION
654 This api function provides for Ap App/HDD to stop WPS session.
655
656 DEPENDENCIES
657 NA.
658
659 PARAMETERS
660
661 IN
662pvosGCtx: Pointer to vos global context structure
663
664 RETURN VALUE
665 The VOS_STATUS code associated with performing the operation
666
667 VOS_STATUS_SUCCESS: Success
668
669 SIDE EFFECTS
670============================================================================*/
671VOS_STATUS
672WLANSAP_Stop_Wps
673(
674 v_PVOID_t pvosGCtx
675);
676
677/*==========================================================================
678 FUNCTION WLANSAP_Get_WPS_State
679
680 DESCRIPTION
681 This api function provides for Ap App/HDD to get WPS state.
682
683 DEPENDENCIES
684 NA.
685
686 PARAMETERS
687
688 IN
689pvosGCtx: Pointer to vos global context structure
690
691 OUT
692pbWPSState: Pointer to variable to indicate if it is in WPS Registration state
693
694 RETURN VALUE
695 The VOS_STATUS code associated with performing the operation
696
697 VOS_STATUS_SUCCESS: Success
698
699 SIDE EFFECTS
700============================================================================*/
701VOS_STATUS
702WLANSAP_Get_WPS_State
703(
704 v_PVOID_t pvosGCtx, v_BOOL_t * pbWPSState
705);
706
707/*----------------------------------------------------------------------------
708 * Opaque SAP handle Type Declaration
709 * -------------------------------------------------------------------------*/
710
711typedef v_PVOID_t tSapHandle, *ptSapHandle;
712
713/*----------------------------------------------------------------------------
714 * Function Declarations and Documentation
715 * -------------------------------------------------------------------------*/
716
717/*==========================================================================
718 FUNCTION WLANSAP_Open
719
720 DESCRIPTION
721 Called at driver initialization (vos_open). SAP will initialize
722 all its internal resources and will wait for the call to start to
723 register with the other modules.
724
725 DEPENDENCIES
726
727 PARAMETERS
728
729 IN
730 pvosGCtx: pointer to the global vos context; a handle to SAP's
731 control block can be extracted from its context
732
733 RETURN VALUE
734 The result code associated with performing the operation
735
736 VOS_STATUS_E_FAULT: pointer to SAP cb is NULL ; access would cause a page
737 fault
738 VOS_STATUS_SUCCESS: Everything is good :)
739
740 SIDE EFFECTS
741============================================================================*/
742VOS_STATUS
743WLANSAP_Open
744(
745 v_PVOID_t pvosGCtx
746);
747
748/*==========================================================================
749 FUNCTION WLANSAP_Start
750
751 DESCRIPTION
752 Called as part of the overall start procedure (vos_start).
753
754 DEPENDENCIES
755
756 PARAMETERS
757
758 IN
759 pvosGCtx: pointer to the global vos context; a handle to SAP's
760 control block can be extracted from its context
761
762 RETURN VALUE
763 The result code associated with performing the operation
764
765 VOS_STATUS_E_FAULT: pointer to SAP cb is NULL ; access would cause a page
766 fault
767 VOS_STATUS_SUCCESS: Everything is good :)
768
769 Other codes can be returned as a result of a BAL failure;
770
771 SIDE EFFECTS
772============================================================================*/
773VOS_STATUS
774WLANSAP_Start
775(
776 v_PVOID_t pvosGCtx
777);
778
779/*==========================================================================
780 FUNCTION WLANSAP_Stop
781
782 DESCRIPTION
783 Called by vos_stop to stop operation in SAP, before close.
784
785 DEPENDENCIES
786
787 PARAMETERS
788
789 IN
790 pvosGCtx: pointer to the global vos context; a handle to SAP's
791 control block can be extracted from its context
792
793 RETURN VALUE
794 The result code associated with performing the operation
795
796 VOS_STATUS_E_FAULT: pointer to SAP cb is NULL ; access would cause a page
797 fault
798 VOS_STATUS_SUCCESS: Everything is good :)
799
800 SIDE EFFECTS
801============================================================================*/
802VOS_STATUS
803WLANSAP_Stop
804(
805 v_PVOID_t pvosGCtx
806);
807
808/*==========================================================================
809 FUNCTION WLANSAP_Close
810
811 DESCRIPTION
812 Called by vos_close during general driver close procedure. SAP will clean up
813 all the internal resources.
814
815 DEPENDENCIES
816
817 PARAMETERS
818
819 IN
820 pvosGCtx: pointer to the global vos context; a handle to SAP's
821 control block can be extracted from its context
822
823 RETURN VALUE
824 The result code associated with performing the operation
825
826 VOS_STATUS_E_FAULT: pointer to SAP cb is NULL ; access would cause a page
827 fault
828 VOS_STATUS_SUCCESS: Everything is good :)
829
830 SIDE EFFECTS
831============================================================================*/
832VOS_STATUS
833WLANSAP_Close
834(
835 v_PVOID_t pvosGCtx
836);
837
838/*==========================================================================
839 FUNCTION (*tpWLAN_SAPEventCB)
840
841 DESCRIPTION
842 Implements the callback for ALL asynchronous events.
843 Including Events resulting from:
844 * Start BSS
845 * Stop BSS,...
846
847 DEPENDENCIES
848 NA.
849
850 PARAMETERS
851
852 IN
853 pSapEvent: pointer to the union of "Sap Event" structures. This now encodes ALL event types.
854 Including Command Complete and Command Status
855 pUsrContext : pUsrContext parameter that was passed to sapStartBss
856 RETURN VALUE
857 The result code associated with performing the operation
858
859 VOS_STATUS_E_FAULT: pointer to pSapEvent is NULL
860 VOS_STATUS_SUCCESS: Success
861
862 SIDE EFFECTS
863============================================================================*/
864typedef VOS_STATUS (*tpWLAN_SAPEventCB)( tpSap_Event pSapEvent, v_PVOID_t pUsrContext);
865
866
867
868/*==========================================================================
869 FUNCTION WLANSAP_getState
870
871 DESCRIPTION
872 This api returns the current SAP state to the caller.
873
874 DEPENDENCIES
875
876 PARAMETERS
877
878 IN
879 pContext : Pointer to Sap Context structure
880
881 RETURN VALUE
882 Returns the SAP FSM state.
883============================================================================*/
884
885v_U8_t WLANSAP_getState ( v_PVOID_t pvosGCtx);
886
887/*==========================================================================
888 FUNCTION WLANSAP_StartBss
889
890 DESCRIPTION
891 This api function provides SAP FSM event eWLAN_SAP_HDD_PHYSICAL_LINK_CREATE for
892starting AP BSS
893
894 DEPENDENCIES
895 NA.
896
897 PARAMETERS
898
899 IN
900pvosGCtx: Pointer to vos global context structure
901pConfig: Pointer to configuration structure passed down from HDD(HostApd for Android)
902hdd_SapEventCallback: Callback function in HDD called by SAP to inform HDD about SAP results
903usrDataForCallback: Parameter that will be passed back in all the SAP callback events.
904
905
906 RETURN VALUE
907 The VOS_STATUS code associated with performing the operation
908
909 VOS_STATUS_SUCCESS: Success
910
911 SIDE EFFECTS
912============================================================================*/
913VOS_STATUS
914WLANSAP_StartBss
915(
916 v_PVOID_t pvosGCtx,
917 tpWLAN_SAPEventCB pSapEventCallback,
918 tsap_Config_t *pConfig, v_PVOID_t pUsrContext
919);
920
921/*==========================================================================
Gopichand Nakkalac005b7c2013-05-14 16:04:14 +0530922 FUNCTION WLANSAP_SetMacACL
923
924 DESCRIPTION
925 This api function provides SAP to set mac list entry in accept list as well
926 as deny list
927
928 DEPENDENCIES
929 NA.
930
931 PARAMETERS
932
933 IN
934pvosGCtx: Pointer to vos global context structure
935pConfig: Pointer to configuration structure passed down from
936 HDD(HostApd for Android)
937
938
939 RETURN VALUE
940 The VOS_STATUS code associated with performing the operation
941
942 VOS_STATUS_SUCCESS: Success
943
944 SIDE EFFECTS
945============================================================================*/
946VOS_STATUS
947WLANSAP_SetMacACL
948(
949 v_PVOID_t pvosGCtx,
950 tsap_Config_t *pConfig
951);
952
953/*==========================================================================
Jeff Johnson295189b2012-06-20 16:38:30 -0700954 FUNCTION WLANSAP_Stop
955
956 DESCRIPTION
957 This api function provides SAP FSM event eWLAN_SAP_HDD_PHYSICAL_LINK_DISCONNECT for
958stopping BSS
959
960 DEPENDENCIES
961 NA.
962
963 PARAMETERS W
964
965 IN
966 pvosGCtx: Pointer to vos global context structure
967
968 RETURN VALUE
969 The VOS_STATUS code associated with performing the operation
970
971 VOS_STATUS_SUCCESS: Success
972
973 SIDE EFFECTS
974============================================================================*/
975VOS_STATUS
976WLANSAP_StopBss
977(
978 v_PVOID_t pvosGCtx
979);
980
981/*==========================================================================
982 FUNCTION WLANSAP_DisassocSta
983
984 DESCRIPTION
985 This api function provides for Ap App/HDD initiated disassociation of station
986
987 DEPENDENCIES
988 NA.
989
990 PARAMETERS
991
992 IN
993 pvosGCtx : Pointer to vos global context structure
994 pPeerStaMac : Mac address of the station to disassociate
995
996 RETURN VALUE
997 The VOS_STATUS code associated with performing the operation
998
999 VOS_STATUS_SUCCESS: Success
1000
1001 SIDE EFFECTS
1002============================================================================*/
1003VOS_STATUS
1004WLANSAP_DisassocSta
1005(
1006 v_PVOID_t pvosGCtx, v_U8_t *pPeerStaMac
1007);
1008
1009/*==========================================================================
1010 FUNCTION WLANSAP_DeauthSta
1011
1012 DESCRIPTION
1013 This api function provides for Ap App/HDD initiated deauthentication of station
1014
1015 DEPENDENCIES
1016 NA.
1017
1018 PARAMETERS
1019
1020 IN
1021 pvosGCtx : Pointer to vos global context structure
1022 pPeerStaMac : Mac address of the station to deauthenticate
1023
1024 RETURN VALUE
1025 The VOS_STATUS code associated with performing the operation
1026
1027 VOS_STATUS_SUCCESS: Success
1028
1029 SIDE EFFECTS
1030============================================================================*/
1031VOS_STATUS
1032WLANSAP_DeauthSta
1033(
1034 v_PVOID_t pvosGCtx, v_U8_t *pPeerStaMac
1035);
1036
1037/*==========================================================================
1038 FUNCTION WLANSAP_SetChannelRange
1039
1040 DESCRIPTION
1041 This api function sets the range of channels for SoftAP.
1042
1043 DEPENDENCIES
1044 NA.
1045
1046 PARAMETERS
1047
1048 IN
1049 startChannel : start channel
1050 endChannel : End channel
1051 operatingBand : Operating band (2.4GHz/5GHz)
1052
1053 RETURN VALUE
1054 The VOS_STATUS code associated with performing the operation
1055
1056 VOS_STATUS_SUCCESS: Success
1057
1058 SIDE EFFECTS
1059============================================================================*/
1060VOS_STATUS
1061WLANSAP_SetChannelRange(tHalHandle hHal,v_U8_t startChannel, v_U8_t endChannel,
1062 v_U8_t operatingBand);
1063
1064/*==========================================================================
1065 FUNCTION WLANSAP_SetKeySta
1066
1067 DESCRIPTION
1068 This api function provides for Ap App/HDD to delete key for a station.
1069
1070 DEPENDENCIES
1071 NA.
1072
1073 PARAMETERS
1074
1075 IN
1076pvosGCtx: Pointer to vos global context structure
1077pSetKeyInfo: tCsrRoamSetKey structure for the station
1078
1079 RETURN VALUE
1080 The VOS_STATUS code associated with performing the operation
1081
1082 VOS_STATUS_SUCCESS: Success
1083
1084 SIDE EFFECTS
1085============================================================================*/
1086VOS_STATUS
1087WLANSAP_SetKeySta
1088(
1089 v_PVOID_t pvosGCtx, tCsrRoamSetKey *pSetKeyInfo
1090);
1091
1092/*==========================================================================
1093 FUNCTION WLANSAP_DelKeySta
1094
1095 DESCRIPTION
1096 This api function provides for Ap App/HDD to delete key for a station.
1097
1098 DEPENDENCIES
1099 NA.
1100
1101 PARAMETERS
1102
1103 IN
1104pvosGCtx: Pointer to vos global context structure
1105pSetKeyInfo: tCsrRoamSetKey structure for the station
1106
1107 RETURN VALUE
1108 The VOS_STATUS code associated with performing the operation
1109
1110 VOS_STATUS_SUCCESS: Success
1111
1112 SIDE EFFECTS
1113============================================================================*/
1114VOS_STATUS
1115WLANSAP_DelKeySta
1116(
1117 v_PVOID_t pvosGCtx, tCsrRoamRemoveKey *pDelKeyInfo
1118);
1119
1120
1121
1122/*==========================================================================
1123 FUNCTION WLANSAP_GetAssocStations
1124
1125 DESCRIPTION
1126 This api function is used to probe the list of associated stations from various modules of CORE stack
1127
1128 DEPENDENCIES
1129 NA.
1130
1131 PARAMETERS
1132
1133 IN
1134pvosGCtx: Pointer to vos global context structure
1135mod: Module from whom list of associtated stations is supposed to be probed. If an invalid module is passed
1136then by default VOS_MODULE_ID_PE will be probed
1137 IN/OUT
1138pNoOfAssocStas:- Number of associated stations that are known to the module specified in mod parameter
1139pAssocStas: Pointer to list of associated stations that are known to the module specified in mod parameter
1140NOTE:- The memory for this list will be allocated by the caller of this API
1141
1142 RETURN VALUE
1143 The VOS_STATUS code associated with performing the operation
1144
1145 VOS_STATUS_SUCCESS: Success
1146
1147 SIDE EFFECTS
1148============================================================================*/
1149VOS_STATUS
1150WLANSAP_GetAssocStations
1151(
1152 v_PVOID_t pvosGCtx, VOS_MODULE_ID module,
1153 tpSap_AssocMacAddr pAssocStas
1154);
1155/*==========================================================================
1156 FUNCTION WLANSAP_RemoveWpsSessionOverlap
1157
1158 DESCRIPTION
1159 This api function provides for Ap App/HDD to remove an entry from session session overlap info.
1160
1161 DEPENDENCIES
1162 NA.
1163
1164 PARAMETERS
1165
1166 IN
1167 pvosGCtx: Pointer to vos global context structure
1168 pRemoveMac: pointer to v_MACADDR_t for session MAC address that needs to be removed from wps session
1169
1170 RETURN VALUE
1171 The VOS_STATUS code associated with performing the operation
1172
1173 VOS_STATUS_SUCCESS: Success
1174 VOS_STATUS_E_FAULT: Session is not dectected. The parameter is function not valid.
1175
1176 SIDE EFFECTS
1177============================================================================*/
1178VOS_STATUS
1179WLANSAP_RemoveWpsSessionOverlap
1180
1181(
1182 v_PVOID_t pvosGCtx,
1183 v_MACADDR_t pRemoveMac
1184);
1185
1186/*==========================================================================
1187 FUNCTION WLANSAP_getWpsSessionOverlap
1188
1189 DESCRIPTION
1190 This api function provides for Ap App/HDD to get WPS session overlap info.
1191
1192 DEPENDENCIES
1193 NA.
1194
1195 PARAMETERS
1196
1197 IN
1198pvosGCtx: Pointer to vos global context structure
1199pSessionMac: pointer to v_MACADDR_t for session MAC address
1200uuide: Pointer to 16 bytes array for session UUID_E
1201
1202 RETURN VALUE
1203 The VOS_STATUS code associated with performing the operation
1204
1205 VOS_STATUS_SUCCESS: Success
1206 VOS_STATUS_E_FAULT: Overlap is dectected. The parameter is function not valid.
1207
1208 SIDE EFFECTS
1209============================================================================*/
1210VOS_STATUS
1211WLANSAP_getWpsSessionOverlap
1212(
1213 v_PVOID_t pvosGCtx
1214);
1215
1216/*==========================================================================
1217 FUNCTION WLANSAP_SetCounterMeasure
1218
1219 DESCRIPTION
1220 This api function is used to disassociate all the stations and prevent
1221 association for any other station.Whenever Authenticator receives 2 mic failures
1222 within 60 seconds, Authenticator will enable counter measure at SAP Layer.
1223 Authenticator will start the 60 seconds timer. Core stack will not allow any
1224 STA to associate till HDD disables counter meassure. Core stack shall kick out all the
1225 STA which are currently associated and DIASSOC Event will be propogated to HDD for
1226 each STA to clean up the HDD STA table.Once the 60 seconds timer expires, Authenticator
1227 will disable the counter meassure at core stack. Now core stack can allow STAs to associate.
1228
1229 DEPENDENCIES
1230 NA.
1231
1232 PARAMETERS
1233
1234 IN
1235pvosGCtx: Pointer to vos global context structure
1236bEnable: If TRUE than all stations will be disassociated and no more will be allowed to associate. If FALSE than CORE
1237will come out of this state.
1238
1239 RETURN VALUE
1240 The VOS_STATUS code associated with performing the operation
1241
1242 VOS_STATUS_SUCCESS: Success
1243
1244 SIDE EFFECTS
1245============================================================================*/
1246VOS_STATUS
1247WLANSAP_SetCounterMeasure
1248(
1249 v_PVOID_t pvosGCtx, v_BOOL_t bEnable
1250);
1251
1252/*==========================================================================
1253 FUNCTION WLANSap_getstationIE_information
1254
1255 DESCRIPTION
1256 This api function provides for Ap App/HDD to retrive the WPA and RSNIE of a station.
1257
1258 DEPENDENCIES
1259 NA.
1260
1261 PARAMETERS
1262
1263 IN
1264 pvosGCtx: Pointer to vos global context structure
1265 pLen : length of WPARSN elment IE where it would be copied
1266 pBuf : buf to copy the WPARSNIe
1267
1268 RETURN VALUE
1269 The VOS_STATUS code associated with performing the operation
1270
1271 VOS_STATUS_SUCCESS: Success
1272
1273 SIDE EFFECTS
1274============================================================================*/
1275VOS_STATUS
1276WLANSap_getstationIE_information(v_PVOID_t pvosGCtx,
1277 v_U32_t *pLen,
1278 v_U8_t *pBuf);
1279
1280
1281VOS_STATUS
1282WLANSAP_getWpsSessionOverlap
1283(
1284 v_PVOID_t pvosGCtx
1285);
1286/*==========================================================================
1287 FUNCTION WLANSAP_ClearACL
1288
1289 DESCRIPTION
1290 This api function removes all the entries in both accept and deny lists.
1291
1292 DEPENDENCIES
1293 NA.
1294
1295 PARAMETERS
1296
1297 IN
1298 pvosGCtx: Pointer to vos global context structure
1299
1300 RETURN VALUE
1301 The VOS_STATUS code associated with performing the operation
1302
1303 VOS_STATUS_SUCCESS: Success
1304
1305 SIDE EFFECTS
1306============================================================================*/
1307VOS_STATUS
1308WLANSAP_ClearACL
1309(
1310 v_PVOID_t pvosGCtx
1311);
1312
1313/*==========================================================================
1314 FUNCTION WLANSAP_SetMode
1315
1316 DESCRIPTION
1317 This api is used to set mode for ACL
1318
1319 DEPENDENCIES
1320 NA.
1321
1322 PARAMETERS
1323
1324 IN
1325 pvosGCtx: Pointer to vos global context structure
1326
1327 RETURN VALUE
1328 The VOS_STATUS code associated with performing the operation
1329
1330 VOS_STATUS_SUCCESS: Success
1331
1332 SIDE EFFECTS
1333============================================================================*/
1334VOS_STATUS
1335WLANSAP_SetMode
1336(
1337 v_PVOID_t pvosGCtx,
1338 v_U32_t mode
1339);
1340
1341/*==========================================================================
1342 FUNCTION WLANSAP_ModifyACL
1343
1344 DESCRIPTION
1345 This api function provides for Ap App/HDD to add/remove mac addresses from black/white lists (ACLs).
1346
1347 DEPENDENCIES
1348 NA.
1349
1350 PARAMETERS
1351
1352 IN
1353 pvosGCtx : Pointer to vos global context structure
1354 pPeerStaMac : MAC address to be added or removed
1355 listType : add/remove to be done on black or white list
1356 cmd : Are we doing to add or delete a mac addr from an ACL.
1357 RETURN VALUE
1358 The VOS_STATUS code associated with performing the operation
1359
1360 VOS_STATUS_SUCCESS: Success
1361
1362 SIDE EFFECTS
1363============================================================================*/
1364VOS_STATUS
1365WLANSAP_ModifyACL
1366(
1367 v_PVOID_t pvosGCtx,
1368 v_U8_t *pPeerStaMac,
1369 eSapACLType listType,
1370 eSapACLCmdType cmd
1371);
1372
1373/*==========================================================================
1374 FUNCTION WLANSAP_Set_WPARSNIes
1375
1376 DESCRIPTION
1377 This api function provides for Ap App/HDD to set AP WPA and RSN IE in its beacon and probe response.
1378
1379 DEPENDENCIES
1380 NA.
1381
1382 PARAMETERS
1383
1384 IN
1385 pvosGCtx: Pointer to vos global context structure
1386 pWPARSNIEs: buffer to the WPA/RSN IEs
1387 WPARSNIEsLen: length of WPA/RSN IEs
1388
1389 RETURN VALUE
1390 The VOS_STATUS code associated with performing the operation
1391
1392 VOS_STATUS_SUCCESS: Success
1393
1394 SIDE EFFECTS
1395============================================================================*/
1396VOS_STATUS WLANSAP_Set_WPARSNIes(v_PVOID_t pvosGCtx, v_U8_t *pWPARSNIEs, v_U32_t WPARSNIEsLen);
1397
1398/*==========================================================================
1399 FUNCTION WLANSAP_GetStatistics
1400
1401 DESCRIPTION
1402 This api function provides for Ap App/HDD to get TL statistics for all stations of Soft AP.
1403
1404 DEPENDENCIES
1405 NA.
1406
1407 PARAMETERS
1408
1409 IN
1410 pvosGCtx: Pointer to vos global context structure
1411 bReset: If set TL statistics will be cleared after reading
1412 OUT
1413 statBuf: Buffer to get the statistics
1414
1415 RETURN VALUE
1416 The VOS_STATUS code associated with performing the operation
1417
1418 VOS_STATUS_SUCCESS: Success
1419
1420 SIDE EFFECTS
1421============================================================================*/
1422VOS_STATUS WLANSAP_GetStatistics(v_PVOID_t pvosGCtx, tSap_SoftapStats *statBuf, v_BOOL_t bReset);
1423
Jeff Johnson295189b2012-06-20 16:38:30 -07001424/*==========================================================================
1425
1426 FUNCTION WLANSAP_SendAction
1427
1428 DESCRIPTION
1429 This api function provides to send action frame sent by upper layer.
1430
1431 DEPENDENCIES
1432 NA.
1433
1434 PARAMETERS
1435
1436 IN
1437 pvosGCtx: Pointer to vos global context structure
1438 pBuf: Pointer of the action frame to be transmitted
1439 len: Length of the action frame
1440
1441 RETURN VALUE
1442 The VOS_STATUS code associated with performing the operation
1443
1444 VOS_STATUS_SUCCESS: Success
1445
1446 SIDE EFFECTS
1447============================================================================*/
1448VOS_STATUS WLANSAP_SendAction( v_PVOID_t pvosGCtx, const tANI_U8 *pBuf,
Jeff Johnsone7245742012-09-05 17:12:55 -07001449 tANI_U32 len, tANI_U16 wait );
Jeff Johnson295189b2012-06-20 16:38:30 -07001450
1451/*==========================================================================
1452
1453 FUNCTION WLANSAP_RemainOnChannel
1454
1455 DESCRIPTION
1456 This api function provides to set Remain On channel on specified channel
1457 for specified duration.
1458
1459 DEPENDENCIES
1460 NA.
1461
1462 PARAMETERS
1463
1464 IN
1465 pvosGCtx: Pointer to vos global context structure
1466 channel: Channel on which driver has to listen
1467 duration: Duration for which driver has to listen on specified channel
1468 callback: Callback function to be called once Listen is done.
1469 pContext: Context needs to be called in callback function.
1470
1471 RETURN VALUE
1472 The VOS_STATUS code associated with performing the operation
1473
1474 VOS_STATUS_SUCCESS: Success
1475
1476 SIDE EFFECTS
1477============================================================================*/
1478VOS_STATUS WLANSAP_RemainOnChannel( v_PVOID_t pvosGCtx,
1479 tANI_U8 channel, tANI_U32 duration,
1480 remainOnChanCallback callback,
1481 void *pContext );
1482
1483/*==========================================================================
1484
1485 FUNCTION WLANSAP_CancelRemainOnChannel
1486
1487 DESCRIPTION
1488 This api cancel previous remain on channel request.
1489
1490 DEPENDENCIES
1491 NA.
1492
1493 PARAMETERS
1494
1495 IN
1496 pvosGCtx: Pointer to vos global context structure
1497
1498 RETURN VALUE
1499 The VOS_STATUS code associated with performing the operation
1500
1501 VOS_STATUS_SUCCESS: Success
1502
1503 SIDE EFFECTS
1504============================================================================*/
1505VOS_STATUS WLANSAP_CancelRemainOnChannel( v_PVOID_t pvosGCtx );
1506
1507
1508/*==========================================================================
1509
1510 FUNCTION WLANSAP_RegisterMgmtFrame
1511
1512 DESCRIPTION
1513 HDD use this API to register specified type of frame with CORE stack.
1514 On receiving such kind of frame CORE stack should pass this frame to HDD
1515
1516 DEPENDENCIES
1517 NA.
1518
1519 PARAMETERS
1520
1521 IN
1522 pvosGCtx: Pointer to vos global context structure
1523 frameType: frameType that needs to be registered with PE.
1524 matchData: Data pointer which should be matched after frame type is matched.
1525 matchLen: Length of the matchData
1526
1527 RETURN VALUE
1528 The VOS_STATUS code associated with performing the operation
1529
1530 VOS_STATUS_SUCCESS: Success
1531
1532 SIDE EFFECTS
1533============================================================================*/
1534VOS_STATUS WLANSAP_RegisterMgmtFrame( v_PVOID_t pvosGCtx, tANI_U16 frameType,
1535 tANI_U8* matchData, tANI_U16 matchLen );
1536
1537/*==========================================================================
1538
1539 FUNCTION WLANSAP_DeRegisterMgmtFrame
1540
1541 DESCRIPTION
1542 This API is used to deregister previously registered frame.
1543
1544 DEPENDENCIES
1545 NA.
1546
1547 PARAMETERS
1548
1549 IN
1550 pvosGCtx: Pointer to vos global context structure
1551 frameType: frameType that needs to be De-registered with PE.
1552 matchData: Data pointer which should be matched after frame type is matched.
1553 matchLen: Length of the matchData
1554
1555 RETURN VALUE
1556 The VOS_STATUS code associated with performing the operation
1557
1558 VOS_STATUS_SUCCESS: Success
1559
1560 SIDE EFFECTS
1561============================================================================*/
1562VOS_STATUS WLANSAP_DeRegisterMgmtFrame( v_PVOID_t pvosGCtx, tANI_U16 frameType,
1563 tANI_U8* matchData, tANI_U16 matchLen );
Jeff Johnson295189b2012-06-20 16:38:30 -07001564
1565
1566#ifdef __cplusplus
1567 }
1568#endif
1569
1570
1571#endif /* #ifndef WLAN_QCT_WLANSAP_H */
1572