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