Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
wadesong | 1795e14 | 2018-01-05 11:13:07 +0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 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 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 47 | #include "sme_api.h" |
| 48 | /*---------------------------------------------------------------------------- |
| 49 | * Preprocessor Definitions and Constants |
| 50 | * -------------------------------------------------------------------------*/ |
| 51 | #ifdef __cplusplus |
| 52 | extern "C" { |
| 53 | #endif |
| 54 | |
| 55 | /*--------------------------------------------------------------------------- |
| 56 | * defines and enum |
| 57 | *--------------------------------------------------------------------------*/ |
| 58 | #define MAX_SSID_LEN 32 |
| 59 | #define MAX_ACL_MAC_ADDRESS 32 |
| 60 | #define AUTO_CHANNEL_SELECT 0 |
| 61 | #define MAX_ASSOC_IND_IE_LEN 255 |
| 62 | |
| 63 | /* defines for WPS config states */ |
| 64 | #define SAP_WPS_DISABLED 0 |
| 65 | #define SAP_WPS_ENABLED_UNCONFIGURED 1 |
| 66 | #define SAP_WPS_ENABLED_CONFIGURED 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 67 | |
| 68 | #define MAX_CHANNEL_LIST_LEN 256 |
Anurag Chouhan | f04e84f | 2016-03-03 10:12:12 +0530 | [diff] [blame] | 69 | #define QDF_MAX_NO_OF_SAP_MODE 2 /* max # of SAP */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 70 | #define SAP_MAX_NUM_SESSION 5 |
| 71 | #define SAP_MAX_OBSS_STA_CNT 1 /* max # of OBSS STA */ |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 72 | #define SAP_ACS_WEIGHT_MAX (26664) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 73 | |
| 74 | /*-------------------------------------------------------------------------- |
| 75 | * reasonCode taken from 802.11 standard. |
| 76 | * ------------------------------------------------------------------------*/ |
| 77 | |
| 78 | typedef enum { |
| 79 | eSAP_RC_RESERVED0, /*0 */ |
| 80 | eSAP_RC_UNSPECIFIED, /*1 */ |
| 81 | eSAP_RC_PREV_AUTH_INVALID, /*2 */ |
| 82 | eSAP_RC_STA_LEFT_DEAUTH, /*3 */ |
| 83 | eSAP_RC_INACTIVITY_DISASSOC, /*4 */ |
| 84 | eSAP_RC_AP_CAPACITY_FULL, /*5 */ |
| 85 | eSAP_RC_CLS2_FROM_NON_AUTH_STA, /*6 */ |
| 86 | eSAP_RC_CLS3_FROM_NON_AUTH_STA, /*7 */ |
| 87 | eSAP_RC_STA_LEFT_DISASSOC, /*8 */ |
| 88 | eSAP_RC_STA_NOT_AUTH, /*9 */ |
| 89 | eSAP_RC_PC_UNACCEPTABLE, /*10 */ |
| 90 | eSAP_RC_SC_UNACCEPTABLE, /*11 */ |
| 91 | eSAP_RC_RESERVED1, /*12 */ |
| 92 | eSAP_RC_INVALID_IE, /*13 */ |
| 93 | eSAP_RC_MIC_FAIL, /*14 */ |
| 94 | eSAP_RC_4_WAY_HANDSHAKE_TO, /*15 */ |
| 95 | eSAP_RC_GO_KEY_HANDSHAKE_TO, /*16 */ |
| 96 | eSAP_RC_IE_MISMATCH, /*17 */ |
| 97 | eSAP_RC_INVALID_GRP_CHIPHER, /*18 */ |
| 98 | eSAP_RC_INVALID_PAIR_CHIPHER, /*19 */ |
| 99 | eSAP_RC_INVALID_AKMP, /*20 */ |
| 100 | eSAP_RC_UNSUPPORTED_RSN, /*21 */ |
| 101 | eSAP_RC_INVALID_RSN, /*22 */ |
| 102 | eSAP_RC_1X_AUTH_FAILED, /*23 */ |
| 103 | eSAP_RC_CHIPER_SUITE_REJECTED, /*24 */ |
| 104 | } eSapReasonCode; |
| 105 | |
| 106 | typedef enum { |
| 107 | eSAP_ACCEPT_UNLESS_DENIED = 0, |
| 108 | eSAP_DENY_UNLESS_ACCEPTED = 1, |
| 109 | /* this type is added to support accept & deny list at the same time */ |
| 110 | eSAP_SUPPORT_ACCEPT_AND_DENY = 2, |
| 111 | /*In this mode all MAC addresses are allowed to connect */ |
| 112 | eSAP_ALLOW_ALL = 3, |
| 113 | } eSapMacAddrACL; |
| 114 | |
| 115 | typedef enum { |
| 116 | eSAP_BLACK_LIST = 0, /* List of mac addresses NOT allowed to assoc */ |
| 117 | eSAP_WHITE_LIST = 1, /* List of mac addresses allowed to assoc */ |
| 118 | } eSapACLType; |
| 119 | |
| 120 | typedef enum { |
| 121 | ADD_STA_TO_ACL = 0, /* cmd to add STA to access control list */ |
| 122 | DELETE_STA_FROM_ACL = 1, /* cmd to del STA from access control list */ |
| 123 | } eSapACLCmdType; |
| 124 | |
| 125 | typedef enum { |
| 126 | eSAP_START_BSS_EVENT = 0, /* Event sent when BSS is started */ |
| 127 | eSAP_STOP_BSS_EVENT, /* Event sent when BSS is stopped */ |
| 128 | eSAP_STA_ASSOC_IND, /* Indicate assoc req to upper layers */ |
| 129 | /* |
| 130 | * Event sent when we have successfully associated a station and |
| 131 | * upper layer neeeds to allocate a context |
| 132 | */ |
| 133 | eSAP_STA_ASSOC_EVENT, |
| 134 | /* |
| 135 | * Event sent when we have successfully reassociated a station and |
| 136 | * upper layer neeeds to allocate a context |
| 137 | */ |
| 138 | eSAP_STA_REASSOC_EVENT, |
| 139 | /* |
| 140 | * Event sent when associated a station has disassociated as a |
| 141 | * result of various conditions |
| 142 | */ |
| 143 | eSAP_STA_DISASSOC_EVENT, |
| 144 | /* Event sent when user called wlansap_set_key_sta */ |
| 145 | eSAP_STA_SET_KEY_EVENT, |
| 146 | /* Event sent whenever there is MIC failure detected */ |
| 147 | eSAP_STA_MIC_FAILURE_EVENT, |
| 148 | /* Event sent when user called wlansap_get_assoc_stations */ |
| 149 | eSAP_ASSOC_STA_CALLBACK_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 150 | /* Event send on WPS PBC probe request is received */ |
| 151 | eSAP_WPS_PBC_PROBE_REQ_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 152 | eSAP_DISCONNECT_ALL_P2P_CLIENT, |
| 153 | eSAP_MAC_TRIG_STOP_BSS_EVENT, |
| 154 | /* |
| 155 | * Event send when a STA in neither white list or black list tries to |
| 156 | * associate in softap mode |
| 157 | */ |
| 158 | eSAP_UNKNOWN_STA_JOIN, |
| 159 | /* Event send when a new STA is rejected association since softAP |
| 160 | * max assoc limit has reached |
| 161 | */ |
| 162 | eSAP_MAX_ASSOC_EXCEEDED, |
| 163 | eSAP_CHANNEL_CHANGE_EVENT, |
| 164 | eSAP_DFS_CAC_START, |
| 165 | eSAP_DFS_CAC_INTERRUPTED, |
| 166 | eSAP_DFS_CAC_END, |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 167 | eSAP_DFS_PRE_CAC_END, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 168 | eSAP_DFS_RADAR_DETECT, |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 169 | eSAP_DFS_RADAR_DETECT_DURING_PRE_CAC, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 170 | /* No ch available after DFS RADAR detect */ |
| 171 | eSAP_DFS_NO_AVAILABLE_CHANNEL, |
Krunal Soni | 2220839 | 2017-09-29 18:10:34 -0700 | [diff] [blame] | 172 | eSAP_STOP_BSS_DUE_TO_NO_CHNL, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | eSAP_ACS_SCAN_SUCCESS_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | eSAP_ACS_CHANNEL_SELECTED, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 175 | eSAP_ECSA_CHANGE_CHAN_IND, |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 176 | eSAP_DFS_NEXT_CHANNEL_REQ, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 177 | } eSapHddEvent; |
| 178 | |
| 179 | typedef enum { |
| 180 | eSAP_OPEN_SYSTEM, |
| 181 | eSAP_SHARED_KEY, |
| 182 | eSAP_AUTO_SWITCH |
| 183 | } eSapAuthType; |
| 184 | |
| 185 | typedef enum { |
| 186 | /* Disassociation was internally initated from CORE stack */ |
| 187 | eSAP_MAC_INITATED_DISASSOC = 0x10000, |
| 188 | /* |
| 189 | * Disassociation was internally initated from host by |
| 190 | * invoking wlansap_disassoc_sta call |
| 191 | */ |
| 192 | eSAP_USR_INITATED_DISASSOC |
| 193 | } eSapDisassocReason; |
| 194 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 195 | typedef enum { |
| 196 | eSAP_DFS_NOL_CLEAR, |
| 197 | eSAP_DFS_NOL_RANDOMIZE, |
| 198 | } eSapDfsNolType; |
| 199 | |
| 200 | /*--------------------------------------------------------------------------- |
| 201 | SAP PAL "status" and "reason" error code defines |
| 202 | ---------------------------------------------------------------------------*/ |
| 203 | typedef enum { |
| 204 | eSAP_STATUS_SUCCESS, /* Success. */ |
| 205 | eSAP_STATUS_FAILURE, /* General Failure. */ |
| 206 | /* Channel not selected during intial scan. */ |
| 207 | eSAP_START_BSS_CHANNEL_NOT_SELECTED, |
| 208 | eSAP_ERROR_MAC_START_FAIL, /* Failed to start Infra BSS */ |
| 209 | } eSapStatus; |
| 210 | |
| 211 | /*--------------------------------------------------------------------------- |
| 212 | SAP PAL "status" and "reason" error code defines |
| 213 | ---------------------------------------------------------------------------*/ |
| 214 | typedef enum { |
| 215 | eSAP_WPSPBC_OVERLAP_IN120S, /* Overlap */ |
| 216 | /* no WPS probe request in 120 second */ |
| 217 | eSAP_WPSPBC_NO_WPSPBC_PROBE_REQ_IN120S, |
| 218 | /* One WPS probe request in 120 second */ |
| 219 | eSAP_WPSPBC_ONE_WPSPBC_PROBE_REQ_IN120S, |
| 220 | } eWPSPBCOverlap; |
| 221 | |
Rachit Kankane | 2487f8f | 2017-04-19 14:30:19 +0530 | [diff] [blame] | 222 | /*--------------------------------------------------------------------------- |
| 223 | SAP Associated station types |
| 224 | ---------------------------------------------------------------------------*/ |
| 225 | typedef enum { |
| 226 | eSTA_TYPE_NONE = 0x00000000, /* No station type */ |
| 227 | eSTA_TYPE_INFRA = 0x00000001, /* legacy station */ |
| 228 | eSTA_TYPE_P2P_CLI = 0x00000002, /* p2p client */ |
| 229 | } eStationType; |
| 230 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 231 | /*---------------------------------------------------------------------------- |
| 232 | * Typedefs |
| 233 | * -------------------------------------------------------------------------*/ |
| 234 | typedef struct sap_StartBssCompleteEvent_s { |
| 235 | uint8_t status; |
| 236 | uint8_t operatingChannel; |
| 237 | uint16_t staId; /* self StaID */ |
| 238 | uint8_t sessionId; /* SoftAP SME session ID */ |
| 239 | } tSap_StartBssCompleteEvent; |
| 240 | |
| 241 | typedef struct sap_StopBssCompleteEvent_s { |
| 242 | uint8_t status; |
| 243 | } tSap_StopBssCompleteEvent; |
| 244 | |
| 245 | typedef struct sap_StationAssocIndication_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 246 | struct qdf_mac_addr staMac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 247 | uint8_t assoId; |
| 248 | uint8_t staId; |
| 249 | uint8_t status; |
| 250 | /* Required for indicating the frames to upper layer */ |
| 251 | uint32_t beaconLength; |
| 252 | uint8_t *beaconPtr; |
| 253 | uint32_t assocReqLength; |
| 254 | uint8_t *assocReqPtr; |
| 255 | bool fWmmEnabled; |
| 256 | eCsrAuthType negotiatedAuthType; |
| 257 | eCsrEncryptionType negotiatedUCEncryptionType; |
| 258 | eCsrEncryptionType negotiatedMCEncryptionType; |
| 259 | bool fAuthRequired; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 260 | uint8_t ecsa_capable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 261 | } tSap_StationAssocIndication; |
| 262 | |
| 263 | typedef struct sap_StationAssocReassocCompleteEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 264 | struct qdf_mac_addr staMac; |
Rachit Kankane | 2487f8f | 2017-04-19 14:30:19 +0530 | [diff] [blame] | 265 | eStationType staType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 266 | uint8_t staId; |
| 267 | uint8_t status; |
| 268 | uint8_t ies[MAX_ASSOC_IND_IE_LEN]; |
| 269 | uint16_t iesLen; |
| 270 | uint32_t statusCode; |
| 271 | eSapAuthType SapAuthType; |
| 272 | bool wmmEnabled; |
| 273 | /* Required for indicating the frames to upper layer */ |
| 274 | uint32_t beaconLength; |
| 275 | uint8_t *beaconPtr; |
| 276 | uint32_t assocReqLength; |
| 277 | uint8_t *assocReqPtr; |
| 278 | uint32_t assocRespLength; |
| 279 | uint8_t *assocRespPtr; |
| 280 | uint8_t timingMeasCap; |
| 281 | tSirSmeChanInfo chan_info; |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 282 | bool ampdu; |
| 283 | bool sgi_enable; |
| 284 | bool tx_stbc; |
| 285 | bool rx_stbc; |
| 286 | tSirMacHTChannelWidth ch_width; |
| 287 | enum sir_sme_phy_mode mode; |
| 288 | uint8_t max_supp_idx; |
| 289 | uint8_t max_ext_idx; |
| 290 | uint8_t max_mcs_idx; |
| 291 | uint8_t rx_mcs_map; |
| 292 | uint8_t tx_mcs_map; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 293 | uint8_t ecsa_capable; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 294 | tDot11fIEHTCaps ht_caps; |
| 295 | tDot11fIEVHTCaps vht_caps; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 296 | } tSap_StationAssocReassocCompleteEvent; |
| 297 | |
| 298 | typedef struct sap_StationDisassocCompleteEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 299 | struct qdf_mac_addr staMac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 300 | uint8_t staId; /* STAID should not be used */ |
| 301 | uint8_t status; |
| 302 | uint32_t statusCode; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 303 | uint32_t reason_code; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 304 | eSapDisassocReason reason; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 305 | int rssi; |
| 306 | int tx_rate; |
| 307 | int rx_rate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 308 | } tSap_StationDisassocCompleteEvent; |
| 309 | |
| 310 | typedef struct sap_StationSetKeyCompleteEvent_s { |
| 311 | uint8_t status; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 312 | struct qdf_mac_addr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 313 | } tSap_StationSetKeyCompleteEvent; |
| 314 | |
| 315 | /*struct corresponding to SAP_STA_MIC_FAILURE_EVENT */ |
| 316 | typedef struct sap_StationMICFailureEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 317 | struct qdf_mac_addr srcMacAddr; /* address used to compute MIC */ |
| 318 | struct qdf_mac_addr staMac; /* taMacAddr transmitter address */ |
| 319 | struct qdf_mac_addr dstMacAddr; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 320 | bool multicast; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 321 | uint8_t IV1; /* first byte of IV */ |
| 322 | uint8_t keyId; /* second byte of IV */ |
| 323 | uint8_t TSC[SIR_CIPHER_SEQ_CTR_SIZE]; /* sequence number */ |
| 324 | |
| 325 | } tSap_StationMICFailureEvent; |
| 326 | /*Structure to return MAC address of associated stations */ |
| 327 | typedef struct sap_AssocMacAddr_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 328 | struct qdf_mac_addr staMac; /* Associated station's MAC address */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 329 | uint8_t assocId; /* Associated station's Association ID */ |
| 330 | uint8_t staId; /* Allocated station Id */ |
| 331 | uint8_t ShortGI40Mhz; |
| 332 | uint8_t ShortGI20Mhz; |
| 333 | uint8_t Support40Mhz; |
| 334 | uint32_t requestedMCRate; |
| 335 | tSirSupportedRates supportedRates; |
| 336 | } tSap_AssocMacAddr, *tpSap_AssocMacAddr; |
| 337 | |
| 338 | /*struct corresponding to SAP_ASSOC_STA_CALLBACK_EVENT */ |
| 339 | typedef struct sap_AssocStaListEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 340 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 341 | /* module id that was passed in wlansap_get_assoc_stations API */ |
| 342 | uint8_t noOfAssocSta; /* Number of associated stations */ |
| 343 | tpSap_AssocMacAddr pAssocStas; |
| 344 | /* |
| 345 | * Pointer to pre allocated memory to obtain list of |
| 346 | * associated stations passed in wlansap_get_assoc_stations API |
| 347 | */ |
| 348 | } tSap_AssocStaListEvent; |
| 349 | |
| 350 | typedef struct sap_GetWPSPBCSessionEvent_s { |
| 351 | uint8_t status; |
| 352 | /* module id that was passed in wlansap_get_assoc_stations API */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 353 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 354 | uint8_t UUID_E[16]; /* Unique identifier of the AP. */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 355 | struct qdf_mac_addr addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | eWPSPBCOverlap wpsPBCOverlap; |
| 357 | } tSap_GetWPSPBCSessionEvent; |
| 358 | |
| 359 | typedef struct sap_WPSPBCProbeReqEvent_s { |
| 360 | uint8_t status; |
| 361 | /* module id that was passed in wlansap_get_assoc_stations API */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 362 | QDF_MODULE_ID module; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 363 | tSirWPSPBCProbeReq WPSPBCProbeReq; |
| 364 | } tSap_WPSPBCProbeReqEvent; |
| 365 | |
| 366 | typedef struct sap_ManagementFrameInfo_s { |
| 367 | uint32_t nFrameLength; |
| 368 | uint8_t frameType; |
| 369 | uint32_t rxChan; /* Channel of where packet is received */ |
| 370 | /* |
| 371 | * Point to a buffer contain the beacon, assoc req, assoc rsp frame, |
| 372 | * in that order user needs to use nBeaconLength, nAssocReqLength, |
| 373 | * nAssocRspLength to desice where each frame starts and ends. |
| 374 | */ |
| 375 | uint8_t *pbFrames; |
| 376 | } tSap_ManagementFrameInfo; |
| 377 | |
| 378 | typedef struct sap_SendActionCnf_s { |
| 379 | eSapStatus actionSendSuccess; |
| 380 | } tSap_SendActionCnf; |
| 381 | |
| 382 | typedef struct sap_UnknownSTAJoinEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 383 | struct qdf_mac_addr macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 384 | } tSap_UnknownSTAJoinEvent; |
| 385 | |
| 386 | typedef struct sap_MaxAssocExceededEvent_s { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 387 | struct qdf_mac_addr macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 388 | } tSap_MaxAssocExceededEvent; |
| 389 | |
| 390 | typedef struct sap_DfsNolInfo_s { |
| 391 | uint16_t sDfsList; /* size of pDfsList in byte */ |
| 392 | void *pDfsList; /* pointer to pDfsList buffer */ |
| 393 | } tSap_DfsNolInfo; |
| 394 | |
| 395 | /** |
| 396 | * sap_acs_ch_selected_s - the structure to hold the selected channels |
| 397 | * @pri_channel: Holds the ACS selected primary channel |
| 398 | * @sec_channel: Holds the ACS selected secondary channel |
| 399 | * |
| 400 | * Holds the primary and secondary channel selected by ACS and is |
| 401 | * used to send it to the HDD. |
| 402 | */ |
| 403 | struct sap_ch_selected_s { |
| 404 | uint16_t pri_ch; |
| 405 | uint16_t ht_sec_ch; |
| 406 | uint16_t vht_seg0_center_ch; |
| 407 | uint16_t vht_seg1_center_ch; |
| 408 | uint16_t ch_width; |
| 409 | }; |
| 410 | |
| 411 | /** |
| 412 | * sap_roc_ready_ind_s - the structure to hold the scan id |
| 413 | * @scan_id: scan identifier |
| 414 | * |
| 415 | * Holds scan identifier |
| 416 | */ |
| 417 | struct sap_roc_ready_ind_s { |
| 418 | uint32_t scan_id; |
| 419 | }; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 420 | |
| 421 | /** |
Liangwei Dong | aef8434 | 2016-10-21 05:28:00 -0400 | [diff] [blame] | 422 | * struct sap_acs_scan_complete_event - acs scan complete event |
| 423 | * @status: status of acs scan |
| 424 | * @channellist: acs scan channels |
| 425 | * @num_of_channels: number of channels |
| 426 | */ |
Srinivas Girigowda | ea4d806 | 2017-10-14 12:40:48 -0700 | [diff] [blame] | 427 | struct sap_acs_scan_complete_event { |
Liangwei Dong | aef8434 | 2016-10-21 05:28:00 -0400 | [diff] [blame] | 428 | uint8_t status; |
| 429 | uint8_t *channellist; |
| 430 | uint8_t num_of_channels; |
| 431 | }; |
| 432 | |
| 433 | /** |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 434 | * struct sap_ch_change_ind - channel change indication |
| 435 | * @new_chan: channel to change |
| 436 | */ |
| 437 | struct sap_ch_change_ind { |
| 438 | uint16_t new_chan; |
| 439 | }; |
| 440 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 441 | /* |
| 442 | * This struct will be filled in and passed to tpWLAN_SAPEventCB that is |
| 443 | * provided during wlansap_start_bss call The event id corresponding to |
| 444 | * structure in the union is defined in comment next to the structure |
| 445 | */ |
| 446 | |
| 447 | typedef struct sap_Event_s { |
| 448 | eSapHddEvent sapHddEventCode; |
| 449 | union { |
| 450 | /*SAP_START_BSS_EVENT */ |
| 451 | tSap_StartBssCompleteEvent sapStartBssCompleteEvent; |
| 452 | /*SAP_STOP_BSS_EVENT */ |
| 453 | tSap_StopBssCompleteEvent sapStopBssCompleteEvent; |
| 454 | /*SAP_ASSOC_INDICATION */ |
| 455 | tSap_StationAssocIndication sapAssocIndication; |
| 456 | /*SAP_STA_ASSOC_EVENT, SAP_STA_REASSOC_EVENT */ |
| 457 | tSap_StationAssocReassocCompleteEvent |
| 458 | sapStationAssocReassocCompleteEvent; |
| 459 | /*SAP_STA_DISASSOC_EVENT */ |
| 460 | tSap_StationDisassocCompleteEvent |
| 461 | sapStationDisassocCompleteEvent; |
| 462 | /*SAP_STA_SET_KEY_EVENT */ |
| 463 | tSap_StationSetKeyCompleteEvent sapStationSetKeyCompleteEvent; |
| 464 | /*SAP_STA_MIC_FAILURE_EVENT */ |
| 465 | tSap_StationMICFailureEvent sapStationMICFailureEvent; |
| 466 | /*SAP_ASSOC_STA_CALLBACK_EVENT */ |
| 467 | tSap_AssocStaListEvent sapAssocStaListEvent; |
| 468 | /*SAP_GET_WPSPBC_SESSION_EVENT */ |
| 469 | tSap_GetWPSPBCSessionEvent sapGetWPSPBCSessionEvent; |
| 470 | /*eSAP_WPS_PBC_PROBE_REQ_EVENT */ |
| 471 | tSap_WPSPBCProbeReqEvent sapPBCProbeReqEvent; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 472 | tSap_SendActionCnf sapActionCnf; |
| 473 | /* eSAP_UNKNOWN_STA_JOIN */ |
| 474 | tSap_UnknownSTAJoinEvent sapUnknownSTAJoin; |
| 475 | /* eSAP_MAX_ASSOC_EXCEEDED */ |
| 476 | tSap_MaxAssocExceededEvent sapMaxAssocExceeded; |
| 477 | /*eSAP_DFS_NOL_XXX */ |
| 478 | tSap_DfsNolInfo sapDfsNolInfo; |
| 479 | struct sap_ch_selected_s sap_ch_selected; |
| 480 | struct sap_roc_ready_ind_s sap_roc_ind; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 481 | struct sap_ch_change_ind sap_chan_cng_ind; |
Liangwei Dong | aef8434 | 2016-10-21 05:28:00 -0400 | [diff] [blame] | 482 | struct sap_acs_scan_complete_event sap_acs_scan_comp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 483 | } sapevt; |
| 484 | } tSap_Event, *tpSap_Event; |
| 485 | |
| 486 | typedef struct sap_SSID { |
| 487 | uint8_t length; |
| 488 | uint8_t ssId[MAX_SSID_LEN]; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 489 | } qdf_packed tSap_SSID_t; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 490 | |
| 491 | typedef struct sap_SSIDInfo { |
| 492 | tSap_SSID_t ssid; /* SSID of the AP */ |
| 493 | /* SSID should/shouldn't be bcast in probe RSP & beacon */ |
| 494 | uint8_t ssidHidden; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 495 | } qdf_packed tSap_SSIDInfo_t; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 496 | |
| 497 | struct sap_acs_cfg { |
| 498 | /* ACS Algo Input */ |
| 499 | uint8_t acs_mode; |
wadesong | 1795e14 | 2018-01-05 11:13:07 +0800 | [diff] [blame] | 500 | eCsrPhyMode hw_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 501 | uint8_t start_ch; |
| 502 | uint8_t end_ch; |
| 503 | uint8_t *ch_list; |
| 504 | uint8_t ch_list_count; |
| 505 | #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE |
| 506 | uint8_t skip_scan_status; |
| 507 | uint8_t skip_scan_range1_stch; |
| 508 | uint8_t skip_scan_range1_endch; |
| 509 | uint8_t skip_scan_range2_stch; |
| 510 | uint8_t skip_scan_range2_endch; |
| 511 | #endif |
| 512 | |
| 513 | uint16_t ch_width; |
Tushnim Bhattacharyya | 0105770 | 2016-10-26 15:14:35 -0700 | [diff] [blame] | 514 | uint8_t pcl_channels[QDF_MAX_NUM_CHAN]; |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 515 | uint8_t pcl_channels_weight_list[QDF_MAX_NUM_CHAN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 516 | uint32_t pcl_ch_count; |
Kapil Gupta | 086c620 | 2016-12-11 18:17:06 +0530 | [diff] [blame] | 517 | uint8_t is_ht_enabled; |
| 518 | uint8_t is_vht_enabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | /* ACS Algo Output */ |
| 520 | uint8_t pri_ch; |
| 521 | uint8_t ht_sec_ch; |
| 522 | uint8_t vht_seg0_center_ch; |
| 523 | uint8_t vht_seg1_center_ch; |
Kapil Gupta | c1224bf | 2017-06-22 21:22:40 +0530 | [diff] [blame] | 524 | uint32_t band; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 525 | }; |
| 526 | |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 527 | /* |
| 528 | * enum vendor_ie_access_policy- access policy |
| 529 | * @ACCESS_POLICY_NONE: access policy attribute is not valid |
| 530 | * @ACCESS_POLICY_RESPOND_IF_IE_IS_PRESENT: respond to probe req/assoc req |
| 531 | * only if ie is present |
| 532 | * @ACCESS_POLICY_DONOT_RESPOND_IF_IE_IS_PRESENT: do not respond to probe req/ |
| 533 | * assoc req if ie is present |
| 534 | */ |
| 535 | enum vendor_ie_access_policy { |
| 536 | ACCESS_POLICY_NONE, |
| 537 | ACCESS_POLICY_RESPOND_IF_IE_IS_PRESENT, |
| 538 | ACCESS_POLICY_DONOT_RESPOND_IF_IE_IS_PRESENT, |
| 539 | }; |
| 540 | |
Agrawal Ashish | 6563461 | 2016-08-18 13:24:32 +0530 | [diff] [blame] | 541 | /* |
| 542 | * enum sap_acs_dfs_mode- state of DFS mode |
| 543 | * @ACS_DFS_MODE_NONE: DFS mode attribute is not valid |
| 544 | * @ACS_DFS_MODE_ENABLE: DFS mode is enabled |
| 545 | * @ACS_DFS_MODE_DISABLE: DFS mode is disabled |
| 546 | * @ACS_DFS_MODE_DEPRIORITIZE: Deprioritize DFS channels in scanning |
| 547 | */ |
| 548 | enum sap_acs_dfs_mode { |
| 549 | ACS_DFS_MODE_NONE, |
| 550 | ACS_DFS_MODE_ENABLE, |
| 551 | ACS_DFS_MODE_DISABLE, |
| 552 | ACS_DFS_MODE_DEPRIORITIZE |
| 553 | }; |
| 554 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 555 | typedef struct sap_Config { |
| 556 | tSap_SSIDInfo_t SSIDinfo; |
| 557 | eCsrPhyMode SapHw_mode; /* Wireless Mode */ |
| 558 | eSapMacAddrACL SapMacaddr_acl; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 559 | struct qdf_mac_addr accept_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 560 | bool ieee80211d; /* Specify if 11D is enabled or disabled */ |
| 561 | bool protEnabled; /* Specify if protection is enabled or disabled */ |
| 562 | /* Specify if OBSS protection is enabled or disabled */ |
| 563 | bool obssProtEnabled; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 564 | struct qdf_mac_addr deny_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */ |
| 565 | struct qdf_mac_addr self_macaddr; /* self macaddress or BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 566 | uint8_t channel; /* Operation channel */ |
| 567 | uint8_t sec_ch; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 568 | struct ch_params ch_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 569 | uint32_t ch_width_orig; |
| 570 | uint8_t max_num_sta; /* maximum number of STAs in station table */ |
| 571 | uint8_t dtim_period; /* dtim interval */ |
| 572 | uint8_t num_accept_mac; |
| 573 | uint8_t num_deny_mac; |
| 574 | /* Max ie length 255 * 2(WPA+RSN) + 2 bytes(vendor specific ID) * 2 */ |
| 575 | uint8_t RSNWPAReqIE[(SIR_MAC_MAX_IE_LENGTH * 2) + 4]; |
| 576 | /* it is ignored if [0] is 0. */ |
| 577 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; |
| 578 | uint8_t RSNAuthType; |
| 579 | uint8_t RSNEncryptType; |
| 580 | uint8_t mcRSNEncryptType; |
| 581 | eSapAuthType authType; |
| 582 | bool privacy; |
| 583 | bool UapsdEnable; |
| 584 | bool fwdWPSPBCProbeReq; |
| 585 | /* 0 - disabled, 1 - not configured , 2 - configured */ |
| 586 | uint8_t wps_state; |
| 587 | uint16_t ht_capab; |
| 588 | uint16_t RSNWPAReqIELength; /* The byte count in the pWPAReqIE */ |
| 589 | uint32_t beacon_int; /* Beacon Interval */ |
| 590 | uint32_t ap_table_max_size; |
| 591 | uint32_t ap_table_expiration_time; |
| 592 | uint32_t ht_op_mode_fixed; |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 593 | enum QDF_OPMODE persona; /* Tells us which persona, GO or AP */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 594 | uint8_t disableDFSChSwitch; |
| 595 | bool enOverLapCh; |
| 596 | #ifdef WLAN_FEATURE_11W |
| 597 | bool mfpRequired; |
| 598 | bool mfpCapable; |
| 599 | #endif |
| 600 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 601 | uint8_t cc_switch_mode; |
| 602 | #endif |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 603 | uint32_t auto_channel_select_weight; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 604 | struct sap_acs_cfg acs_cfg; |
| 605 | uint16_t probeRespIEsBufferLen; |
| 606 | /* buffer for addn ies comes from hostapd */ |
| 607 | void *pProbeRespIEsBuffer; |
| 608 | uint16_t assocRespIEsLen; |
| 609 | /* buffer for addn ies comes from hostapd */ |
| 610 | void *pAssocRespIEsBuffer; |
| 611 | uint16_t probeRespBcnIEsLen; |
| 612 | /* buffer for addn ies comes from hostapd */ |
| 613 | void *pProbeRespBcnIEsBuffer; |
| 614 | uint8_t sap_dot11mc; /* Specify if 11MC is enabled or disabled*/ |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 615 | uint16_t beacon_tx_rate; |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 616 | uint8_t *vendor_ie; |
| 617 | enum vendor_ie_access_policy vendor_ie_access_policy; |
| 618 | uint16_t sta_inactivity_timeout; |
| 619 | uint16_t tx_pkt_fail_cnt_threshold; |
| 620 | uint8_t short_retry_limit; |
| 621 | uint8_t long_retry_limit; |
| 622 | uint8_t ampdu_size; |
Agrawal Ashish | 06e76d2 | 2016-08-18 16:44:48 +0530 | [diff] [blame] | 623 | tSirMacRateSet supported_rates; |
| 624 | tSirMacRateSet extended_rates; |
Agrawal Ashish | 6563461 | 2016-08-18 13:24:32 +0530 | [diff] [blame] | 625 | enum sap_acs_dfs_mode acs_dfs_mode; |
Kapil Gupta | 086c620 | 2016-12-11 18:17:06 +0530 | [diff] [blame] | 626 | struct hdd_channel_info *channel_info; |
Jayachandran Sreekumaran | 68c952c | 2017-04-24 12:42:03 +0530 | [diff] [blame] | 627 | uint32_t channel_info_count; |
Arif Hussain | 759a023 | 2017-03-20 13:17:18 -0700 | [diff] [blame] | 628 | bool dfs_cac_offload; |
gaolez | e2920bd | 2017-03-21 17:38:42 +0800 | [diff] [blame] | 629 | /* beacon count before channel switch */ |
| 630 | uint8_t sap_chanswitch_beacon_cnt; |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame] | 631 | uint8_t sap_chanswitch_mode; |
hqu | 16d6e08 | 2017-09-04 10:52:31 +0800 | [diff] [blame] | 632 | bool chan_switch_hostapd_rate_enabled; |
lifeng | 1c16b6b | 2017-09-25 13:59:55 +0800 | [diff] [blame] | 633 | bool dfs_beacon_tx_enhanced; |
lifeng | 7c607dd | 2017-02-21 21:16:49 +0800 | [diff] [blame] | 634 | uint16_t reduced_beacon_interval; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 635 | } tsap_Config_t; |
| 636 | |
| 637 | #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE |
| 638 | typedef enum { |
| 639 | eSAP_DO_NEW_ACS_SCAN, |
| 640 | eSAP_DO_PAR_ACS_SCAN, |
| 641 | eSAP_SKIP_ACS_SCAN |
| 642 | } tSap_skip_acs_scan; |
| 643 | #endif |
| 644 | |
| 645 | typedef enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 646 | eSAP_DFS_DO_NOT_SKIP_CAC, |
| 647 | eSAP_DFS_SKIP_CAC |
| 648 | } eSapDfsCACState_t; |
| 649 | |
| 650 | typedef enum { |
| 651 | eSAP_DFS_CHANNEL_USABLE, |
| 652 | eSAP_DFS_CHANNEL_AVAILABLE, |
| 653 | eSAP_DFS_CHANNEL_UNAVAILABLE |
| 654 | } eSapDfsChanStatus_t; |
| 655 | |
| 656 | typedef struct sSapDfsNolInfo { |
| 657 | uint8_t dfs_channel_number; |
| 658 | eSapDfsChanStatus_t radar_status_flag; |
| 659 | uint64_t radar_found_timestamp; |
| 660 | } tSapDfsNolInfo; |
| 661 | |
| 662 | typedef struct sSapDfsInfo { |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 663 | qdf_mc_timer_t sap_dfs_cac_timer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 664 | uint8_t sap_radar_found_status; |
| 665 | /* |
| 666 | * New channel to move to when a Radar is |
| 667 | * detected on current Channel |
| 668 | */ |
| 669 | uint8_t target_channel; |
| 670 | uint8_t last_radar_found_channel; |
| 671 | uint8_t ignore_cac; |
| 672 | eSapDfsCACState_t cac_state; |
| 673 | uint8_t user_provided_target_channel; |
| 674 | |
| 675 | /* |
| 676 | * Requests for Channel Switch Announcement IE |
| 677 | * generation and transmission |
| 678 | */ |
| 679 | uint8_t csaIERequired; |
| 680 | uint8_t numCurrentRegDomainDfsChannels; |
| 681 | tSapDfsNolInfo sapDfsChannelNolList[NUM_5GHZ_CHANNELS]; |
| 682 | uint8_t is_dfs_cac_timer_running; |
| 683 | /* |
| 684 | * New channel width and new channel bonding mode |
| 685 | * will only be updated via channel fallback mechanism |
| 686 | */ |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 687 | enum phy_ch_width orig_chanWidth; |
| 688 | enum phy_ch_width new_chanWidth; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 689 | struct ch_params new_ch_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 690 | |
| 691 | /* |
| 692 | * INI param to enable/disable SAP W53 |
| 693 | * channel operation. |
| 694 | */ |
| 695 | uint8_t is_dfs_w53_disabled; |
| 696 | |
| 697 | /* |
| 698 | * sap_operating_channel_location holds SAP indoor, |
| 699 | * outdoor location information. Currently, if this |
| 700 | * param is set this Indoor/outdoor channel interop |
| 701 | * restriction will only be implemented for JAPAN |
| 702 | * regulatory domain. |
| 703 | * |
| 704 | * 0 - Indicates that location unknown |
| 705 | * (or) SAP Indoor/outdoor interop is allowed |
| 706 | * |
| 707 | * 1 - Indicates device is operating on Indoor channels |
| 708 | * and SAP cannot pick next random channel from outdoor |
| 709 | * list of channels when a radar is found on current operating |
| 710 | * DFS channel. |
| 711 | * |
| 712 | * 2 - Indicates device is operating on Outdoor Channels |
| 713 | * and SAP cannot pick next random channel from indoor |
| 714 | * list of channels when a radar is found on current |
| 715 | * operating DFS channel. |
| 716 | */ |
| 717 | uint8_t sap_operating_chan_preferred_location; |
| 718 | |
| 719 | /* |
| 720 | * Flag to indicate if DFS test mode is enabled and |
| 721 | * channel switch is disabled. |
| 722 | */ |
| 723 | uint8_t disable_dfs_ch_switch; |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 724 | uint16_t tx_leakage_threshold; |
gaolez | e2920bd | 2017-03-21 17:38:42 +0800 | [diff] [blame] | 725 | /* beacon count before channel switch */ |
| 726 | uint8_t sap_ch_switch_beacon_cnt; |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame] | 727 | uint8_t sap_ch_switch_mode; |
lifeng | 1c16b6b | 2017-09-25 13:59:55 +0800 | [diff] [blame] | 728 | bool dfs_beacon_tx_enhanced; |
lifeng | 7c607dd | 2017-02-21 21:16:49 +0800 | [diff] [blame] | 729 | uint16_t reduced_beacon_interval; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 730 | } tSapDfsInfo; |
| 731 | |
| 732 | typedef struct tagSapCtxList { |
| 733 | uint8_t sessionID; |
| 734 | void *pSapContext; |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 735 | enum QDF_OPMODE sapPersona; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 736 | } tSapCtxList, tpSapCtxList; |
| 737 | |
| 738 | typedef struct tagSapStruct { |
| 739 | /* Information Required for SAP DFS Master mode */ |
| 740 | tSapDfsInfo SapDfsInfo; |
| 741 | tSapCtxList sapCtxList[SAP_MAX_NUM_SESSION]; |
| 742 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 743 | bool sap_channel_avoidance; |
| 744 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 745 | bool acs_with_more_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 746 | bool enable_dfs_phy_error_logs; |
| 747 | } tSapStruct, *tpSapStruct; |
| 748 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 749 | typedef struct sap_SoftapStats_s { |
| 750 | uint32_t txUCFcnt; |
| 751 | uint32_t txMCFcnt; |
| 752 | uint32_t txBCFcnt; |
| 753 | uint32_t txUCBcnt; |
| 754 | uint32_t txMCBcnt; |
| 755 | uint32_t txBCBcnt; |
| 756 | uint32_t rxUCFcnt; |
| 757 | uint32_t rxMCFcnt; |
| 758 | uint32_t rxBCFcnt; |
| 759 | uint32_t rxUCBcnt; |
| 760 | uint32_t rxMCBcnt; |
| 761 | uint32_t rxBCBcnt; |
| 762 | uint32_t rxBcnt; |
| 763 | uint32_t rxBcntCRCok; |
| 764 | uint32_t rxRate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 765 | } tSap_SoftapStats, *tpSap_SoftapStats; |
Amar Singhal | 7a1726a | 2015-10-14 16:28:11 -0700 | [diff] [blame] | 766 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 767 | #ifdef FEATURE_WLAN_CH_AVOID |
| 768 | /* Store channel safety information */ |
| 769 | typedef struct { |
| 770 | uint16_t channelNumber; |
| 771 | bool isSafe; |
| 772 | } sapSafeChannelType; |
| 773 | #endif /* FEATURE_WLAN_CH_AVOID */ |
Jeff Johnson | 2bc0b72 | 2017-09-25 08:51:43 -0700 | [diff] [blame] | 774 | |
| 775 | /** |
| 776 | * struct sap_context - per-BSS Context for SAP |
| 777 | * |
| 778 | * struct sap_context is used to share per-BSS context between SAP and |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 779 | * its clients. A context is generated by sap_create_ctx() and is |
Krunal Soni | b5d18ae | 2017-11-20 21:52:35 -0800 | [diff] [blame] | 780 | * destroyed by sap_destroy_ctx(). During the lifetime of the BSS the |
Jeff Johnson | 2bc0b72 | 2017-09-25 08:51:43 -0700 | [diff] [blame] | 781 | * SAP context is passed as the primary parameter to SAP APIs. Note |
| 782 | * that by design the contents of the structure are opaque to the |
| 783 | * clients and a SAP context pointer must only be dereferenced by SAP. |
| 784 | */ |
| 785 | struct sap_context; |
| 786 | |
| 787 | /** |
Krunal Soni | b5d18ae | 2017-11-20 21:52:35 -0800 | [diff] [blame] | 788 | * wlansap_roam_callback() - API to get the events for SAP persona |
| 789 | * @pContext: sap context |
| 790 | * @pCsrRoamInfo: pointer to SME CSR roam info structure |
| 791 | * @roamId: roam id being used |
| 792 | * @roamStatus: status of the event reported by SME to SAP |
| 793 | * @roamResult: result of the event reported by SME to SAP |
| 794 | * |
| 795 | * Any activity like start_bss, stop_bss, and etc for SAP persona |
| 796 | * happens, SME reports the result of those events to SAP through this |
| 797 | * callback. |
| 798 | * |
| 799 | * Return: QDF_STATUS based on overall result |
| 800 | */ |
| 801 | QDF_STATUS wlansap_roam_callback(void *pContext, |
| 802 | struct csr_roam_info *pCsrRoamInfo, |
| 803 | uint32_t roamId, |
| 804 | eRoamCmdStatus roamStatus, |
| 805 | eCsrRoamResult roamResult); |
| 806 | |
| 807 | /** |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 808 | * sap_create_ctx() - API to create the sap context |
Jeff Johnson | 2bc0b72 | 2017-09-25 08:51:43 -0700 | [diff] [blame] | 809 | * |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 810 | * This API assigns the sap context from global sap context pool |
| 811 | * stored in gp_sap_ctx[i] array. |
Jeff Johnson | 2bc0b72 | 2017-09-25 08:51:43 -0700 | [diff] [blame] | 812 | * |
| 813 | * Return: Pointer to the SAP context, or NULL if a context could not |
| 814 | * be allocated |
| 815 | */ |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 816 | struct sap_context *sap_create_ctx(void); |
Jeff Johnson | 2bc0b72 | 2017-09-25 08:51:43 -0700 | [diff] [blame] | 817 | |
Jeff Johnson | 70955b5 | 2017-09-25 09:19:33 -0700 | [diff] [blame] | 818 | /** |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 819 | * sap_destroy_ctx - API to destroy the sap context |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 820 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 70955b5 | 2017-09-25 09:19:33 -0700 | [diff] [blame] | 821 | * |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 822 | * This API puts back the given sap context to global sap context pool which |
| 823 | * makes current sap session's sap context invalid. |
Jeff Johnson | 70955b5 | 2017-09-25 09:19:33 -0700 | [diff] [blame] | 824 | * |
| 825 | * Return: The result code associated with performing the operation |
| 826 | * QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL; |
| 827 | * access would cause a page fault |
| 828 | * QDF_STATUS_SUCCESS: Success |
| 829 | */ |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 830 | QDF_STATUS sap_destroy_ctx(struct sap_context *sap_ctx); |
Jeff Johnson | 70955b5 | 2017-09-25 09:19:33 -0700 | [diff] [blame] | 831 | |
Jeff Johnson | d8b6057 | 2017-09-15 11:25:05 -0700 | [diff] [blame] | 832 | /** |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 833 | * sap_init_ctx - Initialize the sap context |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 834 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | d8b6057 | 2017-09-15 11:25:05 -0700 | [diff] [blame] | 835 | * @mode: Device mode |
| 836 | * @addr: MAC address of the SAP |
| 837 | * @session_id: Pointer to the session id |
| 838 | * |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 839 | * sap_create_ctx() allocates the sap context which is uninitialized. |
| 840 | * This API needs to be called to properly initialize the sap context |
| 841 | * which is just created. |
Jeff Johnson | d8b6057 | 2017-09-15 11:25:05 -0700 | [diff] [blame] | 842 | * |
| 843 | * Return: The result code associated with performing the operation |
| 844 | * QDF_STATUS_E_FAULT: BSS could not be started |
| 845 | * QDF_STATUS_SUCCESS: Success |
| 846 | */ |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 847 | QDF_STATUS sap_init_ctx(struct sap_context *sap_ctx, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 848 | enum QDF_OPMODE mode, |
Jeff Johnson | d8b6057 | 2017-09-15 11:25:05 -0700 | [diff] [blame] | 849 | uint8_t *addr, uint32_t session_id); |
| 850 | |
Jeff Johnson | 3d4c710 | 2017-09-15 11:36:19 -0700 | [diff] [blame] | 851 | /** |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 852 | * sap_deinit_ctx() - De-initialize the sap context |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 853 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 3d4c710 | 2017-09-15 11:36:19 -0700 | [diff] [blame] | 854 | * |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 855 | * When SAP session is about to close, this API needs to be called |
| 856 | * to de-initialize all the members of sap context structure, so that |
| 857 | * nobody can accidently start using the sap context. |
Jeff Johnson | 3d4c710 | 2017-09-15 11:36:19 -0700 | [diff] [blame] | 858 | * |
| 859 | * Return: The result code associated with performing the operation |
| 860 | * QDF_STATUS_E_FAULT: BSS could not be stopped |
| 861 | * QDF_STATUS_SUCCESS: Success |
| 862 | */ |
Krunal Soni | 5943765 | 2017-11-21 13:42:14 -0800 | [diff] [blame] | 863 | QDF_STATUS sap_deinit_ctx(struct sap_context *sap_ctx); |
Jeff Johnson | 3d4c710 | 2017-09-15 11:36:19 -0700 | [diff] [blame] | 864 | |
Jeff Johnson | e5124bb | 2017-09-24 19:03:02 -0700 | [diff] [blame] | 865 | /** |
bings | 394afdd | 2017-01-09 11:22:38 +0800 | [diff] [blame] | 866 | * sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT |
Jeff Johnson | bc110a7 | 2017-09-25 15:22:18 -0700 | [diff] [blame] | 867 | * @sapcontext: Pointer to the SAP context |
bings | 394afdd | 2017-01-09 11:22:38 +0800 | [diff] [blame] | 868 | * |
| 869 | * Return: true on AUTO_CHANNEL_SELECT, false otherwise |
| 870 | */ |
Jeff Johnson | bc110a7 | 2017-09-25 15:22:18 -0700 | [diff] [blame] | 871 | bool sap_is_auto_channel_select(struct sap_context *sapcontext); |
bings | 394afdd | 2017-01-09 11:22:38 +0800 | [diff] [blame] | 872 | |
Manishekar Chandrasekaran | f7a1dad | 2016-06-23 06:43:47 +0530 | [diff] [blame] | 873 | QDF_STATUS wlansap_global_init(void); |
| 874 | QDF_STATUS wlansap_global_deinit(void); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 875 | typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent, |
Peng Xu | 66162de | 2016-02-11 17:01:20 -0800 | [diff] [blame] | 876 | void *pUsrContext); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 877 | |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 878 | /** |
| 879 | * wlansap_is_channel_in_nol_list() - This API checks if channel is |
| 880 | * in nol list |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 881 | * @sap_ctx: SAP context pointer |
Jeff Johnson | bb4d77c | 2017-09-24 19:16:50 -0700 | [diff] [blame] | 882 | * @channelNumber: channel number |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 883 | * @chanBondState: channel bonding state |
| 884 | * |
Jeff Johnson | bb4d77c | 2017-09-24 19:16:50 -0700 | [diff] [blame] | 885 | * Return: True if the channel is in the NOL list, false otherwise |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 886 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 887 | bool wlansap_is_channel_in_nol_list(struct sap_context *sap_ctx, |
Jeff Johnson | bb4d77c | 2017-09-24 19:16:50 -0700 | [diff] [blame] | 888 | uint8_t channelNumber, |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 889 | ePhyChanBondState chanBondState); |
Jeff Johnson | bb4d77c | 2017-09-24 19:16:50 -0700 | [diff] [blame] | 890 | |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 891 | /** |
| 892 | * wlansap_is_channel_leaking_in_nol() - This API checks if channel is leaking |
| 893 | * in nol list |
Jeff Johnson | 2f6013c | 2017-09-24 19:40:07 -0700 | [diff] [blame] | 894 | * @sap_ctx: SAP context pointer |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 895 | * @channel: channel |
| 896 | * @chan_bw: channel bandwidth |
| 897 | * |
| 898 | * Return: True/False |
| 899 | */ |
Jeff Johnson | 2f6013c | 2017-09-24 19:40:07 -0700 | [diff] [blame] | 900 | bool wlansap_is_channel_leaking_in_nol(struct sap_context *sap_ctx, |
| 901 | uint8_t channel, |
Kapil Gupta | 94ca6f6 | 2016-12-11 18:43:12 +0530 | [diff] [blame] | 902 | uint8_t chan_bw); |
| 903 | |
Jeff Johnson | e2f7d54 | 2017-09-24 20:52:24 -0700 | [diff] [blame] | 904 | /** |
| 905 | * wlansap_start_bss() - start BSS |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 906 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | e2f7d54 | 2017-09-24 20:52:24 -0700 | [diff] [blame] | 907 | * @pSapEventCallback: Callback function in HDD called by SAP to inform HDD |
| 908 | * about SAP results |
| 909 | * @pConfig: Pointer to configuration structure passed down from |
| 910 | * HDD(HostApd for Android) |
| 911 | * @pUsrContext: Parameter that will be passed back in all the SAP callback |
| 912 | * events. |
| 913 | * |
| 914 | * This api function provides SAP FSM event eWLAN_SAP_PHYSICAL_LINK_CREATE for |
| 915 | * starting AP BSS |
| 916 | * |
| 917 | * Return: The result code associated with performing the operation |
| 918 | * QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL; |
| 919 | * access would cause a page fault |
| 920 | * QDF_STATUS_SUCCESS: Success |
| 921 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 922 | QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx, |
Jeff Johnson | e2f7d54 | 2017-09-24 20:52:24 -0700 | [diff] [blame] | 923 | tpWLAN_SAPEventCB pSapEventCallback, |
| 924 | tsap_Config_t *pConfig, void *pUsrContext); |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 925 | |
| 926 | /** |
Jeff Johnson | 16e29cd | 2017-09-24 21:01:19 -0700 | [diff] [blame] | 927 | * wlansap_stop_bss() - stop BSS. |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 928 | * @sap_ctx: Pointer to SAP context |
Jeff Johnson | 16e29cd | 2017-09-24 21:01:19 -0700 | [diff] [blame] | 929 | * |
| 930 | * This api function provides SAP FSM event eSAP_HDD_STOP_INFRA_BSS for |
| 931 | * stopping AP BSS |
| 932 | * |
| 933 | * Return: The result code associated with performing the operation |
| 934 | * QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL; |
| 935 | * access would cause a page fault |
| 936 | * QDF_STATUS_SUCCESS: Success |
| 937 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 938 | QDF_STATUS wlansap_stop_bss(struct sap_context *sap_ctx); |
Jeff Johnson | 16e29cd | 2017-09-24 21:01:19 -0700 | [diff] [blame] | 939 | |
| 940 | /** |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 941 | * wlan_sap_update_next_channel() - Update next channel configured using vendor |
| 942 | * command in SAP context |
Jeff Johnson | cd1ee1e | 2017-09-25 14:50:49 -0700 | [diff] [blame] | 943 | * @sap_ctx: SAP context |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 944 | * @channel: channel number |
| 945 | * @chan_bw: channel width |
| 946 | * |
| 947 | * Return: QDF_STATUS |
| 948 | */ |
Jeff Johnson | cd1ee1e | 2017-09-25 14:50:49 -0700 | [diff] [blame] | 949 | QDF_STATUS wlan_sap_update_next_channel(struct sap_context *sap_ctx, |
| 950 | uint8_t channel, |
| 951 | enum phy_ch_width chan_bw); |
| 952 | |
Jeff Johnson | 108566e | 2017-09-25 14:54:35 -0700 | [diff] [blame] | 953 | /** |
| 954 | * wlan_sap_set_pre_cac_status() - Set the pre cac status |
| 955 | * @sap_ctx: SAP context |
| 956 | * @status: Status of pre cac |
| 957 | * @handle: Global MAC handle |
| 958 | * |
| 959 | * Sets the pre cac status in the MAC context and updates the state |
| 960 | * |
| 961 | * Return: QDF_STATUS |
| 962 | */ |
| 963 | QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx, |
| 964 | bool status, tHalHandle handle); |
| 965 | |
Jeff Johnson | 2cdcfdc | 2017-09-25 15:00:22 -0700 | [diff] [blame] | 966 | /** |
| 967 | * wlan_sap_set_chan_before_pre_cac() - Save the channel before pre cac |
| 968 | * @sap_ctx: SAP context |
| 969 | * @chan_before_pre_cac: Channel before pre cac |
| 970 | * |
| 971 | * Saves the channel that was in use before pre cac operation |
| 972 | * |
| 973 | * Return: QDF_STATUS |
| 974 | */ |
| 975 | QDF_STATUS wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx, |
| 976 | uint8_t chan_before_pre_cac); |
| 977 | |
Jeff Johnson | a68cc53 | 2017-09-25 15:18:30 -0700 | [diff] [blame] | 978 | /** |
| 979 | * wlan_sap_set_pre_cac_complete_status() - Sets pre cac complete status |
| 980 | * @sap_ctx: SAP context |
| 981 | * @status: Status of pre cac complete |
| 982 | * |
| 983 | * Sets the status of pre cac i.e., whether pre cac is complete or not |
| 984 | * |
| 985 | * Return: QDF_STATUS |
| 986 | */ |
| 987 | QDF_STATUS wlan_sap_set_pre_cac_complete_status(struct sap_context *sap_ctx, |
| 988 | bool status); |
| 989 | |
Manishekar Chandrasekaran | 9e8c7be | 2016-08-03 14:57:14 +0530 | [diff] [blame] | 990 | bool wlan_sap_is_pre_cac_active(tHalHandle handle); |
| 991 | 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] | 992 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
Jeff Johnson | 5e6b0d2 | 2017-09-24 19:52:34 -0700 | [diff] [blame] | 993 | /** |
| 994 | * wlansap_check_cc_intf() - Get interfering concurrent channel |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 995 | * @sap_ctx: SAP context pointer |
Jeff Johnson | 5e6b0d2 | 2017-09-24 19:52:34 -0700 | [diff] [blame] | 996 | * |
| 997 | * Determine if a Concurrent Channel is interfering. |
| 998 | * |
| 999 | * Return: Channel number of the interfering channel, or 0 if none. |
| 1000 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1001 | uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1002 | #endif |
Jeff Johnson | 65dd6d9 | 2017-09-24 21:12:49 -0700 | [diff] [blame] | 1003 | |
| 1004 | /** |
| 1005 | * wlansap_set_mac_acl() - set MAC list entry in ACL. |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1006 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 65dd6d9 | 2017-09-24 21:12:49 -0700 | [diff] [blame] | 1007 | * @pConfig: Pointer to SAP config. |
| 1008 | * |
| 1009 | * This api function provides SAP to set mac list entry in accept list as well |
| 1010 | * as deny list |
| 1011 | * |
| 1012 | * Return: The result code associated with performing the operation |
| 1013 | * QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL; |
| 1014 | * access would cause a page fault |
| 1015 | * QDF_STATUS_SUCCESS: Success |
| 1016 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1017 | QDF_STATUS wlansap_set_mac_acl(struct sap_context *sap_ctx, |
Jeff Johnson | 65dd6d9 | 2017-09-24 21:12:49 -0700 | [diff] [blame] | 1018 | tsap_Config_t *pConfig); |
Jeff Johnson | 16e29cd | 2017-09-24 21:01:19 -0700 | [diff] [blame] | 1019 | |
Jeff Johnson | 92e867c | 2017-09-25 13:58:52 -0700 | [diff] [blame] | 1020 | /** |
| 1021 | * wlansap_disassoc_sta() - initiate disassociation of station. |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1022 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 92e867c | 2017-09-25 13:58:52 -0700 | [diff] [blame] | 1023 | * @p_del_sta_params: pointer to station deletion parameters |
| 1024 | * |
| 1025 | * This api function provides for Ap App/HDD initiated disassociation of station |
| 1026 | * |
| 1027 | * Return: The QDF_STATUS code associated with performing the operation |
| 1028 | * QDF_STATUS_SUCCESS: Success |
| 1029 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1030 | QDF_STATUS wlansap_disassoc_sta(struct sap_context *sap_ctx, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 1031 | struct csr_del_sta_params *p_del_sta_params); |
Jeff Johnson | 92e867c | 2017-09-25 13:58:52 -0700 | [diff] [blame] | 1032 | |
Jeff Johnson | e7ff1d0 | 2017-09-25 14:03:34 -0700 | [diff] [blame] | 1033 | /** |
| 1034 | * wlansap_deauth_sta() - Ap App/HDD initiated deauthentication of station |
| 1035 | * @pStaCtx : Pointer to the SAP context |
| 1036 | * @pDelStaParams : Pointer to parameters of the station to deauthenticate |
| 1037 | * |
| 1038 | * This api function provides for Ap App/HDD initiated deauthentication of |
| 1039 | * station |
| 1040 | * |
| 1041 | * Return: The QDF_STATUS code associated with performing the operation |
| 1042 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1043 | QDF_STATUS wlansap_deauth_sta(struct sap_context *sap_ctx, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 1044 | struct csr_del_sta_params *pDelStaParams); |
Jeff Johnson | e7ff1d0 | 2017-09-25 14:03:34 -0700 | [diff] [blame] | 1045 | |
Jeff Johnson | 52a2ce3 | 2017-09-25 14:13:27 -0700 | [diff] [blame] | 1046 | /** |
| 1047 | * wlansap_set_channel_change_with_csa() - Set channel change with CSA |
| 1048 | * @sapContext: Pointer to SAP context |
| 1049 | * @targetChannel: Target channel |
| 1050 | * @target_bw: Target bandwidth |
| 1051 | * @strict: if true switch to the requested channel always, fail |
| 1052 | * otherwise |
| 1053 | * |
| 1054 | * This api function does a channel change to the target channel specified. |
| 1055 | * CSA IE is included in the beacons before doing a channel change. |
| 1056 | * |
| 1057 | * Return: QDF_STATUS |
| 1058 | */ |
| 1059 | QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext, |
| 1060 | uint32_t targetChannel, |
| 1061 | enum phy_ch_width target_bw, |
| 1062 | bool strict); |
| 1063 | |
Jeff Johnson | e6b25d9 | 2017-09-25 14:30:32 -0700 | [diff] [blame] | 1064 | /** |
| 1065 | * wlansap_set_key_sta() - set keys for a stations. |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1066 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | e6b25d9 | 2017-09-25 14:30:32 -0700 | [diff] [blame] | 1067 | * @pSetKeyInfo : tCsrRoamSetKey structure for the station |
| 1068 | * |
| 1069 | * This api function provides for Ap App/HDD to set key for a station. |
| 1070 | * |
| 1071 | * Return: The QDF_STATUS code associated with performing the operation |
| 1072 | * QDF_STATUS_SUCCESS: Success |
| 1073 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1074 | QDF_STATUS wlansap_set_key_sta(struct sap_context *sap_ctx, |
Jeff Johnson | e6b25d9 | 2017-09-25 14:30:32 -0700 | [diff] [blame] | 1075 | tCsrRoamSetKey *pSetKeyInfo); |
Jeff Johnson | 617fe64 | 2017-09-24 17:52:51 -0700 | [diff] [blame] | 1076 | |
| 1077 | /** |
| 1078 | * wlan_sap_getstation_ie_information() - RSNIE Population |
| 1079 | * @sap_ctx: Pointer to the SAP context |
| 1080 | * @len: Length of @buf |
| 1081 | * @buf: RSNIE IE data |
| 1082 | * |
| 1083 | * Populate RSN IE from CSR to HDD context |
| 1084 | * |
| 1085 | * Return: QDF_STATUS enumeration |
| 1086 | */ |
| 1087 | |
| 1088 | QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx, |
| 1089 | uint32_t *len, uint8_t *buf); |
| 1090 | |
Jeff Johnson | 31d1a74 | 2017-09-25 13:53:29 -0700 | [diff] [blame] | 1091 | /** |
| 1092 | * wlansap_clear_acl() - Clear all ACLs |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1093 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 31d1a74 | 2017-09-25 13:53:29 -0700 | [diff] [blame] | 1094 | * |
| 1095 | * Return: QDF_STATUS. If success the ACLs were cleared, otherwise an |
| 1096 | * error occurred. |
| 1097 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1098 | QDF_STATUS wlansap_clear_acl(struct sap_context *sap_ctx); |
Jeff Johnson | 878f6d5 | 2017-09-25 08:28:53 -0700 | [diff] [blame] | 1099 | |
| 1100 | /** |
| 1101 | * wlansap_get_acl_accept_list() - Get ACL accept list |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1102 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 878f6d5 | 2017-09-25 08:28:53 -0700 | [diff] [blame] | 1103 | * @pAcceptList: Pointer to the buffer to store the ACL accept list |
| 1104 | * @nAcceptList: Pointer to the location to store the number of |
| 1105 | * entries in the ACL accept list. |
| 1106 | * |
| 1107 | * Return: QDF_STATUS. If success the data was returned, otherwise an |
| 1108 | * error occurred. |
| 1109 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1110 | QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *sap_ctx, |
Jeff Johnson | 878f6d5 | 2017-09-25 08:28:53 -0700 | [diff] [blame] | 1111 | struct qdf_mac_addr *pAcceptList, |
| 1112 | uint8_t *nAcceptList); |
| 1113 | |
Jeff Johnson | 49c819f | 2017-09-25 13:48:36 -0700 | [diff] [blame] | 1114 | /** |
| 1115 | * wlansap_get_acl_deny_list() - Get ACL deny list |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1116 | * @sap_ctx: Pointer to the SAP context |
Jeff Johnson | 49c819f | 2017-09-25 13:48:36 -0700 | [diff] [blame] | 1117 | * @pDenyList: Pointer to the buffer to store the ACL deny list |
| 1118 | * @nDenyList: Pointer to the location to store the number of |
| 1119 | * entries in the ACL deny list. |
| 1120 | * |
| 1121 | * Return: QDF_STATUS. If success the data was returned, otherwise an |
| 1122 | * error occurred. |
| 1123 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1124 | QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *sap_ctx, |
Jeff Johnson | 49c819f | 2017-09-25 13:48:36 -0700 | [diff] [blame] | 1125 | struct qdf_mac_addr *pDenyList, |
| 1126 | uint8_t *nDenyList); |
Jeff Johnson | f8ac737 | 2017-09-24 21:24:25 -0700 | [diff] [blame] | 1127 | |
| 1128 | /** |
| 1129 | * wlansap_set_acl_mode() - Set the SAP ACL mode |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1130 | * @sap_ctx: The SAP context pointer |
Jeff Johnson | f8ac737 | 2017-09-24 21:24:25 -0700 | [diff] [blame] | 1131 | * @mode: the desired ACL mode |
| 1132 | * |
| 1133 | * Return: QDF_STATUS |
| 1134 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1135 | QDF_STATUS wlansap_set_acl_mode(struct sap_context *sap_ctx, |
Jeff Johnson | f8ac737 | 2017-09-24 21:24:25 -0700 | [diff] [blame] | 1136 | eSapMacAddrACL mode); |
| 1137 | |
Jeff Johnson | 1030f8c | 2017-09-24 21:33:40 -0700 | [diff] [blame] | 1138 | /** |
| 1139 | * wlansap_get_acl_mode() - Get the SAP ACL mode |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1140 | * @sap_ctx: The SAP context pointer |
Jeff Johnson | 1030f8c | 2017-09-24 21:33:40 -0700 | [diff] [blame] | 1141 | * @mode: Pointer where to return the current ACL mode |
| 1142 | * |
| 1143 | * Return: QDF_STATUS |
| 1144 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1145 | QDF_STATUS wlansap_get_acl_mode(struct sap_context *sap_ctx, |
Jeff Johnson | 1030f8c | 2017-09-24 21:33:40 -0700 | [diff] [blame] | 1146 | eSapMacAddrACL *mode); |
Jeff Johnson | 42fbe2f | 2017-09-24 17:42:11 -0700 | [diff] [blame] | 1147 | |
| 1148 | /** |
| 1149 | * wlansap_modify_acl() - Update ACL entries |
| 1150 | * @sap_ctx: Pointer to the SAP context |
| 1151 | * @peer_sta_mac: peer sta mac to be updated. |
| 1152 | * @list_type: white/Black list type. |
| 1153 | * @cmd: command to be executed on ACL. |
| 1154 | * |
| 1155 | * This function is called when a peer needs to be added or deleted from the |
| 1156 | * white/black ACL |
| 1157 | * |
| 1158 | * Return: Status |
| 1159 | */ |
| 1160 | QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx, |
| 1161 | uint8_t *peer_sta_mac, |
| 1162 | eSapACLType list_type, eSapACLCmdType cmd); |
| 1163 | |
Jeff Johnson | 730c250 | 2017-09-25 14:33:45 -0700 | [diff] [blame] | 1164 | /** |
Jeff Johnson | 4a7ff43 | 2017-09-24 18:10:00 -0700 | [diff] [blame] | 1165 | * wlansap_register_mgmt_frame() - register management frame |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1166 | * @sap_ctx: Pointer to SAP context |
Jeff Johnson | 4a7ff43 | 2017-09-24 18:10:00 -0700 | [diff] [blame] | 1167 | * @frame_type: frame type that needs to be registered with PE. |
| 1168 | * @match_data: pointer to data which should be matched after @frame_type |
| 1169 | * is matched. |
| 1170 | * @match_len: Length of the @match_data |
| 1171 | * |
| 1172 | * HDD use this API to register specified type of frame with CORE stack. |
| 1173 | * On receiving such kind of frame CORE stack should pass this frame to HDD |
| 1174 | * |
| 1175 | * Return: The QDF_STATUS code associated with performing the operation |
| 1176 | * QDF_STATUS_SUCCESS: Success and error code otherwise |
| 1177 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1178 | QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *sap_ctx, |
Jeff Johnson | 4a7ff43 | 2017-09-24 18:10:00 -0700 | [diff] [blame] | 1179 | uint16_t frame_type, |
| 1180 | uint8_t *match_data, |
| 1181 | uint16_t match_len); |
| 1182 | |
Jeff Johnson | 42e7c40 | 2017-09-24 18:18:10 -0700 | [diff] [blame] | 1183 | /** |
| 1184 | * wlansap_de_register_mgmt_frame() - de register management frame |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1185 | * @sap_ctx: Pointer to SAP context |
Jeff Johnson | 42e7c40 | 2017-09-24 18:18:10 -0700 | [diff] [blame] | 1186 | * @frame_type: frame type that needs to be de-registered with PE. |
| 1187 | * @match_data: pointer to data which should be matched after @frame_type |
| 1188 | * is matched. |
| 1189 | * @match_len: Length of the @match_data |
| 1190 | * |
| 1191 | * HDD use this API to deregister a previously registered frame |
| 1192 | * |
| 1193 | * Return: The QDF_STATUS code associated with performing the operation |
| 1194 | * QDF_STATUS_SUCCESS: Success and error code otherwise |
| 1195 | */ |
Jeff Johnson | e13d806 | 2017-09-28 06:54:55 -0700 | [diff] [blame] | 1196 | QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *sap_ctx, |
Jeff Johnson | 42e7c40 | 2017-09-24 18:18:10 -0700 | [diff] [blame] | 1197 | uint16_t frame_type, |
| 1198 | uint8_t *match_data, |
| 1199 | uint16_t match_len); |
| 1200 | |
Jeff Johnson | 164b3bb | 2017-09-25 19:34:14 -0700 | [diff] [blame] | 1201 | /** |
| 1202 | * wlansap_channel_change_request() - Send channel change request |
| 1203 | * @sapContext: Pointer to the SAP context |
| 1204 | * @target_channel: Target channel |
| 1205 | * |
| 1206 | * This API is used to send an Indication to SME/PE to change the |
| 1207 | * current operating channel to a different target channel. |
| 1208 | * |
| 1209 | * The Channel change will be issued by SAP under the following |
| 1210 | * scenarios. |
| 1211 | * 1. A radar indication is received during SAP CAC WAIT STATE and |
| 1212 | * channel change is required. |
| 1213 | * 2. A radar indication is received during SAP STARTED STATE and |
| 1214 | * channel change is required. |
| 1215 | * |
| 1216 | * Return: The QDF_STATUS code associated with performing the operation |
| 1217 | * QDF_STATUS_SUCCESS: Success |
| 1218 | * |
| 1219 | */ |
| 1220 | QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext, |
| 1221 | uint8_t target_channel); |
Jeff Johnson | 3abdd24 | 2017-09-25 19:21:33 -0700 | [diff] [blame] | 1222 | |
| 1223 | /** |
| 1224 | * wlansap_start_beacon_req() - Send Start Beaconing Request |
| 1225 | * @sap_ctx: Pointer to the SAP context |
| 1226 | * |
| 1227 | * This API is used to send an Indication to SME/PE to start |
| 1228 | * beaconing on the current operating channel. |
| 1229 | * |
| 1230 | * When SAP is started on DFS channel and when ADD BSS RESP is received |
| 1231 | * LIM temporarily holds off Beaconing for SAP to do CAC WAIT. When |
| 1232 | * CAC WAIT is done SAP resumes the Beacon Tx by sending a start beacon |
| 1233 | * request to LIM. |
| 1234 | * |
| 1235 | * Return: The QDF_STATUS code associated with performing the operation |
| 1236 | * QDF_STATUS_SUCCESS: Success |
| 1237 | */ |
| 1238 | QDF_STATUS wlansap_start_beacon_req(struct sap_context *sap_ctx); |
Jeff Johnson | bfeafc6 | 2017-09-25 18:50:01 -0700 | [diff] [blame] | 1239 | |
| 1240 | /** |
| 1241 | * wlansap_dfs_send_csa_ie_request() - Send CSA IE |
| 1242 | * @sap_ctx: Pointer to the SAP context |
| 1243 | * |
| 1244 | * This API is used to send channel switch announcement request to PE |
| 1245 | * |
| 1246 | * Return: The QDF_STATUS code associated with performing the operation |
| 1247 | * QDF_STATUS_SUCCESS: Success |
| 1248 | */ |
| 1249 | QDF_STATUS wlansap_dfs_send_csa_ie_request(struct sap_context *sap_ctx); |
| 1250 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1251 | QDF_STATUS wlansap_get_dfs_ignore_cac(tHalHandle hHal, uint8_t *pIgnore_cac); |
| 1252 | QDF_STATUS wlansap_set_dfs_ignore_cac(tHalHandle hHal, uint8_t ignore_cac); |
| 1253 | QDF_STATUS wlansap_set_dfs_restrict_japan_w53(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1254 | uint8_t disable_Dfs_JapanW3); |
| 1255 | |
| 1256 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1257 | QDF_STATUS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1258 | wlan_sap_set_channel_avoidance(tHalHandle hal, bool sap_channel_avoidance); |
| 1259 | #endif |
| 1260 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1261 | QDF_STATUS wlansap_set_dfs_preferred_channel_location(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1262 | uint8_t dfs_Preferred_Channels_location); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1263 | QDF_STATUS wlansap_set_dfs_target_chnl(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1264 | uint8_t target_channel); |
bings | 58ce862 | 2017-07-10 15:55:36 +0800 | [diff] [blame] | 1265 | |
| 1266 | /** |
Nachiket Kukade | d915283 | 2017-10-16 16:18:22 +0530 | [diff] [blame] | 1267 | * wlan_sap_get_roam_profile() - Returns sap roam profile. |
| 1268 | * @sap_ctx: Pointer to Sap Context. |
| 1269 | * |
| 1270 | * This function provides the SAP roam profile. |
| 1271 | * |
| 1272 | * Return: SAP RoamProfile |
| 1273 | */ |
Jeff Johnson | 66ee8a9 | 2018-03-17 15:24:26 -0700 | [diff] [blame] | 1274 | struct csr_roam_profile *wlan_sap_get_roam_profile(struct sap_context *sap_ctx); |
Nachiket Kukade | d915283 | 2017-10-16 16:18:22 +0530 | [diff] [blame] | 1275 | |
| 1276 | /** |
bings | 58ce862 | 2017-07-10 15:55:36 +0800 | [diff] [blame] | 1277 | * wlan_sap_get_phymode() - Returns sap phymode. |
Jeff Johnson | ebb7f0a | 2017-09-24 20:00:13 -0700 | [diff] [blame] | 1278 | * @sap_ctx: Pointer to Sap Context. |
bings | 58ce862 | 2017-07-10 15:55:36 +0800 | [diff] [blame] | 1279 | * |
| 1280 | * This function provides the SAP current phymode. |
| 1281 | * |
| 1282 | * Return: phymode |
| 1283 | */ |
Jeff Johnson | ebb7f0a | 2017-09-24 20:00:13 -0700 | [diff] [blame] | 1284 | eCsrPhyMode wlan_sap_get_phymode(struct sap_context *sap_ctx); |
| 1285 | |
Jeff Johnson | ee7a393 | 2017-09-24 20:17:55 -0700 | [diff] [blame] | 1286 | /** |
| 1287 | * wlan_sap_get_vht_ch_width() - Returns SAP VHT channel width. |
| 1288 | * @sap_ctx: Pointer to Sap Context |
| 1289 | * |
| 1290 | * This function provides the SAP current VHT channel with. |
| 1291 | * |
| 1292 | * Return: VHT channel width |
| 1293 | */ |
| 1294 | uint32_t wlan_sap_get_vht_ch_width(struct sap_context *sap_ctx); |
| 1295 | |
Jeff Johnson | 2de14da | 2017-09-24 20:23:37 -0700 | [diff] [blame] | 1296 | /** |
| 1297 | * wlan_sap_set_vht_ch_width() - Sets SAP VHT channel width. |
| 1298 | * @sap_ctx: Pointer to Sap Context |
| 1299 | * @vht_channel_width: SAP VHT channel width value. |
| 1300 | * |
| 1301 | * This function sets the SAP current VHT channel width. |
| 1302 | * |
| 1303 | * Return: None |
| 1304 | */ |
| 1305 | void wlan_sap_set_vht_ch_width(struct sap_context *sap_ctx, |
| 1306 | uint32_t vht_channel_width); |
| 1307 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1308 | QDF_STATUS wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1309 | const uint8_t * |
| 1310 | pAdditionIEBuffer, |
| 1311 | uint16_t additionIELength, |
| 1312 | eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1313 | QDF_STATUS wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1314 | eUpdateIEsType updateType); |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1315 | void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum, |
| 1316 | uint8_t *endChannelNum, uint8_t *bandStartChannel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1317 | uint8_t *bandEndChannel); |
Jeff Johnson | b26e270 | 2017-09-25 18:31:14 -0700 | [diff] [blame] | 1318 | |
| 1319 | /** |
Arif Hussain | cd15163 | 2017-02-11 16:57:19 -0800 | [diff] [blame] | 1320 | * wlansap_set_dfs_nol() - Set dfs nol |
| 1321 | * @sap_ctx: SAP context |
| 1322 | * @conf: set type |
| 1323 | * |
| 1324 | * Return: QDF_STATUS |
| 1325 | */ |
Wen Gong | 01a2c63 | 2018-04-11 18:34:55 +0800 | [diff] [blame^] | 1326 | #ifdef DFS_COMPONENT_ENABLE |
Jeff Johnson | b3c4f7e | 2017-09-25 18:23:05 -0700 | [diff] [blame] | 1327 | QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, |
| 1328 | eSapDfsNolType conf); |
Wen Gong | 01a2c63 | 2018-04-11 18:34:55 +0800 | [diff] [blame^] | 1329 | #else |
| 1330 | static inline QDF_STATUS wlansap_set_dfs_nol(struct sap_context *sap_ctx, |
| 1331 | eSapDfsNolType conf) |
| 1332 | { |
| 1333 | return QDF_STATUS_SUCCESS; |
| 1334 | } |
| 1335 | #endif |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 1336 | |
| 1337 | /** |
| 1338 | * wlan_sap_set_vendor_acs() - Set vendor specific acs in sap context |
Jeff Johnson | ed4ed17 | 2017-09-25 18:36:16 -0700 | [diff] [blame] | 1339 | * @sap_context: SAP context |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 1340 | * @is_vendor_acs: if vendor specific acs is enabled |
| 1341 | * |
| 1342 | * Return: QDF_STATUS |
| 1343 | */ |
Jeff Johnson | ed4ed17 | 2017-09-25 18:36:16 -0700 | [diff] [blame] | 1344 | QDF_STATUS wlan_sap_set_vendor_acs(struct sap_context *sap_context, |
| 1345 | bool is_vendor_acs); |
| 1346 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1347 | void wlansap_populate_del_sta_params(const uint8_t *mac, |
| 1348 | uint16_t reason_code, |
| 1349 | uint8_t subtype, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 1350 | struct csr_del_sta_params *pDelStaParams); |
Jeff Johnson | 630fd6a | 2017-09-25 15:27:39 -0700 | [diff] [blame] | 1351 | |
| 1352 | /** |
| 1353 | * wlansap_acs_chselect() - Initiates acs channel selection |
| 1354 | * @sap_context: Pointer to SAP context structure |
| 1355 | * @pacs_event_callback: Callback function in hdd called by sap |
| 1356 | * to inform hdd about channel selection result |
| 1357 | * @pconfig: Pointer to configuration structure |
| 1358 | * passed down from hdd |
| 1359 | * @pusr_context: Parameter that will be passed back in all |
| 1360 | * the sap callback events. |
| 1361 | * |
| 1362 | * This function serves as an api for hdd to initiate acs scan pre |
| 1363 | * start bss. |
| 1364 | * |
| 1365 | * Return: The QDF_STATUS code associated with performing the operation. |
| 1366 | */ |
| 1367 | QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context, |
| 1368 | tpWLAN_SAPEventCB pacs_event_callback, |
| 1369 | tsap_Config_t *pconfig, |
| 1370 | void *pusr_context); |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 1371 | |
Jeff Johnson | 92675a5 | 2017-09-25 15:35:19 -0700 | [diff] [blame] | 1372 | /** |
| 1373 | * wlansap_get_chan_width() - get sap channel width. |
| 1374 | * @sap_ctx: pointer to the SAP context |
| 1375 | * |
| 1376 | * This function get channel width of sap. |
| 1377 | * |
| 1378 | * Return: sap channel width |
| 1379 | */ |
| 1380 | uint32_t wlansap_get_chan_width(struct sap_context *sap_ctx); |
Kai Liu | bdd5fcb | 2016-09-28 22:55:44 +0800 | [diff] [blame] | 1381 | |
bings | 1826d9c | 2018-01-23 16:14:01 +0800 | [diff] [blame] | 1382 | /** |
| 1383 | * wlansap_set_tx_leakage_threshold() - set sap tx leakage threshold. |
| 1384 | * @hal: HAL pointer |
| 1385 | * @tx_leakage_threshold: sap tx leakage threshold |
| 1386 | * |
| 1387 | * This function set sap tx leakage threshold. |
| 1388 | * |
| 1389 | * Return: QDF_STATUS. |
| 1390 | */ |
Yingying Tang | b4832f7 | 2016-10-20 13:44:55 +0800 | [diff] [blame] | 1391 | QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal, |
| 1392 | uint16_t tx_leakage_threshold); |
Wu Gao | 3671743 | 2016-11-21 15:09:48 +0800 | [diff] [blame] | 1393 | |
Jeff Johnson | 104433a | 2017-09-25 15:39:43 -0700 | [diff] [blame] | 1394 | /* |
| 1395 | * wlansap_set_invalid_session() - set session ID to invalid |
| 1396 | * @sap_ctx: pointer to the SAP context |
| 1397 | * |
| 1398 | * This function sets session ID to invalid |
| 1399 | * |
| 1400 | * Return: QDF_STATUS |
| 1401 | */ |
| 1402 | QDF_STATUS wlansap_set_invalid_session(struct sap_context *sap_ctx); |
Wu Gao | 3671743 | 2016-11-21 15:09:48 +0800 | [diff] [blame] | 1403 | |
Arif Hussain | cd15163 | 2017-02-11 16:57:19 -0800 | [diff] [blame] | 1404 | /** |
| 1405 | * sap_dfs_set_current_channel() - Set current channel params in dfs component |
| 1406 | * @sap_ctx: sap context |
| 1407 | * |
| 1408 | * Set current channel params in dfs component, this info will be used to mark |
| 1409 | * the channels in nol when radar is detected. |
| 1410 | * |
| 1411 | * Return: None |
| 1412 | */ |
| 1413 | void sap_dfs_set_current_channel(void *sap_ctx); |
Wu Gao | 3545e64 | 2017-07-14 19:24:41 +0800 | [diff] [blame] | 1414 | |
| 1415 | /** |
| 1416 | * wlansap_cleanup_cac_timer() - Force cleanup DFS CAC timer |
| 1417 | * @sap_ctx: sap context |
| 1418 | * |
| 1419 | * Force cleanup DFS CAC timer when reset all adapters. It will not |
| 1420 | * check concurrency SAP since just called when reset all adapters. |
| 1421 | * |
| 1422 | * Return: None |
| 1423 | */ |
Jeff Johnson | 14ec068 | 2017-09-25 15:44:03 -0700 | [diff] [blame] | 1424 | void wlansap_cleanup_cac_timer(struct sap_context *sap_ctx); |
Wu Gao | 3545e64 | 2017-07-14 19:24:41 +0800 | [diff] [blame] | 1425 | |
Vignesh Viswanathan | 200f5c1 | 2018-02-27 14:01:59 +0530 | [diff] [blame] | 1426 | /** |
| 1427 | * wlansap_set_stop_bss_inprogress - sets the stop_bss_in_progress flag |
| 1428 | * |
| 1429 | * @sap_ctx: Pointer to the global SAP ctx |
| 1430 | * @in_progress: the value to be set to the stop_bss_in_progress_flag |
| 1431 | * |
| 1432 | * This function sets the value in in_progress parameter to the |
| 1433 | * stop_bss_in_progress flag in sap_context. |
| 1434 | * |
| 1435 | * Return: None |
| 1436 | */ |
| 1437 | void wlansap_set_stop_bss_inprogress(struct sap_context *sap_ctx, |
| 1438 | bool in_progress); |
| 1439 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1440 | #ifdef __cplusplus |
| 1441 | } |
| 1442 | #endif |
| 1443 | #endif /* #ifndef WLAN_QCT_WLANSAP_H */ |