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