Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
bings | 394afdd | 2017-01-09 11:22:38 +0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -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. |
| 20 | */ |
| 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 | |
| 28 | #ifndef WLAN_QCT_WLANSAP_H |
| 29 | #define WLAN_QCT_WLANSAP_H |
| 30 | |
| 31 | /** |
| 32 | * W L A N S O F T A P P A L L A Y E R |
| 33 | * E X T E R N A L A P I |
| 34 | * |
| 35 | * DESCRIPTION |
| 36 | * This file contains the external API exposed by the wlan SAP PAL layer |
| 37 | * module. |
| 38 | */ |
| 39 | |
| 40 | /*---------------------------------------------------------------------------- |
| 41 | * Include Files |
| 42 | * -------------------------------------------------------------------------*/ |
| 43 | #include "cds_api.h" |
| 44 | #include "cds_packet.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 45 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 46 | |
| 47 | #include "p2p_api.h" |
| 48 | #include "sme_api.h" |
| 49 | /*---------------------------------------------------------------------------- |
| 50 | * Preprocessor Definitions and Constants |
| 51 | * -------------------------------------------------------------------------*/ |
| 52 | #ifdef __cplusplus |
| 53 | extern "C" { |
| 54 | #endif |
| 55 | |
| 56 | /*--------------------------------------------------------------------------- |
| 57 | * defines and enum |
| 58 | *--------------------------------------------------------------------------*/ |
| 59 | #define MAX_SSID_LEN 32 |
| 60 | #define MAX_ACL_MAC_ADDRESS 32 |
| 61 | #define AUTO_CHANNEL_SELECT 0 |
| 62 | #define MAX_ASSOC_IND_IE_LEN 255 |
| 63 | |
| 64 | /* defines for WPS config states */ |
| 65 | #define SAP_WPS_DISABLED 0 |
| 66 | #define SAP_WPS_ENABLED_UNCONFIGURED 1 |
| 67 | #define SAP_WPS_ENABLED_CONFIGURED 2 |
| 68 | #define MAX_NAME_SIZE 64 |
| 69 | #define MAX_TEXT_SIZE 32 |
| 70 | |
| 71 | #define MAX_CHANNEL_LIST_LEN 256 |
Anurag Chouhan | f04e84f | 2016-03-03 10:12:12 +0530 | [diff] [blame] | 72 | #define QDF_MAX_NO_OF_SAP_MODE 2 /* max # of SAP */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 73 | #define SAP_MAX_NUM_SESSION 5 |
| 74 | #define SAP_MAX_OBSS_STA_CNT 1 /* max # of OBSS STA */ |
| 75 | #define SAP_ACS_WEIGHT_MAX (4444) |
| 76 | |
| 77 | /*-------------------------------------------------------------------------- |
| 78 | * reasonCode taken from 802.11 standard. |
| 79 | * ------------------------------------------------------------------------*/ |
| 80 | |
| 81 | typedef enum { |
| 82 | eSAP_RC_RESERVED0, /*0 */ |
| 83 | eSAP_RC_UNSPECIFIED, /*1 */ |
| 84 | eSAP_RC_PREV_AUTH_INVALID, /*2 */ |
| 85 | eSAP_RC_STA_LEFT_DEAUTH, /*3 */ |
| 86 | eSAP_RC_INACTIVITY_DISASSOC, /*4 */ |
| 87 | eSAP_RC_AP_CAPACITY_FULL, /*5 */ |
| 88 | eSAP_RC_CLS2_FROM_NON_AUTH_STA, /*6 */ |
| 89 | eSAP_RC_CLS3_FROM_NON_AUTH_STA, /*7 */ |
| 90 | eSAP_RC_STA_LEFT_DISASSOC, /*8 */ |
| 91 | eSAP_RC_STA_NOT_AUTH, /*9 */ |
| 92 | eSAP_RC_PC_UNACCEPTABLE, /*10 */ |
| 93 | eSAP_RC_SC_UNACCEPTABLE, /*11 */ |
| 94 | eSAP_RC_RESERVED1, /*12 */ |
| 95 | eSAP_RC_INVALID_IE, /*13 */ |
| 96 | eSAP_RC_MIC_FAIL, /*14 */ |
| 97 | eSAP_RC_4_WAY_HANDSHAKE_TO, /*15 */ |
| 98 | eSAP_RC_GO_KEY_HANDSHAKE_TO, /*16 */ |
| 99 | eSAP_RC_IE_MISMATCH, /*17 */ |
| 100 | eSAP_RC_INVALID_GRP_CHIPHER, /*18 */ |
| 101 | eSAP_RC_INVALID_PAIR_CHIPHER, /*19 */ |
| 102 | eSAP_RC_INVALID_AKMP, /*20 */ |
| 103 | eSAP_RC_UNSUPPORTED_RSN, /*21 */ |
| 104 | eSAP_RC_INVALID_RSN, /*22 */ |
| 105 | eSAP_RC_1X_AUTH_FAILED, /*23 */ |
| 106 | eSAP_RC_CHIPER_SUITE_REJECTED, /*24 */ |
| 107 | } eSapReasonCode; |
| 108 | |
| 109 | typedef enum { |
| 110 | eSAP_ACCEPT_UNLESS_DENIED = 0, |
| 111 | eSAP_DENY_UNLESS_ACCEPTED = 1, |
| 112 | /* this type is added to support accept & deny list at the same time */ |
| 113 | eSAP_SUPPORT_ACCEPT_AND_DENY = 2, |
| 114 | /*In this mode all MAC addresses are allowed to connect */ |
| 115 | eSAP_ALLOW_ALL = 3, |
| 116 | } eSapMacAddrACL; |
| 117 | |
| 118 | typedef enum { |
| 119 | eSAP_BLACK_LIST = 0, /* List of mac addresses NOT allowed to assoc */ |
| 120 | eSAP_WHITE_LIST = 1, /* List of mac addresses allowed to assoc */ |
| 121 | } eSapACLType; |
| 122 | |
| 123 | typedef enum { |
| 124 | ADD_STA_TO_ACL = 0, /* cmd to add STA to access control list */ |
| 125 | DELETE_STA_FROM_ACL = 1, /* cmd to del STA from access control list */ |
| 126 | } eSapACLCmdType; |
| 127 | |
| 128 | typedef enum { |
| 129 | eSAP_START_BSS_EVENT = 0, /* Event sent when BSS is started */ |
| 130 | eSAP_STOP_BSS_EVENT, /* Event sent when BSS is stopped */ |
| 131 | eSAP_STA_ASSOC_IND, /* Indicate assoc req to upper layers */ |
| 132 | /* |
| 133 | * Event sent when we have successfully associated a station and |
| 134 | * upper layer neeeds to allocate a context |
| 135 | */ |
| 136 | eSAP_STA_ASSOC_EVENT, |
| 137 | /* |
| 138 | * Event sent when we have successfully reassociated a station and |
| 139 | * upper layer neeeds to allocate a context |
| 140 | */ |
| 141 | eSAP_STA_REASSOC_EVENT, |
| 142 | /* |
| 143 | * Event sent when associated a station has disassociated as a |
| 144 | * result of various conditions |
| 145 | */ |
| 146 | eSAP_STA_DISASSOC_EVENT, |
| 147 | /* Event sent when user called wlansap_set_key_sta */ |
| 148 | eSAP_STA_SET_KEY_EVENT, |
| 149 | /* Event sent whenever there is MIC failure detected */ |
| 150 | eSAP_STA_MIC_FAILURE_EVENT, |
| 151 | /* Event sent when user called wlansap_get_assoc_stations */ |
| 152 | eSAP_ASSOC_STA_CALLBACK_EVENT, |
| 153 | /* Event send when user call wlansap_get_wps_session_overlap */ |
| 154 | eSAP_GET_WPSPBC_SESSION_EVENT, |
| 155 | /* Event send on WPS PBC probe request is received */ |
| 156 | eSAP_WPS_PBC_PROBE_REQ_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 157 | eSAP_REMAIN_CHAN_READY, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 158 | eSAP_DISCONNECT_ALL_P2P_CLIENT, |
| 159 | eSAP_MAC_TRIG_STOP_BSS_EVENT, |
| 160 | /* |
| 161 | * Event send when a STA in neither white list or black list tries to |
| 162 | * associate in softap mode |
| 163 | */ |
| 164 | eSAP_UNKNOWN_STA_JOIN, |
| 165 | /* Event send when a new STA is rejected association since softAP |
| 166 | * max assoc limit has reached |
| 167 | */ |
| 168 | eSAP_MAX_ASSOC_EXCEEDED, |
| 169 | eSAP_CHANNEL_CHANGE_EVENT, |
| 170 | eSAP_DFS_CAC_START, |
| 171 | eSAP_DFS_CAC_INTERRUPTED, |
| 172 | eSAP_DFS_CAC_END, |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 173 | eSAP_DFS_PRE_CAC_END, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | eSAP_DFS_RADAR_DETECT, |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 175 | eSAP_DFS_RADAR_DETECT_DURING_PRE_CAC, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 176 | /* Event sent when user need to get the DFS NOL from CNSS */ |
| 177 | eSAP_DFS_NOL_GET, |
| 178 | /* Event sent when user need to set the DFS NOL to CNSS */ |
| 179 | eSAP_DFS_NOL_SET, |
| 180 | /* No ch available after DFS RADAR detect */ |
| 181 | eSAP_DFS_NO_AVAILABLE_CHANNEL, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 182 | eSAP_ACS_SCAN_SUCCESS_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 183 | eSAP_ACS_CHANNEL_SELECTED, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 184 | eSAP_ECSA_CHANGE_CHAN_IND, |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 185 | eSAP_DFS_NEXT_CHANNEL_REQ, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 186 | } eSapHddEvent; |
| 187 | |
| 188 | typedef enum { |
| 189 | eSAP_OPEN_SYSTEM, |
| 190 | eSAP_SHARED_KEY, |
| 191 | eSAP_AUTO_SWITCH |
| 192 | } eSapAuthType; |
| 193 | |
| 194 | typedef enum { |
| 195 | /* Disassociation was internally initated from CORE stack */ |
| 196 | eSAP_MAC_INITATED_DISASSOC = 0x10000, |
| 197 | /* |
| 198 | * Disassociation was internally initated from host by |
| 199 | * invoking wlansap_disassoc_sta call |
| 200 | */ |
| 201 | eSAP_USR_INITATED_DISASSOC |
| 202 | } eSapDisassocReason; |
| 203 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 204 | typedef enum { |
| 205 | eSAP_DFS_NOL_CLEAR, |
| 206 | eSAP_DFS_NOL_RANDOMIZE, |
| 207 | } eSapDfsNolType; |
| 208 | |
| 209 | /*--------------------------------------------------------------------------- |
| 210 | SAP PAL "status" and "reason" error code defines |
| 211 | ---------------------------------------------------------------------------*/ |
| 212 | typedef enum { |
| 213 | eSAP_STATUS_SUCCESS, /* Success. */ |
| 214 | eSAP_STATUS_FAILURE, /* General Failure. */ |
| 215 | /* Channel not selected during intial scan. */ |
| 216 | eSAP_START_BSS_CHANNEL_NOT_SELECTED, |
| 217 | eSAP_ERROR_MAC_START_FAIL, /* Failed to start Infra BSS */ |
| 218 | } eSapStatus; |
| 219 | |
| 220 | /*--------------------------------------------------------------------------- |
| 221 | SAP PAL "status" and "reason" error code defines |
| 222 | ---------------------------------------------------------------------------*/ |
| 223 | typedef enum { |
| 224 | eSAP_WPSPBC_OVERLAP_IN120S, /* Overlap */ |
| 225 | /* no WPS probe request in 120 second */ |
| 226 | eSAP_WPSPBC_NO_WPSPBC_PROBE_REQ_IN120S, |
| 227 | /* One WPS probe request in 120 second */ |
| 228 | eSAP_WPSPBC_ONE_WPSPBC_PROBE_REQ_IN120S, |
| 229 | } eWPSPBCOverlap; |
| 230 | |
Rachit Kankane | 2487f8f | 2017-04-19 14:30:19 +0530 | [diff] [blame] | 231 | /*--------------------------------------------------------------------------- |
| 232 | SAP Associated station types |
| 233 | ---------------------------------------------------------------------------*/ |
| 234 | typedef enum { |
| 235 | eSTA_TYPE_NONE = 0x00000000, /* No station type */ |
| 236 | eSTA_TYPE_INFRA = 0x00000001, /* legacy station */ |
| 237 | eSTA_TYPE_P2P_CLI = 0x00000002, /* p2p client */ |
| 238 | } eStationType; |
| 239 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 240 | /*---------------------------------------------------------------------------- |
| 241 | * Typedefs |
| 242 | * -------------------------------------------------------------------------*/ |
| 243 | typedef struct sap_StartBssCompleteEvent_s { |
| 244 | uint8_t status; |
| 245 | uint8_t operatingChannel; |
| 246 | uint16_t staId; /* self StaID */ |
| 247 | uint8_t sessionId; /* SoftAP SME session ID */ |
| 248 | } tSap_StartBssCompleteEvent; |
| 249 | |
| 250 | typedef struct sap_StopBssCompleteEvent_s { |
| 251 | uint8_t status; |
| 252 | } tSap_StopBssCompleteEvent; |
| 253 | |
| 254 | typedef struct sap_StationAssocIndication_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 255 | struct qdf_mac_addr staMac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 256 | uint8_t assoId; |
| 257 | uint8_t staId; |
| 258 | uint8_t status; |
| 259 | /* Required for indicating the frames to upper layer */ |
| 260 | uint32_t beaconLength; |
| 261 | uint8_t *beaconPtr; |
| 262 | uint32_t assocReqLength; |
| 263 | uint8_t *assocReqPtr; |
| 264 | bool fWmmEnabled; |
| 265 | eCsrAuthType negotiatedAuthType; |
| 266 | eCsrEncryptionType negotiatedUCEncryptionType; |
| 267 | eCsrEncryptionType negotiatedMCEncryptionType; |
| 268 | bool fAuthRequired; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 269 | uint8_t ecsa_capable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 270 | } tSap_StationAssocIndication; |
| 271 | |
| 272 | typedef struct sap_StationAssocReassocCompleteEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 273 | struct qdf_mac_addr staMac; |
Rachit Kankane | 2487f8f | 2017-04-19 14:30:19 +0530 | [diff] [blame] | 274 | eStationType staType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 275 | uint8_t staId; |
| 276 | uint8_t status; |
| 277 | uint8_t ies[MAX_ASSOC_IND_IE_LEN]; |
| 278 | uint16_t iesLen; |
| 279 | uint32_t statusCode; |
| 280 | eSapAuthType SapAuthType; |
| 281 | bool wmmEnabled; |
| 282 | /* Required for indicating the frames to upper layer */ |
| 283 | uint32_t beaconLength; |
| 284 | uint8_t *beaconPtr; |
| 285 | uint32_t assocReqLength; |
| 286 | uint8_t *assocReqPtr; |
| 287 | uint32_t assocRespLength; |
| 288 | uint8_t *assocRespPtr; |
| 289 | uint8_t timingMeasCap; |
| 290 | tSirSmeChanInfo chan_info; |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 291 | bool ampdu; |
| 292 | bool sgi_enable; |
| 293 | bool tx_stbc; |
| 294 | bool rx_stbc; |
| 295 | tSirMacHTChannelWidth ch_width; |
| 296 | enum sir_sme_phy_mode mode; |
| 297 | uint8_t max_supp_idx; |
| 298 | uint8_t max_ext_idx; |
| 299 | uint8_t max_mcs_idx; |
| 300 | uint8_t rx_mcs_map; |
| 301 | uint8_t tx_mcs_map; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 302 | uint8_t ecsa_capable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 303 | } tSap_StationAssocReassocCompleteEvent; |
| 304 | |
| 305 | typedef struct sap_StationDisassocCompleteEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 306 | struct qdf_mac_addr staMac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 307 | uint8_t staId; /* STAID should not be used */ |
| 308 | uint8_t status; |
| 309 | uint32_t statusCode; |
| 310 | eSapDisassocReason reason; |
| 311 | } tSap_StationDisassocCompleteEvent; |
| 312 | |
| 313 | typedef struct sap_StationSetKeyCompleteEvent_s { |
| 314 | uint8_t status; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 315 | struct qdf_mac_addr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | } tSap_StationSetKeyCompleteEvent; |
| 317 | |
| 318 | /*struct corresponding to SAP_STA_MIC_FAILURE_EVENT */ |
| 319 | typedef struct sap_StationMICFailureEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 320 | struct qdf_mac_addr srcMacAddr; /* address used to compute MIC */ |
| 321 | struct qdf_mac_addr staMac; /* taMacAddr transmitter address */ |
| 322 | struct qdf_mac_addr dstMacAddr; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 323 | bool multicast; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 324 | uint8_t IV1; /* first byte of IV */ |
| 325 | uint8_t keyId; /* second byte of IV */ |
| 326 | uint8_t TSC[SIR_CIPHER_SEQ_CTR_SIZE]; /* sequence number */ |
| 327 | |
| 328 | } tSap_StationMICFailureEvent; |
| 329 | /*Structure to return MAC address of associated stations */ |
| 330 | typedef struct sap_AssocMacAddr_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 331 | struct qdf_mac_addr staMac; /* Associated station's MAC address */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 332 | uint8_t assocId; /* Associated station's Association ID */ |
| 333 | uint8_t staId; /* Allocated station Id */ |
| 334 | uint8_t ShortGI40Mhz; |
| 335 | uint8_t ShortGI20Mhz; |
| 336 | uint8_t Support40Mhz; |
| 337 | uint32_t requestedMCRate; |
| 338 | tSirSupportedRates supportedRates; |
| 339 | } tSap_AssocMacAddr, *tpSap_AssocMacAddr; |
| 340 | |
| 341 | /*struct corresponding to SAP_ASSOC_STA_CALLBACK_EVENT */ |
| 342 | typedef struct sap_AssocStaListEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 343 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 344 | /* module id that was passed in wlansap_get_assoc_stations API */ |
| 345 | uint8_t noOfAssocSta; /* Number of associated stations */ |
| 346 | tpSap_AssocMacAddr pAssocStas; |
| 347 | /* |
| 348 | * Pointer to pre allocated memory to obtain list of |
| 349 | * associated stations passed in wlansap_get_assoc_stations API |
| 350 | */ |
| 351 | } tSap_AssocStaListEvent; |
| 352 | |
| 353 | typedef struct sap_GetWPSPBCSessionEvent_s { |
| 354 | uint8_t status; |
| 355 | /* module id that was passed in wlansap_get_assoc_stations API */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 356 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 357 | uint8_t UUID_E[16]; /* Unique identifier of the AP. */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 358 | struct qdf_mac_addr addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 359 | eWPSPBCOverlap wpsPBCOverlap; |
| 360 | } tSap_GetWPSPBCSessionEvent; |
| 361 | |
| 362 | typedef struct sap_WPSPBCProbeReqEvent_s { |
| 363 | uint8_t status; |
| 364 | /* module id that was passed in wlansap_get_assoc_stations API */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 365 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 366 | tSirWPSPBCProbeReq WPSPBCProbeReq; |
| 367 | } tSap_WPSPBCProbeReqEvent; |
| 368 | |
| 369 | typedef struct sap_ManagementFrameInfo_s { |
| 370 | uint32_t nFrameLength; |
| 371 | uint8_t frameType; |
| 372 | uint32_t rxChan; /* Channel of where packet is received */ |
| 373 | /* |
| 374 | * Point to a buffer contain the beacon, assoc req, assoc rsp frame, |
| 375 | * in that order user needs to use nBeaconLength, nAssocReqLength, |
| 376 | * nAssocRspLength to desice where each frame starts and ends. |
| 377 | */ |
| 378 | uint8_t *pbFrames; |
| 379 | } tSap_ManagementFrameInfo; |
| 380 | |
| 381 | typedef struct sap_SendActionCnf_s { |
| 382 | eSapStatus actionSendSuccess; |
| 383 | } tSap_SendActionCnf; |
| 384 | |
| 385 | typedef struct sap_UnknownSTAJoinEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 386 | struct qdf_mac_addr macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | } tSap_UnknownSTAJoinEvent; |
| 388 | |
| 389 | typedef struct sap_MaxAssocExceededEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 390 | struct qdf_mac_addr macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 391 | } tSap_MaxAssocExceededEvent; |
| 392 | |
| 393 | typedef struct sap_DfsNolInfo_s { |
| 394 | uint16_t sDfsList; /* size of pDfsList in byte */ |
| 395 | void *pDfsList; /* pointer to pDfsList buffer */ |
| 396 | } tSap_DfsNolInfo; |
| 397 | |
| 398 | /** |
| 399 | * sap_acs_ch_selected_s - the structure to hold the selected channels |
| 400 | * @pri_channel: Holds the ACS selected primary channel |
| 401 | * @sec_channel: Holds the ACS selected secondary channel |
| 402 | * |
| 403 | * Holds the primary and secondary channel selected by ACS and is |
| 404 | * used to send it to the HDD. |
| 405 | */ |
| 406 | struct sap_ch_selected_s { |
| 407 | uint16_t pri_ch; |
| 408 | uint16_t ht_sec_ch; |
| 409 | uint16_t vht_seg0_center_ch; |
| 410 | uint16_t vht_seg1_center_ch; |
| 411 | uint16_t ch_width; |
| 412 | }; |
| 413 | |
| 414 | /** |
| 415 | * sap_roc_ready_ind_s - the structure to hold the scan id |
| 416 | * @scan_id: scan identifier |
| 417 | * |
| 418 | * Holds scan identifier |
| 419 | */ |
| 420 | struct sap_roc_ready_ind_s { |
| 421 | uint32_t scan_id; |
| 422 | }; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 423 | |
| 424 | /** |
Liangwei Dong | aef8434 | 2016-10-21 05:28:00 -0400 | [diff] [blame] | 425 | * struct sap_acs_scan_complete_event - acs scan complete event |
| 426 | * @status: status of acs scan |
| 427 | * @channellist: acs scan channels |
| 428 | * @num_of_channels: number of channels |
| 429 | */ |
| 430 | struct sap_acs_scan_complete_event{ |
| 431 | uint8_t status; |
| 432 | uint8_t *channellist; |
| 433 | uint8_t num_of_channels; |
| 434 | }; |
| 435 | |
| 436 | /** |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 437 | * struct sap_ch_change_ind - channel change indication |
| 438 | * @new_chan: channel to change |
| 439 | */ |
| 440 | struct sap_ch_change_ind { |
| 441 | uint16_t new_chan; |
| 442 | }; |
| 443 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 444 | /* |
| 445 | * This struct will be filled in and passed to tpWLAN_SAPEventCB that is |
| 446 | * provided during wlansap_start_bss call The event id corresponding to |
| 447 | * structure in the union is defined in comment next to the structure |
| 448 | */ |
| 449 | |
| 450 | typedef struct sap_Event_s { |
| 451 | eSapHddEvent sapHddEventCode; |
| 452 | union { |
| 453 | /*SAP_START_BSS_EVENT */ |
| 454 | tSap_StartBssCompleteEvent sapStartBssCompleteEvent; |
| 455 | /*SAP_STOP_BSS_EVENT */ |
| 456 | tSap_StopBssCompleteEvent sapStopBssCompleteEvent; |
| 457 | /*SAP_ASSOC_INDICATION */ |
| 458 | tSap_StationAssocIndication sapAssocIndication; |
| 459 | /*SAP_STA_ASSOC_EVENT, SAP_STA_REASSOC_EVENT */ |
| 460 | tSap_StationAssocReassocCompleteEvent |
| 461 | sapStationAssocReassocCompleteEvent; |
| 462 | /*SAP_STA_DISASSOC_EVENT */ |
| 463 | tSap_StationDisassocCompleteEvent |
| 464 | sapStationDisassocCompleteEvent; |
| 465 | /*SAP_STA_SET_KEY_EVENT */ |
| 466 | tSap_StationSetKeyCompleteEvent sapStationSetKeyCompleteEvent; |
| 467 | /*SAP_STA_MIC_FAILURE_EVENT */ |
| 468 | tSap_StationMICFailureEvent sapStationMICFailureEvent; |
| 469 | /*SAP_ASSOC_STA_CALLBACK_EVENT */ |
| 470 | tSap_AssocStaListEvent sapAssocStaListEvent; |
| 471 | /*SAP_GET_WPSPBC_SESSION_EVENT */ |
| 472 | tSap_GetWPSPBCSessionEvent sapGetWPSPBCSessionEvent; |
| 473 | /*eSAP_WPS_PBC_PROBE_REQ_EVENT */ |
| 474 | tSap_WPSPBCProbeReqEvent sapPBCProbeReqEvent; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 475 | tSap_SendActionCnf sapActionCnf; |
| 476 | /* eSAP_UNKNOWN_STA_JOIN */ |
| 477 | tSap_UnknownSTAJoinEvent sapUnknownSTAJoin; |
| 478 | /* eSAP_MAX_ASSOC_EXCEEDED */ |
| 479 | tSap_MaxAssocExceededEvent sapMaxAssocExceeded; |
| 480 | /*eSAP_DFS_NOL_XXX */ |
| 481 | tSap_DfsNolInfo sapDfsNolInfo; |
| 482 | struct sap_ch_selected_s sap_ch_selected; |
| 483 | struct sap_roc_ready_ind_s sap_roc_ind; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 484 | struct sap_ch_change_ind sap_chan_cng_ind; |
Liangwei Dong | aef8434 | 2016-10-21 05:28:00 -0400 | [diff] [blame] | 485 | struct sap_acs_scan_complete_event sap_acs_scan_comp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 486 | } sapevt; |
| 487 | } tSap_Event, *tpSap_Event; |
| 488 | |
| 489 | typedef struct sap_SSID { |
| 490 | uint8_t length; |
| 491 | uint8_t ssId[MAX_SSID_LEN]; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 492 | } qdf_packed tSap_SSID_t; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 493 | |
| 494 | typedef struct sap_SSIDInfo { |
| 495 | tSap_SSID_t ssid; /* SSID of the AP */ |
| 496 | /* SSID should/shouldn't be bcast in probe RSP & beacon */ |
| 497 | uint8_t ssidHidden; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 498 | } qdf_packed tSap_SSIDInfo_t; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 499 | |
| 500 | struct sap_acs_cfg { |
| 501 | /* ACS Algo Input */ |
| 502 | uint8_t acs_mode; |
| 503 | uint32_t hw_mode; |
| 504 | uint8_t start_ch; |
| 505 | uint8_t end_ch; |
| 506 | uint8_t *ch_list; |
| 507 | uint8_t ch_list_count; |
| 508 | #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE |
| 509 | uint8_t skip_scan_status; |
| 510 | uint8_t skip_scan_range1_stch; |
| 511 | uint8_t skip_scan_range1_endch; |
| 512 | uint8_t skip_scan_range2_stch; |
| 513 | uint8_t skip_scan_range2_endch; |
| 514 | #endif |
| 515 | |
| 516 | uint16_t ch_width; |
Tushnim Bhattacharyya | 0105770 | 2016-10-26 15:14:35 -0700 | [diff] [blame] | 517 | uint8_t pcl_channels[QDF_MAX_NUM_CHAN]; |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 518 | uint8_t pcl_channels_weight_list[QDF_MAX_NUM_CHAN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | uint32_t pcl_ch_count; |
Kapil Gupta | 086c620 | 2016-12-11 18:17:06 +0530 | [diff] [blame] | 520 | uint8_t is_ht_enabled; |
| 521 | uint8_t is_vht_enabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 522 | /* ACS Algo Output */ |
| 523 | uint8_t pri_ch; |
| 524 | uint8_t ht_sec_ch; |
| 525 | uint8_t vht_seg0_center_ch; |
| 526 | uint8_t vht_seg1_center_ch; |
Kapil Gupta | c1224bf | 2017-06-22 21:22:40 +0530 | [diff] [blame] | 527 | uint32_t band; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 528 | }; |
| 529 | |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 530 | /* |
| 531 | * enum vendor_ie_access_policy- access policy |
| 532 | * @ACCESS_POLICY_NONE: access policy attribute is not valid |
| 533 | * @ACCESS_POLICY_RESPOND_IF_IE_IS_PRESENT: respond to probe req/assoc req |
| 534 | * only if ie is present |
| 535 | * @ACCESS_POLICY_DONOT_RESPOND_IF_IE_IS_PRESENT: do not respond to probe req/ |
| 536 | * assoc req if ie is present |
| 537 | */ |
| 538 | enum vendor_ie_access_policy { |
| 539 | ACCESS_POLICY_NONE, |
| 540 | ACCESS_POLICY_RESPOND_IF_IE_IS_PRESENT, |
| 541 | ACCESS_POLICY_DONOT_RESPOND_IF_IE_IS_PRESENT, |
| 542 | }; |
| 543 | |
Agrawal Ashish | 6563461 | 2016-08-18 13:24:32 +0530 | [diff] [blame] | 544 | /* |
| 545 | * enum sap_acs_dfs_mode- state of DFS mode |
| 546 | * @ACS_DFS_MODE_NONE: DFS mode attribute is not valid |
| 547 | * @ACS_DFS_MODE_ENABLE: DFS mode is enabled |
| 548 | * @ACS_DFS_MODE_DISABLE: DFS mode is disabled |
| 549 | * @ACS_DFS_MODE_DEPRIORITIZE: Deprioritize DFS channels in scanning |
| 550 | */ |
| 551 | enum sap_acs_dfs_mode { |
| 552 | ACS_DFS_MODE_NONE, |
| 553 | ACS_DFS_MODE_ENABLE, |
| 554 | ACS_DFS_MODE_DISABLE, |
| 555 | ACS_DFS_MODE_DEPRIORITIZE |
| 556 | }; |
| 557 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 558 | typedef struct sap_Config { |
| 559 | tSap_SSIDInfo_t SSIDinfo; |
| 560 | eCsrPhyMode SapHw_mode; /* Wireless Mode */ |
| 561 | eSapMacAddrACL SapMacaddr_acl; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 562 | struct qdf_mac_addr accept_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 563 | bool ieee80211d; /* Specify if 11D is enabled or disabled */ |
| 564 | bool protEnabled; /* Specify if protection is enabled or disabled */ |
| 565 | /* Specify if OBSS protection is enabled or disabled */ |
| 566 | bool obssProtEnabled; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 567 | struct qdf_mac_addr deny_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */ |
| 568 | struct qdf_mac_addr self_macaddr; /* self macaddress or BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 569 | uint8_t channel; /* Operation channel */ |
| 570 | uint8_t sec_ch; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 571 | struct ch_params ch_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 572 | uint32_t ch_width_orig; |
| 573 | uint8_t max_num_sta; /* maximum number of STAs in station table */ |
| 574 | uint8_t dtim_period; /* dtim interval */ |
| 575 | uint8_t num_accept_mac; |
| 576 | uint8_t num_deny_mac; |
| 577 | /* Max ie length 255 * 2(WPA+RSN) + 2 bytes(vendor specific ID) * 2 */ |
| 578 | uint8_t RSNWPAReqIE[(SIR_MAC_MAX_IE_LENGTH * 2) + 4]; |
| 579 | /* it is ignored if [0] is 0. */ |
| 580 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; |
| 581 | uint8_t RSNAuthType; |
| 582 | uint8_t RSNEncryptType; |
| 583 | uint8_t mcRSNEncryptType; |
| 584 | eSapAuthType authType; |
| 585 | bool privacy; |
| 586 | bool UapsdEnable; |
| 587 | bool fwdWPSPBCProbeReq; |
| 588 | /* 0 - disabled, 1 - not configured , 2 - configured */ |
| 589 | uint8_t wps_state; |
| 590 | uint16_t ht_capab; |
| 591 | uint16_t RSNWPAReqIELength; /* The byte count in the pWPAReqIE */ |
| 592 | uint32_t beacon_int; /* Beacon Interval */ |
| 593 | uint32_t ap_table_max_size; |
| 594 | uint32_t ap_table_expiration_time; |
| 595 | uint32_t ht_op_mode_fixed; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 596 | enum tQDF_ADAPTER_MODE persona; /* Tells us which persona, GO or AP */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 597 | uint8_t disableDFSChSwitch; |
| 598 | bool enOverLapCh; |
| 599 | #ifdef WLAN_FEATURE_11W |
| 600 | bool mfpRequired; |
| 601 | bool mfpCapable; |
| 602 | #endif |
| 603 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 604 | uint8_t cc_switch_mode; |
| 605 | #endif |
| 606 | struct sap_acs_cfg acs_cfg; |
| 607 | uint16_t probeRespIEsBufferLen; |
| 608 | /* buffer for addn ies comes from hostapd */ |
| 609 | void *pProbeRespIEsBuffer; |
| 610 | uint16_t assocRespIEsLen; |
| 611 | /* buffer for addn ies comes from hostapd */ |
| 612 | void *pAssocRespIEsBuffer; |
| 613 | uint16_t probeRespBcnIEsLen; |
| 614 | /* buffer for addn ies comes from hostapd */ |
| 615 | void *pProbeRespBcnIEsBuffer; |
| 616 | uint8_t sap_dot11mc; /* Specify if 11MC is enabled or disabled*/ |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 617 | uint8_t beacon_tx_rate; |
| 618 | uint8_t *vendor_ie; |
| 619 | enum vendor_ie_access_policy vendor_ie_access_policy; |
| 620 | uint16_t sta_inactivity_timeout; |
| 621 | uint16_t tx_pkt_fail_cnt_threshold; |
| 622 | uint8_t short_retry_limit; |
| 623 | uint8_t long_retry_limit; |
| 624 | uint8_t ampdu_size; |
Agrawal Ashish | 06e76d2 | 2016-08-18 16:44:48 +0530 | [diff] [blame] | 625 | tSirMacRateSet supported_rates; |
| 626 | tSirMacRateSet extended_rates; |
Agrawal Ashish | 6563461 | 2016-08-18 13:24:32 +0530 | [diff] [blame] | 627 | enum sap_acs_dfs_mode acs_dfs_mode; |
Kapil Gupta | 086c620 | 2016-12-11 18:17:06 +0530 | [diff] [blame] | 628 | struct hdd_channel_info *channel_info; |
Jayachandran Sreekumaran | 68c952c | 2017-04-24 12:42:03 +0530 | [diff] [blame] | 629 | uint32_t channel_info_count; |
Arif Hussain | 759a023 | 2017-03-20 13:17:18 -0700 | [diff] [blame] | 630 | bool dfs_cac_offload; |
gaolez | e2920bd | 2017-03-21 17:38:42 +0800 | [diff] [blame] | 631 | /* beacon count before channel switch */ |
| 632 | uint8_t sap_chanswitch_beacon_cnt; |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame^] | 633 | uint8_t sap_chanswitch_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 634 | } tsap_Config_t; |
| 635 | |
| 636 | #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE |
| 637 | typedef enum { |
| 638 | eSAP_DO_NEW_ACS_SCAN, |
| 639 | eSAP_DO_PAR_ACS_SCAN, |
| 640 | eSAP_SKIP_ACS_SCAN |
| 641 | } tSap_skip_acs_scan; |
| 642 | #endif |
| 643 | |
| 644 | typedef enum { |
| 645 | eSAP_WPS_PROBE_RSP_IE, |
| 646 | eSAP_WPS_BEACON_IE, |
| 647 | eSAP_WPS_ASSOC_RSP_IE |
| 648 | } eSapWPSIE_CODE; |
| 649 | |
| 650 | typedef struct sSapName { |
| 651 | uint8_t num_name; |
| 652 | uint8_t name[MAX_NAME_SIZE]; |
| 653 | } tSapName; |
| 654 | |
| 655 | typedef struct sSapText { |
| 656 | uint8_t num_text; |
| 657 | uint8_t text[MAX_TEXT_SIZE]; |
| 658 | } tSapText; |
| 659 | |
| 660 | typedef enum { |
| 661 | eSAP_DFS_DO_NOT_SKIP_CAC, |
| 662 | eSAP_DFS_SKIP_CAC |
| 663 | } eSapDfsCACState_t; |
| 664 | |
| 665 | typedef enum { |
| 666 | eSAP_DFS_CHANNEL_USABLE, |
| 667 | eSAP_DFS_CHANNEL_AVAILABLE, |
| 668 | eSAP_DFS_CHANNEL_UNAVAILABLE |
| 669 | } eSapDfsChanStatus_t; |
| 670 | |
| 671 | typedef struct sSapDfsNolInfo { |
| 672 | uint8_t dfs_channel_number; |
| 673 | eSapDfsChanStatus_t radar_status_flag; |
| 674 | uint64_t radar_found_timestamp; |
| 675 | } tSapDfsNolInfo; |
| 676 | |
| 677 | typedef struct sSapDfsInfo { |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 678 | qdf_mc_timer_t sap_dfs_cac_timer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 679 | uint8_t sap_radar_found_status; |
| 680 | /* |
| 681 | * New channel to move to when a Radar is |
| 682 | * detected on current Channel |
| 683 | */ |
| 684 | uint8_t target_channel; |
| 685 | uint8_t last_radar_found_channel; |
| 686 | uint8_t ignore_cac; |
| 687 | eSapDfsCACState_t cac_state; |
| 688 | uint8_t user_provided_target_channel; |
| 689 | |
| 690 | /* |
| 691 | * Requests for Channel Switch Announcement IE |
| 692 | * generation and transmission |
| 693 | */ |
| 694 | uint8_t csaIERequired; |
| 695 | uint8_t numCurrentRegDomainDfsChannels; |
| 696 | tSapDfsNolInfo sapDfsChannelNolList[NUM_5GHZ_CHANNELS]; |
| 697 | uint8_t is_dfs_cac_timer_running; |
| 698 | /* |
| 699 | * New channel width and new channel bonding mode |
| 700 | * will only be updated via channel fallback mechanism |
| 701 | */ |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 702 | enum phy_ch_width orig_chanWidth; |
| 703 | enum phy_ch_width new_chanWidth; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 704 | struct ch_params new_ch_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 705 | |
| 706 | /* |
| 707 | * INI param to enable/disable SAP W53 |
| 708 | * channel operation. |
| 709 | */ |
| 710 | uint8_t is_dfs_w53_disabled; |
| 711 | |
| 712 | /* |
| 713 | * sap_operating_channel_location holds SAP indoor, |
| 714 | * outdoor location information. Currently, if this |
| 715 | * param is set this Indoor/outdoor channel interop |
| 716 | * restriction will only be implemented for JAPAN |
| 717 | * regulatory domain. |
| 718 | * |
| 719 | * 0 - Indicates that location unknown |
| 720 | * (or) SAP Indoor/outdoor interop is allowed |
| 721 | * |
| 722 | * 1 - Indicates device is operating on Indoor channels |
| 723 | * and SAP cannot pick next random channel from outdoor |
| 724 | * list of channels when a radar is found on current operating |
| 725 | * DFS channel. |
| 726 | * |
| 727 | * 2 - Indicates device is operating on Outdoor Channels |
| 728 | * and SAP cannot pick next random channel from indoor |
| 729 | * list of channels when a radar is found on current |
| 730 | * operating DFS channel. |
| 731 | */ |
| 732 | uint8_t sap_operating_chan_preferred_location; |
| 733 | |
| 734 | /* |
| 735 | * Flag to indicate if DFS test mode is enabled and |
| 736 | * channel switch is disabled. |
| 737 | */ |
| 738 | uint8_t disable_dfs_ch_switch; |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 739 | uint16_t tx_leakage_threshold; |
gaolez | e2920bd | 2017-03-21 17:38:42 +0800 | [diff] [blame] | 740 | /* beacon count before channel switch */ |
| 741 | uint8_t sap_ch_switch_beacon_cnt; |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame^] | 742 | uint8_t sap_ch_switch_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 743 | } tSapDfsInfo; |
| 744 | |
| 745 | typedef struct tagSapCtxList { |
| 746 | uint8_t sessionID; |
| 747 | void *pSapContext; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 748 | enum tQDF_ADAPTER_MODE sapPersona; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 749 | } tSapCtxList, tpSapCtxList; |
| 750 | |
| 751 | typedef struct tagSapStruct { |
| 752 | /* Information Required for SAP DFS Master mode */ |
| 753 | tSapDfsInfo SapDfsInfo; |
| 754 | tSapCtxList sapCtxList[SAP_MAX_NUM_SESSION]; |
| 755 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 756 | bool sap_channel_avoidance; |
| 757 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 758 | bool enable_dfs_phy_error_logs; |
| 759 | } tSapStruct, *tpSapStruct; |
| 760 | |
| 761 | #define WPS_PROBRSP_VER_PRESENT 0x00000001 |
| 762 | #define WPS_PROBRSP_STATE_PRESENT 0x00000002 |
| 763 | #define WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004 |
| 764 | #define WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008 |
| 765 | #define WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010 |
| 766 | #define WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 |
| 767 | #define WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040 |
| 768 | #define WPS_PROBRSP_UUIDE_PRESENT 0x00000080 |
| 769 | #define WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100 |
| 770 | #define WPS_PROBRSP_MODELNAME_PRESENT 0x00000200 |
| 771 | #define WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400 |
| 772 | #define WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800 |
| 773 | #define WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000 |
| 774 | #define WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000 |
| 775 | #define WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000 |
| 776 | #define WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000 |
| 777 | |
| 778 | typedef struct sap_WPSProbeRspIE_s { |
| 779 | uint32_t FieldPresent; |
| 780 | uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ |
| 781 | uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ |
| 782 | bool APSetupLocked; /* Must be included if value is true */ |
| 783 | /* indicates if user has recently activated a reg to add an Enrollee. */ |
| 784 | bool SelectedRegistra; |
| 785 | uint16_t DevicePasswordID; /* Device Password ID */ |
| 786 | /* Selected Registrar config method */ |
| 787 | uint16_t SelectedRegistraCfgMethod; |
| 788 | uint8_t ResponseType; /* Response type */ |
| 789 | uint8_t UUID_E[16]; /* Unique identifier of the AP. */ |
| 790 | tSapName Manufacture; |
| 791 | tSapText ModelName; |
| 792 | tSapText ModelNumber; |
| 793 | tSapText SerialNumber; |
| 794 | /* Device Category ID: 1Computer, 2Input Device, ... */ |
| 795 | uint32_t PrimaryDeviceCategory; |
| 796 | /* Vendor specific OUI for Device Sub Category */ |
| 797 | uint8_t PrimaryDeviceOUI[4]; |
| 798 | /* |
| 799 | * Device Sub Category ID: 1-PC, |
| 800 | * 2-Server if Device Category is computer |
| 801 | */ |
| 802 | uint32_t DeviceSubCategory; |
| 803 | tSapText DeviceName; |
| 804 | uint16_t ConfigMethod; /* Configuaration method */ |
| 805 | uint8_t RFBand; /* RF bands available on the AP */ |
| 806 | } tSap_WPSProbeRspIE; |
| 807 | |
| 808 | #define WPS_BEACON_VER_PRESENT 0x00000001 |
| 809 | #define WPS_BEACON_STATE_PRESENT 0x00000002 |
| 810 | #define WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004 |
| 811 | #define WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008 |
| 812 | #define WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010 |
| 813 | #define WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 |
| 814 | #define WPS_BEACON_UUIDE_PRESENT 0x00000080 |
| 815 | #define WPS_BEACON_RF_BANDS_PRESENT 0x00000100 |
| 816 | |
| 817 | typedef struct sap_WPSBeaconIE_s { |
| 818 | uint32_t FieldPresent; |
| 819 | uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ |
| 820 | uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ |
| 821 | bool APSetupLocked; /* Must be included if value is true */ |
| 822 | /* indicates if user has recently activated a reg to add an Enrollee. */ |
| 823 | bool SelectedRegistra; |
| 824 | uint16_t DevicePasswordID; /* Device Password ID */ |
| 825 | uint16_t SelectedRegistraCfgMethod; /* Selected reg config method */ |
| 826 | uint8_t UUID_E[16]; /* Unique identifier of the AP. */ |
| 827 | uint8_t RFBand; /* RF bands available on the AP */ |
| 828 | } tSap_WPSBeaconIE; |
| 829 | |
| 830 | #define WPS_ASSOCRSP_VER_PRESENT 0x00000001 |
| 831 | #define WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002 |
| 832 | |
| 833 | typedef struct sap_WPSAssocRspIE_s { |
| 834 | uint32_t FieldPresent; |
| 835 | uint32_t Version; |
| 836 | uint8_t ResposeType; |
| 837 | } tSap_WPSAssocRspIE; |
| 838 | |
| 839 | typedef struct sap_WPSIE_s { |
| 840 | eSapWPSIE_CODE sapWPSIECode; |
| 841 | union { |
| 842 | tSap_WPSProbeRspIE sapWPSProbeRspIE; /* WPS Set Probe Resp IE */ |
| 843 | tSap_WPSBeaconIE sapWPSBeaconIE; /* WPS Set Beacon IE */ |
| 844 | tSap_WPSAssocRspIE sapWPSAssocRspIE; /* WPS Set Assoc Resp IE */ |
| 845 | } sapwpsie; |
| 846 | } tSap_WPSIE, *tpSap_WPSIE; |
| 847 | |
| 848 | #ifdef WLANTL_DEBUG |
| 849 | #define MAX_RATE_INDEX 136 |
| 850 | #define MAX_NUM_RSSI 100 |
| 851 | #define MAX_RSSI_INTERVAL 5 |
| 852 | #endif |
| 853 | |
| 854 | typedef struct sap_SoftapStats_s { |
| 855 | uint32_t txUCFcnt; |
| 856 | uint32_t txMCFcnt; |
| 857 | uint32_t txBCFcnt; |
| 858 | uint32_t txUCBcnt; |
| 859 | uint32_t txMCBcnt; |
| 860 | uint32_t txBCBcnt; |
| 861 | uint32_t rxUCFcnt; |
| 862 | uint32_t rxMCFcnt; |
| 863 | uint32_t rxBCFcnt; |
| 864 | uint32_t rxUCBcnt; |
| 865 | uint32_t rxMCBcnt; |
| 866 | uint32_t rxBCBcnt; |
| 867 | uint32_t rxBcnt; |
| 868 | uint32_t rxBcntCRCok; |
| 869 | uint32_t rxRate; |
| 870 | #ifdef WLANTL_DEBUG |
| 871 | uint32_t pktCounterRateIdx[MAX_RATE_INDEX]; |
| 872 | uint32_t pktCounterRssi[MAX_NUM_RSSI]; |
| 873 | #endif |
| 874 | } tSap_SoftapStats, *tpSap_SoftapStats; |
Amar Singhal | 7a1726a | 2015-10-14 16:28:11 -0700 | [diff] [blame] | 875 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 876 | #ifdef FEATURE_WLAN_CH_AVOID |
| 877 | /* Store channel safety information */ |
| 878 | typedef struct { |
| 879 | uint16_t channelNumber; |
| 880 | bool isSafe; |
| 881 | } sapSafeChannelType; |
| 882 | #endif /* FEATURE_WLAN_CH_AVOID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 883 | void sap_cleanup_channel_list(void *sapContext); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 884 | void sapCleanupAllChannelList(void); |
bings | 394afdd | 2017-01-09 11:22:38 +0800 | [diff] [blame] | 885 | |
| 886 | /** |
| 887 | * sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT |
| 888 | * @pvos_gctx: Pointer to vos global context structure |
| 889 | * |
| 890 | * Return: true on AUTO_CHANNEL_SELECT, false otherwise |
| 891 | */ |
| 892 | bool sap_is_auto_channel_select(void *pvos_gctx); |
| 893 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 894 | QDF_STATUS wlansap_set_wps_ie(void *p_cds_gctx, tSap_WPSIE *pWPSIe); |
| 895 | QDF_STATUS wlansap_update_wps_ie(void *p_cds_gctx); |
| 896 | QDF_STATUS wlansap_stop_Wps(void *p_cds_gctx); |
| 897 | QDF_STATUS wlansap_get_wps_state(void *p_cds_gctx, bool *pbWPSState); |
Ryan Hsu | 4252a2f | 2016-01-05 11:18:24 -0800 | [diff] [blame] | 898 | void *wlansap_open(void *p_cds_gctx); |
Manishekar Chandrasekaran | f7a1dad | 2016-06-23 06:43:47 +0530 | [diff] [blame] | 899 | QDF_STATUS wlansap_global_init(void); |
| 900 | QDF_STATUS wlansap_global_deinit(void); |
Peng Xu | 66162de | 2016-02-11 17:01:20 -0800 | [diff] [blame] | 901 | QDF_STATUS wlansap_start(void *p_cds_gctx, enum tQDF_ADAPTER_MODE mode, |
Dustin Brown | d28772b | 2017-03-17 14:16:07 -0700 | [diff] [blame] | 902 | uint8_t *addr, uint32_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 903 | QDF_STATUS wlansap_stop(void *p_cds_gctx); |
| 904 | QDF_STATUS wlansap_close(void *p_cds_gctx); |
| 905 | typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent, |
Peng Xu | 66162de | 2016-02-11 17:01:20 -0800 | [diff] [blame] | 906 | void *pUsrContext); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 907 | uint8_t wlansap_get_state(void *p_cds_gctx); |
| 908 | |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 909 | /** |
| 910 | * wlansap_is_channel_in_nol_list() - This API checks if channel is |
| 911 | * in nol list |
| 912 | * @ctx: context pointer |
| 913 | * @channel: channel |
| 914 | * @chanBondState: channel bonding state |
| 915 | * |
| 916 | * Return: True/False |
| 917 | */ |
| 918 | bool wlansap_is_channel_in_nol_list(void *p_cds_gctx, uint8_t channel_no, |
| 919 | ePhyChanBondState chanBondState); |
| 920 | /** |
| 921 | * wlansap_is_channel_leaking_in_nol() - This API checks if channel is leaking |
| 922 | * in nol list |
| 923 | * @ctx: context pointer |
| 924 | * @channel: channel |
| 925 | * @chan_bw: channel bandwidth |
| 926 | * |
| 927 | * Return: True/False |
| 928 | */ |
| 929 | bool wlansap_is_channel_leaking_in_nol(void *ctx, uint8_t channel, |
| 930 | uint8_t chan_bw); |
| 931 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 932 | QDF_STATUS wlansap_start_bss(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 933 | tpWLAN_SAPEventCB pSapEventCallback, |
| 934 | tsap_Config_t *pConfig, void *pUsrContext); |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 935 | |
| 936 | /** |
| 937 | * wlan_sap_update_next_channel() - Update next channel configured using vendor |
| 938 | * command in SAP context |
| 939 | * @ctx: SAP context |
| 940 | * @channel: channel number |
| 941 | * @chan_bw: channel width |
| 942 | * |
| 943 | * Return: QDF_STATUS |
| 944 | */ |
| 945 | QDF_STATUS wlan_sap_update_next_channel(void *ctx, uint8_t channel, |
| 946 | enum phy_ch_width chan_bw); |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 947 | QDF_STATUS wlan_sap_set_pre_cac_status(void *ctx, bool status, |
| 948 | tHalHandle handle); |
| 949 | QDF_STATUS wlan_sap_set_chan_before_pre_cac(void *ctx, |
| 950 | uint8_t chan_before_pre_cac); |
| 951 | QDF_STATUS wlan_sap_set_pre_cac_complete_status(void *ctx, bool status); |
| 952 | bool wlan_sap_is_pre_cac_active(tHalHandle handle); |
| 953 | QDF_STATUS wlan_sap_get_pre_cac_vdev_id(tHalHandle handle, uint8_t *vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 954 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 955 | uint16_t wlansap_check_cc_intf(void *Ctx); |
| 956 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 957 | QDF_STATUS wlansap_set_mac_acl(void *p_cds_gctx, tsap_Config_t *pConfig); |
| 958 | QDF_STATUS wlansap_stop_bss(void *p_cds_gctx); |
| 959 | QDF_STATUS wlansap_disassoc_sta(void *p_cds_gctx, |
Deepthi Gowri | b3bfefd | 2016-09-13 15:14:34 +0530 | [diff] [blame] | 960 | struct tagCsrDelStaParams *p_del_sta_params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 961 | QDF_STATUS wlansap_deauth_sta(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 962 | struct tagCsrDelStaParams *pDelStaParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 963 | QDF_STATUS wlansap_set_channel_change_with_csa(void *p_cds_gctx, |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 964 | uint32_t targetChannel, enum phy_ch_width target_bw); |
| 965 | QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx, |
| 966 | tCsrRoamSetKey *pSetKeyInfo); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 967 | QDF_STATUS wlansap_get_assoc_stations(void *p_cds_gctx, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 968 | QDF_MODULE_ID module, tpSap_AssocMacAddr pAssocStas); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 969 | QDF_STATUS wlansap_remove_wps_session_overlap(void *p_cds_gctx, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 970 | struct qdf_mac_addr pRemoveMac); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 971 | QDF_STATUS wlansap_get_wps_session_overlap(void *p_cds_gctx); |
| 972 | QDF_STATUS wlansap_set_counter_measure(void *p_cds_gctx, bool bEnable); |
| 973 | QDF_STATUS wlan_sap_getstation_ie_information(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 974 | uint32_t *pLen, uint8_t *pBuf); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 975 | QDF_STATUS wlansap_clear_acl(void *p_cds_gctx); |
| 976 | QDF_STATUS wlansap_get_acl_accept_list(void *p_cds_gctx, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 977 | struct qdf_mac_addr *pAcceptList, uint8_t *nAcceptList); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 978 | QDF_STATUS wlansap_get_acl_deny_list(void *pCtx, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 979 | struct qdf_mac_addr *pDenyList, uint8_t *nDenyList); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 980 | QDF_STATUS wlansap_set_mode(void *p_cds_gctx, uint32_t mode); |
| 981 | QDF_STATUS wlansap_get_acl_mode(void *p_cds_gctx, eSapMacAddrACL *mode); |
| 982 | QDF_STATUS wlansap_modify_acl(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 983 | uint8_t *pPeerStaMac, eSapACLType listType, eSapACLCmdType cmd); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 984 | QDF_STATUS wlansap_set_wparsn_ies |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 985 | (void *p_cds_gctx, uint8_t *pWPARSNIEs, uint32_t WPARSNIEsLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 986 | QDF_STATUS wlansap_send_action |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 987 | (void *p_cds_gctx, |
| 988 | const uint8_t *pBuf, uint32_t len, uint16_t wait, uint16_t channel_freq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 989 | QDF_STATUS wlansap_remain_on_channel |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 990 | (void *p_cds_gctx, |
| 991 | uint8_t channel, |
| 992 | uint32_t duration, remainOnChanCallback callback, void *pContext, |
| 993 | uint32_t *scan_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 994 | QDF_STATUS wlansap_cancel_remain_on_channel(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 995 | uint32_t scan_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 996 | QDF_STATUS wlansap_register_mgmt_frame |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 997 | (void *p_cds_gctx, |
| 998 | uint16_t frameType, uint8_t *matchData, uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 999 | QDF_STATUS wlansap_de_register_mgmt_frame |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1000 | (void *p_cds_gctx, |
| 1001 | uint16_t frameType, uint8_t *matchData, uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1002 | QDF_STATUS wlansap_channel_change_request(void *p_cds_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1003 | uint8_t tArgetChannel); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1004 | QDF_STATUS wlansap_start_beacon_req(void *pSapCtx); |
| 1005 | QDF_STATUS wlansap_dfs_send_csa_ie_request(void *pSapCtx); |
| 1006 | QDF_STATUS wlansap_get_dfs_ignore_cac(tHalHandle hHal, uint8_t *pIgnore_cac); |
| 1007 | QDF_STATUS wlansap_set_dfs_ignore_cac(tHalHandle hHal, uint8_t ignore_cac); |
| 1008 | QDF_STATUS wlansap_set_dfs_restrict_japan_w53(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1009 | uint8_t disable_Dfs_JapanW3); |
| 1010 | |
| 1011 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1012 | QDF_STATUS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1013 | wlan_sap_set_channel_avoidance(tHalHandle hal, bool sap_channel_avoidance); |
| 1014 | #endif |
| 1015 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1016 | QDF_STATUS wlansap_set_dfs_preferred_channel_location(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1017 | uint8_t dfs_Preferred_Channels_location); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1018 | QDF_STATUS wlansap_set_dfs_target_chnl(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1019 | uint8_t target_channel); |
bings | 58ce862 | 2017-07-10 15:55:36 +0800 | [diff] [blame] | 1020 | |
| 1021 | /** |
| 1022 | * wlan_sap_get_phymode() - Returns sap phymode. |
| 1023 | * @ctx: Pointer to cds Context or Sap Context. |
| 1024 | * |
| 1025 | * This function provides the SAP current phymode. |
| 1026 | * |
| 1027 | * Return: phymode |
| 1028 | */ |
| 1029 | eCsrPhyMode wlan_sap_get_phymode(void *ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1030 | uint32_t wlan_sap_get_vht_ch_width(void *ctx); |
| 1031 | void wlan_sap_set_vht_ch_width(void *ctx, uint32_t vht_channel_width); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1032 | QDF_STATUS wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1033 | const uint8_t * |
| 1034 | pAdditionIEBuffer, |
| 1035 | uint16_t additionIELength, |
| 1036 | eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1037 | QDF_STATUS wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1038 | eUpdateIEsType updateType); |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1039 | void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum, |
| 1040 | uint8_t *endChannelNum, uint8_t *bandStartChannel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1041 | uint8_t *bandEndChannel); |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 1042 | QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len); |
Arif Hussain | cd15163 | 2017-02-11 16:57:19 -0800 | [diff] [blame] | 1043 | |
| 1044 | /** |
| 1045 | * wlansap_set_dfs_nol() - Set dfs nol |
| 1046 | * @sap_ctx: SAP context |
| 1047 | * @conf: set type |
| 1048 | * |
| 1049 | * Return: QDF_STATUS |
| 1050 | */ |
| 1051 | QDF_STATUS wlansap_set_dfs_nol(void *sap_ctx, eSapDfsNolType conf); |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 1052 | |
| 1053 | /** |
| 1054 | * wlan_sap_set_vendor_acs() - Set vendor specific acs in sap context |
| 1055 | * @pSapCtx: SAP context |
| 1056 | * @is_vendor_acs: if vendor specific acs is enabled |
| 1057 | * |
| 1058 | * Return: QDF_STATUS |
| 1059 | */ |
| 1060 | QDF_STATUS wlan_sap_set_vendor_acs(void *sap_ctx, bool is_vendor_acs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1061 | void wlansap_populate_del_sta_params(const uint8_t *mac, |
| 1062 | uint16_t reason_code, |
| 1063 | uint8_t subtype, |
| 1064 | struct tagCsrDelStaParams *pDelStaParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1065 | QDF_STATUS wlansap_acs_chselect(void *pvos_gctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1066 | tpWLAN_SAPEventCB pacs_event_callback, |
| 1067 | tsap_Config_t *pconfig, |
| 1068 | void *pusr_context); |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 1069 | |
Kai Liu | bdd5fcb | 2016-09-28 22:55:44 +0800 | [diff] [blame] | 1070 | uint32_t wlansap_get_chan_width(void *cds_ctx); |
| 1071 | |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 1072 | QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal, |
| 1073 | uint16_t tx_leakage_threshold); |
Wu Gao | 3671743 | 2016-11-21 15:09:48 +0800 | [diff] [blame] | 1074 | |
| 1075 | QDF_STATUS wlansap_set_invalid_session(void *cds_ctx); |
| 1076 | |
Arif Hussain | cd15163 | 2017-02-11 16:57:19 -0800 | [diff] [blame] | 1077 | /** |
| 1078 | * sap_dfs_set_current_channel() - Set current channel params in dfs component |
| 1079 | * @sap_ctx: sap context |
| 1080 | * |
| 1081 | * Set current channel params in dfs component, this info will be used to mark |
| 1082 | * the channels in nol when radar is detected. |
| 1083 | * |
| 1084 | * Return: None |
| 1085 | */ |
| 1086 | void sap_dfs_set_current_channel(void *sap_ctx); |
Wu Gao | 3545e64 | 2017-07-14 19:24:41 +0800 | [diff] [blame] | 1087 | |
| 1088 | /** |
| 1089 | * wlansap_cleanup_cac_timer() - Force cleanup DFS CAC timer |
| 1090 | * @sap_ctx: sap context |
| 1091 | * |
| 1092 | * Force cleanup DFS CAC timer when reset all adapters. It will not |
| 1093 | * check concurrency SAP since just called when reset all adapters. |
| 1094 | * |
| 1095 | * Return: None |
| 1096 | */ |
| 1097 | void wlansap_cleanup_cac_timer(void *sap_ctx); |
| 1098 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1099 | #ifdef __cplusplus |
| 1100 | } |
| 1101 | #endif |
| 1102 | #endif /* #ifndef WLAN_QCT_WLANSAP_H */ |