Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
kaliu | 154d789 | 2015-12-30 17:27:58 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011-2016 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 | /** |
| 29 | * \file csr_api.h |
| 30 | * |
| 31 | * Exports and types for the Common Scan and Roaming Module interfaces. |
| 32 | */ |
| 33 | |
| 34 | #ifndef CSRAPI_H__ |
| 35 | #define CSRAPI_H__ |
| 36 | |
| 37 | #include "sir_api.h" |
| 38 | #include "sir_mac_prot_def.h" |
| 39 | #include "csr_link_list.h" |
| 40 | |
| 41 | #define CSR_INVALID_SCANRESULT_HANDLE (NULL) |
| 42 | |
| 43 | typedef enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 44 | /* never used */ |
| 45 | eCSR_AUTH_TYPE_NONE, |
| 46 | /* MAC layer authentication types */ |
| 47 | eCSR_AUTH_TYPE_OPEN_SYSTEM, |
| 48 | eCSR_AUTH_TYPE_SHARED_KEY, |
| 49 | eCSR_AUTH_TYPE_AUTOSWITCH, |
| 50 | |
| 51 | /* Upper layer authentication types */ |
| 52 | eCSR_AUTH_TYPE_WPA, |
| 53 | eCSR_AUTH_TYPE_WPA_PSK, |
| 54 | eCSR_AUTH_TYPE_WPA_NONE, |
| 55 | |
| 56 | eCSR_AUTH_TYPE_RSN, |
| 57 | eCSR_AUTH_TYPE_RSN_PSK, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 58 | eCSR_AUTH_TYPE_FT_RSN, |
| 59 | eCSR_AUTH_TYPE_FT_RSN_PSK, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 60 | #ifdef FEATURE_WLAN_WAPI |
| 61 | eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE, |
| 62 | eCSR_AUTH_TYPE_WAPI_WAI_PSK, |
| 63 | #endif /* FEATURE_WLAN_WAPI */ |
| 64 | #ifdef FEATURE_WLAN_ESE |
| 65 | eCSR_AUTH_TYPE_CCKM_WPA, |
| 66 | eCSR_AUTH_TYPE_CCKM_RSN, |
| 67 | #endif /* FEATURE_WLAN_ESE */ |
| 68 | #ifdef WLAN_FEATURE_11W |
| 69 | eCSR_AUTH_TYPE_RSN_PSK_SHA256, |
| 70 | eCSR_AUTH_TYPE_RSN_8021X_SHA256, |
| 71 | #endif |
| 72 | eCSR_NUM_OF_SUPPORT_AUTH_TYPE, |
| 73 | eCSR_AUTH_TYPE_FAILED = 0xff, |
| 74 | eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED, |
| 75 | |
| 76 | } eCsrAuthType; |
| 77 | |
| 78 | typedef enum { |
| 79 | eCSR_ENCRYPT_TYPE_NONE, |
| 80 | eCSR_ENCRYPT_TYPE_WEP40_STATICKEY, |
| 81 | eCSR_ENCRYPT_TYPE_WEP104_STATICKEY, |
| 82 | eCSR_ENCRYPT_TYPE_WEP40, |
| 83 | eCSR_ENCRYPT_TYPE_WEP104, |
| 84 | eCSR_ENCRYPT_TYPE_TKIP, |
| 85 | eCSR_ENCRYPT_TYPE_AES, |
| 86 | #ifdef FEATURE_WLAN_WAPI |
| 87 | /* WAPI */ |
| 88 | eCSR_ENCRYPT_TYPE_WPI, |
| 89 | #endif /* FEATURE_WLAN_WAPI */ |
| 90 | #ifdef FEATURE_WLAN_ESE |
| 91 | eCSR_ENCRYPT_TYPE_KRK, |
| 92 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 93 | eCSR_ENCRYPT_TYPE_BTK, |
| 94 | #endif |
| 95 | #endif /* FEATURE_WLAN_ESE */ |
| 96 | #ifdef WLAN_FEATURE_11W |
| 97 | /* 11w BIP */ |
| 98 | eCSR_ENCRYPT_TYPE_AES_CMAC, |
| 99 | #endif |
| 100 | eCSR_ENCRYPT_TYPE_ANY, |
| 101 | eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY, |
| 102 | |
| 103 | eCSR_ENCRYPT_TYPE_FAILED = 0xff, |
| 104 | eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED, |
| 105 | |
| 106 | } eCsrEncryptionType; |
| 107 | |
| 108 | /*--------------------------------------------------------------------------- |
| 109 | Enumeration of the various Security types |
| 110 | ---------------------------------------------------------------------------*/ |
| 111 | typedef enum { |
| 112 | eCSR_SECURITY_TYPE_WPA, |
| 113 | eCSR_SECURITY_TYPE_RSN, |
| 114 | #ifdef FEATURE_WLAN_WAPI |
| 115 | eCSR_SECURITY_TYPE_WAPI, |
| 116 | #endif /* FEATURE_WLAN_WAPI */ |
| 117 | eCSR_SECURITY_TYPE_UNKNOWN, |
| 118 | |
| 119 | } eCsrSecurityType; |
| 120 | |
| 121 | typedef enum { |
| 122 | /* 11a/b/g only, no HT, no proprietary */ |
| 123 | eCSR_DOT11_MODE_abg = 0x0001, |
| 124 | eCSR_DOT11_MODE_11a = 0x0002, |
| 125 | eCSR_DOT11_MODE_11b = 0x0004, |
| 126 | eCSR_DOT11_MODE_11g = 0x0008, |
| 127 | eCSR_DOT11_MODE_11n = 0x0010, |
| 128 | eCSR_DOT11_MODE_11g_ONLY = 0x0020, |
| 129 | eCSR_DOT11_MODE_11n_ONLY = 0x0040, |
| 130 | eCSR_DOT11_MODE_11b_ONLY = 0x0080, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 131 | eCSR_DOT11_MODE_11ac = 0x0100, |
| 132 | eCSR_DOT11_MODE_11ac_ONLY = 0x0200, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 133 | /* |
| 134 | * This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL |
| 135 | * except when it starts IBSS in 11B of 2.4GHz |
| 136 | * It is for CSR internal use |
| 137 | */ |
| 138 | eCSR_DOT11_MODE_AUTO = 0x0400, |
| 139 | |
| 140 | /* specify the number of maximum bits for phyMode */ |
| 141 | eCSR_NUM_PHY_MODE = 16, |
| 142 | } eCsrPhyMode; |
| 143 | |
| 144 | typedef enum { |
| 145 | eCSR_BSS_TYPE_NONE, |
| 146 | eCSR_BSS_TYPE_INFRASTRUCTURE, |
| 147 | eCSR_BSS_TYPE_INFRA_AP, /* SoftAP AP */ |
| 148 | eCSR_BSS_TYPE_IBSS, /* IBSS network we'll NOT start */ |
| 149 | eCSR_BSS_TYPE_START_IBSS, /* IBSS network we'll start if no partners */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 150 | eCSR_BSS_TYPE_ANY, /* any BSS type (IBSS or Infrastructure).*/ |
| 151 | } eCsrRoamBssType; |
| 152 | |
| 153 | typedef enum { |
| 154 | eCSR_SCAN_REQUEST_11D_SCAN = 1, |
| 155 | eCSR_SCAN_REQUEST_FULL_SCAN, |
| 156 | eCSR_SCAN_IDLE_MODE_SCAN, |
| 157 | eCSR_SCAN_HO_PROBE_SCAN, /* direct probe on entry from candidate list */ |
| 158 | eCSR_SCAN_P2P_DISCOVERY, |
| 159 | |
| 160 | eCSR_SCAN_SOFTAP_CHANNEL_RANGE, |
| 161 | eCSR_SCAN_P2P_FIND_PEER, |
| 162 | } eCsrRequestType; |
| 163 | |
| 164 | typedef enum { |
| 165 | eCSR_SCAN_RESULT_GET = 0, |
| 166 | eCSR_SCAN_RESULT_FLUSH = 1, /* to delete all cached scan results */ |
| 167 | } eCsrScanResultCmd; |
| 168 | |
| 169 | typedef enum { |
| 170 | eCSR_SCAN_SUCCESS, |
| 171 | eCSR_SCAN_FAILURE, |
| 172 | eCSR_SCAN_ABORT, |
| 173 | eCSR_SCAN_FOUND_PEER, |
| 174 | } eCsrScanStatus; |
| 175 | |
| 176 | /* |
| 177 | * Reason to abort the scan |
| 178 | * The reason can used later to decide whether to update the scan results |
| 179 | * to upper layer or not |
| 180 | */ |
| 181 | typedef enum { |
| 182 | eCSR_SCAN_ABORT_DEFAULT, |
| 183 | eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, /* Scan abort due to band change */ |
| 184 | eCSR_SCAN_ABORT_SSID_ONLY |
| 185 | } eCsrAbortReason; |
| 186 | |
| 187 | typedef enum { |
| 188 | eCSR_BW_20MHz_VAL = 20, |
| 189 | eCSR_BW_40MHz_VAL = 40, |
| 190 | eCSR_BW_80MHz_VAL = 80, |
| 191 | eCSR_BW_160MHz_VAL = 160 |
| 192 | } eCSR_BW_Val; |
| 193 | |
| 194 | typedef enum { |
| 195 | eCSR_INI_SINGLE_CHANNEL_CENTERED = 0, |
| 196 | eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY, |
| 197 | eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 198 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED, |
| 199 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED, |
| 200 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED, |
| 201 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW, |
| 202 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW, |
| 203 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH, |
| 204 | eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 205 | eCSR_INI_CHANNEL_BONDING_STATE_MAX |
| 206 | } eIniChanBondState; |
| 207 | |
| 208 | #define CSR_RSN_PMKID_SIZE 16 |
| 209 | #define CSR_MAX_PMKID_ALLOWED 32 |
| 210 | #define CSR_WEP40_KEY_LEN 5 |
| 211 | #define CSR_WEP104_KEY_LEN 13 |
| 212 | #define CSR_TKIP_KEY_LEN 32 |
| 213 | #define CSR_AES_KEY_LEN 16 |
| 214 | #define CSR_MAX_TX_POWER (WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX) |
| 215 | #define CSR_MAX_RSC_LEN 16 |
| 216 | #ifdef FEATURE_WLAN_WAPI |
| 217 | #define CSR_WAPI_BKID_SIZE 16 |
| 218 | #define CSR_MAX_BKID_ALLOWED 16 |
| 219 | #define CSR_WAPI_KEY_LEN 32 |
| 220 | #define CSR_MAX_KEY_LEN (CSR_WAPI_KEY_LEN) /* longest one is for WAPI */ |
| 221 | #else |
| 222 | #define CSR_MAX_KEY_LEN (CSR_TKIP_KEY_LEN) /* longest one is for TKIP */ |
| 223 | #endif /* FEATURE_WLAN_WAPI */ |
| 224 | #ifdef FEATURE_WLAN_ESE |
| 225 | #define CSR_KRK_KEY_LEN 16 |
| 226 | #endif |
| 227 | |
| 228 | typedef struct tagCsrChannelInfo { |
| 229 | uint8_t numOfChannels; |
| 230 | uint8_t *ChannelList; /* it will be an array of channels */ |
| 231 | } tCsrChannelInfo, *tpCsrChannelInfo; |
| 232 | |
| 233 | typedef struct tagCsrSSIDInfo { |
| 234 | tSirMacSSid SSID; |
| 235 | bool handoffPermitted; |
| 236 | bool ssidHidden; |
| 237 | } tCsrSSIDInfo; |
| 238 | |
| 239 | typedef struct tagCsrSSIDs { |
| 240 | uint32_t numOfSSIDs; |
| 241 | tCsrSSIDInfo *SSIDList; /* To be allocated for array of SSIDs */ |
| 242 | } tCsrSSIDs; |
| 243 | |
| 244 | typedef struct tagCsrBSSIDs { |
| 245 | uint32_t numOfBSSIDs; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 246 | struct qdf_mac_addr *bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 247 | } tCsrBSSIDs; |
| 248 | |
| 249 | typedef struct tagCsrStaParams { |
| 250 | uint16_t capability; |
| 251 | uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP]; |
| 252 | uint8_t supported_rates_len; |
| 253 | uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES]; |
| 254 | uint8_t htcap_present; |
| 255 | tSirHTCap HTCap; |
| 256 | uint8_t vhtcap_present; |
| 257 | tSirVHTCap VHTCap; |
| 258 | uint8_t uapsd_queues; |
| 259 | uint8_t max_sp; |
| 260 | uint8_t supported_channels_len; |
| 261 | uint8_t supported_channels[SIR_MAC_MAX_SUPP_CHANNELS]; |
| 262 | uint8_t supported_oper_classes_len; |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 263 | uint8_t supported_oper_classes[CDS_MAX_SUPP_OPER_CLASSES]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 264 | } tCsrStaParams; |
| 265 | |
| 266 | typedef struct tagCsrScanRequest { |
| 267 | tSirScanType scanType; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 268 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 269 | eCsrRoamBssType BSSType; |
| 270 | tCsrSSIDs SSIDs; |
| 271 | tCsrChannelInfo ChannelInfo; |
| 272 | uint32_t minChnTime; /* in units of milliseconds */ |
| 273 | uint32_t maxChnTime; /* in units of milliseconds */ |
| 274 | uint32_t restTime; /* in units of milliseconds */ |
| 275 | uint32_t uIEFieldLen; |
| 276 | uint8_t *pIEField; |
| 277 | eCsrRequestType requestType; /* 11d scan or full scan */ |
| 278 | bool p2pSearch; |
| 279 | bool skipDfsChnlInP2pSearch; |
| 280 | bool bcnRptReqScan; /* is Scan issued by Beacon Report Request */ |
| 281 | uint32_t scan_id; |
| 282 | uint32_t timestamp; |
| 283 | } tCsrScanRequest; |
| 284 | |
| 285 | typedef struct tagCsrScanResultInfo { |
| 286 | /* |
| 287 | * Carry the IEs for the current BSSDescription. |
| 288 | * A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS. |
| 289 | */ |
| 290 | void *pvIes; |
| 291 | tAniSSID ssId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 292 | unsigned long timer; /* timer is variable for hidden SSID timer */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 293 | /* |
| 294 | * This member must be the last in the structure because the |
| 295 | * end of tSirBssDescription is an |
| 296 | * array with nonknown size at this time */ |
| 297 | tSirBssDescription BssDescriptor; |
| 298 | } tCsrScanResultInfo; |
| 299 | |
| 300 | typedef struct tagCsrEncryptionList { |
| 301 | |
| 302 | uint32_t numEntries; |
| 303 | eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE]; |
| 304 | |
| 305 | } tCsrEncryptionList, *tpCsrEncryptionList; |
| 306 | |
| 307 | typedef struct tagCsrAuthList { |
| 308 | uint32_t numEntries; |
| 309 | eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE]; |
| 310 | } tCsrAuthList, *tpCsrAuthList; |
| 311 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | typedef struct tagCsrMobilityDomainInfo { |
| 313 | uint8_t mdiePresent; |
| 314 | uint16_t mobilityDomain; |
| 315 | } tCsrMobilityDomainInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | |
| 317 | #ifdef FEATURE_WLAN_ESE |
| 318 | typedef struct tagCsrEseCckmInfo { |
| 319 | uint32_t reassoc_req_num; |
| 320 | bool krk_plumbed; |
| 321 | uint8_t krk[SIR_KRK_KEY_LEN]; |
| 322 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 323 | uint8_t btk[SIR_BTK_KEY_LEN]; |
| 324 | #endif |
| 325 | } tCsrEseCckmInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 326 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 327 | #define CSR_DOT11F_IE_RSN_MAX_LEN (114) |
| 328 | typedef struct tagCsrEseCckmIe { |
| 329 | uint8_t cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN]; |
| 330 | uint8_t cckmIeLen; |
| 331 | } tCsrEseCckmIe; |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 332 | #endif /* FEATURE_WLAN_ESE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 333 | |
| 334 | typedef struct sCsrChannel_ { |
| 335 | uint8_t numChannels; |
| 336 | uint8_t channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 337 | } sCsrChannel; |
| 338 | |
| 339 | typedef struct tagCsrScanResultFilter { |
| 340 | tCsrBSSIDs BSSIDs; |
| 341 | tCsrSSIDs SSIDs; |
| 342 | tCsrChannelInfo ChannelInfo; |
| 343 | tCsrAuthList authType; |
| 344 | tCsrEncryptionList EncryptionType; |
| 345 | /* |
| 346 | * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. |
| 347 | * If caller doesn't case, put all supported encryption types in here |
| 348 | */ |
| 349 | tCsrEncryptionList mcEncryptionType; |
| 350 | eCsrRoamBssType BSSType; |
| 351 | /* its a bit mask of all the needed phy mode defined in eCsrPhyMode */ |
| 352 | eCsrPhyMode phyMode; |
| 353 | /* |
| 354 | * If countryCode[0] is not 0, countryCode is checked |
| 355 | * independent of fCheckUnknownCountryCode |
| 356 | */ |
| 357 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; |
| 358 | uint8_t uapsd_mask; |
| 359 | /* For WPS filtering if true => auth and ecryption should be ignored */ |
| 360 | bool bWPSAssociation; |
| 361 | bool bOSENAssociation; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 362 | /* |
| 363 | * For measurement reports --> if set, only SSID, |
| 364 | * BSSID and channel is considered for filtering. |
| 365 | */ |
| 366 | bool fMeasurement; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 367 | tCsrMobilityDomainInfo MDID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 368 | bool p2pResult; |
| 369 | #ifdef WLAN_FEATURE_11W |
| 370 | /* Management Frame Protection */ |
| 371 | bool MFPEnabled; |
| 372 | uint8_t MFPRequired; |
| 373 | uint8_t MFPCapable; |
| 374 | #endif |
| 375 | /* The following flag is used to distinguish the |
| 376 | * roaming case while building the scan filter and |
| 377 | * applying it on to the scan results. This is mainly |
| 378 | * used to support whitelist ssid feature. |
| 379 | */ |
| 380 | uint8_t scan_filter_for_roam; |
| 381 | struct sCsrChannel_ pcl_channels; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 382 | enum tQDF_ADAPTER_MODE csrPersona; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 383 | } tCsrScanResultFilter; |
| 384 | |
| 385 | typedef struct sCsrChnPower_ { |
| 386 | uint8_t firstChannel; |
| 387 | uint8_t numChannels; |
| 388 | uint8_t maxtxPower; |
| 389 | } sCsrChnPower; |
| 390 | |
| 391 | typedef struct tagCsr11dinfo { |
| 392 | sCsrChannel Channels; |
| 393 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN + 1]; |
| 394 | /* max power channel list */ |
| 395 | sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 396 | } tCsr11dinfo; |
| 397 | |
| 398 | typedef enum { |
| 399 | eCSR_ROAM_CANCELLED = 1, |
| 400 | /* it means error happens before assoc_start/roaming_start is called. */ |
| 401 | eCSR_ROAM_FAILED, |
| 402 | /* |
| 403 | * a CSR trigger roaming operation starts, |
| 404 | * callback may get a pointer to tCsrConnectedProfile |
| 405 | */ |
| 406 | eCSR_ROAM_ROAMING_START, |
| 407 | /* a CSR trigger roaming operation is completed */ |
| 408 | eCSR_ROAM_ROAMING_COMPLETION, |
| 409 | /* Connection completed status. */ |
| 410 | eCSR_ROAM_CONNECT_COMPLETION, |
| 411 | /* |
| 412 | * an association or start_IBSS operation starts, |
| 413 | * callback may get a pointer to tCsrRoamProfile and |
| 414 | * a pointer to tSirBssDescription |
| 415 | */ |
| 416 | eCSR_ROAM_ASSOCIATION_START, |
| 417 | /* |
| 418 | * a roaming operation is finish, see eCsrRoamResult for |
| 419 | * possible data passed back |
| 420 | */ |
| 421 | eCSR_ROAM_ASSOCIATION_COMPLETION, |
| 422 | eCSR_ROAM_DISASSOCIATED, |
| 423 | eCSR_ROAM_ASSOCIATION_FAILURE, |
| 424 | /* when callback with this flag. it gets a pointer to the BSS desc. */ |
| 425 | eCSR_ROAM_SHOULD_ROAM, |
| 426 | /* A new candidate for PMKID is found */ |
| 427 | eCSR_ROAM_SCAN_FOUND_NEW_BSS, |
| 428 | /* CSR is done lostlink roaming and still cannot reconnect */ |
| 429 | eCSR_ROAM_LOSTLINK, |
| 430 | /* a link lost is detected. CSR starts roaming. */ |
| 431 | eCSR_ROAM_LOSTLINK_DETECTED, |
| 432 | /* |
| 433 | * TKIP MIC error detected, callback gets a pointer |
| 434 | * to tpSirSmeMicFailureInd |
| 435 | */ |
| 436 | eCSR_ROAM_MIC_ERROR_IND, |
| 437 | /* IBSS indications. */ |
| 438 | eCSR_ROAM_IBSS_IND, |
| 439 | /* |
| 440 | * Update the connection status, useful for IBSS: new peer added, |
| 441 | * network is active etc. |
| 442 | */ |
| 443 | eCSR_ROAM_CONNECT_STATUS_UPDATE, |
| 444 | eCSR_ROAM_GEN_INFO, |
| 445 | eCSR_ROAM_SET_KEY_COMPLETE, |
| 446 | eCSR_ROAM_IBSS_LEAVE, /* IBSS indications. */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 447 | /* BSS in SoftAP mode status indication */ |
| 448 | eCSR_ROAM_INFRA_IND, |
| 449 | eCSR_ROAM_WPS_PBC_PROBE_REQ_IND, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 450 | eCSR_ROAM_FT_RESPONSE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 451 | eCSR_ROAM_FT_START, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | eCSR_ROAM_REMAIN_CHAN_READY, |
| 453 | eCSR_ROAM_SEND_ACTION_CNF, |
| 454 | /* this mean error happens before assoc_start/roam_start is called. */ |
| 455 | eCSR_ROAM_SESSION_OPENED, |
| 456 | eCSR_ROAM_FT_REASSOC_FAILED, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 457 | eCSR_ROAM_PMK_NOTIFY, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 458 | /* |
| 459 | * Following 4 enums are used by FEATURE_WLAN_LFR_METRICS |
| 460 | * but they are needed for compilation even when |
| 461 | * FEATURE_WLAN_LFR_METRICS is not defined. |
| 462 | */ |
| 463 | eCSR_ROAM_PREAUTH_INIT_NOTIFY, |
| 464 | eCSR_ROAM_PREAUTH_STATUS_SUCCESS, |
| 465 | eCSR_ROAM_PREAUTH_STATUS_FAILURE, |
| 466 | eCSR_ROAM_HANDOVER_SUCCESS, |
| 467 | #ifdef FEATURE_WLAN_TDLS |
| 468 | eCSR_ROAM_TDLS_STATUS_UPDATE, |
| 469 | eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND, |
| 470 | #endif |
| 471 | /* Disaconnect all the clients */ |
| 472 | eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, |
| 473 | /* Stopbss triggered from SME due to different */ |
| 474 | eCSR_ROAM_SEND_P2P_STOP_BSS, |
| 475 | /* beacon interval */ |
| 476 | #ifdef WLAN_FEATURE_11W |
| 477 | eCSR_ROAM_UNPROT_MGMT_FRAME_IND, |
| 478 | #endif |
| 479 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 480 | eCSR_ROAM_IBSS_PEER_INFO_COMPLETE, |
| 481 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 482 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 483 | eCSR_ROAM_TSM_IE_IND, |
| 484 | eCSR_ROAM_CCKM_PREAUTH_NOTIFY, |
| 485 | eCSR_ROAM_ESE_ADJ_AP_REPORT_IND, |
| 486 | eCSR_ROAM_ESE_BCN_REPORT_IND, |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 487 | #endif /* FEATURE_WLAN_ESE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 488 | |
| 489 | /* Radar indication from lower layers */ |
| 490 | eCSR_ROAM_DFS_RADAR_IND, |
| 491 | eCSR_ROAM_SET_CHANNEL_RSP, |
| 492 | |
| 493 | /* Channel sw update notification */ |
| 494 | eCSR_ROAM_DFS_CHAN_SW_NOTIFY, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 495 | eCSR_ROAM_EXT_CHG_CHNL_IND, |
Chandrasekaran, Manishekar | e716c40 | 2016-01-29 11:30:15 +0530 | [diff] [blame] | 496 | eCSR_ROAM_STATUS_UPDATE_HW_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 497 | } eRoamCmdStatus; |
| 498 | |
| 499 | /* comment inside indicates what roaming callback gets */ |
| 500 | typedef enum { |
| 501 | eCSR_ROAM_RESULT_NONE, |
| 502 | /* |
| 503 | * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, |
| 504 | * tCsrRoamInfo's pBssDesc may pass back |
| 505 | */ |
| 506 | eCSR_ROAM_RESULT_FAILURE, |
| 507 | /* Pass back pointer to tCsrRoamInfo */ |
| 508 | eCSR_ROAM_RESULT_ASSOCIATED, |
| 509 | eCSR_ROAM_RESULT_NOT_ASSOCIATED, |
| 510 | eCSR_ROAM_RESULT_MIC_FAILURE, |
| 511 | eCSR_ROAM_RESULT_FORCED, |
| 512 | eCSR_ROAM_RESULT_DISASSOC_IND, |
| 513 | eCSR_ROAM_RESULT_DEAUTH_IND, |
| 514 | eCSR_ROAM_RESULT_CAP_CHANGED, |
| 515 | /* |
| 516 | * This means we starts an IBSS tCsrRoamInfo's |
| 517 | * pBssDesc may pass back |
| 518 | */ |
| 519 | eCSR_ROAM_RESULT_IBSS_STARTED, |
| 520 | eCSR_ROAM_RESULT_IBSS_START_FAILED, |
| 521 | eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS, |
| 522 | eCSR_ROAM_RESULT_IBSS_JOIN_FAILED, |
| 523 | eCSR_ROAM_RESULT_IBSS_CONNECT, |
| 524 | eCSR_ROAM_RESULT_IBSS_INACTIVE, |
| 525 | /* |
| 526 | * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION |
| 527 | * tCsrRoamInfo's pBssDesc may pass back and the peer's MAC address |
| 528 | * in peerMacOrBssid. If roamStatus is eCSR_ROAM_IBSS_IND, |
| 529 | * the peer's MAC address in peerMacOrBssid and a beacon frame |
| 530 | * of the IBSS in pbFrames |
| 531 | */ |
| 532 | eCSR_ROAM_RESULT_IBSS_NEW_PEER, |
| 533 | /* |
| 534 | * Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd |
| 535 | * in pIbssPeerInd |
| 536 | */ |
| 537 | eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED, |
| 538 | /* |
| 539 | * Coalescing in the IBSS network (joined an IBSS network) |
| 540 | * Callback pass a BSSID in peerMacOrBssid |
| 541 | */ |
| 542 | eCSR_ROAM_RESULT_IBSS_COALESCED, |
| 543 | /* |
| 544 | * If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer |
| 545 | * to tCsrConnectedProfile used to connect. |
| 546 | */ |
| 547 | eCSR_ROAM_RESULT_IBSS_STOP, |
| 548 | eCSR_ROAM_RESULT_LOSTLINK, |
| 549 | eCSR_ROAM_RESULT_MIC_ERROR_UNICAST, |
| 550 | eCSR_ROAM_RESULT_MIC_ERROR_GROUP, |
| 551 | eCSR_ROAM_RESULT_AUTHENTICATED, |
| 552 | eCSR_ROAM_RESULT_NEW_RSN_BSS, |
| 553 | #ifdef FEATURE_WLAN_WAPI |
| 554 | eCSR_ROAM_RESULT_NEW_WAPI_BSS, |
| 555 | #endif /* FEATURE_WLAN_WAPI */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 556 | /* INFRA started successfully */ |
| 557 | eCSR_ROAM_RESULT_INFRA_STARTED, |
| 558 | /* INFRA start failed */ |
| 559 | eCSR_ROAM_RESULT_INFRA_START_FAILED, |
| 560 | /* INFRA stopped */ |
| 561 | eCSR_ROAM_RESULT_INFRA_STOPPED, |
| 562 | /* A station joining INFRA AP */ |
| 563 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND, |
| 564 | /* A station joined INFRA AP */ |
| 565 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF, |
| 566 | /* INFRA disassociated */ |
| 567 | eCSR_ROAM_RESULT_INFRA_DISASSOCIATED, |
| 568 | eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND, |
| 569 | eCSR_ROAM_RESULT_SEND_ACTION_FAIL, |
| 570 | /* peer rejected assoc because max assoc limit reached */ |
| 571 | eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED, |
| 572 | /* Assoc rejected due to concurrent session running on a diff channel */ |
| 573 | eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL, |
| 574 | #ifdef FEATURE_WLAN_TDLS |
| 575 | eCSR_ROAM_RESULT_ADD_TDLS_PEER, |
| 576 | eCSR_ROAM_RESULT_UPDATE_TDLS_PEER, |
| 577 | eCSR_ROAM_RESULT_DELETE_TDLS_PEER, |
| 578 | eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND, |
| 579 | eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND, |
| 580 | eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP, |
| 581 | eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER, |
| 582 | eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN, |
| 583 | eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED, |
| 584 | #endif |
| 585 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 586 | eCSR_ROAM_RESULT_IBSS_PEER_INFO_SUCCESS, |
| 587 | eCSR_ROAM_RESULT_IBSS_PEER_INFO_FAILED, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 588 | eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND, |
| 589 | eCSR_ROAM_RESULT_CHANNEL_CHANGE_SUCCESS, |
| 590 | eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE, |
| 591 | eCSR_ROAM_RESULT_DFS_CHANSW_UPDATE_SUCCESS, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 592 | eCSR_ROAM_EXT_CHG_CHNL_UPDATE_IND, |
Chandrasekaran, Manishekar | e716c40 | 2016-01-29 11:30:15 +0530 | [diff] [blame] | 593 | eCSR_ROAM_RESULT_UPDATE_HW_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 594 | } eCsrRoamResult; |
| 595 | |
| 596 | /*---------------------------------------------------------------------------- |
| 597 | List of link quality indications HDD can receive from SME |
| 598 | --------------------------------------------------------------------------*/ |
| 599 | typedef enum { |
| 600 | eCSR_ROAM_LINK_QUAL_MIN_IND = -1, |
| 601 | |
| 602 | eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */ |
| 603 | eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */ |
| 604 | eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */ |
| 605 | eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */ |
| 606 | |
| 607 | eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */ |
| 608 | } eCsrRoamLinkQualityInd; |
| 609 | |
| 610 | typedef enum { |
| 611 | eCSR_DISCONNECT_REASON_UNSPECIFIED = 0, |
| 612 | eCSR_DISCONNECT_REASON_MIC_ERROR, |
| 613 | eCSR_DISCONNECT_REASON_DISASSOC, |
| 614 | eCSR_DISCONNECT_REASON_DEAUTH, |
| 615 | eCSR_DISCONNECT_REASON_HANDOFF, |
| 616 | eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE, |
| 617 | eCSR_DISCONNECT_REASON_IBSS_LEAVE, |
| 618 | eCSR_DISCONNECT_REASON_STA_HAS_LEFT, |
| 619 | } eCsrRoamDisconnectReason; |
| 620 | |
| 621 | typedef enum { |
| 622 | /* Not associated in Infra or participating in an IBSS/Ad-hoc */ |
| 623 | eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED, |
| 624 | /* Associated in an Infrastructure network. */ |
| 625 | eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED, |
| 626 | /* Participating in IBSS network though disconnection */ |
| 627 | eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED, |
| 628 | /* Participating in IBSS network with partner stations also present */ |
| 629 | eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED, |
| 630 | /* Participating in WDS network in AP/STA mode but not connected yet */ |
| 631 | eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED, |
| 632 | /* Participating in a WDS network and connected peer to peer */ |
| 633 | eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED, |
| 634 | /* Participating in a Infra network in AP not yet in connected state */ |
| 635 | eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED, |
| 636 | /* Participating in a Infra network and connected to a peer */ |
| 637 | eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED, |
kaliu | 154d789 | 2015-12-30 17:27:58 +0530 | [diff] [blame] | 638 | /* Disconnecting with AP or stop connecting process */ |
| 639 | eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 640 | |
| 641 | } eCsrConnectState; |
| 642 | |
| 643 | /* |
| 644 | * This parameter is no longer supported in the Profile. |
| 645 | * Need to set this in the global properties for the adapter. |
| 646 | */ |
| 647 | typedef enum eCSR_MEDIUM_ACCESS { |
| 648 | eCSR_MEDIUM_ACCESS_AUTO = 0, |
| 649 | eCSR_MEDIUM_ACCESS_DCF, |
| 650 | eCSR_MEDIUM_ACCESS_eDCF, |
| 651 | eCSR_MEDIUM_ACCESS_HCF, |
| 652 | |
| 653 | eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p, |
| 654 | eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP, |
| 655 | eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify, |
| 656 | eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF, |
| 657 | eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF, |
| 658 | } eCsrMediaAccessType; |
| 659 | |
| 660 | typedef enum { |
| 661 | eCSR_TX_RATE_AUTO = 0, /* use rate adaption to determine Tx rate. */ |
| 662 | eCSR_TX_RATE_1Mbps = 0x00000001, |
| 663 | eCSR_TX_RATE_2Mbps = 0x00000002, |
| 664 | eCSR_TX_RATE_5_5Mbps = 0x00000004, |
| 665 | eCSR_TX_RATE_6Mbps = 0x00000008, |
| 666 | eCSR_TX_RATE_9Mbps = 0x00000010, |
| 667 | eCSR_TX_RATE_11Mbps = 0x00000020, |
| 668 | eCSR_TX_RATE_12Mbps = 0x00000040, |
| 669 | eCSR_TX_RATE_18Mbps = 0x00000080, |
| 670 | eCSR_TX_RATE_24Mbps = 0x00000100, |
| 671 | eCSR_TX_RATE_36Mbps = 0x00000200, |
| 672 | eCSR_TX_RATE_42Mbps = 0x00000400, |
| 673 | eCSR_TX_RATE_48Mbps = 0x00000800, |
| 674 | eCSR_TX_RATE_54Mbps = 0x00001000, |
| 675 | eCSR_TX_RATE_72Mbps = 0x00002000, |
| 676 | eCSR_TX_RATE_84Mbps = 0x00004000, |
| 677 | eCSR_TX_RATE_96Mbps = 0x00008000, |
| 678 | eCSR_TX_RATE_108Mbps = 0x00010000, |
| 679 | eCSR_TX_RATE_126Mbps = 0x00020000, |
| 680 | eCSR_TX_RATE_144Mbps = 0x00040000, |
| 681 | eCSR_TX_RATE_168Mbps = 0x00080000, |
| 682 | eCSR_TX_RATE_192Mbps = 0x00100000, |
| 683 | eCSR_TX_RATE_216Mbps = 0x00200000, |
| 684 | eCSR_TX_RATE_240Mbps = 0x00400000, |
| 685 | |
| 686 | } eCsrExposedTxRate; |
| 687 | |
| 688 | typedef enum { |
| 689 | eCSR_OPERATING_CHANNEL_ALL = 0, |
| 690 | eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL, |
| 691 | eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL, |
| 692 | } eOperationChannel; |
| 693 | |
| 694 | typedef enum { |
| 695 | eCSR_DOT11_FRAG_THRESH_AUTO = -1, |
| 696 | eCSR_DOT11_FRAG_THRESH_MIN = 256, |
| 697 | eCSR_DOT11_FRAG_THRESH_MAX = 2346, |
| 698 | eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000 |
| 699 | } eCsrDot11FragThresh; |
| 700 | |
| 701 | /* for channel bonding for ibss */ |
| 702 | typedef enum { |
| 703 | eCSR_CB_OFF = 0, |
| 704 | eCSR_CB_AUTO = 1, |
| 705 | eCSR_CB_DOWN = 2, |
| 706 | eCSR_CB_UP = 3, |
| 707 | } eCsrCBChoice; |
| 708 | |
| 709 | /* |
| 710 | * For channel bonding, the channel number gap is 4, either up or down. |
| 711 | * For both 11a and 11g mode. |
| 712 | */ |
| 713 | #define CSR_CB_CHANNEL_GAP 4 |
| 714 | #define CSR_CB_CENTER_CHANNEL_OFFSET 2 |
| 715 | |
| 716 | /* WEP keysize (in bits) */ |
| 717 | typedef enum { |
| 718 | /* 40 bit key + 24bit IV = 64bit WEP */ |
| 719 | eCSR_SECURITY_WEP_KEYSIZE_40 = 40, |
| 720 | /* 104bit key + 24bit IV = 128bit WEP */ |
| 721 | eCSR_SECURITY_WEP_KEYSIZE_104 = 104, |
| 722 | eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40, |
| 723 | eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104, |
| 724 | eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = |
| 725 | (eCSR_SECURITY_WEP_KEYSIZE_MAX / 8), |
| 726 | } eCsrWEPKeySize; |
| 727 | |
| 728 | /* Possible values for the WEP static key ID */ |
| 729 | typedef enum { |
| 730 | |
| 731 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0, |
| 732 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3, |
| 733 | eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0, |
| 734 | |
| 735 | eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1, |
| 736 | |
| 737 | } eCsrWEPStaticKeyID; |
| 738 | |
| 739 | /* Two extra key indicies are used for the IGTK (which is used by BIP) */ |
| 740 | #define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1) |
| 741 | |
| 742 | typedef enum { |
| 743 | eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE, |
| 744 | eCSR_SECURITY_SET_KEY_ACTION_SET_KEY, |
| 745 | eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY, |
| 746 | } eCsrSetKeyAction; |
| 747 | |
| 748 | typedef enum { |
| 749 | eCSR_BAND_ALL, |
| 750 | eCSR_BAND_24, |
| 751 | eCSR_BAND_5G, |
| 752 | eCSR_BAND_MAX, |
| 753 | } eCsrBand; |
| 754 | |
| 755 | typedef enum { |
| 756 | /* |
| 757 | * Roaming because HDD requested for reassoc by changing one of the |
| 758 | * fields in tCsrRoamModifyProfileFields. OR Roaming because SME |
| 759 | * requested for reassoc by changing one of the fields in |
| 760 | * tCsrRoamModifyProfileFields. |
| 761 | */ |
| 762 | eCsrRoamReasonStaCapabilityChanged, |
| 763 | /* |
| 764 | * Roaming because SME requested for reassoc to a different AP, |
| 765 | * as part of inter AP handoff. |
| 766 | */ |
| 767 | eCsrRoamReasonBetterAP, |
| 768 | /* |
| 769 | * Roaming because SME requested it as the link is lost - placeholder, |
| 770 | * will clean it up once handoff code gets in |
| 771 | */ |
| 772 | eCsrRoamReasonSmeIssuedForLostLink, |
| 773 | |
| 774 | } eCsrRoamReasonCodes; |
| 775 | |
| 776 | typedef enum { |
| 777 | eCsrRoamWmmAuto = 0, |
| 778 | eCsrRoamWmmQbssOnly = 1, |
| 779 | eCsrRoamWmmNoQos = 2, |
| 780 | |
| 781 | } eCsrRoamWmmUserModeType; |
| 782 | |
| 783 | typedef enum { |
| 784 | eCSR_REQUESTER_MIN = 0, |
| 785 | eCSR_DIAG, |
| 786 | eCSR_UMA_GAN, |
| 787 | eCSR_HDD |
| 788 | } eCsrStatsRequesterType; |
| 789 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 790 | /** |
| 791 | * enum csr_hi_rssi_scan_id - Parameter ids for hi rssi scan feature |
| 792 | * |
| 793 | * @eCSR_HI_RSSI_SCAN_MAXCOUNT_ID: how many times scan can be performed |
| 794 | * @eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID: rssi difference to trigger scan |
| 795 | * @eCSR_HI_RSSI_SCAN_DELAY_ID: delay in millseconds between scans |
| 796 | * @eCSR_HI_RSSI_SCAN_RSSI_UB_ID: rssi upper bound for scan trigger |
| 797 | */ |
| 798 | enum csr_hi_rssi_scan_id { |
| 799 | eCSR_HI_RSSI_SCAN_MAXCOUNT_ID, |
| 800 | eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID, |
| 801 | eCSR_HI_RSSI_SCAN_DELAY_ID, |
| 802 | eCSR_HI_RSSI_SCAN_RSSI_UB_ID |
| 803 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 804 | |
| 805 | typedef struct tagPmkidCandidateInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 806 | struct qdf_mac_addr BSSID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 807 | bool preAuthSupported; |
| 808 | } tPmkidCandidateInfo; |
| 809 | |
| 810 | typedef struct tagPmkidCacheInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 811 | struct qdf_mac_addr BSSID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 812 | uint8_t PMKID[CSR_RSN_PMKID_SIZE]; |
| 813 | } tPmkidCacheInfo; |
| 814 | |
| 815 | #ifdef FEATURE_WLAN_WAPI |
| 816 | typedef struct tagBkidCandidateInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 817 | struct qdf_mac_addr BSSID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 818 | bool preAuthSupported; |
| 819 | } tBkidCandidateInfo; |
| 820 | |
| 821 | typedef struct tagBkidCacheInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 822 | struct qdf_mac_addr BSSID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 823 | uint8_t BKID[CSR_WAPI_BKID_SIZE]; |
| 824 | } tBkidCacheInfo; |
| 825 | #endif /* FEATURE_WLAN_WAPI */ |
| 826 | |
| 827 | typedef struct tagCsrKeys { |
| 828 | /* Also use to indicate whether the key index is set */ |
| 829 | uint8_t KeyLength[CSR_MAX_NUM_KEY]; |
| 830 | uint8_t KeyMaterial[CSR_MAX_NUM_KEY][CSR_MAX_KEY_LEN]; |
| 831 | uint8_t defaultIndex; |
| 832 | } tCsrKeys; |
| 833 | |
| 834 | /* |
| 835 | * Following fields which're part of tCsrRoamConnectedProfile might need |
| 836 | * modification dynamically once STA is up & running & this'd trigger reassoc |
| 837 | */ |
| 838 | typedef struct tagCsrRoamModifyProfileFields { |
| 839 | /* |
| 840 | * during connect this specifies ACs U-APSD is to be setup |
| 841 | * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 842 | * During assoc response this COULD carry confirmation of what |
| 843 | * ACs U-APSD got setup for. Later if an APP looking for APSD, |
| 844 | * SME-QoS might need to modify this field |
| 845 | */ |
| 846 | uint8_t uapsd_mask; |
| 847 | /* HDD might ask to modify this field */ |
| 848 | uint16_t listen_interval; |
| 849 | } tCsrRoamModifyProfileFields; |
| 850 | |
| 851 | typedef struct tagCsrRoamProfile { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 852 | tCsrSSIDs SSIDs; |
| 853 | tCsrBSSIDs BSSIDs; |
| 854 | /* this is bit mask of all the needed phy mode defined in eCsrPhyMode */ |
| 855 | uint32_t phyMode; |
| 856 | eCsrRoamBssType BSSType; |
| 857 | tCsrAuthList AuthType; |
| 858 | eCsrAuthType negotiatedAuthType; |
| 859 | tCsrEncryptionList EncryptionType; |
| 860 | /* This field is for output only, not for input */ |
| 861 | eCsrEncryptionType negotiatedUCEncryptionType; |
| 862 | /* |
| 863 | * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. |
| 864 | * If caller doesn't case, put all supported encryption types in here |
| 865 | */ |
| 866 | tCsrEncryptionList mcEncryptionType; |
| 867 | /* This field is for output only, not for input */ |
| 868 | eCsrEncryptionType negotiatedMCEncryptionType; |
| 869 | #ifdef WLAN_FEATURE_11W |
| 870 | /* Management Frame Protection */ |
| 871 | bool MFPEnabled; |
| 872 | uint8_t MFPRequired; |
| 873 | uint8_t MFPCapable; |
| 874 | #endif |
| 875 | tCsrKeys Keys; |
| 876 | eCsrCBChoice CBMode; |
| 877 | tCsrChannelInfo ChannelInfo; |
| 878 | uint8_t operationChannel; |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 879 | struct ch_params_s ch_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 880 | /* If this is 0, SME will fill in for caller. */ |
| 881 | uint16_t beaconInterval; |
| 882 | /* |
| 883 | * during connect this specifies ACs U-APSD is to be setup |
| 884 | * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 885 | * During assoc resp this'd carry cnf of what ACs U-APSD got setup for |
| 886 | */ |
| 887 | uint8_t uapsd_mask; |
| 888 | uint32_t nWPAReqIELength; /* The byte count in the pWPAReqIE */ |
| 889 | uint8_t *pWPAReqIE; /* If not null,it's IE byte stream for WPA */ |
| 890 | uint32_t nRSNReqIELength; /* The byte count in the pRSNReqIE */ |
| 891 | uint8_t *pRSNReqIE; /* If not null,it's IE byte stream for RSN */ |
| 892 | #ifdef FEATURE_WLAN_WAPI |
| 893 | uint32_t nWAPIReqIELength;/* The byte count in the pWAPIReqIE */ |
| 894 | uint8_t *pWAPIReqIE; /* If not null,it's IE byte stream for WAPI */ |
| 895 | #endif /* FEATURE_WLAN_WAPI */ |
| 896 | |
| 897 | uint32_t nAddIEScanLength;/* pAddIE for scan (at the time of join) */ |
| 898 | /* |
| 899 | * If not null,it's the IE byte stream for additional IE, |
| 900 | * which can be WSC IE and/or P2P IE |
| 901 | */ |
| 902 | uint8_t *pAddIEScan; |
| 903 | uint32_t nAddIEAssocLength; /* The byte count in the pAddIE for assoc */ |
| 904 | /* |
| 905 | * If not null, it has the IE byte stream for additional IE, |
| 906 | * which can be WSC IE and/or P2P IE |
| 907 | */ |
| 908 | uint8_t *pAddIEAssoc; |
| 909 | /* it is ignored if [0] is 0. */ |
| 910 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; |
| 911 | /* WPS Association if true => auth and ecryption should be ignored */ |
| 912 | bool bWPSAssociation; |
| 913 | bool bOSENAssociation; |
| 914 | uint32_t nWSCReqIELength; /* The byte count in the pWSCReqIE */ |
| 915 | uint8_t *pWSCReqIE; /* If not null,it's IE byte stream for WSC */ |
| 916 | uint8_t ieee80211d; |
| 917 | uint8_t privacy; |
| 918 | bool fwdWPSPBCProbeReq; |
| 919 | tAniAuthType csr80211AuthType; |
| 920 | uint32_t dtimPeriod; |
| 921 | bool ApUapsdEnable; |
| 922 | bool protEnabled; |
| 923 | bool obssProtEnabled; |
| 924 | uint16_t cfg_protection; |
| 925 | uint8_t wps_state; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 926 | tCsrMobilityDomainInfo MDID; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 927 | enum tQDF_ADAPTER_MODE csrPersona; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 928 | uint8_t disableDFSChSwitch; |
| 929 | /* addIe params */ |
| 930 | tSirAddIeParams addIeParams; |
| 931 | uint8_t sap_dot11mc; |
| 932 | } tCsrRoamProfile; |
| 933 | |
| 934 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 935 | typedef struct tagCsrRoamHTProfile { |
| 936 | uint8_t phymode; |
| 937 | uint8_t htCapability; |
| 938 | uint8_t htSupportedChannelWidthSet; |
| 939 | uint8_t htRecommendedTxWidthSet; |
| 940 | ePhyChanBondState htSecondaryChannelOffset; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 941 | uint8_t vhtCapability; |
| 942 | uint8_t vhtTxChannelWidthSet; |
| 943 | uint8_t apCenterChan; |
| 944 | uint8_t apChanWidth; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 945 | } tCsrRoamHTProfile; |
| 946 | #endif |
| 947 | typedef struct tagCsrRoamConnectedProfile { |
| 948 | tSirMacSSid SSID; |
| 949 | bool handoffPermitted; |
| 950 | bool ssidHidden; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 951 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 952 | eCsrRoamBssType BSSType; |
| 953 | eCsrAuthType AuthType; |
| 954 | tCsrAuthList AuthInfo; |
| 955 | eCsrEncryptionType EncryptionType; |
| 956 | tCsrEncryptionList EncryptionInfo; |
| 957 | eCsrEncryptionType mcEncryptionType; |
| 958 | tCsrEncryptionList mcEncryptionInfo; |
| 959 | eCsrCBChoice CBMode; |
| 960 | uint8_t operationChannel; |
| 961 | uint32_t vht_channel_width; |
| 962 | uint16_t beaconInterval; |
| 963 | tCsrKeys Keys; |
| 964 | /* |
| 965 | * meaningless on connect. It's an OUT param from CSR's point of view |
| 966 | * During assoc response carries the ACM bit-mask i.e. what |
| 967 | * ACs have ACM=1 (if any),(Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE |
| 968 | * all other bits are ignored) |
| 969 | */ |
| 970 | uint8_t acm_mask; |
| 971 | tCsrRoamModifyProfileFields modifyProfileFields; |
| 972 | uint32_t nAddIEAssocLength; |
| 973 | /* |
| 974 | * If not null,it's IE byte stream for additional IE, |
| 975 | * which can be WSC IE and/or P2P IE |
| 976 | */ |
| 977 | uint8_t *pAddIEAssoc; |
| 978 | tSirBssDescription *pBssDesc; |
| 979 | bool qap; /* AP supports QoS */ |
| 980 | bool qosConnection; /* A connection is QoS enabled */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 981 | tCsrMobilityDomainInfo MDID; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 982 | #ifdef FEATURE_WLAN_ESE |
| 983 | tCsrEseCckmInfo eseCckmInfo; |
| 984 | bool isESEAssoc; |
| 985 | #endif |
| 986 | uint32_t dot11Mode; |
| 987 | uint8_t proxyARPService; |
| 988 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 989 | tCsrRoamHTProfile HTProfile; |
| 990 | #endif |
| 991 | #ifdef WLAN_FEATURE_11W |
| 992 | /* Management Frame Protection */ |
| 993 | bool MFPEnabled; |
| 994 | uint8_t MFPRequired; |
| 995 | uint8_t MFPCapable; |
| 996 | #endif |
| 997 | } tCsrRoamConnectedProfile; |
| 998 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 999 | typedef struct tagCsr11rConfigParams { |
| 1000 | bool IsFTResourceReqSupported; |
| 1001 | } tCsr11rConfigParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1002 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1003 | typedef struct tagCsrNeighborRoamConfigParams { |
| 1004 | |
| 1005 | uint32_t nNeighborScanTimerPeriod; |
| 1006 | uint8_t nNeighborLookupRssiThreshold; |
| 1007 | uint16_t nNeighborScanMinChanTime; |
| 1008 | uint16_t nNeighborScanMaxChanTime; |
| 1009 | sCsrChannel neighborScanChanList; |
| 1010 | uint8_t nMaxNeighborRetries; |
| 1011 | uint16_t nNeighborResultsRefreshPeriod; |
| 1012 | uint16_t nEmptyScanRefreshPeriod; |
| 1013 | uint8_t nOpportunisticThresholdDiff; |
| 1014 | uint8_t nRoamRescanRssiDiff; |
| 1015 | uint8_t nRoamBmissFirstBcnt; |
| 1016 | uint8_t nRoamBmissFinalBcnt; |
| 1017 | uint8_t nRoamBeaconRssiWeight; |
| 1018 | uint8_t delay_before_vdev_stop; |
| 1019 | uint32_t nhi_rssi_scan_max_count; |
| 1020 | uint32_t nhi_rssi_scan_rssi_delta; |
| 1021 | uint32_t nhi_rssi_scan_delay; |
| 1022 | int32_t nhi_rssi_scan_rssi_ub; |
| 1023 | } tCsrNeighborRoamConfigParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1024 | |
| 1025 | typedef struct tagCsrConfigParam { |
| 1026 | uint32_t FragmentationThreshold; |
| 1027 | /* keep this uint32_t. This gets converted to ePhyChannelBondState */ |
| 1028 | uint32_t channelBondingMode24GHz; |
| 1029 | uint32_t channelBondingMode5GHz; |
| 1030 | eCsrPhyMode phyMode; |
| 1031 | eCsrBand eBand; |
| 1032 | uint32_t RTSThreshold; |
| 1033 | uint32_t HeartbeatThresh50; |
| 1034 | uint32_t HeartbeatThresh24; |
| 1035 | eCsrCBChoice cbChoice; |
| 1036 | eCsrBand bandCapability; /* indicate hw capability */ |
| 1037 | uint16_t TxRate; |
| 1038 | eCsrRoamWmmUserModeType WMMSupportMode; |
| 1039 | bool Is11eSupportEnabled; |
| 1040 | bool Is11dSupportEnabled; |
| 1041 | bool Is11dSupportEnabledOriginal; |
| 1042 | bool Is11hSupportEnabled; |
| 1043 | bool shortSlotTime; |
| 1044 | bool ProprietaryRatesEnabled; |
| 1045 | uint8_t AdHocChannel24; |
| 1046 | uint8_t AdHocChannel5G; |
| 1047 | /* |
| 1048 | * this number minus one is the number of times a scan doesn't find it |
| 1049 | * before it is removed |
| 1050 | */ |
| 1051 | uint32_t nScanResultAgeCount; |
| 1052 | /* scan res aging time threshold when Not-Connect-No-PowerSave,in sec */ |
| 1053 | uint32_t scanAgeTimeNCNPS; |
| 1054 | /* scan res aging time threshold when Not-Connect-Power-Save,in sec */ |
| 1055 | uint32_t scanAgeTimeNCPS; |
| 1056 | /* scan res aging time threshold when Connect-No-Power-Save, in sec */ |
| 1057 | uint32_t scanAgeTimeCNPS; |
| 1058 | /* scan res aging time threshold when Connect-Power-Save, in sec */ |
| 1059 | uint32_t scanAgeTimeCPS; |
| 1060 | /* In sec, CSR'll try this long before gives up. 0 means no roaming */ |
| 1061 | uint32_t nRoamingTime; |
| 1062 | /* to set the RSSI difference for each category */ |
| 1063 | uint8_t bCatRssiOffset; |
| 1064 | /* to set MCC Enable/Disable mode */ |
| 1065 | uint8_t fEnableMCCMode; |
| 1066 | bool mcc_rts_cts_prot_enable; |
| 1067 | bool mcc_bcast_prob_resp_enable; |
| 1068 | /* |
| 1069 | * To allow MCC GO different B.I than STA's. |
| 1070 | * NOTE: make sure if RIVA firmware can handle this combination before |
| 1071 | * enabling this at the moment, this flag is provided only to pass |
| 1072 | * Wi-Fi Cert. 5.1.12 |
| 1073 | */ |
| 1074 | uint8_t fAllowMCCGODiffBI; |
| 1075 | tCsr11dinfo Csr11dinfo; |
| 1076 | |
| 1077 | /* Country Code Priority */ |
| 1078 | bool fSupplicantCountryCodeHasPriority; |
| 1079 | uint16_t vccRssiThreshold; |
| 1080 | uint32_t vccUlMacLossThreshold; |
| 1081 | uint32_t nPassiveMinChnTime; /* in units of milliseconds */ |
| 1082 | uint32_t nPassiveMaxChnTime; /* in units of milliseconds */ |
| 1083 | uint32_t nActiveMinChnTime; /* in units of milliseconds */ |
| 1084 | uint32_t nActiveMaxChnTime; /* in units of milliseconds */ |
| 1085 | uint32_t nInitialDwellTime; /* in units of milliseconds */ |
| 1086 | bool initial_scan_no_dfs_chnl; |
| 1087 | #ifdef WLAN_AP_STA_CONCURRENCY |
| 1088 | uint32_t nPassiveMinChnTimeConc; /* in units of milliseconds */ |
| 1089 | uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */ |
| 1090 | uint32_t nActiveMinChnTimeConc; /* in units of milliseconds */ |
| 1091 | uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */ |
| 1092 | uint32_t nRestTimeConc; /* in units of milliseconds */ |
| 1093 | /* num of channels combined for STA in each split scan operation */ |
| 1094 | uint8_t nNumStaChanCombinedConc; |
| 1095 | /* number of channels combined for P2P in each split scan operation */ |
| 1096 | uint8_t nNumP2PChanCombinedConc; |
| 1097 | #endif |
| 1098 | /* |
| 1099 | * in dBm, the maximum TX power The actual TX power is the lesser of |
| 1100 | * this value and 11d. If 11d is disable, the lesser of this and |
| 1101 | * default setting. |
| 1102 | */ |
| 1103 | uint8_t nTxPowerCap; |
| 1104 | /* stats request frequency from PE while in full power */ |
| 1105 | uint32_t statsReqPeriodicity; |
| 1106 | /* stats request frequency from PE while in power save */ |
| 1107 | uint32_t statsReqPeriodicityInPS; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1108 | tCsr11rConfigParams csr11rConfig; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1109 | #ifdef FEATURE_WLAN_ESE |
| 1110 | uint8_t isEseIniFeatureEnabled; |
| 1111 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1112 | uint8_t isFastRoamIniFeatureEnabled; |
| 1113 | uint8_t MAWCEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1114 | uint8_t isFastTransitionEnabled; |
| 1115 | uint8_t RoamRssiDiff; |
| 1116 | bool isWESModeEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1117 | tCsrNeighborRoamConfigParams neighborRoamConfig; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1118 | /* |
| 1119 | * Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC |
| 1120 | * This is mandated by WMM-AC certification |
| 1121 | */ |
| 1122 | bool addTSWhenACMIsOff; |
| 1123 | /* |
| 1124 | * channelPowerInfoList24 has been seen corrupted. Set this flag to true |
| 1125 | * trying to detect when it happens. Adding this into code because we |
| 1126 | * can't reproduce it easily. We don't know when it happens. |
| 1127 | */ |
| 1128 | bool fValidateList; |
| 1129 | /* |
| 1130 | * Customer wants to start with an active scan based on the default |
| 1131 | * country code. This optimization will minimize the driver load to |
| 1132 | * association time. Based on this flag we will bypass the initial |
| 1133 | * passive scan needed for 11d to determine the country code & domain |
| 1134 | */ |
| 1135 | bool fEnableBypass11d; |
| 1136 | /* |
| 1137 | * Customer wants to optimize the scan time. Avoiding scans(passive) |
| 1138 | * on DFS channels while swipping through both bands can save some time |
| 1139 | * (apprx 1.3 sec) |
| 1140 | */ |
| 1141 | uint8_t fEnableDFSChnlScan; |
| 1142 | /* |
| 1143 | * To enable/disable scanning 2.4Ghz channels twice on a single scan |
| 1144 | * request from HDD |
| 1145 | */ |
| 1146 | bool fScanTwice; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1147 | uint32_t nVhtChannelWidth; |
| 1148 | uint8_t enableTxBF; |
Kiran Kumar Lokere | 5302ab6 | 2015-12-16 16:03:16 -0800 | [diff] [blame] | 1149 | uint8_t enable_txbf_sap_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1150 | uint8_t txBFCsnValue; |
| 1151 | uint8_t enable2x2; |
| 1152 | bool enableVhtFor24GHz; |
| 1153 | uint8_t enableMuBformee; |
| 1154 | uint8_t enableVhtpAid; |
| 1155 | uint8_t enableVhtGid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1156 | uint8_t enableAmpduPs; |
| 1157 | uint8_t enableHtSmps; |
| 1158 | uint8_t htSmps; |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 1159 | bool send_smps_action; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1160 | bool ignore_peer_erp_info; |
| 1161 | /* |
| 1162 | * To enable/disable scanning only 2.4Ghz channels on first scan |
| 1163 | */ |
| 1164 | bool fFirstScanOnly2GChnl; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1165 | bool nRoamPrefer5GHz; |
| 1166 | bool nRoamIntraBand; |
| 1167 | uint8_t nProbes; |
| 1168 | uint16_t nRoamScanHomeAwayTime; |
| 1169 | |
| 1170 | bool isRoamOffloadScanEnabled; |
| 1171 | bool bFastRoamInConIniFeatureEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1172 | uint8_t scanCfgAgingTime; |
| 1173 | uint8_t enableTxLdpc; |
| 1174 | uint8_t isAmsduSupportInAMPDU; |
| 1175 | uint8_t nSelect5GHzMargin; |
| 1176 | uint8_t isCoalesingInIBSSAllowed; |
| 1177 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 1178 | uint8_t cc_switch_mode; |
| 1179 | #endif |
| 1180 | uint8_t allowDFSChannelRoam; |
| 1181 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 1182 | bool isRoamOffloadEnabled; |
| 1183 | #endif |
| 1184 | bool obssEnabled; |
| 1185 | uint8_t conc_custom_rule1; |
| 1186 | uint8_t conc_custom_rule2; |
| 1187 | uint8_t is_sta_connection_in_5gz_enabled; |
| 1188 | bool sendDeauthBeforeCon; |
| 1189 | |
| 1190 | /* 802.11p enable */ |
| 1191 | bool enable_dot11p; |
| 1192 | uint8_t max_scan_count; |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 1193 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 1194 | bool pno_channel_prediction; |
| 1195 | uint8_t top_k_num_of_channels; |
| 1196 | uint8_t stationary_thresh; |
| 1197 | uint32_t channel_prediction_full_scan; |
| 1198 | #endif |
Varun Reddy Yeturu | 0518629 | 2015-09-28 17:12:33 -0700 | [diff] [blame] | 1199 | bool early_stop_scan_enable; |
| 1200 | int8_t early_stop_scan_min_threshold; |
| 1201 | int8_t early_stop_scan_max_threshold; |
Varun Reddy Yeturu | 044bda2 | 2015-11-21 22:03:40 -0800 | [diff] [blame] | 1202 | int8_t first_scan_bucket_threshold; |
Krunal Soni | 1878d3a | 2016-01-14 13:00:44 -0800 | [diff] [blame] | 1203 | bool pnoOffload; |
| 1204 | uint8_t fEnableDebugLog; |
| 1205 | uint8_t max_intf_count; |
| 1206 | bool enable5gEBT; |
| 1207 | bool enableSelfRecovery; |
| 1208 | uint32_t f_sta_miracast_mcc_rest_time_val; |
| 1209 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 1210 | bool sap_channel_avoidance; |
| 1211 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 1212 | uint8_t f_prefer_non_dfs_on_radar; |
| 1213 | bool is_ps_enabled; |
| 1214 | bool policy_manager_enabled; |
| 1215 | uint32_t fine_time_meas_cap; |
| 1216 | uint32_t dual_mac_feature_disable; |
Gupta, Kapil | c68ad46 | 2016-02-01 19:17:23 +0530 | [diff] [blame] | 1217 | uint32_t roam_dense_traffic_thresh; |
| 1218 | uint32_t roam_dense_rssi_thresh_offset; |
| 1219 | uint32_t roam_dense_min_aps; |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 1220 | uint32_t obss_width_interval; |
| 1221 | uint32_t obss_active_dwelltime; |
| 1222 | uint32_t obss_passive_dwelltime; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1223 | } tCsrConfigParam; |
| 1224 | |
| 1225 | /* Tush */ |
| 1226 | typedef struct tagCsrUpdateConfigParam { |
| 1227 | tCsr11dinfo Csr11dinfo; |
| 1228 | } tCsrUpdateConfigParam; |
| 1229 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 1230 | #define csr_roamIsRoamOffloadEnabled(pMac) \ |
| 1231 | (pMac->roam.configParam.isRoamOffloadEnabled) |
| 1232 | #define DEFAULT_REASSOC_FAILURE_TIMEOUT 1000 |
| 1233 | #endif |
| 1234 | |
| 1235 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 1236 | /* connected but not authenticated */ |
| 1237 | #define CSR_ROAM_AUTH_STATUS_CONNECTED 0x1 |
| 1238 | /* connected and authenticated */ |
| 1239 | #define CSR_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 |
| 1240 | #endif |
| 1241 | |
| 1242 | typedef struct tagCsrRoamInfo { |
| 1243 | tCsrRoamProfile *pProfile; |
| 1244 | tSirBssDescription *pBssDesc; |
| 1245 | uint32_t nBeaconLength; |
| 1246 | uint32_t nAssocReqLength; |
| 1247 | uint32_t nAssocRspLength; |
| 1248 | uint32_t nFrameLength; |
| 1249 | uint8_t frameType; |
| 1250 | /* |
| 1251 | * Point to a buffer contain the beacon, assoc req, assoc rsp frame, |
| 1252 | * in that order user needs to use nBeaconLength, nAssocReqLength, |
| 1253 | * nAssocRspLength to desice where each frame starts and ends. |
| 1254 | */ |
| 1255 | uint8_t *pbFrames; |
| 1256 | bool fReassocReq; /* set to true if for re-association */ |
| 1257 | bool fReassocRsp; /* set to true if for re-association */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1258 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1259 | /* |
| 1260 | * Only valid in IBSS. this is the peers MAC address for |
| 1261 | * eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED |
| 1262 | */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1263 | struct qdf_mac_addr peerMac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1264 | tSirResultCodes statusCode; |
| 1265 | /* this'd be our own defined or sent from otherBSS(per 802.11spec) */ |
| 1266 | uint32_t reasonCode; |
| 1267 | uint8_t staId; /* Peer stationId when connected */ |
| 1268 | /* |
| 1269 | * The DPU signatures will be sent eventually to TL to help it |
| 1270 | * determine the assoc to which a packet belongs to unicast DPU sign |
| 1271 | */ |
| 1272 | uint8_t ucastSig; |
| 1273 | uint8_t bcastSig; /* Broadcast DPU signature */ |
| 1274 | /* false means auth needed from supplicant. true means authenticated */ |
| 1275 | bool fAuthRequired; |
| 1276 | uint8_t sessionId; |
| 1277 | uint8_t rsnIELen; |
| 1278 | uint8_t *prsnIE; |
| 1279 | uint8_t wapiIELen; |
| 1280 | uint8_t *pwapiIE; |
| 1281 | uint8_t addIELen; |
| 1282 | uint8_t *paddIE; |
| 1283 | union { |
| 1284 | tSirMicFailureInfo *pMICFailureInfo; |
| 1285 | tCsrRoamConnectedProfile *pConnectedProfile; |
| 1286 | tSirWPSPBCProbeReq *pWPSPBCProbeReq; |
| 1287 | } u; |
| 1288 | bool wmmEnabledSta; /* set to true if WMM enabled STA */ |
| 1289 | uint32_t dtimPeriod; |
| 1290 | #ifdef FEATURE_WLAN_ESE |
| 1291 | bool isESEAssoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1292 | tSirTsmIE tsmIe; |
| 1293 | uint32_t timestamp[2]; |
| 1294 | uint16_t tsmRoamDelay; |
| 1295 | tSirEseBcnReportRsp *pEseBcnReportRsp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1296 | #endif |
| 1297 | void *pRemainCtx; |
| 1298 | uint32_t roc_scan_id; |
| 1299 | uint32_t rxChan; |
| 1300 | #ifdef FEATURE_WLAN_TDLS |
| 1301 | uint8_t staType; |
| 1302 | bool tdls_prohibited; /* per ExtCap in Assoc/Reassoc resp */ |
| 1303 | bool tdls_chan_swit_prohibited; /* per ExtCap in Assoc/Reassoc resp */ |
| 1304 | #endif |
| 1305 | /* Required for indicating the frames to upper layer */ |
| 1306 | uint32_t beaconLength; |
| 1307 | uint8_t *beaconPtr; |
| 1308 | uint32_t assocReqLength; |
| 1309 | uint8_t *assocReqPtr; |
| 1310 | int8_t rxRssi; |
| 1311 | tSirSmeDfsEventInd dfs_event; |
| 1312 | tSirChanChangeResponse *channelChangeRespEvent; |
| 1313 | /* Timing and fine Timing measurement capability clubbed together */ |
| 1314 | uint8_t timingMeasCap; |
| 1315 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 1316 | uint8_t roamSynchInProgress; |
| 1317 | uint8_t synchAuthStatus; |
| 1318 | uint8_t kck[SIR_KCK_KEY_LEN]; |
| 1319 | uint8_t kek[SIR_KEK_KEY_LEN]; |
| 1320 | uint8_t replay_ctr[SIR_REPLAY_CTR_LEN]; |
Ravi Joshi | 277ae9b | 2015-11-13 11:30:43 -0800 | [diff] [blame] | 1321 | uint8_t subnet_change_status; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1322 | #endif |
| 1323 | tSirSmeChanInfo chan_info; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 1324 | uint8_t target_channel; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1325 | } tCsrRoamInfo; |
| 1326 | |
| 1327 | typedef struct tagCsrFreqScanInfo { |
| 1328 | uint32_t nStartFreq; /* in unit of MHz */ |
| 1329 | uint32_t nEndFreq; /* in unit of MHz */ |
| 1330 | tSirScanType scanType; |
| 1331 | } tCsrFreqScanInfo; |
| 1332 | |
| 1333 | typedef struct sSirSmeAssocIndToUpperLayerCnf { |
| 1334 | uint16_t messageType; /* eWNI_SME_ASSOC_CNF */ |
| 1335 | uint16_t length; |
| 1336 | uint8_t sessionId; |
| 1337 | tSirResultCodes statusCode; |
| 1338 | tSirMacAddr bssId; /* Self BSSID */ |
| 1339 | tSirMacAddr peerMacAddr; |
| 1340 | uint16_t aid; |
| 1341 | tSirMacAddr alternateBssId; |
| 1342 | uint8_t alternateChannelId; |
| 1343 | uint8_t wmmEnabledSta; /* set to true if WMM enabled STA */ |
| 1344 | tSirRSNie rsnIE; /* RSN IE received from peer */ |
| 1345 | tSirWAPIie wapiIE; /* WAPI IE received from peer */ |
| 1346 | tSirAddie addIE; /* this can be WSC and/or P2P IE */ |
| 1347 | uint8_t reassocReq; /* set to true if reassoc */ |
| 1348 | /* Timing and fine Timing measurement capability clubbed together */ |
| 1349 | uint8_t timingMeasCap; |
| 1350 | tSirSmeChanInfo chan_info; |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 1351 | uint8_t target_channel; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1352 | } tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf; |
| 1353 | |
| 1354 | typedef struct tagCsrSummaryStatsInfo { |
| 1355 | uint32_t retry_cnt[4]; |
| 1356 | uint32_t multiple_retry_cnt[4]; |
| 1357 | uint32_t tx_frm_cnt[4]; |
| 1358 | /* uint32_t num_rx_frm_crc_err; same as rx_error_cnt */ |
| 1359 | /* uint32_t num_rx_frm_crc_ok; same as rx_frm_cnt */ |
| 1360 | uint32_t rx_frm_cnt; |
| 1361 | uint32_t frm_dup_cnt; |
| 1362 | uint32_t fail_cnt[4]; |
| 1363 | uint32_t rts_fail_cnt; |
| 1364 | uint32_t ack_fail_cnt; |
| 1365 | uint32_t rts_succ_cnt; |
| 1366 | uint32_t rx_discard_cnt; |
| 1367 | uint32_t rx_error_cnt; |
| 1368 | uint32_t tx_byte_cnt; |
| 1369 | |
| 1370 | } tCsrSummaryStatsInfo; |
| 1371 | |
| 1372 | typedef struct tagCsrGlobalClassAStatsInfo { |
| 1373 | uint32_t rx_frag_cnt; |
| 1374 | uint32_t promiscuous_rx_frag_cnt; |
| 1375 | /* uint32_t rx_fcs_err; */ |
| 1376 | uint32_t rx_input_sensitivity; |
| 1377 | uint32_t max_pwr; |
| 1378 | /* uint32_t default_pwr; */ |
| 1379 | uint32_t sync_fail_cnt; |
| 1380 | uint32_t tx_rate; |
| 1381 | /* mcs index for HT20 and HT40 rates */ |
| 1382 | uint32_t mcs_index; |
| 1383 | /* to diff between HT20 & HT40 rates;short & long guard interval */ |
| 1384 | uint32_t tx_rate_flags; |
| 1385 | |
| 1386 | } tCsrGlobalClassAStatsInfo; |
| 1387 | |
| 1388 | typedef struct tagCsrGlobalClassBStatsInfo { |
| 1389 | uint32_t uc_rx_wep_unencrypted_frm_cnt; |
| 1390 | uint32_t uc_rx_mic_fail_cnt; |
| 1391 | uint32_t uc_tkip_icv_err; |
| 1392 | uint32_t uc_aes_ccmp_format_err; |
| 1393 | uint32_t uc_aes_ccmp_replay_cnt; |
| 1394 | uint32_t uc_aes_ccmp_decrpt_err; |
| 1395 | uint32_t uc_wep_undecryptable_cnt; |
| 1396 | uint32_t uc_wep_icv_err; |
| 1397 | uint32_t uc_rx_decrypt_succ_cnt; |
| 1398 | uint32_t uc_rx_decrypt_fail_cnt; |
| 1399 | uint32_t mcbc_rx_wep_unencrypted_frm_cnt; |
| 1400 | uint32_t mcbc_rx_mic_fail_cnt; |
| 1401 | uint32_t mcbc_tkip_icv_err; |
| 1402 | uint32_t mcbc_aes_ccmp_format_err; |
| 1403 | uint32_t mcbc_aes_ccmp_replay_cnt; |
| 1404 | uint32_t mcbc_aes_ccmp_decrpt_err; |
| 1405 | uint32_t mcbc_wep_undecryptable_cnt; |
| 1406 | uint32_t mcbc_wep_icv_err; |
| 1407 | uint32_t mcbc_rx_decrypt_succ_cnt; |
| 1408 | uint32_t mcbc_rx_decrypt_fail_cnt; |
| 1409 | |
| 1410 | } tCsrGlobalClassBStatsInfo; |
| 1411 | |
| 1412 | typedef struct tagCsrGlobalClassCStatsInfo { |
| 1413 | uint32_t rx_amsdu_cnt; |
| 1414 | uint32_t rx_ampdu_cnt; |
| 1415 | uint32_t tx_20_frm_cnt; |
| 1416 | uint32_t rx_20_frm_cnt; |
| 1417 | uint32_t rx_mpdu_in_ampdu_cnt; |
| 1418 | uint32_t ampdu_delimiter_crc_err; |
| 1419 | |
| 1420 | } tCsrGlobalClassCStatsInfo; |
| 1421 | |
| 1422 | typedef struct tagCsrGlobalClassDStatsInfo { |
| 1423 | uint32_t tx_uc_frm_cnt; |
| 1424 | uint32_t tx_mc_frm_cnt; |
| 1425 | uint32_t tx_bc_frm_cnt; |
| 1426 | uint32_t rx_uc_frm_cnt; |
| 1427 | uint32_t rx_mc_frm_cnt; |
| 1428 | uint32_t rx_bc_frm_cnt; |
| 1429 | uint32_t tx_uc_byte_cnt[4]; |
| 1430 | uint32_t tx_mc_byte_cnt; |
| 1431 | uint32_t tx_bc_byte_cnt; |
| 1432 | uint32_t rx_uc_byte_cnt[4]; |
| 1433 | uint32_t rx_mc_byte_cnt; |
| 1434 | uint32_t rx_bc_byte_cnt; |
| 1435 | uint32_t rx_byte_cnt; |
| 1436 | uint32_t num_rx_bytes_crc_ok; |
| 1437 | uint32_t rx_rate; |
| 1438 | |
| 1439 | } tCsrGlobalClassDStatsInfo; |
| 1440 | |
| 1441 | typedef struct tagCsrPerStaStatsInfo { |
| 1442 | uint32_t tx_frag_cnt[4]; |
| 1443 | uint32_t tx_ampdu_cnt; |
| 1444 | uint32_t tx_mpdu_in_ampdu_cnt; |
| 1445 | } tCsrPerStaStatsInfo; |
| 1446 | |
| 1447 | typedef struct tagCsrRoamSetKey { |
| 1448 | eCsrEncryptionType encType; |
| 1449 | tAniKeyDirection keyDirection; /* Tx, Rx or Tx-and-Rx */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1450 | struct qdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1451 | uint8_t paeRole; /* 0 for supplicant */ |
| 1452 | uint8_t keyId; /* Key index */ |
| 1453 | uint16_t keyLength; /* Number of bytes containing the key in pKey */ |
| 1454 | uint8_t Key[CSR_MAX_KEY_LEN]; |
| 1455 | uint8_t keyRsc[CSR_MAX_RSC_LEN]; |
| 1456 | } tCsrRoamSetKey; |
| 1457 | |
| 1458 | typedef struct tagCsrRoamRemoveKey { |
| 1459 | eCsrEncryptionType encType; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1460 | struct qdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1461 | uint8_t keyId; /* key index */ |
| 1462 | } tCsrRoamRemoveKey; |
| 1463 | |
| 1464 | #ifdef FEATURE_WLAN_TDLS |
| 1465 | |
| 1466 | typedef struct tagCsrLinkEstablishParams { |
| 1467 | tSirMacAddr peerMac; |
| 1468 | uint8_t uapsdQueues; |
| 1469 | uint8_t maxSp; |
| 1470 | uint8_t isBufSta; |
| 1471 | uint8_t isOffChannelSupported; |
| 1472 | uint8_t isResponder; |
| 1473 | uint8_t supportedChannelsLen; |
| 1474 | uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS]; |
| 1475 | uint8_t supportedOperClassesLen; |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 1476 | uint8_t supportedOperClasses[CDS_MAX_SUPP_OPER_CLASSES]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1477 | } tCsrTdlsLinkEstablishParams; |
| 1478 | |
| 1479 | typedef struct tagCsrTdlsSendMgmt { |
| 1480 | tSirMacAddr peerMac; |
| 1481 | uint8_t frameType; |
| 1482 | uint8_t dialog; |
| 1483 | uint16_t statusCode; |
| 1484 | uint8_t responder; |
| 1485 | uint32_t peerCapability; |
| 1486 | uint8_t *buf; |
| 1487 | uint8_t len; |
| 1488 | |
| 1489 | } tCsrTdlsSendMgmt; |
| 1490 | #endif |
| 1491 | |
| 1492 | typedef void *tScanResultHandle; |
| 1493 | |
| 1494 | typedef enum { |
| 1495 | REASSOC = 0, |
| 1496 | FASTREASSOC = 1 |
| 1497 | } handoff_src; |
| 1498 | |
| 1499 | typedef struct tagCsrHandoffRequest { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1500 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1501 | uint8_t channel; |
| 1502 | uint8_t src; /* To check if its a REASSOC or a FASTREASSOC IOCTL */ |
| 1503 | } tCsrHandoffRequest; |
| 1504 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1505 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1506 | typedef struct tagCsrEseBeaconReqParams { |
| 1507 | uint16_t measurementToken; |
| 1508 | uint8_t channel; |
| 1509 | uint8_t scanMode; |
| 1510 | uint16_t measurementDuration; |
| 1511 | } tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams; |
| 1512 | |
| 1513 | typedef struct tagCsrEseBeaconReq { |
| 1514 | uint8_t numBcnReqIe; |
| 1515 | tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS]; |
| 1516 | } tCsrEseBeaconReq, *tpCsrEseBeaconReq; |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1517 | #endif /* FEATURE_WLAN_ESE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1518 | |
| 1519 | struct tagCsrDelStaParams { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1520 | struct qdf_mac_addr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1521 | uint16_t reason_code; |
| 1522 | uint8_t subtype; |
| 1523 | }; |
| 1524 | |
| 1525 | /* |
| 1526 | * NOTE: p2 is the second context pass in for the caller |
| 1527 | * NOTE: what if callback is called before requester gets the scanId?? |
| 1528 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1529 | typedef QDF_STATUS (*csr_scan_completeCallback)(tHalHandle, void *p2, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1530 | uint8_t sessionId, |
| 1531 | uint32_t scanID, |
| 1532 | eCsrScanStatus status); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1533 | typedef QDF_STATUS (*csr_roam_completeCallback)(void *pContext, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1534 | tCsrRoamInfo * pParam, |
| 1535 | uint32_t roamId, |
| 1536 | eRoamCmdStatus roamStatus, |
| 1537 | eCsrRoamResult roamResult); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1538 | typedef QDF_STATUS (*csr_roamSessionCloseCallback)(void *pContext); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1539 | |
| 1540 | #define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == \ |
| 1541 | (pProfile)->BSSType) |
| 1542 | #define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == \ |
| 1543 | (pProfile)->BSSType) |
| 1544 | #define CSR_IS_IBSS(pProfile) (CSR_IS_START_IBSS(pProfile) || \ |
| 1545 | CSR_IS_JOIN_TO_IBSS(pProfile)) |
| 1546 | #define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == \ |
| 1547 | (pProfile)->BSSType) |
| 1548 | #define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == \ |
| 1549 | (pProfile)->BSSType) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1550 | #define CSR_IS_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ |
| 1551 | (pProfile)->BSSType) |
| 1552 | #define CSR_IS_CONN_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ |
| 1553 | (pProfile)->BSSType) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1554 | #define CSR_IS_CLOSE_SESSION_COMMAND(pCommand) \ |
| 1555 | ((pCommand)->command == eSmeCommandDelStaSession) |
| 1556 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1557 | QDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1558 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1559 | QDF_STATUS csr_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1560 | |
| 1561 | /* enum to string conversion for debug output */ |
| 1562 | const char *get_e_roam_cmd_status_str(eRoamCmdStatus val); |
| 1563 | const char *get_e_csr_roam_result_str(eCsrRoamResult val); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1564 | QDF_STATUS csr_set_phy_mode(tHalHandle hHal, uint32_t phyMode, eCsrBand eBand, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1565 | bool *pfRestartNeeded); |
| 1566 | typedef void (*csr_roamLinkQualityIndCallback) |
| 1567 | (eCsrRoamLinkQualityInd ind, void *pContext); |
| 1568 | typedef void (*tCsrStatsCallback)(void *stats, void *pContext); |
| 1569 | typedef void (*tCsrRssiCallback)(int8_t rssi, uint32_t staId, void *pContext); |
| 1570 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1571 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1572 | typedef void (*tCsrTsmStatsCallback)(tAniTrafStrmMetrics tsmMetrics, |
| 1573 | uint32_t staId, void *pContext); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1574 | #endif /* FEATURE_WLAN_ESE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1575 | typedef void (*tCsrSnrCallback)(int8_t snr, uint32_t staId, void *pContext); |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame^] | 1576 | #ifdef WLAN_FEATURE_HOST_ROAM |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1577 | QDF_STATUS csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId, |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame^] | 1578 | tpSirBssDescription pBssDescription); |
| 1579 | #else |
| 1580 | static inline QDF_STATUS csr_roam_issue_ft_preauth_req(tHalHandle hHal, |
| 1581 | uint32_t sessionId, tpSirBssDescription pBssDescription) |
| 1582 | { |
| 1583 | return QDF_STATUS_E_NOSUPPORT; |
| 1584 | } |
| 1585 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1586 | QDF_STATUS csr_set_band(tHalHandle hHal, uint8_t sessionId, eCsrBand eBand); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1587 | eCsrBand csr_get_current_band(tHalHandle hHal); |
| 1588 | typedef void (*csr_readyToSuspendCallback)(void *pContext, bool suspended); |
| 1589 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
| 1590 | typedef void (*csr_readyToExtWoWCallback)(void *pContext, bool status); |
| 1591 | #endif |
| 1592 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1593 | QDF_STATUS csr_roam_issue_ft_roam_offload_synch(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1594 | uint32_t sessionId, tSirBssDescription *pBssDescription); |
| 1595 | #endif |
| 1596 | typedef void (*tCsrLinkStatusCallback)(uint8_t status, void *pContext); |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 1597 | #ifdef FEATURE_WLAN_TDLS |
| 1598 | void csr_roam_fill_tdls_info(tCsrRoamInfo *roam_info, tpSirSmeJoinRsp join_rsp); |
| 1599 | #else |
| 1600 | static inline void csr_roam_fill_tdls_info(tCsrRoamInfo *roam_info, |
| 1601 | tpSirSmeJoinRsp join_rsp) |
| 1602 | {} |
| 1603 | #endif |
| 1604 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1605 | #endif |