1 /* 2 * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * \file csr_api.h 21 * 22 * Exports and types for the Common Scan and Roaming Module interfaces. 23 */ 24 25 #ifndef CSRAPI_H__ 26 #define CSRAPI_H__ 27 28 #include "sir_api.h" 29 #include "sir_mac_prot_def.h" 30 #include "csr_link_list.h" 31 #include "wlan_scan_public_structs.h" 32 33 #define CSR_INVALID_SCANRESULT_HANDLE (NULL) 34 #define CSR_NUM_WLM_LATENCY_LEVEL 4 35 36 typedef enum { 37 /* never used */ 38 eCSR_AUTH_TYPE_NONE, 39 /* MAC layer authentication types */ 40 eCSR_AUTH_TYPE_OPEN_SYSTEM, 41 eCSR_AUTH_TYPE_SHARED_KEY, 42 eCSR_AUTH_TYPE_SAE, 43 eCSR_AUTH_TYPE_AUTOSWITCH, 44 45 /* Upper layer authentication types */ 46 eCSR_AUTH_TYPE_WPA, 47 eCSR_AUTH_TYPE_WPA_PSK, 48 eCSR_AUTH_TYPE_WPA_NONE, 49 50 eCSR_AUTH_TYPE_RSN, 51 eCSR_AUTH_TYPE_RSN_PSK, 52 eCSR_AUTH_TYPE_FT_RSN, 53 eCSR_AUTH_TYPE_FT_RSN_PSK, 54 #ifdef FEATURE_WLAN_WAPI 55 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE, 56 eCSR_AUTH_TYPE_WAPI_WAI_PSK, 57 #endif /* FEATURE_WLAN_WAPI */ 58 eCSR_AUTH_TYPE_CCKM_WPA, 59 eCSR_AUTH_TYPE_CCKM_RSN, 60 eCSR_AUTH_TYPE_RSN_PSK_SHA256, 61 eCSR_AUTH_TYPE_RSN_8021X_SHA256, 62 eCSR_AUTH_TYPE_FILS_SHA256, 63 eCSR_AUTH_TYPE_FILS_SHA384, 64 eCSR_AUTH_TYPE_FT_FILS_SHA256, 65 eCSR_AUTH_TYPE_FT_FILS_SHA384, 66 eCSR_AUTH_TYPE_DPP_RSN, 67 eCSR_AUTH_TYPE_OWE, 68 eCSR_AUTH_TYPE_SUITEB_EAP_SHA256, 69 eCSR_AUTH_TYPE_SUITEB_EAP_SHA384, 70 eCSR_NUM_OF_SUPPORT_AUTH_TYPE, 71 eCSR_AUTH_TYPE_FAILED = 0xff, 72 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED, 73 74 } eCsrAuthType; 75 76 typedef enum { 77 eCSR_ENCRYPT_TYPE_NONE, 78 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY, 79 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY, 80 eCSR_ENCRYPT_TYPE_WEP40, 81 eCSR_ENCRYPT_TYPE_WEP104, 82 eCSR_ENCRYPT_TYPE_TKIP, 83 eCSR_ENCRYPT_TYPE_AES,/* CCMP */ 84 #ifdef FEATURE_WLAN_WAPI 85 /* WAPI */ 86 eCSR_ENCRYPT_TYPE_WPI, 87 #endif /* FEATURE_WLAN_WAPI */ 88 eCSR_ENCRYPT_TYPE_KRK, 89 eCSR_ENCRYPT_TYPE_BTK, 90 eCSR_ENCRYPT_TYPE_AES_CMAC, 91 eCSR_ENCRYPT_TYPE_AES_GMAC_128, 92 eCSR_ENCRYPT_TYPE_AES_GMAC_256, 93 eCSR_ENCRYPT_TYPE_AES_GCMP, 94 eCSR_ENCRYPT_TYPE_AES_GCMP_256, 95 eCSR_ENCRYPT_TYPE_ANY, 96 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY, 97 98 eCSR_ENCRYPT_TYPE_FAILED = 0xff, 99 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED, 100 101 } eCsrEncryptionType; 102 103 /*--------------------------------------------------------------------------- 104 Enumeration of the various Security types 105 ---------------------------------------------------------------------------*/ 106 typedef enum { 107 eCSR_SECURITY_TYPE_WPA, 108 eCSR_SECURITY_TYPE_RSN, 109 #ifdef FEATURE_WLAN_WAPI 110 eCSR_SECURITY_TYPE_WAPI, 111 #endif /* FEATURE_WLAN_WAPI */ 112 eCSR_SECURITY_TYPE_UNKNOWN, 113 114 } eCsrSecurityType; 115 116 typedef enum { 117 /* 11a/b/g only, no HT, no proprietary */ 118 eCSR_DOT11_MODE_abg = 0x0001, 119 eCSR_DOT11_MODE_11a = 0x0002, 120 eCSR_DOT11_MODE_11b = 0x0004, 121 eCSR_DOT11_MODE_11g = 0x0008, 122 eCSR_DOT11_MODE_11n = 0x0010, 123 eCSR_DOT11_MODE_11g_ONLY = 0x0020, 124 eCSR_DOT11_MODE_11n_ONLY = 0x0040, 125 eCSR_DOT11_MODE_11b_ONLY = 0x0080, 126 eCSR_DOT11_MODE_11ac = 0x0100, 127 eCSR_DOT11_MODE_11ac_ONLY = 0x0200, 128 /* 129 * This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL 130 * except when it starts IBSS in 11B of 2.4GHz 131 * It is for CSR internal use 132 */ 133 eCSR_DOT11_MODE_AUTO = 0x0400, 134 eCSR_DOT11_MODE_11ax = 0x0800, 135 eCSR_DOT11_MODE_11ax_ONLY = 0x1000, 136 137 /* specify the number of maximum bits for phyMode */ 138 eCSR_NUM_PHY_MODE = 16, 139 } eCsrPhyMode; 140 141 /** 142 * enum eCsrRoamBssType - BSS type in CSR operations 143 * @eCSR_BSS_TYPE_INFRASTRUCTURE: Infrastructure station 144 * @eCSR_BSS_TYPE_INFRA_AP: SoftAP 145 * @eCSR_BSS_TYPE_IBSS: IBSS network we'll not start 146 * @eCSR_BSS_TYPE_START_IBSS: IBSS network we'll start if no partners found 147 * @eCSR_BSS_TYPE_NDI: NAN datapath interface 148 * @eCSR_BSS_TYPE_ANY: any BSS type (IBSS or Infrastructure) 149 */ 150 typedef enum { 151 eCSR_BSS_TYPE_INFRASTRUCTURE, 152 eCSR_BSS_TYPE_INFRA_AP, 153 eCSR_BSS_TYPE_IBSS, 154 eCSR_BSS_TYPE_START_IBSS, 155 eCSR_BSS_TYPE_NDI, 156 eCSR_BSS_TYPE_ANY, 157 } eCsrRoamBssType; 158 159 typedef enum { 160 eCSR_SCAN_SUCCESS, 161 eCSR_SCAN_FAILURE, 162 eCSR_SCAN_ABORT, 163 eCSR_SCAN_FOUND_PEER, 164 } eCsrScanStatus; 165 166 typedef enum { 167 eCSR_BW_20MHz_VAL = 20, 168 eCSR_BW_40MHz_VAL = 40, 169 eCSR_BW_80MHz_VAL = 80, 170 eCSR_BW_160MHz_VAL = 160 171 } eCSR_BW_Val; 172 173 typedef enum { 174 eCSR_INI_SINGLE_CHANNEL_CENTERED = 0, 175 eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY, 176 eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY, 177 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED, 178 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED, 179 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED, 180 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW, 181 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW, 182 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH, 183 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH, 184 eCSR_INI_CHANNEL_BONDING_STATE_MAX 185 } eIniChanBondState; 186 187 #define CSR_RSN_PMKID_SIZE 16 188 #define CSR_RSN_MAX_PMK_LEN 48 189 #define CSR_MAX_PMKID_ALLOWED 32 190 #define CSR_WEP40_KEY_LEN 5 191 #define CSR_WEP104_KEY_LEN 13 192 #define CSR_TKIP_KEY_LEN 32 193 #define CSR_AES_KEY_LEN 16 194 #define CSR_AES_GCMP_KEY_LEN 16 195 #define CSR_AES_GCMP_256_KEY_LEN 32 196 #define CSR_AES_GMAC_128_KEY_LEN 16 197 #define CSR_AES_GMAC_256_KEY_LEN 32 198 #define CSR_MAX_TX_POWER (WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX) 199 #define CSR_MAX_RSC_LEN 16 200 #ifdef FEATURE_WLAN_WAPI 201 #define CSR_WAPI_BKID_SIZE 16 202 #define CSR_MAX_BKID_ALLOWED 16 203 #define CSR_WAPI_KEY_LEN 32 204 #define CSR_MAX_KEY_LEN (CSR_WAPI_KEY_LEN) /* longest one is for WAPI */ 205 #else 206 #define CSR_MAX_KEY_LEN (CSR_TKIP_KEY_LEN) /* longest one is for TKIP */ 207 #endif /* FEATURE_WLAN_WAPI */ 208 #ifdef FEATURE_WLAN_ESE 209 #define CSR_KRK_KEY_LEN 16 210 #endif 211 212 typedef struct tagCsrChannelInfo { 213 uint8_t numOfChannels; 214 uint8_t *ChannelList; /* it will be an array of channels */ 215 } tCsrChannelInfo, *tpCsrChannelInfo; 216 217 typedef enum { 218 eHIDDEN_SSID_NOT_IN_USE, 219 eHIDDEN_SSID_ZERO_LEN, 220 eHIDDEN_SSID_ZERO_CONTENTS 221 } tHiddenssId; 222 223 typedef struct tagCsrSSIDInfo { 224 tSirMacSSid SSID; 225 bool handoffPermitted; 226 tHiddenssId ssidHidden; 227 } tCsrSSIDInfo; 228 229 typedef struct tagCsrSSIDs { 230 uint32_t numOfSSIDs; 231 tCsrSSIDInfo *SSIDList; /* To be allocated for array of SSIDs */ 232 } tCsrSSIDs; 233 234 typedef struct tagCsrBSSIDs { 235 uint32_t numOfBSSIDs; 236 struct qdf_mac_addr *bssid; 237 } tCsrBSSIDs; 238 239 typedef struct tagCsrStaParams { 240 uint16_t capability; 241 uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP]; 242 uint8_t supported_rates_len; 243 uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES]; 244 uint8_t htcap_present; 245 tSirHTCap HTCap; 246 uint8_t vhtcap_present; 247 tSirVHTCap VHTCap; 248 uint8_t uapsd_queues; 249 uint8_t max_sp; 250 uint8_t supported_channels_len; 251 uint8_t supported_channels[SIR_MAC_MAX_SUPP_CHANNELS]; 252 uint8_t supported_oper_classes_len; 253 uint8_t supported_oper_classes[REG_MAX_SUPP_OPER_CLASSES]; 254 } tCsrStaParams; 255 256 typedef struct tagCsrScanResultInfo { 257 /* 258 * Carry the IEs for the current BSSDescription. 259 * A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS. 260 */ 261 void *pvIes; 262 tAniSSID ssId; 263 unsigned long timer; /* timer is variable for hidden SSID timer */ 264 /* 265 * This member must be the last in the structure because the 266 * end of tSirBssDescription is an 267 * array with nonknown size at this time */ 268 tSirBssDescription BssDescriptor; 269 } tCsrScanResultInfo; 270 271 typedef struct tagCsrEncryptionList { 272 273 uint32_t numEntries; 274 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE]; 275 276 } tCsrEncryptionList, *tpCsrEncryptionList; 277 278 typedef struct tagCsrAuthList { 279 uint32_t numEntries; 280 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE]; 281 } tCsrAuthList, *tpCsrAuthList; 282 283 typedef struct tagCsrMobilityDomainInfo { 284 uint8_t mdiePresent; 285 uint16_t mobilityDomain; 286 } tCsrMobilityDomainInfo; 287 288 #ifdef FEATURE_WLAN_ESE 289 typedef struct tagCsrEseCckmInfo { 290 uint32_t reassoc_req_num; 291 bool krk_plumbed; 292 uint8_t krk[SIR_KRK_KEY_LEN]; 293 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 294 uint8_t btk[SIR_BTK_KEY_LEN]; 295 #endif 296 } tCsrEseCckmInfo; 297 298 typedef struct tagCsrEseCckmIe { 299 uint8_t cckmIe[DOT11F_IE_RSN_MAX_LEN]; 300 uint8_t cckmIeLen; 301 } tCsrEseCckmIe; 302 #endif /* FEATURE_WLAN_ESE */ 303 304 typedef struct sCsrChannel_ { 305 uint8_t numChannels; 306 uint8_t channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; 307 } sCsrChannel; 308 309 typedef struct tagCsrScanResultFilter { 310 tCsrBSSIDs BSSIDs; 311 tCsrSSIDs SSIDs; 312 tCsrChannelInfo ChannelInfo; 313 tCsrAuthList authType; 314 tCsrEncryptionList EncryptionType; 315 /* 316 * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. 317 * If caller doesn't case, put all supported encryption types in here 318 */ 319 tCsrEncryptionList mcEncryptionType; 320 eCsrRoamBssType BSSType; 321 /* its a bit mask of all the needed phy mode defined in eCsrPhyMode */ 322 eCsrPhyMode phyMode; 323 /* 324 * If countryCode[0] is not 0, countryCode is checked 325 * independent of fCheckUnknownCountryCode 326 */ 327 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; 328 uint8_t uapsd_mask; 329 /* For WPS filtering if true => auth and ecryption should be ignored */ 330 bool bWPSAssociation; 331 bool bOSENAssociation; 332 /* 333 * For measurement reports --> if set, only SSID, 334 * BSSID and channel is considered for filtering. 335 */ 336 bool fMeasurement; 337 tCsrMobilityDomainInfo MDID; 338 bool p2pResult; 339 #ifdef WLAN_FEATURE_11W 340 /* Management Frame Protection */ 341 bool MFPEnabled; 342 uint8_t MFPRequired; 343 uint8_t MFPCapable; 344 #endif 345 /* The following flag is used to distinguish the 346 * roaming case while building the scan filter and 347 * applying it on to the scan results. This is mainly 348 * used to support whitelist ssid feature. 349 */ 350 uint8_t scan_filter_for_roam; 351 struct sCsrChannel_ pcl_channels; 352 struct qdf_mac_addr bssid_hint; 353 enum QDF_OPMODE csrPersona; 354 bool realm_check; 355 uint8_t fils_realm[2]; 356 bool force_rsne_override; 357 } tCsrScanResultFilter; 358 359 typedef struct sCsrChnPower_ { 360 uint8_t firstChannel; 361 uint8_t numChannels; 362 uint8_t maxtxPower; 363 } sCsrChnPower; 364 365 typedef struct tagCsr11dinfo { 366 sCsrChannel Channels; 367 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN + 1]; 368 /* max power channel list */ 369 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN]; 370 } tCsr11dinfo; 371 372 typedef enum { 373 eCSR_ROAM_CANCELLED = 1, 374 /* it means error happens before assoc_start/roaming_start is called. */ 375 eCSR_ROAM_FAILED, 376 /* 377 * a CSR trigger roaming operation starts, 378 * callback may get a pointer to tCsrConnectedProfile 379 */ 380 eCSR_ROAM_ROAMING_START, 381 /* a CSR trigger roaming operation is completed */ 382 eCSR_ROAM_ROAMING_COMPLETION, 383 /* Connection completed status. */ 384 eCSR_ROAM_CONNECT_COMPLETION, 385 /* 386 * an association or start_IBSS operation starts, 387 * callback may get a pointer to struct csr_roam_profile and 388 * a pointer to tSirBssDescription 389 */ 390 eCSR_ROAM_ASSOCIATION_START, 391 /* 392 * a roaming operation is finish, see eCsrRoamResult for 393 * possible data passed back 394 */ 395 eCSR_ROAM_ASSOCIATION_COMPLETION, 396 eCSR_ROAM_DISASSOCIATED, 397 eCSR_ROAM_ASSOCIATION_FAILURE, 398 /* when callback with this flag. it gets a pointer to the BSS desc. */ 399 eCSR_ROAM_SHOULD_ROAM, 400 /* A new candidate for PMKID is found */ 401 eCSR_ROAM_SCAN_FOUND_NEW_BSS, 402 /* CSR is done lostlink roaming and still cannot reconnect */ 403 eCSR_ROAM_LOSTLINK, 404 /* a link lost is detected. CSR starts roaming. */ 405 eCSR_ROAM_LOSTLINK_DETECTED, 406 /* 407 * TKIP MIC error detected, callback gets a pointer 408 * to tpSirSmeMicFailureInd 409 */ 410 eCSR_ROAM_MIC_ERROR_IND, 411 /* IBSS indications. */ 412 eCSR_ROAM_IBSS_IND, 413 /* 414 * Update the connection status, useful for IBSS: new peer added, 415 * network is active etc. 416 */ 417 eCSR_ROAM_CONNECT_STATUS_UPDATE, 418 eCSR_ROAM_GEN_INFO, 419 eCSR_ROAM_SET_KEY_COMPLETE, 420 eCSR_ROAM_IBSS_LEAVE, /* IBSS indications. */ 421 /* BSS in SoftAP mode status indication */ 422 eCSR_ROAM_INFRA_IND, 423 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND, 424 eCSR_ROAM_FT_RESPONSE, 425 eCSR_ROAM_FT_START, 426 /* this mean error happens before assoc_start/roam_start is called. */ 427 eCSR_ROAM_SESSION_OPENED, 428 eCSR_ROAM_FT_REASSOC_FAILED, 429 eCSR_ROAM_PMK_NOTIFY, 430 /* 431 * Following 4 enums are used by FEATURE_WLAN_LFR_METRICS 432 * but they are needed for compilation even when 433 * FEATURE_WLAN_LFR_METRICS is not defined. 434 */ 435 eCSR_ROAM_PREAUTH_INIT_NOTIFY, 436 eCSR_ROAM_PREAUTH_STATUS_SUCCESS, 437 eCSR_ROAM_PREAUTH_STATUS_FAILURE, 438 eCSR_ROAM_HANDOVER_SUCCESS, 439 /* 440 * TDLS callback events 441 */ 442 eCSR_ROAM_TDLS_STATUS_UPDATE, 443 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND, 444 445 /* Disaconnect all the clients */ 446 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, 447 /* Stopbss triggered from SME due to different */ 448 eCSR_ROAM_SEND_P2P_STOP_BSS, 449 /* beacon interval */ 450 #ifdef WLAN_FEATURE_11W 451 eCSR_ROAM_UNPROT_MGMT_FRAME_IND, 452 #endif 453 454 eCSR_ROAM_IBSS_PEER_INFO_COMPLETE, 455 456 #ifdef FEATURE_WLAN_ESE 457 eCSR_ROAM_TSM_IE_IND, 458 eCSR_ROAM_CCKM_PREAUTH_NOTIFY, 459 eCSR_ROAM_ESE_ADJ_AP_REPORT_IND, 460 eCSR_ROAM_ESE_BCN_REPORT_IND, 461 #endif /* FEATURE_WLAN_ESE */ 462 463 /* Radar indication from lower layers */ 464 eCSR_ROAM_DFS_RADAR_IND, 465 eCSR_ROAM_SET_CHANNEL_RSP, 466 467 /* Channel sw update notification */ 468 eCSR_ROAM_DFS_CHAN_SW_NOTIFY, 469 eCSR_ROAM_EXT_CHG_CHNL_IND, 470 eCSR_ROAM_STA_CHANNEL_SWITCH, 471 eCSR_ROAM_NDP_STATUS_UPDATE, 472 eCSR_ROAM_UPDATE_SCAN_RESULT, 473 eCSR_ROAM_START, 474 eCSR_ROAM_ABORT, 475 eCSR_ROAM_NAPI_OFF, 476 eCSR_ROAM_CHANNEL_COMPLETE_IND, 477 eCSR_ROAM_CAC_COMPLETE_IND, 478 eCSR_ROAM_SAE_COMPUTE, 479 } eRoamCmdStatus; 480 481 /* comment inside indicates what roaming callback gets */ 482 typedef enum { 483 eCSR_ROAM_RESULT_NONE, 484 eCSR_ROAM_RESULT_SUCCESS = eCSR_ROAM_RESULT_NONE, 485 /* 486 * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, 487 * struct csr_roam_info's pBssDesc may pass back 488 */ 489 eCSR_ROAM_RESULT_FAILURE, 490 /* Pass back pointer to struct csr_roam_info */ 491 eCSR_ROAM_RESULT_ASSOCIATED, 492 eCSR_ROAM_RESULT_NOT_ASSOCIATED, 493 eCSR_ROAM_RESULT_MIC_FAILURE, 494 eCSR_ROAM_RESULT_FORCED, 495 eCSR_ROAM_RESULT_DISASSOC_IND, 496 eCSR_ROAM_RESULT_DEAUTH_IND, 497 eCSR_ROAM_RESULT_CAP_CHANGED, 498 /* 499 * This means we starts an IBSS struct csr_roam_info's 500 * pBssDesc may pass back 501 */ 502 eCSR_ROAM_RESULT_IBSS_STARTED, 503 eCSR_ROAM_RESULT_IBSS_START_FAILED, 504 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS, 505 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED, 506 eCSR_ROAM_RESULT_IBSS_CONNECT, 507 eCSR_ROAM_RESULT_IBSS_INACTIVE, 508 /* 509 * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION struct 510 * csr_roam_info's pBssDesc may pass back and the peer's MAC 511 * address in peerMacOrBssid. If roamStatus is 512 * eCSR_ROAM_IBSS_IND, the peer's MAC address in 513 * peerMacOrBssid and a beacon frame of the IBSS in pbFrames 514 */ 515 eCSR_ROAM_RESULT_IBSS_NEW_PEER, 516 /* 517 * Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd 518 * in pIbssPeerInd 519 */ 520 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED, 521 /* 522 * Coalescing in the IBSS network (joined an IBSS network) 523 * Callback pass a BSSID in peerMacOrBssid 524 */ 525 eCSR_ROAM_RESULT_IBSS_COALESCED, 526 /* 527 * If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer 528 * to tCsrConnectedProfile used to connect. 529 */ 530 eCSR_ROAM_RESULT_IBSS_STOP, 531 eCSR_ROAM_RESULT_LOSTLINK, 532 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST, 533 eCSR_ROAM_RESULT_MIC_ERROR_GROUP, 534 eCSR_ROAM_RESULT_AUTHENTICATED, 535 eCSR_ROAM_RESULT_NEW_RSN_BSS, 536 #ifdef FEATURE_WLAN_WAPI 537 eCSR_ROAM_RESULT_NEW_WAPI_BSS, 538 #endif /* FEATURE_WLAN_WAPI */ 539 /* INFRA started successfully */ 540 eCSR_ROAM_RESULT_INFRA_STARTED, 541 /* INFRA start failed */ 542 eCSR_ROAM_RESULT_INFRA_START_FAILED, 543 /* INFRA stopped */ 544 eCSR_ROAM_RESULT_INFRA_STOPPED, 545 /* A station joining INFRA AP */ 546 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND, 547 /* A station joined INFRA AP */ 548 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF, 549 /* INFRA disassociated */ 550 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED, 551 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND, 552 eCSR_ROAM_RESULT_SEND_ACTION_FAIL, 553 /* peer rejected assoc because max assoc limit reached */ 554 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED, 555 /* Assoc rejected due to concurrent session running on a diff channel */ 556 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL, 557 /* TDLS events */ 558 eCSR_ROAM_RESULT_ADD_TDLS_PEER, 559 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER, 560 eCSR_ROAM_RESULT_DELETE_TDLS_PEER, 561 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND, 562 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND, 563 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP, 564 eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER, 565 eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN, 566 eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED, 567 eCSR_ROAM_RESULT_TDLS_CONNECTION_TRACKER_NOTIFICATION, 568 569 eCSR_ROAM_RESULT_IBSS_PEER_INFO_SUCCESS, 570 eCSR_ROAM_RESULT_IBSS_PEER_INFO_FAILED, 571 eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND, 572 eCSR_ROAM_RESULT_CHANNEL_CHANGE_SUCCESS, 573 eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE, 574 eCSR_ROAM_RESULT_DFS_CHANSW_UPDATE_SUCCESS, 575 eCSR_ROAM_EXT_CHG_CHNL_UPDATE_IND, 576 577 eCSR_ROAM_RESULT_NDI_CREATE_RSP, 578 eCSR_ROAM_RESULT_NDI_DELETE_RSP, 579 eCSR_ROAM_RESULT_NDP_INITIATOR_RSP, 580 eCSR_ROAM_RESULT_NDP_NEW_PEER_IND, 581 eCSR_ROAM_RESULT_NDP_CONFIRM_IND, 582 eCSR_ROAM_RESULT_NDP_INDICATION, 583 eCSR_ROAM_RESULT_NDP_SCHED_UPDATE_RSP, 584 eCSR_ROAM_RESULT_NDP_RESPONDER_RSP, 585 eCSR_ROAM_RESULT_NDP_END_RSP, 586 eCSR_ROAM_RESULT_NDP_PEER_DEPARTED_IND, 587 eCSR_ROAM_RESULT_NDP_END_IND, 588 eCSR_ROAM_RESULT_CAC_END_IND, 589 /* If Scan for SSID failed to found proper BSS */ 590 eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE, 591 eCSR_ROAM_RESULT_INVOKE_FAILED, 592 } eCsrRoamResult; 593 594 /*---------------------------------------------------------------------------- 595 List of link quality indications HDD can receive from SME 596 --------------------------------------------------------------------------*/ 597 typedef enum { 598 eCSR_ROAM_LINK_QUAL_MIN_IND = -1, 599 600 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */ 601 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */ 602 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */ 603 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */ 604 605 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */ 606 } eCsrRoamLinkQualityInd; 607 608 typedef enum { 609 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0, 610 eCSR_DISCONNECT_REASON_MIC_ERROR, 611 eCSR_DISCONNECT_REASON_DISASSOC, 612 eCSR_DISCONNECT_REASON_DEAUTH, 613 eCSR_DISCONNECT_REASON_HANDOFF, 614 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE, 615 eCSR_DISCONNECT_REASON_IBSS_LEAVE, 616 eCSR_DISCONNECT_REASON_STA_HAS_LEFT, 617 eCSR_DISCONNECT_REASON_NDI_DELETE, 618 eCSR_DISCONNECT_REASON_ROAM_HO_FAIL, 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, 638 /* Disconnecting with AP or stop connecting process */ 639 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING, 640 /* NAN Data interface not started */ 641 eCSR_CONNECT_STATE_TYPE_NDI_NOT_STARTED, 642 /* NAN Data interface started */ 643 eCSR_CONNECT_STATE_TYPE_NDI_STARTED, 644 645 } eCsrConnectState; 646 647 /* 648 * This parameter is no longer supported in the Profile. 649 * Need to set this in the global properties for the adapter. 650 */ 651 typedef enum eCSR_MEDIUM_ACCESS { 652 eCSR_MEDIUM_ACCESS_AUTO = 0, 653 eCSR_MEDIUM_ACCESS_DCF, 654 eCSR_MEDIUM_ACCESS_eDCF, 655 eCSR_MEDIUM_ACCESS_HCF, 656 657 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p, 658 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP, 659 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify, 660 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF, 661 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF, 662 } eCsrMediaAccessType; 663 664 typedef enum { 665 eCSR_OPERATING_CHANNEL_ALL = 0, 666 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL, 667 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL, 668 } eOperationChannel; 669 670 typedef enum { 671 eCSR_DOT11_FRAG_THRESH_AUTO = -1, 672 eCSR_DOT11_FRAG_THRESH_MIN = 256, 673 eCSR_DOT11_FRAG_THRESH_MAX = 2346, 674 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000 675 } eCsrDot11FragThresh; 676 677 /* 678 * For channel bonding, the channel number gap is 4, either up or down. 679 * For both 11a and 11g mode. 680 */ 681 #define CSR_CB_CHANNEL_GAP 4 682 #define CSR_CB_CENTER_CHANNEL_OFFSET 2 683 684 /* WEP keysize (in bits) */ 685 typedef enum { 686 /* 40 bit key + 24bit IV = 64bit WEP */ 687 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, 688 /* 104bit key + 24bit IV = 128bit WEP */ 689 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, 690 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40, 691 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104, 692 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = 693 (eCSR_SECURITY_WEP_KEYSIZE_MAX / 8), 694 } eCsrWEPKeySize; 695 696 /* Possible values for the WEP static key ID */ 697 typedef enum { 698 699 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0, 700 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3, 701 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0, 702 703 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1, 704 705 } eCsrWEPStaticKeyID; 706 707 /* Two extra key indicies are used for the IGTK (which is used by BIP) */ 708 #define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1) 709 710 typedef enum { 711 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE, 712 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY, 713 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY, 714 } eCsrSetKeyAction; 715 716 typedef enum { 717 /* 718 * Roaming because HDD requested for reassoc by changing one of the 719 * fields in tCsrRoamModifyProfileFields. OR Roaming because SME 720 * requested for reassoc by changing one of the fields in 721 * tCsrRoamModifyProfileFields. 722 */ 723 eCsrRoamReasonStaCapabilityChanged, 724 /* 725 * Roaming because SME requested for reassoc to a different AP, 726 * as part of inter AP handoff. 727 */ 728 eCsrRoamReasonBetterAP, 729 /* 730 * Roaming because SME requested it as the link is lost - placeholder, 731 * will clean it up once handoff code gets in 732 */ 733 eCsrRoamReasonSmeIssuedForLostLink, 734 735 } eCsrRoamReasonCodes; 736 737 typedef enum { 738 eCsrRoamWmmAuto = 0, 739 eCsrRoamWmmQbssOnly = 1, 740 eCsrRoamWmmNoQos = 2, 741 742 } eCsrRoamWmmUserModeType; 743 744 typedef enum { 745 eCSR_REQUESTER_MIN = 0, 746 eCSR_DIAG, 747 eCSR_UMA_GAN, 748 eCSR_HDD 749 } eCsrStatsRequesterType; 750 751 /** 752 * enum csr_hi_rssi_scan_id - Parameter ids for hi rssi scan feature 753 * 754 * @eCSR_HI_RSSI_SCAN_MAXCOUNT_ID: how many times scan can be performed 755 * @eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID: rssi difference to trigger scan 756 * @eCSR_HI_RSSI_SCAN_DELAY_ID: delay in millseconds between scans 757 * @eCSR_HI_RSSI_SCAN_RSSI_UB_ID: rssi upper bound for scan trigger 758 */ 759 enum csr_hi_rssi_scan_id { 760 eCSR_HI_RSSI_SCAN_MAXCOUNT_ID, 761 eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID, 762 eCSR_HI_RSSI_SCAN_DELAY_ID, 763 eCSR_HI_RSSI_SCAN_RSSI_UB_ID 764 }; 765 766 typedef struct tagPmkidCandidateInfo { 767 struct qdf_mac_addr BSSID; 768 bool preAuthSupported; 769 } tPmkidCandidateInfo; 770 771 typedef struct tagPmkidCacheInfo { 772 struct qdf_mac_addr BSSID; 773 uint8_t PMKID[CSR_RSN_PMKID_SIZE]; 774 uint8_t pmk[CSR_RSN_MAX_PMK_LEN]; 775 uint8_t pmk_len; 776 uint8_t ssid_len; 777 uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH]; 778 uint8_t cache_id[CACHE_ID_LEN]; 779 } tPmkidCacheInfo; 780 781 #ifdef FEATURE_WLAN_WAPI 782 typedef struct tagBkidCandidateInfo { 783 struct qdf_mac_addr BSSID; 784 bool preAuthSupported; 785 } tBkidCandidateInfo; 786 787 typedef struct tagBkidCacheInfo { 788 struct qdf_mac_addr BSSID; 789 uint8_t BKID[CSR_WAPI_BKID_SIZE]; 790 } tBkidCacheInfo; 791 #endif /* FEATURE_WLAN_WAPI */ 792 793 typedef struct tagCsrKeys { 794 /* Also use to indicate whether the key index is set */ 795 uint8_t KeyLength[CSR_MAX_NUM_KEY]; 796 uint8_t KeyMaterial[CSR_MAX_NUM_KEY][CSR_MAX_KEY_LEN]; 797 uint8_t defaultIndex; 798 } tCsrKeys; 799 800 /* 801 * Following fields which're part of tCsrRoamConnectedProfile might need 802 * modification dynamically once STA is up & running & this'd trigger reassoc 803 */ 804 typedef struct tagCsrRoamModifyProfileFields { 805 /* 806 * during connect this specifies ACs U-APSD is to be setup 807 * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). 808 * During assoc response this COULD carry confirmation of what 809 * ACs U-APSD got setup for. Later if an APP looking for APSD, 810 * SME-QoS might need to modify this field 811 */ 812 uint8_t uapsd_mask; 813 /* HDD might ask to modify this field */ 814 uint16_t listen_interval; 815 } tCsrRoamModifyProfileFields; 816 817 struct csr_roam_profile { 818 tCsrSSIDs SSIDs; 819 tCsrBSSIDs BSSIDs; 820 /* this is bit mask of all the needed phy mode defined in eCsrPhyMode */ 821 uint32_t phyMode; 822 eCsrRoamBssType BSSType; 823 tCsrAuthList AuthType; 824 eCsrAuthType negotiatedAuthType; 825 tCsrEncryptionList EncryptionType; 826 /* This field is for output only, not for input */ 827 eCsrEncryptionType negotiatedUCEncryptionType; 828 /* 829 * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. 830 * If caller doesn't case, put all supported encryption types in here 831 */ 832 tCsrEncryptionList mcEncryptionType; 833 /* This field is for output only, not for input */ 834 eCsrEncryptionType negotiatedMCEncryptionType; 835 #ifdef WLAN_FEATURE_11W 836 /* Management Frame Protection */ 837 bool MFPEnabled; 838 uint8_t MFPRequired; 839 uint8_t MFPCapable; 840 #endif 841 tAniEdType mgmt_encryption_type; 842 tCsrKeys Keys; 843 tCsrChannelInfo ChannelInfo; 844 uint8_t operationChannel; 845 struct ch_params ch_params; 846 /* If this is 0, SME will fill in for caller. */ 847 uint16_t beaconInterval; 848 /* 849 * during connect this specifies ACs U-APSD is to be setup 850 * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). 851 * During assoc resp this'd carry cnf of what ACs U-APSD got setup for 852 */ 853 uint8_t uapsd_mask; 854 uint32_t nWPAReqIELength; /* The byte count in the pWPAReqIE */ 855 uint8_t *pWPAReqIE; /* If not null,it's IE byte stream for WPA */ 856 uint32_t nRSNReqIELength; /* The byte count in the pRSNReqIE */ 857 uint8_t *pRSNReqIE; /* If not null,it's IE byte stream for RSN */ 858 #ifdef FEATURE_WLAN_WAPI 859 uint32_t nWAPIReqIELength;/* The byte count in the pWAPIReqIE */ 860 uint8_t *pWAPIReqIE; /* If not null,it's IE byte stream for WAPI */ 861 #endif /* FEATURE_WLAN_WAPI */ 862 863 uint32_t nAddIEScanLength;/* pAddIE for scan (at the time of join) */ 864 /* 865 * If not null,it's the IE byte stream for additional IE, 866 * which can be WSC IE and/or P2P IE 867 */ 868 uint8_t *pAddIEScan; 869 uint32_t nAddIEAssocLength; /* The byte count in the pAddIE for assoc */ 870 /* 871 * If not null, it has the IE byte stream for additional IE, 872 * which can be WSC IE and/or P2P IE 873 */ 874 uint8_t *pAddIEAssoc; 875 /* it is ignored if [0] is 0. */ 876 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; 877 /* WPS Association if true => auth and ecryption should be ignored */ 878 bool bWPSAssociation; 879 bool bOSENAssociation; 880 uint32_t nWSCReqIELength; /* The byte count in the pWSCReqIE */ 881 uint8_t *pWSCReqIE; /* If not null,it's IE byte stream for WSC */ 882 uint8_t ieee80211d; 883 uint8_t privacy; 884 bool fwdWPSPBCProbeReq; 885 tAniAuthType csr80211AuthType; 886 uint32_t dtimPeriod; 887 bool ApUapsdEnable; 888 bool protEnabled; 889 bool obssProtEnabled; 890 bool chan_switch_hostapd_rate_enabled; 891 uint16_t cfg_protection; 892 uint8_t wps_state; 893 tCsrMobilityDomainInfo MDID; 894 enum QDF_OPMODE csrPersona; 895 uint8_t disableDFSChSwitch; 896 /* addIe params */ 897 tSirAddIeParams addIeParams; 898 uint8_t sap_dot11mc; 899 uint16_t beacon_tx_rate; 900 tSirMacRateSet supported_rates; 901 tSirMacRateSet extended_rates; 902 struct qdf_mac_addr bssid_hint; 903 bool force_24ghz_in_ht20; 904 uint32_t cac_duration_ms; 905 uint32_t dfs_regdomain; 906 bool supplicant_disabled_roaming; 907 bool driver_disabled_roaming; 908 #ifdef WLAN_FEATURE_FILS_SK 909 bool fils_connection; 910 uint8_t *hlp_ie; 911 uint32_t hlp_ie_len; 912 struct cds_fils_connection_info *fils_con_info; 913 #endif 914 bool force_rsne_override; 915 }; 916 917 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH 918 typedef struct tagCsrRoamHTProfile { 919 uint8_t phymode; 920 uint8_t htCapability; 921 uint8_t htSupportedChannelWidthSet; 922 uint8_t htRecommendedTxWidthSet; 923 ePhyChanBondState htSecondaryChannelOffset; 924 uint8_t vhtCapability; 925 uint8_t apCenterChan; 926 uint8_t apChanWidth; 927 } tCsrRoamHTProfile; 928 #endif 929 typedef struct tagCsrRoamConnectedProfile { 930 tSirMacSSid SSID; 931 bool handoffPermitted; 932 bool ssidHidden; 933 uint8_t operationChannel; 934 struct qdf_mac_addr bssid; 935 uint16_t beaconInterval; 936 eCsrRoamBssType BSSType; 937 eCsrAuthType AuthType; 938 tCsrAuthList AuthInfo; 939 eCsrEncryptionType EncryptionType; 940 tCsrEncryptionList EncryptionInfo; 941 eCsrEncryptionType mcEncryptionType; 942 tCsrEncryptionList mcEncryptionInfo; 943 uint32_t vht_channel_width; 944 tCsrKeys Keys; 945 /* 946 * meaningless on connect. It's an OUT param from CSR's point of view 947 * During assoc response carries the ACM bit-mask i.e. what 948 * ACs have ACM=1 (if any),(Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE 949 * all other bits are ignored) 950 */ 951 uint8_t acm_mask; 952 tCsrRoamModifyProfileFields modifyProfileFields; 953 bool qosConnection; /* A connection is QoS enabled */ 954 uint32_t nAddIEAssocLength; 955 /* 956 * If not null,it's IE byte stream for additional IE, 957 * which can be WSC IE and/or P2P IE 958 */ 959 uint8_t *pAddIEAssoc; 960 tSirBssDescription *pBssDesc; 961 bool qap; /* AP supports QoS */ 962 tCsrMobilityDomainInfo MDID; 963 #ifdef FEATURE_WLAN_ESE 964 tCsrEseCckmInfo eseCckmInfo; 965 bool isESEAssoc; 966 #endif 967 uint32_t dot11Mode; 968 uint8_t proxyARPService; 969 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH 970 tCsrRoamHTProfile HTProfile; 971 #endif 972 #ifdef WLAN_FEATURE_11W 973 /* Management Frame Protection */ 974 bool MFPEnabled; 975 uint8_t MFPRequired; 976 uint8_t MFPCapable; 977 #endif 978 } tCsrRoamConnectedProfile; 979 980 typedef struct tagCsrNeighborRoamConfigParams { 981 982 uint32_t nNeighborScanTimerPeriod; 983 uint32_t neighbor_scan_min_timer_period; 984 uint8_t nNeighborLookupRssiThreshold; 985 int8_t rssi_thresh_offset_5g; 986 uint16_t nNeighborScanMinChanTime; 987 uint16_t nNeighborScanMaxChanTime; 988 sCsrChannel neighborScanChanList; 989 uint8_t nMaxNeighborRetries; 990 uint16_t nNeighborResultsRefreshPeriod; 991 uint16_t nEmptyScanRefreshPeriod; 992 uint8_t nOpportunisticThresholdDiff; 993 uint8_t nRoamRescanRssiDiff; 994 uint8_t nRoamBmissFirstBcnt; 995 uint8_t nRoamBmissFinalBcnt; 996 uint8_t nRoamBeaconRssiWeight; 997 uint8_t delay_before_vdev_stop; 998 uint32_t nhi_rssi_scan_max_count; 999 uint32_t nhi_rssi_scan_rssi_delta; 1000 uint32_t nhi_rssi_scan_delay; 1001 int32_t nhi_rssi_scan_rssi_ub; 1002 } tCsrNeighborRoamConfigParams; 1003 1004 /** 1005 * enum sta_roam_policy_dfs_mode - state of DFS mode for STA ROME policy 1006 * @CSR_STA_ROAM_POLICY_NONE: DFS mode attribute is not valid 1007 * @CSR_STA_ROAM_POLICY_DFS_ENABLED: DFS mode is enabled 1008 * @CSR_STA_ROAM_POLICY_DFS_DISABLED: DFS mode is disabled 1009 * @CSR_STA_ROAM_POLICY_DFS_DEPRIORITIZE: Deprioritize DFS channels in scanning 1010 */ 1011 enum sta_roam_policy_dfs_mode { 1012 CSR_STA_ROAM_POLICY_NONE, 1013 CSR_STA_ROAM_POLICY_DFS_ENABLED, 1014 CSR_STA_ROAM_POLICY_DFS_DISABLED, 1015 CSR_STA_ROAM_POLICY_DFS_DEPRIORITIZE 1016 }; 1017 1018 /** 1019 * struct csr_sta_roam_policy_params - sta roam policy params for station 1020 * @dfs_mode: tell is DFS channels needs to be skipped while scanning 1021 * @skip_unsafe_channels: tells if unsafe channels needs to be skip in scanning 1022 * @sap_operating_band: Opearting band for SAP 1023 */ 1024 struct csr_sta_roam_policy_params { 1025 enum sta_roam_policy_dfs_mode dfs_mode; 1026 bool skip_unsafe_channels; 1027 uint8_t sap_operating_band; 1028 }; 1029 1030 /** 1031 * struct csr_mbo_thresholds - mbo related thresholds 1032 * @mbo_candidate_rssi_thres - Candidate RSSI threshold 1033 * @mbo_current_rssi_thres - Current RSSI threshold 1034 * @mbo_current_rssi_mcc_thres - Current RSSI MCC threshold 1035 * mbo_candidate_rssi_btc_thres - Candidate RSSI BTC threshold 1036 */ 1037 struct csr_mbo_thresholds { 1038 int8_t mbo_candidate_rssi_thres; 1039 int8_t mbo_current_rssi_thres; 1040 int8_t mbo_current_rssi_mcc_thres; 1041 int8_t mbo_candidate_rssi_btc_thres; 1042 }; 1043 1044 /** 1045 * struct csr_neighbor_report_offload_params - neighbor report offload params 1046 * @params_bitmask: bitmask to specify which of the below are enabled 1047 * @time_offset: time offset after 11k offload command to trigger a neighbor 1048 * report request (in seconds) 1049 * @low_rssi_offset: Offset from rssi threshold to trigger neighbor 1050 * report request (in dBm) 1051 * @bmiss_count_trigger: Number of beacon miss events to trigger neighbor 1052 * report request 1053 * @per_threshold_offset: offset from PER threshold to trigger neighbor 1054 * report request (in %) 1055 * @neighbor_report_cache_timeout: timeout after which new trigger can enable 1056 * sending of a neighbor report request (in seconds) 1057 * @max_neighbor_report_req_cap: max number of neighbor report requests that 1058 * can be sent to the peer in the current session 1059 */ 1060 struct csr_neighbor_report_offload_params { 1061 uint8_t params_bitmask; 1062 uint32_t time_offset; 1063 uint32_t low_rssi_offset; 1064 uint32_t bmiss_count_trigger; 1065 uint32_t per_threshold_offset; 1066 uint32_t neighbor_report_cache_timeout; 1067 uint32_t max_neighbor_report_req_cap; 1068 }; 1069 1070 typedef struct tagCsrConfigParam { 1071 uint32_t FragmentationThreshold; 1072 /* keep this uint32_t. This gets converted to ePhyChannelBondState */ 1073 uint32_t channelBondingMode24GHz; 1074 uint32_t channelBondingMode5GHz; 1075 eCsrPhyMode phyMode; 1076 enum band_info eBand; 1077 uint32_t RTSThreshold; 1078 uint32_t HeartbeatThresh50; 1079 uint32_t HeartbeatThresh24; 1080 enum band_info bandCapability; /* indicate hw capability */ 1081 eCsrRoamWmmUserModeType WMMSupportMode; 1082 bool Is11eSupportEnabled; 1083 bool Is11dSupportEnabled; 1084 bool Is11hSupportEnabled; 1085 bool shortSlotTime; 1086 bool ProprietaryRatesEnabled; 1087 uint8_t AdHocChannel24; 1088 uint8_t AdHocChannel5G; 1089 /* 1090 * this number minus one is the number of times a scan doesn't find it 1091 * before it is removed 1092 */ 1093 uint32_t nScanResultAgeCount; 1094 /* to set the RSSI difference for each category */ 1095 uint8_t bCatRssiOffset; 1096 /* to set MCC Enable/Disable mode */ 1097 uint8_t fEnableMCCMode; 1098 bool mcc_rts_cts_prot_enable; 1099 bool mcc_bcast_prob_resp_enable; 1100 /* 1101 * To allow MCC GO different B.I than STA's. 1102 * NOTE: make sure if RIVA firmware can handle this combination before 1103 * enabling this at the moment, this flag is provided only to pass 1104 * Wi-Fi Cert. 5.1.12 1105 */ 1106 uint8_t fAllowMCCGODiffBI; 1107 tCsr11dinfo Csr11dinfo; 1108 1109 /* Country Code Priority */ 1110 bool fSupplicantCountryCodeHasPriority; 1111 uint16_t vccRssiThreshold; 1112 uint32_t vccUlMacLossThreshold; 1113 uint32_t nPassiveMinChnTime; /* in units of milliseconds */ 1114 uint32_t nPassiveMaxChnTime; /* in units of milliseconds */ 1115 uint32_t nActiveMinChnTime; /* in units of milliseconds */ 1116 uint32_t nActiveMaxChnTime; /* in units of milliseconds */ 1117 uint32_t nInitialDwellTime; /* in units of milliseconds */ 1118 bool initial_scan_no_dfs_chnl; 1119 uint32_t nPassiveMinChnTimeConc; /* in units of milliseconds */ 1120 uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */ 1121 uint32_t nActiveMinChnTimeConc; /* in units of milliseconds */ 1122 uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */ 1123 uint32_t nRestTimeConc; /* in units of milliseconds */ 1124 /*In units of milliseconds*/ 1125 uint32_t min_rest_time_conc; 1126 /*In units of milliseconds*/ 1127 uint32_t idle_time_conc; 1128 1129 /* 1130 * in dBm, the maximum TX power The actual TX power is the lesser of 1131 * this value and 11d. If 11d is disable, the lesser of this and 1132 * default setting. 1133 */ 1134 uint8_t nTxPowerCap; 1135 bool allow_tpc_from_ap; 1136 /* stats request frequency from PE while in full power */ 1137 uint32_t statsReqPeriodicity; 1138 /* stats request frequency from PE while in power save */ 1139 uint32_t statsReqPeriodicityInPS; 1140 #ifdef FEATURE_WLAN_ESE 1141 uint8_t isEseIniFeatureEnabled; 1142 #endif 1143 uint8_t isFastRoamIniFeatureEnabled; 1144 struct mawc_params csr_mawc_config; 1145 uint8_t isFastTransitionEnabled; 1146 uint8_t RoamRssiDiff; 1147 int32_t rssi_abs_thresh; 1148 bool isWESModeEnabled; 1149 tCsrNeighborRoamConfigParams neighborRoamConfig; 1150 /* 1151 * Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC 1152 * This is mandated by WMM-AC certification 1153 */ 1154 bool addTSWhenACMIsOff; 1155 /* 1156 * Customer wants to start with an active scan based on the default 1157 * country code. This optimization will minimize the driver load to 1158 * association time. Based on this flag we will bypass the initial 1159 * passive scan needed for 11d to determine the country code & domain 1160 */ 1161 bool fEnableBypass11d; 1162 /* 1163 * Customer wants to optimize the scan time. Avoiding scans(passive) 1164 * on DFS channels while swipping through both bands can save some time 1165 * (apprx 1.3 sec) 1166 */ 1167 uint8_t fEnableDFSChnlScan; 1168 /* 1169 * To enable/disable scanning 2.4Ghz channels twice on a single scan 1170 * request from HDD 1171 */ 1172 bool fScanTwice; 1173 uint32_t nVhtChannelWidth; 1174 uint8_t enableTxBF; 1175 bool enable_subfee_vendor_vhtie; 1176 uint8_t enable_txbf_sap_mode; 1177 uint8_t enable2x2; 1178 bool enableVhtFor24GHz; 1179 bool vendor_vht_sap; 1180 uint8_t enableMuBformee; 1181 uint8_t enableVhtpAid; 1182 uint8_t enableVhtGid; 1183 uint8_t enableAmpduPs; 1184 uint8_t enableHtSmps; 1185 uint8_t htSmps; 1186 bool send_smps_action; 1187 bool ignore_peer_erp_info; 1188 /* 1189 * To enable/disable scanning only 2.4Ghz channels on first scan 1190 */ 1191 bool fFirstScanOnly2GChnl; 1192 bool nRoamPrefer5GHz; 1193 bool nRoamIntraBand; 1194 uint8_t nProbes; 1195 uint16_t nRoamScanHomeAwayTime; 1196 1197 bool isRoamOffloadScanEnabled; 1198 bool bFastRoamInConIniFeatureEnabled; 1199 uint8_t scanCfgAgingTime; 1200 uint8_t enable_tx_ldpc; 1201 uint8_t enable_rx_ldpc; 1202 uint8_t disable_high_ht_mcs_2x2; 1203 bool enable_vht20_mcs9; 1204 uint8_t max_amsdu_num; 1205 uint8_t nSelect5GHzMargin; 1206 uint32_t ho_delay_for_rx; 1207 uint32_t min_delay_btw_roam_scans; 1208 uint32_t roam_trigger_reason_bitmask; 1209 uint8_t isCoalesingInIBSSAllowed; 1210 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH 1211 uint8_t cc_switch_mode; 1212 #endif 1213 uint8_t allowDFSChannelRoam; 1214 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 1215 bool isRoamOffloadEnabled; 1216 #endif 1217 bool obssEnabled; 1218 uint8_t conc_custom_rule1; 1219 uint8_t conc_custom_rule2; 1220 uint8_t is_sta_connection_in_5gz_enabled; 1221 bool send_deauth_before_con; 1222 1223 /* 802.11p enable */ 1224 bool enable_dot11p; 1225 uint8_t max_scan_count; 1226 bool early_stop_scan_enable; 1227 int8_t early_stop_scan_min_threshold; 1228 int8_t early_stop_scan_max_threshold; 1229 int8_t first_scan_bucket_threshold; 1230 uint8_t fEnableDebugLog; 1231 uint8_t max_intf_count; 1232 bool enable5gEBT; 1233 bool enableSelfRecovery; 1234 uint32_t f_sta_miracast_mcc_rest_time_val; 1235 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE 1236 bool sap_channel_avoidance; 1237 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ 1238 bool acs_with_more_param; 1239 uint8_t f_prefer_non_dfs_on_radar; 1240 bool is_ps_enabled; 1241 uint32_t auto_bmps_timer_val; 1242 uint32_t dual_mac_feature_disable; 1243 uint32_t sta_sap_scc_on_dfs_chan; 1244 uint32_t roam_dense_traffic_thresh; 1245 uint32_t roam_dense_rssi_thresh_offset; 1246 uint32_t roam_dense_min_aps; 1247 int8_t roam_bg_scan_bad_rssi_thresh; 1248 uint8_t roam_bad_rssi_thresh_offset_2g; 1249 uint32_t roam_bg_scan_client_bitmap; 1250 uint32_t obss_width_interval; 1251 uint32_t obss_active_dwelltime; 1252 uint32_t obss_passive_dwelltime; 1253 bool ignore_peer_ht_opmode; 1254 bool enable_edca_params; 1255 uint32_t edca_vo_cwmin; 1256 uint32_t edca_vi_cwmin; 1257 uint32_t edca_bk_cwmin; 1258 uint32_t edca_be_cwmin; 1259 uint32_t edca_vo_cwmax; 1260 uint32_t edca_vi_cwmax; 1261 uint32_t edca_bk_cwmax; 1262 uint32_t edca_be_cwmax; 1263 uint32_t edca_vo_aifs; 1264 uint32_t edca_vi_aifs; 1265 uint32_t edca_bk_aifs; 1266 uint32_t edca_be_aifs; 1267 bool enable_fatal_event; 1268 enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode; 1269 enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc; 1270 enum scan_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode; 1271 struct csr_sta_roam_policy_params sta_roam_policy_params; 1272 uint32_t tx_aggregation_size; 1273 uint32_t tx_aggregation_size_be; 1274 uint32_t tx_aggregation_size_bk; 1275 uint32_t tx_aggregation_size_vi; 1276 uint32_t tx_aggregation_size_vo; 1277 uint32_t rx_aggregation_size; 1278 uint32_t tx_aggr_sw_retry_threshold_be; 1279 uint32_t tx_aggr_sw_retry_threshold_bk; 1280 uint32_t tx_aggr_sw_retry_threshold_vi; 1281 uint32_t tx_aggr_sw_retry_threshold_vo; 1282 struct wmi_per_roam_config per_roam_config; 1283 bool enable_bcast_probe_rsp; 1284 bool is_fils_enabled; 1285 #ifdef WLAN_FEATURE_11AX 1286 bool enable_ul_ofdma; 1287 bool enable_ul_mimo; 1288 #endif 1289 uint16_t wlm_latency_enable; 1290 uint16_t wlm_latency_level; 1291 uint32_t wlm_latency_flags[CSR_NUM_WLM_LATENCY_LEVEL]; 1292 bool qcn_ie_support; 1293 uint8_t fils_max_chan_guard_time; 1294 uint16_t pkt_err_disconn_th; 1295 bool is_force_1x1; 1296 uint16_t num_11b_tx_chains; 1297 uint16_t num_11ag_tx_chains; 1298 uint32_t disallow_duration; 1299 uint32_t rssi_channel_penalization; 1300 uint32_t num_disallowed_aps; 1301 struct sir_score_config bss_score_params; 1302 uint8_t oce_feature_bitmap; 1303 struct csr_mbo_thresholds mbo_thresholds; 1304 uint32_t btm_offload_config; 1305 uint32_t btm_solicited_timeout; 1306 uint32_t btm_max_attempt_cnt; 1307 uint32_t btm_sticky_time; 1308 uint32_t offload_11k_enable_bitmask; 1309 bool wep_tkip_in_he; 1310 struct csr_neighbor_report_offload_params neighbor_report_offload; 1311 bool enable_ftopen; 1312 bool roam_force_rssi_trigger; 1313 } tCsrConfigParam; 1314 1315 /* Tush */ 1316 typedef struct tagCsrUpdateConfigParam { 1317 tCsr11dinfo Csr11dinfo; 1318 } tCsrUpdateConfigParam; 1319 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 1320 #define csr_roamIsRoamOffloadEnabled(pMac) \ 1321 (pMac->roam.configParam.isRoamOffloadEnabled) 1322 #define DEFAULT_REASSOC_FAILURE_TIMEOUT 1000 1323 #else 1324 #define csr_roamIsRoamOffloadEnabled(pMac) false 1325 #endif 1326 1327 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 1328 /* connected but not authenticated */ 1329 #define CSR_ROAM_AUTH_STATUS_CONNECTED 0x1 1330 /* connected and authenticated */ 1331 #define CSR_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 1332 #endif 1333 1334 struct csr_roam_info { 1335 struct csr_roam_profile *pProfile; 1336 tSirBssDescription *pBssDesc; 1337 uint32_t nBeaconLength; 1338 uint32_t nAssocReqLength; 1339 uint32_t nAssocRspLength; 1340 uint32_t nFrameLength; 1341 uint8_t frameType; 1342 /* 1343 * Point to a buffer contain the beacon, assoc req, assoc rsp frame, 1344 * in that order user needs to use nBeaconLength, nAssocReqLength, 1345 * nAssocRspLength to desice where each frame starts and ends. 1346 */ 1347 uint8_t *pbFrames; 1348 bool fReassocReq; /* set to true if for re-association */ 1349 bool fReassocRsp; /* set to true if for re-association */ 1350 struct qdf_mac_addr bssid; 1351 /* 1352 * Only valid in IBSS. this is the peers MAC address for 1353 * eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED 1354 */ 1355 struct qdf_mac_addr peerMac; 1356 tSirResultCodes statusCode; 1357 /* this'd be our own defined or sent from otherBSS(per 802.11spec) */ 1358 uint32_t reasonCode; 1359 1360 uint8_t disassoc_reason; 1361 1362 uint8_t staId; /* Peer stationId when connected */ 1363 /* false means auth needed from supplicant. true means authenticated */ 1364 bool fAuthRequired; 1365 uint8_t sessionId; 1366 uint8_t rsnIELen; 1367 uint8_t *prsnIE; 1368 uint8_t wapiIELen; 1369 uint8_t *pwapiIE; 1370 uint8_t addIELen; 1371 uint8_t *paddIE; 1372 union { 1373 tSirMicFailureInfo *pMICFailureInfo; 1374 tCsrRoamConnectedProfile *pConnectedProfile; 1375 tSirWPSPBCProbeReq *pWPSPBCProbeReq; 1376 } u; 1377 bool wmmEnabledSta; /* set to true if WMM enabled STA */ 1378 uint32_t dtimPeriod; 1379 #ifdef FEATURE_WLAN_ESE 1380 bool isESEAssoc; 1381 tSirTsmIE tsmIe; 1382 uint32_t timestamp[2]; 1383 uint16_t tsmRoamDelay; 1384 tSirEseBcnReportRsp *pEseBcnReportRsp; 1385 #endif 1386 void *pRemainCtx; 1387 uint32_t roc_scan_id; 1388 uint32_t rxChan; 1389 #ifdef FEATURE_WLAN_TDLS 1390 /* 1391 * TDLS parameters to check whether TDLS 1392 * and TDLS channel switch is allowed in the 1393 * AP network 1394 */ 1395 uint8_t staType; 1396 bool tdls_prohibited; /* per ExtCap in Assoc/Reassoc resp */ 1397 bool tdls_chan_swit_prohibited; /* per ExtCap in Assoc/Reassoc resp */ 1398 #endif 1399 /* Required for indicating the frames to upper layer */ 1400 uint32_t beaconLength; 1401 uint8_t *beaconPtr; 1402 uint32_t assocReqLength; 1403 uint8_t *assocReqPtr; 1404 int8_t rxRssi; 1405 tSirSmeDfsEventInd dfs_event; 1406 tSirChanChangeResponse *channelChangeRespEvent; 1407 /* Timing and fine Timing measurement capability clubbed together */ 1408 uint8_t timingMeasCap; 1409 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 1410 uint8_t roamSynchInProgress; 1411 uint8_t synchAuthStatus; 1412 uint8_t kck[SIR_KCK_KEY_LEN]; 1413 uint8_t kek[SIR_KEK_KEY_LEN_FILS]; 1414 uint8_t kek_len; 1415 uint32_t pmk_len; 1416 uint8_t pmk[SIR_PMK_LEN]; 1417 uint8_t pmkid[SIR_PMKID_LEN]; 1418 bool update_erp_next_seq_num; 1419 uint16_t next_erp_seq_num; 1420 uint8_t replay_ctr[SIR_REPLAY_CTR_LEN]; 1421 uint8_t subnet_change_status; 1422 #endif 1423 tSirSmeChanInfo chan_info; 1424 uint8_t target_channel; 1425 1426 #ifdef WLAN_FEATURE_NAN_DATAPATH 1427 union { 1428 struct ndi_create_rsp ndi_create_params; 1429 struct ndi_delete_rsp ndi_delete_params; 1430 } ndp; 1431 #endif 1432 tDot11fIEHTCaps ht_caps; 1433 tDot11fIEVHTCaps vht_caps; 1434 tDot11fIEhs20vendor_ie hs20vendor_ie; 1435 tDot11fIEVHTOperation vht_operation; 1436 tDot11fIEHTInfo ht_operation; 1437 bool reassoc; 1438 bool ampdu; 1439 bool sgi_enable; 1440 bool tx_stbc; 1441 bool rx_stbc; 1442 tSirMacHTChannelWidth ch_width; 1443 enum sir_sme_phy_mode mode; 1444 uint8_t max_supp_idx; 1445 uint8_t max_ext_idx; 1446 uint8_t max_mcs_idx; 1447 uint8_t rx_mcs_map; 1448 uint8_t tx_mcs_map; 1449 /* Extended capabilities of STA */ 1450 uint8_t ecsa_capable; 1451 bool is_fils_connection; 1452 #ifdef WLAN_FEATURE_FILS_SK 1453 uint16_t fils_seq_num; 1454 struct fils_join_rsp_params *fils_join_rsp; 1455 #endif 1456 int rssi; 1457 int tx_rate; 1458 int rx_rate; 1459 #ifdef WLAN_FEATURE_SAE 1460 struct sir_sae_info *sae_info; 1461 #endif 1462 }; 1463 1464 typedef struct tagCsrFreqScanInfo { 1465 uint32_t nStartFreq; /* in unit of MHz */ 1466 uint32_t nEndFreq; /* in unit of MHz */ 1467 tSirScanType scanType; 1468 } tCsrFreqScanInfo; 1469 1470 typedef struct sSirSmeAssocIndToUpperLayerCnf { 1471 uint16_t messageType; /* eWNI_SME_ASSOC_CNF */ 1472 uint16_t length; 1473 uint8_t sessionId; 1474 tSirResultCodes statusCode; 1475 tSirMacAddr bssId; /* Self BSSID */ 1476 tSirMacAddr peerMacAddr; 1477 uint16_t aid; 1478 tSirMacAddr alternateBssId; 1479 uint8_t alternateChannelId; 1480 uint8_t wmmEnabledSta; /* set to true if WMM enabled STA */ 1481 tSirRSNie rsnIE; /* RSN IE received from peer */ 1482 tSirWAPIie wapiIE; /* WAPI IE received from peer */ 1483 tSirAddie addIE; /* this can be WSC and/or P2P IE */ 1484 uint8_t reassocReq; /* set to true if reassoc */ 1485 /* Timing and fine Timing measurement capability clubbed together */ 1486 uint8_t timingMeasCap; 1487 tSirSmeChanInfo chan_info; 1488 uint8_t target_channel; 1489 bool ampdu; 1490 bool sgi_enable; 1491 bool tx_stbc; 1492 tSirMacHTChannelWidth ch_width; 1493 enum sir_sme_phy_mode mode; 1494 bool rx_stbc; 1495 uint8_t max_supp_idx; 1496 uint8_t max_ext_idx; 1497 uint8_t max_mcs_idx; 1498 uint8_t rx_mcs_map; 1499 uint8_t tx_mcs_map; 1500 /* Extended capabilities of STA */ 1501 uint8_t ecsa_capable; 1502 1503 tDot11fIEHTCaps ht_caps; 1504 tDot11fIEVHTCaps vht_caps; 1505 } tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf; 1506 1507 typedef struct tagCsrSummaryStatsInfo { 1508 uint32_t snr; 1509 uint32_t rssi; 1510 uint32_t retry_cnt[4]; 1511 uint32_t multiple_retry_cnt[4]; 1512 uint32_t tx_frm_cnt[4]; 1513 /* uint32_t num_rx_frm_crc_err; same as rx_error_cnt */ 1514 /* uint32_t num_rx_frm_crc_ok; same as rx_frm_cnt */ 1515 uint32_t rx_frm_cnt; 1516 uint32_t frm_dup_cnt; 1517 uint32_t fail_cnt[4]; 1518 uint32_t rts_fail_cnt; 1519 uint32_t ack_fail_cnt; 1520 uint32_t rts_succ_cnt; 1521 uint32_t rx_discard_cnt; 1522 uint32_t rx_error_cnt; 1523 uint32_t tx_byte_cnt; 1524 1525 } tCsrSummaryStatsInfo; 1526 1527 typedef struct tagCsrGlobalClassAStatsInfo { 1528 uint8_t nss; 1529 uint32_t max_pwr; 1530 uint32_t tx_rate; 1531 /* mcs index for HT20 and HT40 rates */ 1532 uint32_t mcs_index; 1533 uint32_t mcs_rate_flags; 1534 /* to diff between HT20 & HT40 rates;short & long guard interval */ 1535 uint32_t tx_rate_flags; 1536 1537 } tCsrGlobalClassAStatsInfo; 1538 1539 typedef struct tagCsrGlobalClassDStatsInfo { 1540 uint32_t tx_uc_frm_cnt; 1541 uint32_t tx_mc_frm_cnt; 1542 uint32_t tx_bc_frm_cnt; 1543 uint32_t rx_uc_frm_cnt; 1544 uint32_t rx_mc_frm_cnt; 1545 uint32_t rx_bc_frm_cnt; 1546 uint32_t tx_uc_byte_cnt[4]; 1547 uint32_t tx_mc_byte_cnt; 1548 uint32_t tx_bc_byte_cnt; 1549 uint32_t rx_uc_byte_cnt[4]; 1550 uint32_t rx_mc_byte_cnt; 1551 uint32_t rx_bc_byte_cnt; 1552 uint32_t rx_byte_cnt; 1553 uint32_t num_rx_bytes_crc_ok; 1554 uint32_t rx_rate; 1555 1556 } tCsrGlobalClassDStatsInfo; 1557 1558 /** 1559 * struct csr_per_chain_rssi_stats_info - stores chain rssi 1560 * @rssi: array containing rssi for all chains 1561 * @peer_mac_addr: peer mac address 1562 */ 1563 struct csr_per_chain_rssi_stats_info { 1564 int8_t rssi[NUM_CHAINS_MAX]; 1565 tSirMacAddr peer_mac_addr; 1566 }; 1567 1568 typedef struct tagCsrRoamSetKey { 1569 eCsrEncryptionType encType; 1570 tAniKeyDirection keyDirection; /* Tx, Rx or Tx-and-Rx */ 1571 struct qdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */ 1572 uint8_t paeRole; /* 0 for supplicant */ 1573 uint8_t keyId; /* Key index */ 1574 uint16_t keyLength; /* Number of bytes containing the key in pKey */ 1575 uint8_t Key[CSR_MAX_KEY_LEN]; 1576 uint8_t keyRsc[CSR_MAX_RSC_LEN]; 1577 } tCsrRoamSetKey; 1578 1579 typedef struct tagCsrRoamRemoveKey { 1580 eCsrEncryptionType encType; 1581 struct qdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */ 1582 uint8_t keyId; /* key index */ 1583 } tCsrRoamRemoveKey; 1584 1585 #ifdef FEATURE_WLAN_TDLS 1586 1587 typedef struct tagCsrLinkEstablishParams { 1588 tSirMacAddr peerMac; 1589 uint8_t uapsdQueues; 1590 uint8_t maxSp; 1591 uint8_t isBufSta; 1592 uint8_t isOffChannelSupported; 1593 uint8_t isResponder; 1594 uint8_t supportedChannelsLen; 1595 uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS]; 1596 uint8_t supportedOperClassesLen; 1597 uint8_t supportedOperClasses[REG_MAX_SUPP_OPER_CLASSES]; 1598 uint8_t qos; 1599 } tCsrTdlsLinkEstablishParams; 1600 1601 typedef struct tagCsrTdlsSendMgmt { 1602 tSirMacAddr peerMac; 1603 uint8_t frameType; 1604 uint8_t dialog; 1605 uint16_t statusCode; 1606 uint8_t responder; 1607 uint32_t peerCapability; 1608 uint8_t *buf; 1609 uint8_t len; 1610 enum wifi_traffic_ac ac; 1611 } tCsrTdlsSendMgmt; 1612 #endif 1613 1614 typedef void *tScanResultHandle; 1615 1616 typedef enum { 1617 REASSOC = 0, 1618 FASTREASSOC = 1, 1619 CONNECT_CMD_USERSPACE = 2, 1620 } handoff_src; 1621 1622 typedef struct tagCsrHandoffRequest { 1623 struct qdf_mac_addr bssid; 1624 uint8_t channel; 1625 uint8_t src; /* To check if its a REASSOC or a FASTREASSOC IOCTL */ 1626 } tCsrHandoffRequest; 1627 1628 #ifdef FEATURE_WLAN_ESE 1629 typedef struct tagCsrEseBeaconReqParams { 1630 uint16_t measurementToken; 1631 uint8_t channel; 1632 uint8_t scanMode; 1633 uint16_t measurementDuration; 1634 } tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams; 1635 1636 typedef struct tagCsrEseBeaconReq { 1637 uint8_t numBcnReqIe; 1638 tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS]; 1639 } tCsrEseBeaconReq, *tpCsrEseBeaconReq; 1640 #endif /* FEATURE_WLAN_ESE */ 1641 1642 struct csr_del_sta_params { 1643 struct qdf_mac_addr peerMacAddr; 1644 uint16_t reason_code; 1645 uint8_t subtype; 1646 }; 1647 1648 /** 1649 * struct wep_update_default_key_idx: wep default key index structure 1650 * @session_id: session ID for the connection session 1651 * @default_idx: default key index for wep 1652 * 1653 * structure includes sesssion id for connection and default key 1654 * index used for wep 1655 */ 1656 struct wep_update_default_key_idx { 1657 uint8_t session_id; 1658 uint8_t default_idx; 1659 }; 1660 1661 /* 1662 * NOTE: p2 is the second context pass in for the caller 1663 * NOTE: what if callback is called before requester gets the scanId?? 1664 */ 1665 typedef QDF_STATUS (*csr_scan_completeCallback)(tHalHandle, void *p2, 1666 uint8_t sessionId, 1667 uint32_t scanID, 1668 eCsrScanStatus status); 1669 typedef QDF_STATUS (*csr_roam_completeCallback)(void *pContext, 1670 struct csr_roam_info *pParam, 1671 uint32_t roamId, 1672 eRoamCmdStatus roamStatus, 1673 eCsrRoamResult roamResult); 1674 typedef QDF_STATUS (*csr_session_open_cb)(uint8_t session_id); 1675 typedef QDF_STATUS (*csr_session_close_cb)(uint8_t session_id); 1676 1677 #define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == \ 1678 (pProfile)->BSSType) 1679 #define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == \ 1680 (pProfile)->BSSType) 1681 #define CSR_IS_IBSS(pProfile) (CSR_IS_START_IBSS(pProfile) || \ 1682 CSR_IS_JOIN_TO_IBSS(pProfile)) 1683 #define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == \ 1684 (pProfile)->BSSType) 1685 #define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == \ 1686 (pProfile)->BSSType) 1687 #define CSR_IS_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ 1688 (pProfile)->BSSType) 1689 #ifdef WLAN_FEATURE_NAN_DATAPATH 1690 #define CSR_IS_NDI(profile) (eCSR_BSS_TYPE_NDI == (profile)->BSSType) 1691 #else 1692 #define CSR_IS_NDI(profile) (false) 1693 #endif 1694 #define CSR_IS_CONN_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \ 1695 (pProfile)->BSSType) 1696 #ifdef WLAN_FEATURE_NAN_DATAPATH 1697 #define CSR_IS_CONN_NDI(profile) (eCSR_BSS_TYPE_NDI == (profile)->BSSType) 1698 #else 1699 #define CSR_IS_CONN_NDI(profile) (false) 1700 #endif 1701 1702 #ifdef WLAN_FEATURE_SAE 1703 #define CSR_IS_AUTH_TYPE_SAE(auth_type) \ 1704 (eCSR_AUTH_TYPE_SAE == auth_type) 1705 #else 1706 #define CSR_IS_AUTH_TYPE_SAE(auth_type) (false) 1707 #endif 1708 1709 QDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam); 1710 1711 /* enum to string conversion for debug output */ 1712 const char *get_e_roam_cmd_status_str(eRoamCmdStatus val); 1713 const char *get_e_csr_roam_result_str(eCsrRoamResult val); 1714 const char *csr_phy_mode_str(eCsrPhyMode phy_mode); 1715 QDF_STATUS csr_set_phy_mode(tHalHandle hHal, uint32_t phyMode, 1716 enum band_info eBand, bool *pfRestartNeeded); 1717 typedef void (*csr_roamLinkQualityIndCallback) 1718 (eCsrRoamLinkQualityInd ind, void *pContext); 1719 typedef void (*tCsrStatsCallback)(void *stats, void *pContext); 1720 typedef void (*tCsrRssiCallback)(int8_t rssi, uint32_t staId, void *pContext); 1721 1722 #ifdef FEATURE_WLAN_ESE 1723 typedef void (*tCsrTsmStatsCallback)(tAniTrafStrmMetrics tsmMetrics, 1724 uint32_t staId, void *pContext); 1725 #endif /* FEATURE_WLAN_ESE */ 1726 typedef void (*tCsrSnrCallback)(int8_t snr, uint32_t staId, void *pContext); 1727 1728 /** 1729 * csr_roam_issue_ft_preauth_req() - Initiate Preauthentication request 1730 * @max_ctx: Global MAC context 1731 * @session_id: SME Session ID 1732 * @bss_desc: BSS descriptor 1733 * 1734 * Return: Success or Failure 1735 */ 1736 #ifdef WLAN_FEATURE_HOST_ROAM 1737 QDF_STATUS csr_roam_issue_ft_preauth_req(tpAniSirGlobal mac_ctx, 1738 uint32_t session_id, 1739 tpSirBssDescription bss_desc); 1740 #else 1741 static inline 1742 QDF_STATUS csr_roam_issue_ft_preauth_req(tpAniSirGlobal mac_ctx, 1743 uint32_t session_id, 1744 tpSirBssDescription bss_desc) 1745 { 1746 return QDF_STATUS_E_NOSUPPORT; 1747 } 1748 #endif 1749 QDF_STATUS csr_set_band(tHalHandle hHal, uint8_t sessionId, 1750 enum band_info eBand); 1751 enum band_info csr_get_current_band(tHalHandle hHal); 1752 typedef void (*csr_readyToSuspendCallback)(void *pContext, bool suspended); 1753 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT 1754 typedef void (*csr_readyToExtWoWCallback)(void *pContext, bool status); 1755 #endif 1756 typedef void (*tCsrLinkStatusCallback)(uint8_t status, void *pContext); 1757 #ifdef FEATURE_WLAN_TDLS 1758 void csr_roam_fill_tdls_info(tpAniSirGlobal mac_ctx, 1759 struct csr_roam_info *roam_info, 1760 tpSirSmeJoinRsp join_rsp); 1761 #else 1762 static inline void csr_roam_fill_tdls_info(tpAniSirGlobal mac_ctx, 1763 struct csr_roam_info *roam_info, 1764 tpSirSmeJoinRsp join_rsp) 1765 {} 1766 #endif 1767 void csr_packetdump_timer_stop(void); 1768 1769 /** 1770 * csr_get_channel_status() - get chan info via channel number 1771 * @p_mac: Pointer to Global MAC structure 1772 * @channel_id: channel id 1773 * 1774 * Return: chan status info 1775 */ 1776 struct lim_channel_status *csr_get_channel_status(void *p_mac, 1777 uint32_t channel_id); 1778 1779 /** 1780 * csr_clear_channel_status() - clear chan info 1781 * @p_mac: Pointer to Global MAC structure 1782 * 1783 * Return: none 1784 */ 1785 void csr_clear_channel_status(void *p_mac); 1786 #endif 1787