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