Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2012, Code Aurora Forum. All rights reserved. |
| 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 | ------------------------------------------------------------------------- * |
| 24 | \file csrApi.h |
| 25 | |
| 26 | Exports and types for the Common Scan and Roaming Module interfaces. |
| 27 | |
| 28 | Copyright (C) 2006 Airgo Networks, Incorporated |
| 29 | ========================================================================== */ |
| 30 | #ifndef CSRAPI_H__ |
| 31 | #define CSRAPI_H__ |
| 32 | |
| 33 | #include "sirApi.h" |
| 34 | #include "sirMacProtDef.h" |
| 35 | #ifdef FEATURE_WLAN_NON_INTEGRATED_SOC |
| 36 | #include "halRfTypes.h" |
| 37 | #endif |
| 38 | #include "csrLinkList.h" |
| 39 | |
| 40 | typedef enum |
| 41 | { |
| 42 | eCSR_AUTH_TYPE_NONE, //never used |
| 43 | // MAC layer authentication types |
| 44 | eCSR_AUTH_TYPE_OPEN_SYSTEM, |
| 45 | eCSR_AUTH_TYPE_SHARED_KEY, |
| 46 | eCSR_AUTH_TYPE_AUTOSWITCH, |
| 47 | |
| 48 | // Upper layer authentication types |
| 49 | eCSR_AUTH_TYPE_WPA, |
| 50 | eCSR_AUTH_TYPE_WPA_PSK, |
| 51 | eCSR_AUTH_TYPE_WPA_NONE, |
| 52 | |
| 53 | eCSR_AUTH_TYPE_RSN, |
| 54 | eCSR_AUTH_TYPE_RSN_PSK, |
| 55 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 56 | eCSR_AUTH_TYPE_FT_RSN, |
| 57 | eCSR_AUTH_TYPE_FT_RSN_PSK, |
| 58 | #endif |
| 59 | #ifdef FEATURE_WLAN_WAPI |
| 60 | eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE, |
| 61 | eCSR_AUTH_TYPE_WAPI_WAI_PSK, |
| 62 | #endif /* FEATURE_WLAN_WAPI */ |
| 63 | #ifdef FEATURE_WLAN_CCX |
| 64 | eCSR_AUTH_TYPE_CCKM_WPA, |
| 65 | eCSR_AUTH_TYPE_CCKM_RSN, |
| 66 | #endif /* FEATURE_WLAN_CCX */ |
| 67 | eCSR_NUM_OF_SUPPORT_AUTH_TYPE, |
| 68 | eCSR_AUTH_TYPE_FAILED = 0xff, |
| 69 | eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED, |
| 70 | |
| 71 | }eCsrAuthType; |
| 72 | |
| 73 | |
| 74 | typedef enum |
| 75 | { |
| 76 | eCSR_ENCRYPT_TYPE_NONE, |
| 77 | eCSR_ENCRYPT_TYPE_WEP40_STATICKEY, |
| 78 | eCSR_ENCRYPT_TYPE_WEP104_STATICKEY, |
| 79 | |
| 80 | eCSR_ENCRYPT_TYPE_WEP40, |
| 81 | eCSR_ENCRYPT_TYPE_WEP104, |
| 82 | eCSR_ENCRYPT_TYPE_TKIP, |
| 83 | eCSR_ENCRYPT_TYPE_AES, |
| 84 | #ifdef FEATURE_WLAN_WAPI |
| 85 | eCSR_ENCRYPT_TYPE_WPI, //WAPI |
| 86 | #endif /* FEATURE_WLAN_WAPI */ |
| 87 | #ifdef FEATURE_WLAN_CCX |
| 88 | eCSR_ENCRYPT_TYPE_KRK, |
| 89 | #endif /* FEATURE_WLAN_CCX */ |
| 90 | #ifdef WLAN_FEATURE_11W |
| 91 | //11w BIP |
| 92 | eCSR_ENCRYPT_TYPE_AES_CMAC, |
| 93 | #endif |
| 94 | eCSR_ENCRYPT_TYPE_ANY, |
| 95 | eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY, |
| 96 | |
| 97 | eCSR_ENCRYPT_TYPE_FAILED = 0xff, |
| 98 | eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED, |
| 99 | |
| 100 | }eCsrEncryptionType; |
| 101 | |
| 102 | /*--------------------------------------------------------------------------- |
| 103 | Enumeration of the various Security types |
| 104 | ---------------------------------------------------------------------------*/ |
| 105 | typedef enum |
| 106 | { |
| 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 | { |
| 118 | eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support |
| 119 | eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary |
| 120 | eCSR_DOT11_MODE_11a = 0x0002, |
| 121 | eCSR_DOT11_MODE_11b = 0x0004, |
| 122 | eCSR_DOT11_MODE_11g = 0x0008, |
| 123 | eCSR_DOT11_MODE_11n = 0x0010, |
| 124 | eCSR_DOT11_MODE_POLARIS = 0x0020, |
| 125 | eCSR_DOT11_MODE_TITAN = 0x0040, |
| 126 | eCSR_DOT11_MODE_11g_ONLY = 0x0080, |
| 127 | eCSR_DOT11_MODE_11n_ONLY = 0x0100, |
| 128 | eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200, |
| 129 | eCSR_DOT11_MODE_11b_ONLY = 0x0400, |
| 130 | eCSR_DOT11_MODE_11a_ONLY = 0x0800, |
| 131 | //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz |
| 132 | //It is for CSR internal use |
| 133 | eCSR_DOT11_MODE_AUTO = 0x1000, |
| 134 | |
| 135 | eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode |
| 136 | }eCsrPhyMode; |
| 137 | |
| 138 | |
| 139 | typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN]; |
| 140 | |
| 141 | typedef enum |
| 142 | { |
| 143 | eCSR_BSS_TYPE_INFRASTRUCTURE, |
| 144 | #ifdef WLAN_SOFTAP_FEATURE |
| 145 | eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP |
| 146 | #endif |
| 147 | eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start |
| 148 | eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected. |
| 149 | eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP |
| 150 | eCSR_BSS_TYPE_WDS_STA, // BT-AMP station |
| 151 | eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure). |
| 152 | }eCsrRoamBssType; |
| 153 | |
| 154 | |
| 155 | |
| 156 | typedef enum { |
| 157 | eCSR_SCAN_REQUEST_11D_SCAN = 1, |
| 158 | eCSR_SCAN_REQUEST_FULL_SCAN, |
| 159 | eCSR_SCAN_IDLE_MODE_SCAN, |
| 160 | eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states |
| 161 | eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list |
| 162 | eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state |
| 163 | eCSR_SCAN_P2P_DISCOVERY, |
| 164 | |
| 165 | eCSR_SCAN_SOFTAP_CHANNEL_RANGE, |
| 166 | eCSR_SCAN_P2P_FIND_PEER, |
| 167 | }eCsrRequestType; |
| 168 | |
| 169 | typedef enum { |
| 170 | eCSR_SCAN_RESULT_GET = 0, |
| 171 | eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results |
| 172 | }eCsrScanResultCmd; |
| 173 | |
| 174 | typedef enum |
| 175 | { |
| 176 | eCSR_SCAN_SUCCESS, |
| 177 | eCSR_SCAN_FAILURE, |
| 178 | eCSR_SCAN_ABORT, |
| 179 | eCSR_SCAN_FOUND_PEER, |
| 180 | }eCsrScanStatus; |
| 181 | |
| 182 | #define CSR_SCAN_TIME_DEFAULT 0 |
| 183 | #define CSR_VALUE_IGNORED 0xFFFFFFFF |
| 184 | #define CSR_RSN_PMKID_SIZE 16 |
| 185 | #define CSR_MAX_PMKID_ALLOWED 16 |
| 186 | #define CSR_WEP40_KEY_LEN 5 |
| 187 | #define CSR_WEP104_KEY_LEN 13 |
| 188 | #define CSR_TKIP_KEY_LEN 32 |
| 189 | #define CSR_AES_KEY_LEN 16 |
| 190 | #define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX ) |
| 191 | #define CSR_MAX_RSC_LEN 16 |
| 192 | #ifdef FEATURE_WLAN_WAPI |
| 193 | #define CSR_WAPI_BKID_SIZE 16 |
| 194 | #define CSR_MAX_BKID_ALLOWED 16 |
| 195 | #define CSR_WAPI_KEY_LEN 32 |
| 196 | #define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI |
| 197 | #else |
| 198 | #define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP |
| 199 | #endif /* FEATURE_WLAN_WAPI */ |
| 200 | #ifdef FEATURE_WLAN_CCX |
| 201 | #define CSR_KRK_KEY_LEN 16 |
| 202 | #endif |
| 203 | |
| 204 | |
| 205 | |
| 206 | typedef struct tagCsrChannelInfo |
| 207 | { |
| 208 | tANI_U8 numOfChannels; |
| 209 | tANI_U8 *ChannelList; //it will be an array of channels |
| 210 | }tCsrChannelInfo; |
| 211 | |
| 212 | typedef struct tagCsrSSIDInfo |
| 213 | { |
| 214 | tSirMacSSid SSID; |
| 215 | tANI_BOOLEAN handoffPermitted; |
| 216 | tANI_BOOLEAN ssidHidden; |
| 217 | }tCsrSSIDInfo; |
| 218 | |
| 219 | typedef struct tagCsrSSIDs |
| 220 | { |
| 221 | tANI_U32 numOfSSIDs; |
| 222 | tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs |
| 223 | }tCsrSSIDs; |
| 224 | |
| 225 | typedef struct tagCsrBSSIDs |
| 226 | { |
| 227 | tANI_U32 numOfBSSIDs; |
| 228 | tCsrBssid *bssid; |
| 229 | }tCsrBSSIDs; |
| 230 | |
| 231 | |
| 232 | typedef struct tagCsrScanRequest |
| 233 | { |
| 234 | tSirScanType scanType; |
| 235 | tCsrBssid bssid; |
| 236 | eCsrRoamBssType BSSType; |
| 237 | tCsrSSIDs SSIDs; |
| 238 | tCsrChannelInfo ChannelInfo; |
| 239 | tANI_U32 minChnTime; //in units of milliseconds |
| 240 | tANI_U32 maxChnTime; //in units of milliseconds |
| 241 | tANI_U32 restTime; //in units of milliseconds //ignored when not connected |
| 242 | tANI_U32 uIEFieldLen; |
| 243 | tANI_U8 *pIEField; |
| 244 | eCsrRequestType requestType; //11d scan or full scan |
| 245 | #ifdef WLAN_FEATURE_P2P |
| 246 | tANI_BOOLEAN p2pSearch; |
| 247 | #endif |
| 248 | }tCsrScanRequest; |
| 249 | |
| 250 | typedef struct tagCsrBGScanRequest |
| 251 | { |
| 252 | tSirScanType scanType; |
| 253 | tSirMacSSid SSID; |
| 254 | tCsrChannelInfo ChannelInfo; |
| 255 | tANI_U32 scanInterval; //in units of milliseconds |
| 256 | tANI_U32 minChnTime; //in units of milliseconds |
| 257 | tANI_U32 maxChnTime; //in units of milliseconds |
| 258 | tANI_U32 restTime; //in units of milliseconds //ignored when not connected |
| 259 | tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected |
| 260 | tCsrBssid bssid; //how to use it?? Apple |
| 261 | }tCsrBGScanRequest; |
| 262 | |
| 263 | |
| 264 | typedef struct tagCsrScanResultInfo |
| 265 | { |
| 266 | //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS. |
| 267 | void *pvIes; |
| 268 | tAniSSID ssId; |
| 269 | v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value |
| 270 | //This member must be the last in the structure because the end of tSirBssDescription is an |
| 271 | // array with nonknown size at this time |
| 272 | tSirBssDescription BssDescriptor; |
| 273 | }tCsrScanResultInfo; |
| 274 | |
| 275 | typedef struct tagCsrEncryptionList |
| 276 | { |
| 277 | |
| 278 | tANI_U32 numEntries; |
| 279 | eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE]; |
| 280 | |
| 281 | }tCsrEncryptionList, *tpCsrEncryptionList; |
| 282 | |
| 283 | typedef struct tagCsrAuthList |
| 284 | { |
| 285 | tANI_U32 numEntries; |
| 286 | eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE]; |
| 287 | }tCsrAuthList, *tpCsrAuthList; |
| 288 | |
| 289 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 290 | typedef struct tagCsrMobilityDomainInfo |
| 291 | { |
| 292 | tANI_U8 mdiePresent; |
| 293 | tANI_U16 mobilityDomain; |
| 294 | } tCsrMobilityDomainInfo; |
| 295 | #endif |
| 296 | |
| 297 | #ifdef FEATURE_WLAN_CCX |
| 298 | typedef struct tagCsrCcxCckmInfo |
| 299 | { |
| 300 | tANI_U32 reassoc_req_num; |
| 301 | tANI_BOOLEAN krk_plumbed; |
| 302 | tANI_U8 krk[CSR_KRK_KEY_LEN]; |
| 303 | } tCsrCcxCckmInfo; |
| 304 | #endif |
| 305 | |
| 306 | |
| 307 | typedef struct tagCsrScanResultFilter |
| 308 | { |
| 309 | tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6) |
| 310 | tCsrSSIDs SSIDs; |
| 311 | tCsrChannelInfo ChannelInfo; |
| 312 | tCsrAuthList authType; |
| 313 | tCsrEncryptionList EncryptionType; |
| 314 | //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case, |
| 315 | //put all supported encryption types in here |
| 316 | tCsrEncryptionList mcEncryptionType; |
| 317 | eCsrRoamBssType BSSType; |
| 318 | //this is a bit mask of all the needed phy mode defined in eCsrPhyMode |
| 319 | tANI_U32 phyMode; |
| 320 | //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode |
| 321 | tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; |
| 322 | tANI_U8 uapsd_mask; |
| 323 | /*For WPS filtering if true => auth and ecryption should be ignored*/ |
| 324 | tANI_BOOLEAN bWPSAssociation; |
| 325 | #if defined WLAN_FEATURE_VOWIFI |
| 326 | /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/ |
| 327 | tANI_BOOLEAN fMeasurement; |
| 328 | #endif |
| 329 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 330 | tCsrMobilityDomainInfo MDID; |
| 331 | #endif |
| 332 | tANI_BOOLEAN p2pResult; |
| 333 | }tCsrScanResultFilter; |
| 334 | |
| 335 | |
| 336 | typedef struct sCsrChnPower_ |
| 337 | { |
| 338 | tANI_U8 firstChannel; |
| 339 | tANI_U8 numChannels; |
| 340 | tANI_U8 maxtxPower; |
| 341 | }sCsrChnPower; |
| 342 | |
| 343 | |
| 344 | typedef struct sCsrChannel_ |
| 345 | { |
| 346 | tANI_U8 numChannels; |
| 347 | tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 348 | }sCsrChannel; |
| 349 | |
| 350 | |
| 351 | typedef struct tagCsr11dinfo |
| 352 | { |
| 353 | sCsrChannel Channels; |
| 354 | tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1]; |
| 355 | //max power channel list |
| 356 | sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 357 | }tCsr11dinfo; |
| 358 | |
| 359 | |
| 360 | typedef enum |
| 361 | { |
| 362 | eCSR_ROAM_CANCELLED = 1, |
| 363 | //this mean error happens before association_start or roaming_start is called. |
| 364 | eCSR_ROAM_FAILED, |
| 365 | //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile |
| 366 | eCSR_ROAM_ROAMING_START, |
| 367 | //a CSR trigger roaming operation is completed |
| 368 | eCSR_ROAM_ROAMING_COMPLETION, |
| 369 | //Connection completed status. |
| 370 | eCSR_ROAM_CONNECT_COMPLETION, |
| 371 | //an association or start_IBSS operation starts, |
| 372 | //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription |
| 373 | eCSR_ROAM_ASSOCIATION_START, |
| 374 | //a roaming operation is finish, see eCsrRoamResult for |
| 375 | //possible data passed back |
| 376 | eCSR_ROAM_ASSOCIATION_COMPLETION, |
| 377 | eCSR_ROAM_DISASSOCIATED, |
| 378 | eCSR_ROAM_ASSOCIATION_FAILURE, |
| 379 | //when callback with this flag. callback gets a pointer to the BSS desc. |
| 380 | eCSR_ROAM_SHOULD_ROAM, |
| 381 | //A new candidate for PMKID is found |
| 382 | eCSR_ROAM_SCAN_FOUND_NEW_BSS, |
| 383 | //CSR is done lostlink roaming and still cannot reconnect |
| 384 | eCSR_ROAM_LOSTLINK, |
| 385 | //a link lost is detected. CSR starts roaming. |
| 386 | eCSR_ROAM_LOSTLINK_DETECTED, |
| 387 | //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd |
| 388 | eCSR_ROAM_MIC_ERROR_IND, |
| 389 | eCSR_ROAM_IBSS_IND, //IBSS indications. |
| 390 | //Update the connection status, useful for IBSS: new peer added, network is active etc. |
| 391 | eCSR_ROAM_CONNECT_STATUS_UPDATE, |
| 392 | eCSR_ROAM_GEN_INFO, |
| 393 | eCSR_ROAM_SET_KEY_COMPLETE, |
| 394 | eCSR_ROAM_REMOVE_KEY_COMPLETE, |
| 395 | eCSR_ROAM_IBSS_LEAVE, //IBSS indications. |
| 396 | //BSS in WDS mode status indication |
| 397 | eCSR_ROAM_WDS_IND, |
| 398 | #ifdef WLAN_SOFTAP_FEATURE |
| 399 | //BSS in SoftAP mode status indication |
| 400 | eCSR_ROAM_INFRA_IND, |
| 401 | eCSR_ROAM_WPS_PBC_PROBE_REQ_IND, |
| 402 | #endif |
| 403 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 404 | eCSR_ROAM_FT_RESPONSE, |
| 405 | #endif |
| 406 | eCSR_ROAM_FT_START, |
| 407 | eCSR_ROAM_INDICATE_MGMT_FRAME, |
| 408 | eCSR_ROAM_REMAIN_CHAN_READY, |
| 409 | eCSR_ROAM_SEND_ACTION_CNF, |
| 410 | //this mean error happens before association_start or roaming_start is called. |
| 411 | eCSR_ROAM_SESSION_OPENED, |
| 412 | eCSR_ROAM_FT_REASSOC_FAILED, |
| 413 | }eRoamCmdStatus; |
| 414 | |
| 415 | |
| 416 | //comment inside indicates what roaming callback gets |
| 417 | typedef enum |
| 418 | { |
| 419 | eCSR_ROAM_RESULT_NONE, |
| 420 | //this means no more action in CSR |
| 421 | //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back |
| 422 | eCSR_ROAM_RESULT_FAILURE, |
| 423 | //Pass back pointer to tCsrRoamInfo |
| 424 | eCSR_ROAM_RESULT_ASSOCIATED, |
| 425 | eCSR_ROAM_RESULT_NOT_ASSOCIATED, |
| 426 | eCSR_ROAM_RESULT_MIC_FAILURE, |
| 427 | eCSR_ROAM_RESULT_FORCED, |
| 428 | eCSR_ROAM_RESULT_DISASSOC_IND, |
| 429 | eCSR_ROAM_RESULT_DEAUTH_IND, |
| 430 | eCSR_ROAM_RESULT_CAP_CHANGED, |
| 431 | //This means we starts an IBSS |
| 432 | //tCsrRoamInfo's pBssDesc may pass back |
| 433 | eCSR_ROAM_RESULT_IBSS_STARTED, |
| 434 | //START_BSS failed |
| 435 | //tCsrRoamInfo's pBssDesc may pass back |
| 436 | eCSR_ROAM_RESULT_IBSS_START_FAILED, |
| 437 | eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS, |
| 438 | eCSR_ROAM_RESULT_IBSS_JOIN_FAILED, |
| 439 | eCSR_ROAM_RESULT_IBSS_CONNECT, |
| 440 | eCSR_ROAM_RESULT_IBSS_INACTIVE, |
| 441 | //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION |
| 442 | //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid |
| 443 | //If roamStatus is eCSR_ROAM_IBSS_IND, |
| 444 | //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames |
| 445 | eCSR_ROAM_RESULT_IBSS_NEW_PEER, |
| 446 | //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd |
| 447 | eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED, |
| 448 | //Coalescing in the IBSS network (joined an IBSS network) |
| 449 | //Callback pass a BSSID in peerMacOrBssid |
| 450 | eCSR_ROAM_RESULT_IBSS_COALESCED, |
| 451 | //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect. |
| 452 | eCSR_ROAM_RESULT_IBSS_STOP, |
| 453 | eCSR_ROAM_RESULT_LOSTLINK, |
| 454 | eCSR_ROAM_RESULT_MIC_ERROR_UNICAST, |
| 455 | eCSR_ROAM_RESULT_MIC_ERROR_GROUP, |
| 456 | eCSR_ROAM_RESULT_AUTHENTICATED, |
| 457 | eCSR_ROAM_RESULT_NEW_RSN_BSS, |
| 458 | #ifdef FEATURE_WLAN_WAPI |
| 459 | eCSR_ROAM_RESULT_NEW_WAPI_BSS, |
| 460 | #endif /* FEATURE_WLAN_WAPI */ |
| 461 | // WDS started successfully |
| 462 | eCSR_ROAM_RESULT_WDS_STARTED, |
| 463 | // WDS start failed |
| 464 | eCSR_ROAM_RESULT_WDS_START_FAILED, |
| 465 | // WDS stopped |
| 466 | eCSR_ROAM_RESULT_WDS_STOPPED, |
| 467 | // WDS joined successfully in STA mode |
| 468 | eCSR_ROAM_RESULT_WDS_ASSOCIATED, |
| 469 | // A station joined WDS AP |
| 470 | eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND, |
| 471 | // WDS join failed in STA mode |
| 472 | eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED, |
| 473 | // WDS disassociated |
| 474 | eCSR_ROAM_RESULT_WDS_DISASSOCIATED, |
| 475 | #ifdef WLAN_SOFTAP_FEATURE |
| 476 | // INFRA started successfully |
| 477 | eCSR_ROAM_RESULT_INFRA_STARTED, |
| 478 | // INFRA start failed |
| 479 | eCSR_ROAM_RESULT_INFRA_START_FAILED, |
| 480 | // INFRA stopped |
| 481 | eCSR_ROAM_RESULT_INFRA_STOPPED, |
| 482 | // A station joining INFRA AP |
| 483 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND, |
| 484 | // A station joined INFRA AP |
| 485 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF, |
| 486 | // INFRA disassociated |
| 487 | eCSR_ROAM_RESULT_INFRA_DISASSOCIATED, |
| 488 | eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND, |
| 489 | #endif |
| 490 | #ifdef WLAN_FEATURE_P2P |
| 491 | eCSR_ROAM_RESULT_SEND_ACTION_FAIL, |
| 492 | #endif |
| 493 | // peer rejected assoc because max assoc limit reached. callback gets pointer to peer |
| 494 | eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED, |
| 495 | }eCsrRoamResult; |
| 496 | |
| 497 | |
| 498 | |
| 499 | /*---------------------------------------------------------------------------- |
| 500 | List of link quality indications HDD can receive from SME |
| 501 | -----------------------------------------------------------------------------*/ |
| 502 | typedef enum |
| 503 | { |
| 504 | eCSR_ROAM_LINK_QUAL_MIN_IND = -1, |
| 505 | |
| 506 | eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */ |
| 507 | eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */ |
| 508 | eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */ |
| 509 | eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */ |
| 510 | |
| 511 | eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */ |
| 512 | |
| 513 | } eCsrRoamLinkQualityInd; |
| 514 | |
| 515 | typedef enum |
| 516 | { |
| 517 | eCSR_DISCONNECT_REASON_UNSPECIFIED = 0, |
| 518 | eCSR_DISCONNECT_REASON_MIC_ERROR, |
| 519 | eCSR_DISCONNECT_REASON_DISASSOC, |
| 520 | eCSR_DISCONNECT_REASON_DEAUTH, |
| 521 | eCSR_DISCONNECT_REASON_HANDOFF, |
| 522 | eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE, |
| 523 | eCSR_DISCONNECT_REASON_IBSS_LEAVE, |
| 524 | }eCsrRoamDisconnectReason; |
| 525 | |
| 526 | typedef enum |
| 527 | { |
| 528 | // Not associated in Infra or participating in an IBSS / Ad-hoc network. |
| 529 | eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED, |
| 530 | // Associated in an Infrastructure network. |
| 531 | eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED, |
| 532 | // Participating in an IBSS network though disconnected (no partner stations |
| 533 | // in the IBSS). |
| 534 | eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED, |
| 535 | // Participating in an IBSS network with partner stations also present |
| 536 | eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED, |
| 537 | // Participating in a WDS network in AP or STA mode but not connected yet |
| 538 | eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED, |
| 539 | // Participating in a WDS network and connected peer to peer |
| 540 | eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED, |
| 541 | #ifdef WLAN_SOFTAP_FEATURE |
| 542 | // Participating in a Infra network in AP not yet in connected state |
| 543 | eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED, |
| 544 | // Participating in a Infra network and connected to a peer |
| 545 | eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED, |
| 546 | #endif |
| 547 | |
| 548 | }eCsrConnectState; |
| 549 | |
| 550 | |
| 551 | // This parameter is no longer supported in the Profile. Need to set this in the global properties |
| 552 | // for the adapter. |
| 553 | typedef enum eCSR_MEDIUM_ACCESS |
| 554 | { |
| 555 | eCSR_MEDIUM_ACCESS_AUTO = 0, |
| 556 | eCSR_MEDIUM_ACCESS_DCF, |
| 557 | eCSR_MEDIUM_ACCESS_eDCF, |
| 558 | eCSR_MEDIUM_ACCESS_HCF, |
| 559 | |
| 560 | eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p, |
| 561 | eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP, |
| 562 | eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify, |
| 563 | eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF, |
| 564 | eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF, |
| 565 | }eCsrMediaAccessType; |
| 566 | |
| 567 | typedef enum |
| 568 | { |
| 569 | eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate. |
| 570 | |
| 571 | eCSR_TX_RATE_1Mbps = 0x00000001, |
| 572 | eCSR_TX_RATE_2Mbps = 0x00000002, |
| 573 | eCSR_TX_RATE_5_5Mbps = 0x00000004, |
| 574 | eCSR_TX_RATE_6Mbps = 0x00000008, |
| 575 | eCSR_TX_RATE_9Mbps = 0x00000010, |
| 576 | eCSR_TX_RATE_11Mbps = 0x00000020, |
| 577 | eCSR_TX_RATE_12Mbps = 0x00000040, |
| 578 | eCSR_TX_RATE_18Mbps = 0x00000080, |
| 579 | eCSR_TX_RATE_24Mbps = 0x00000100, |
| 580 | eCSR_TX_RATE_36Mbps = 0x00000200, |
| 581 | eCSR_TX_RATE_42Mbps = 0x00000400, |
| 582 | eCSR_TX_RATE_48Mbps = 0x00000800, |
| 583 | eCSR_TX_RATE_54Mbps = 0x00001000, |
| 584 | eCSR_TX_RATE_72Mbps = 0x00002000, |
| 585 | eCSR_TX_RATE_84Mbps = 0x00004000, |
| 586 | eCSR_TX_RATE_96Mbps = 0x00008000, |
| 587 | eCSR_TX_RATE_108Mbps = 0x00010000, |
| 588 | eCSR_TX_RATE_126Mbps = 0x00020000, |
| 589 | eCSR_TX_RATE_144Mbps = 0x00040000, |
| 590 | eCSR_TX_RATE_168Mbps = 0x00080000, |
| 591 | eCSR_TX_RATE_192Mbps = 0x00100000, |
| 592 | eCSR_TX_RATE_216Mbps = 0x00200000, |
| 593 | eCSR_TX_RATE_240Mbps = 0x00400000, |
| 594 | |
| 595 | }eCsrExposedTxRate; |
| 596 | |
| 597 | typedef enum |
| 598 | { |
| 599 | eCSR_OPERATING_CHANNEL_ALL = 0, |
| 600 | eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL, |
| 601 | eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL, |
| 602 | }eOperationChannel; |
| 603 | |
| 604 | typedef enum |
| 605 | { |
| 606 | eCSR_DOT11_FRAG_THRESH_AUTO = -1, |
| 607 | eCSR_DOT11_FRAG_THRESH_MIN = 256, |
| 608 | eCSR_DOT11_FRAG_THRESH_MAX = 2346, |
| 609 | eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000 |
| 610 | }eCsrDot11FragThresh; |
| 611 | |
| 612 | |
| 613 | //for channel bonding for ibss |
| 614 | typedef enum |
| 615 | { |
| 616 | eCSR_CB_OFF = 0, |
| 617 | eCSR_CB_AUTO = 1, |
| 618 | eCSR_CB_DOWN = 2, |
| 619 | eCSR_CB_UP = 3, |
| 620 | }eCsrCBChoice; |
| 621 | |
| 622 | //For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode. |
| 623 | #define CSR_CB_CHANNEL_GAP 4 |
| 624 | #define CSR_CB_CENTER_CHANNEL_OFFSET 2 |
| 625 | #define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END ) |
| 626 | |
| 627 | // WEP keysize (in bits)... |
| 628 | typedef enum |
| 629 | { |
| 630 | eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP |
| 631 | eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP |
| 632 | |
| 633 | eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40, |
| 634 | eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104, |
| 635 | eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ), |
| 636 | }eCsrWEPKeySize; |
| 637 | |
| 638 | |
| 639 | // Possible values for the WEP static key ID... |
| 640 | typedef enum |
| 641 | { |
| 642 | |
| 643 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0, |
| 644 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3, |
| 645 | eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0, |
| 646 | |
| 647 | eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1, |
| 648 | |
| 649 | }eCsrWEPStaticKeyID; |
| 650 | |
| 651 | #define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 1) |
| 652 | |
| 653 | typedef enum |
| 654 | { |
| 655 | eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE, |
| 656 | eCSR_SECURITY_SET_KEY_ACTION_SET_KEY, |
| 657 | eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY, |
| 658 | }eCsrSetKeyAction; |
| 659 | |
| 660 | typedef enum |
| 661 | { |
| 662 | eCSR_BAND_ALL, |
| 663 | eCSR_BAND_24, |
| 664 | eCSR_BAND_5G, |
| 665 | eCSR_BAND_MAX, |
| 666 | }eCsrBand; |
| 667 | |
| 668 | |
| 669 | typedef enum |
| 670 | { |
| 671 | // Roaming because HDD requested for reassoc by changing one of the fields in |
| 672 | // tCsrRoamModifyProfileFields. OR |
| 673 | // Roaming because SME requested for reassoc by changing one of the fields in |
| 674 | // tCsrRoamModifyProfileFields. |
| 675 | eCsrRoamReasonStaCapabilityChanged, |
| 676 | // Roaming because SME requested for reassoc to a different AP, as part of |
| 677 | // inter AP handoff. |
| 678 | eCsrRoamReasonBetterAP, |
| 679 | // Roaming because SME requested it as the link is lost - placeholder, will |
| 680 | // clean it up once handoff code gets in |
| 681 | eCsrRoamReasonSmeIssuedForLostLink, |
| 682 | |
| 683 | }eCsrRoamReasonCodes; |
| 684 | |
| 685 | typedef enum |
| 686 | { |
| 687 | eCsrRoamWmmAuto = 0, |
| 688 | eCsrRoamWmmQbssOnly = 1, |
| 689 | eCsrRoamWmmNoQos = 2, |
| 690 | |
| 691 | } eCsrRoamWmmUserModeType; |
| 692 | |
| 693 | typedef enum |
| 694 | { |
| 695 | eCSR_REQUESTER_MIN = 0, |
| 696 | eCSR_DIAG, |
| 697 | eCSR_UMA_GAN, |
| 698 | eCSR_HDD |
| 699 | } eCsrStatsRequesterType; |
| 700 | |
| 701 | typedef struct tagPmkidCandidateInfo |
| 702 | { |
| 703 | tCsrBssid BSSID; |
| 704 | tANI_BOOLEAN preAuthSupported; |
| 705 | }tPmkidCandidateInfo; |
| 706 | |
| 707 | typedef struct tagPmkidCacheInfo |
| 708 | { |
| 709 | tCsrBssid BSSID; |
| 710 | tANI_U8 PMKID[CSR_RSN_PMKID_SIZE]; |
| 711 | }tPmkidCacheInfo; |
| 712 | |
| 713 | #ifdef FEATURE_WLAN_WAPI |
| 714 | typedef struct tagBkidCandidateInfo |
| 715 | { |
| 716 | tCsrBssid BSSID; |
| 717 | tANI_BOOLEAN preAuthSupported; |
| 718 | }tBkidCandidateInfo; |
| 719 | |
| 720 | typedef struct tagBkidCacheInfo |
| 721 | { |
| 722 | tCsrBssid BSSID; |
| 723 | tANI_U8 BKID[CSR_WAPI_BKID_SIZE]; |
| 724 | }tBkidCacheInfo; |
| 725 | #endif /* FEATURE_WLAN_WAPI */ |
| 726 | |
| 727 | typedef struct tagCsrKeys |
| 728 | { |
| 729 | tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set |
| 730 | tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ]; |
| 731 | tANI_U8 defaultIndex; |
| 732 | }tCsrKeys; |
| 733 | |
| 734 | /* Following are fields which are part of tCsrRoamConnectedProfile might need |
| 735 | modification dynamically once STA is up & running and this could trigger |
| 736 | reassoc */ |
| 737 | typedef struct tagCsrRoamModifyProfileFields |
| 738 | { |
| 739 | // during connect this specifies ACs U-APSD is to be setup |
| 740 | // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 741 | // During assoc response this COULD carry confirmation of what ACs U-APSD |
| 742 | // got setup for. Later if an APP looking for APSD, SME-QoS might need to |
| 743 | // modify this field |
| 744 | tANI_U8 uapsd_mask; |
| 745 | // HDD might ask to modify this field |
| 746 | tANI_U16 listen_interval; |
| 747 | }tCsrRoamModifyProfileFields; |
| 748 | |
| 749 | typedef struct tagCsrRoamProfile |
| 750 | { |
| 751 | //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs. |
| 752 | //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP |
| 753 | //that we need to join. Index 1 is the SSID for self BSS. |
| 754 | tCsrSSIDs SSIDs; |
| 755 | tCsrBSSIDs BSSIDs; |
| 756 | tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode |
| 757 | eCsrRoamBssType BSSType; |
| 758 | |
| 759 | tCsrAuthList AuthType; |
| 760 | eCsrAuthType negotiatedAuthType; |
| 761 | |
| 762 | tCsrEncryptionList EncryptionType; |
| 763 | //This field is for output only, not for input |
| 764 | eCsrEncryptionType negotiatedUCEncryptionType; |
| 765 | |
| 766 | //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case, |
| 767 | //put all supported encryption types in here |
| 768 | tCsrEncryptionList mcEncryptionType; |
| 769 | //This field is for output only, not for input |
| 770 | eCsrEncryptionType negotiatedMCEncryptionType; |
| 771 | |
| 772 | tCsrKeys Keys; |
| 773 | eCsrCBChoice CBMode; //up, down or auto |
| 774 | tCsrChannelInfo ChannelInfo; |
| 775 | tANI_U8 operationChannel; |
| 776 | tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller. |
| 777 | // during connect this specifies ACs U-APSD is to be setup |
| 778 | // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 779 | // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for |
| 780 | tANI_U8 uapsd_mask; |
| 781 | tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE |
| 782 | tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA |
| 783 | tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE |
| 784 | tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN |
| 785 | #ifdef FEATURE_WLAN_WAPI |
| 786 | tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE |
| 787 | tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI |
| 788 | #endif /* FEATURE_WLAN_WAPI */ |
| 789 | |
| 790 | tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join) |
| 791 | tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE |
| 792 | tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc |
| 793 | tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE |
| 794 | |
| 795 | tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0. |
| 796 | /*WPS Association if true => auth and ecryption should be ignored*/ |
| 797 | tANI_BOOLEAN bWPSAssociation; |
| 798 | tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE |
| 799 | tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC |
| 800 | |
| 801 | #ifdef WLAN_SOFTAP_FEATURE |
| 802 | tANI_U8 ieee80211d; |
| 803 | tANI_U8 privacy; |
| 804 | tANI_BOOLEAN fwdWPSPBCProbeReq; |
| 805 | tAniAuthType csr80211AuthType; |
| 806 | tANI_U32 dtimPeriod; |
| 807 | tANI_BOOLEAN ApUapsdEnable; |
| 808 | tANI_BOOLEAN protEnabled; |
| 809 | tANI_BOOLEAN obssProtEnabled; |
| 810 | tANI_U16 cfg_protection; |
| 811 | tANI_U8 wps_state; |
| 812 | #endif |
| 813 | |
| 814 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 815 | tCsrMobilityDomainInfo MDID; |
| 816 | #endif |
| 817 | tVOS_CON_MODE csrPersona; |
| 818 | |
| 819 | }tCsrRoamProfile; |
| 820 | |
| 821 | |
| 822 | typedef struct tagCsrRoamConnectedProfile |
| 823 | { |
| 824 | tSirMacSSid SSID; |
| 825 | tANI_BOOLEAN handoffPermitted; |
| 826 | tANI_BOOLEAN ssidHidden; |
| 827 | tCsrBssid bssid; |
| 828 | eCsrRoamBssType BSSType; |
| 829 | eCsrAuthType AuthType; |
| 830 | tCsrAuthList AuthInfo; |
| 831 | eCsrEncryptionType EncryptionType; |
| 832 | tCsrEncryptionList EncryptionInfo; |
| 833 | eCsrEncryptionType mcEncryptionType; |
| 834 | tCsrEncryptionList mcEncryptionInfo; |
| 835 | eCsrCBChoice CBMode; //up, down or auto |
| 836 | tANI_U8 operationChannel; |
| 837 | tCsrKeys Keys; |
| 838 | // meaningless on connect. It's an OUT param from CSR's point of view |
| 839 | // During assoc response carries the ACM bit-mask i.e. what |
| 840 | // ACs have ACM=1 (if any), |
| 841 | // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored) |
| 842 | tANI_U8 acm_mask; |
| 843 | tCsrRoamModifyProfileFields modifyProfileFields; |
| 844 | tSirBssDescription *pBssDesc; |
| 845 | tANI_BOOLEAN qap; //AP supports QoS |
| 846 | tANI_BOOLEAN qosConnection; //A connection is QoS enabled |
| 847 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 848 | tCsrMobilityDomainInfo MDID; |
| 849 | #endif |
| 850 | |
| 851 | #ifdef FEATURE_WLAN_CCX |
| 852 | tCsrCcxCckmInfo ccxCckmInfo; |
| 853 | tANI_BOOLEAN isCCXAssoc; |
| 854 | #endif |
| 855 | }tCsrRoamConnectedProfile; |
| 856 | |
| 857 | |
| 858 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 859 | typedef struct tagCsr11rConfigParams |
| 860 | { |
| 861 | tANI_BOOLEAN IsFTResourceReqSupported; |
| 862 | } tCsr11rConfigParams; |
| 863 | #endif |
| 864 | |
| 865 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 866 | typedef struct tagCsrNeighborRoamConfigParams |
| 867 | { |
| 868 | |
| 869 | tANI_U32 nNeighborScanTimerPeriod; |
| 870 | tANI_U8 nNeighborLookupRssiThreshold; |
| 871 | tANI_U8 nNeighborReassocRssiThreshold; |
| 872 | tANI_U16 nNeighborScanMinChanTime; |
| 873 | tANI_U16 nNeighborScanMaxChanTime; |
| 874 | sCsrChannel neighborScanChanList; |
| 875 | tANI_U8 nMaxNeighborRetries; |
| 876 | tANI_U16 nNeighborResultsRefreshPeriod; |
| 877 | }tCsrNeighborRoamConfigParams; |
| 878 | #endif |
| 879 | |
| 880 | typedef struct tagCsrConfigParam |
| 881 | { |
| 882 | tANI_U32 FragmentationThreshold; |
| 883 | tANI_U32 channelBondingMode24GHz; |
| 884 | tANI_U32 channelBondingMode5GHz; |
| 885 | eCsrPhyMode phyMode; |
| 886 | eCsrBand eBand; |
| 887 | tANI_U32 RTSThreshold; |
| 888 | tANI_U32 HeartbeatThresh50; |
| 889 | tANI_U32 HeartbeatThresh24; |
| 890 | eCsrCBChoice cbChoice; |
| 891 | eCsrBand bandCapability; //indicate hw capability |
| 892 | tANI_U32 bgScanInterval; |
| 893 | tANI_U16 TxRate; |
| 894 | eCsrRoamWmmUserModeType WMMSupportMode; |
| 895 | tANI_BOOLEAN Is11eSupportEnabled; |
| 896 | tANI_BOOLEAN Is11dSupportEnabled; |
| 897 | tANI_BOOLEAN Is11dSupportEnabledOriginal; |
| 898 | tANI_BOOLEAN Is11hSupportEnabled; |
| 899 | tANI_BOOLEAN shortSlotTime; |
| 900 | tANI_BOOLEAN ProprietaryRatesEnabled; |
| 901 | tANI_U8 AdHocChannel24; |
| 902 | tANI_U8 AdHocChannel5G; |
| 903 | tANI_U32 impsSleepTime; //in units of seconds |
| 904 | tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed |
| 905 | tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds |
| 906 | tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds |
| 907 | tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds, |
| 908 | tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds |
| 909 | tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming |
| 910 | tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category |
| 911 | tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode |
| 912 | |
| 913 | tCsr11dinfo Csr11dinfo; |
| 914 | //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional |
| 915 | //channels are limited to the default channel list. It is an "AND" operation between the |
| 916 | //default channels and the channels in the 802.11d IE. |
| 917 | tANI_BOOLEAN fEnforce11dChannels; |
| 918 | //Country Code Priority |
| 919 | //0 = 802.11D > Country IOCTL > NV |
| 920 | //1 = Country IOCTL > 802.11D > NV |
| 921 | tANI_BOOLEAN fSupplicantCountryCodeHasPriority; |
| 922 | //When true, AP with unknown country code won't be see. |
| 923 | //"Unknown country code" means either Ap doesn't have 11d IE or we cannot |
| 924 | //find a domain for the country code in its 11d IE. |
| 925 | tANI_BOOLEAN fEnforceCountryCodeMatch; |
| 926 | //When true, only APs in the default domain can be seen. If the Ap has "unknown country |
| 927 | //code", or the domain of the country code doesn't match the default domain, the Ap is |
| 928 | //not acceptable. |
| 929 | tANI_BOOLEAN fEnforceDefaultDomain; |
| 930 | |
| 931 | tANI_U16 vccRssiThreshold; |
| 932 | tANI_U32 vccUlMacLossThreshold; |
| 933 | |
| 934 | tANI_U32 nPassiveMinChnTime; //in units of milliseconds |
| 935 | tANI_U32 nPassiveMaxChnTime; //in units of milliseconds |
| 936 | tANI_U32 nActiveMinChnTime; //in units of milliseconds |
| 937 | tANI_U32 nActiveMaxChnTime; //in units of milliseconds |
| 938 | |
| 939 | tANI_BOOLEAN IsIdleScanEnabled; |
| 940 | //in dBm, the maximum TX power |
| 941 | //The actual TX power is the lesser of this value and 11d. |
| 942 | //If 11d is disable, the lesser of this and default setting. |
| 943 | tANI_U8 nTxPowerCap; |
| 944 | tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power |
| 945 | tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save |
| 946 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 947 | tCsr11rConfigParams csr11rConfig; |
| 948 | #endif |
| 949 | #ifdef FEATURE_WLAN_CCX |
| 950 | tANI_U8 isCcxIniFeatureEnabled; |
| 951 | #endif |
| 952 | |
| 953 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) |
| 954 | tANI_U8 isFastTransitionEnabled; |
| 955 | #endif |
| 956 | |
| 957 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 958 | tCsrNeighborRoamConfigParams neighborRoamConfig; |
| 959 | #endif |
| 960 | |
| 961 | /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC |
| 962 | * This is mandated by WMM-AC certification */ |
| 963 | tANI_BOOLEAN addTSWhenACMIsOff; |
| 964 | |
| 965 | |
| 966 | /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to |
| 967 | * detect when it happens. Adding this into code because we can't reproduce it easily. |
| 968 | * We don't know when it happens. */ |
| 969 | tANI_BOOLEAN fValidateList; |
| 970 | |
| 971 | /*Customer wants to start with an active scan based on the default country code. |
| 972 | * This optimization will minimize the driver load to association time. |
| 973 | * Based on this flag we will bypass the initial passive scan needed for 11d |
| 974 | * to determine the country code & domain */ |
| 975 | tANI_BOOLEAN fEnableBypass11d; |
| 976 | |
| 977 | /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS |
| 978 | * channels while swipping through both bands can save some time |
| 979 | * (apprx 1.3 sec) */ |
| 980 | tANI_BOOLEAN fEnableDFSChnlScan; |
| 981 | |
| 982 | //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD |
| 983 | tANI_BOOLEAN fScanTwice; |
| 984 | |
| 985 | }tCsrConfigParam; |
| 986 | |
| 987 | //Tush |
| 988 | typedef struct tagCsrUpdateConfigParam |
| 989 | { |
| 990 | tCsr11dinfo Csr11dinfo; |
| 991 | }tCsrUpdateConfigParam; |
| 992 | |
| 993 | typedef struct tagCsrRoamInfo |
| 994 | { |
| 995 | tCsrRoamProfile *pProfile; //may be NULL |
| 996 | tSirBssDescription *pBssDesc; //May be NULL |
| 997 | tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0 |
| 998 | tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0 |
| 999 | tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0 |
| 1000 | tANI_U32 nFrameLength; |
| 1001 | tANI_U8 frameType; |
| 1002 | tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order |
| 1003 | //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where |
| 1004 | //each frame starts and ends. |
| 1005 | tANI_BOOLEAN fReassocReq; //set to true if for re-association |
| 1006 | tANI_BOOLEAN fReassocRsp; //set to true if for re-association |
| 1007 | tCsrBssid bssid; |
| 1008 | //Only valid in IBSS |
| 1009 | //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED |
| 1010 | tCsrBssid peerMac; |
| 1011 | tSirResultCodes statusCode; |
| 1012 | tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec) |
| 1013 | tANI_U8 staId; // Peer stationId when connected |
| 1014 | /*The DPU signatures will be sent eventually to TL to help it determine the |
| 1015 | association to which a packet belongs to*/ |
| 1016 | /*Unicast DPU signature*/ |
| 1017 | tANI_U8 ucastSig; |
| 1018 | |
| 1019 | /*Broadcast DPU signature*/ |
| 1020 | tANI_U8 bcastSig; |
| 1021 | |
| 1022 | tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open) |
| 1023 | tANI_U8 sessionId; |
| 1024 | tANI_U8 rsnIELen; |
| 1025 | tANI_U8 *prsnIE; |
| 1026 | |
| 1027 | tANI_U8 addIELen; |
| 1028 | tANI_U8 *paddIE; |
| 1029 | |
| 1030 | union |
| 1031 | { |
| 1032 | tSirMicFailureInfo *pMICFailureInfo; |
| 1033 | tCsrRoamConnectedProfile *pConnectedProfile; |
| 1034 | #ifdef WLAN_SOFTAP_FEATURE |
| 1035 | tSirWPSPBCProbeReq *pWPSPBCProbeReq; |
| 1036 | #endif |
| 1037 | } u; |
| 1038 | |
| 1039 | #ifdef WLAN_SOFTAP_FEATURE |
| 1040 | tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA |
| 1041 | tANI_U32 dtimPeriod; |
| 1042 | #endif |
| 1043 | |
| 1044 | #ifdef FEATURE_WLAN_CCX |
| 1045 | tANI_BOOLEAN isCCXAssoc; |
| 1046 | #endif |
| 1047 | #ifdef WLAN_FEATURE_P2P |
| 1048 | void* pRemainCtx; |
| 1049 | tANI_U32 rxChan; |
| 1050 | #endif |
| 1051 | |
| 1052 | // Required for indicating the frames to upper layer |
| 1053 | tANI_U32 beaconLength; |
| 1054 | tANI_U8* beaconPtr; |
| 1055 | tANI_U32 assocReqLength; |
| 1056 | tANI_U8* assocReqPtr; |
| 1057 | }tCsrRoamInfo; |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | typedef struct tagCsrFreqScanInfo |
| 1064 | { |
| 1065 | tANI_U32 nStartFreq; //in unit of MHz |
| 1066 | tANI_U32 nEndFreq; //in unit of MHz |
| 1067 | tSirScanType scanType; |
| 1068 | }tCsrFreqScanInfo; |
| 1069 | |
| 1070 | |
| 1071 | #ifdef WLAN_SOFTAP_FEATURE |
| 1072 | typedef struct sSirSmeAssocIndToUpperLayerCnf |
| 1073 | { |
| 1074 | tANI_U16 messageType; // eWNI_SME_ASSOC_CNF |
| 1075 | tANI_U16 length; |
| 1076 | tANI_U8 sessionId; |
| 1077 | tSirResultCodes statusCode; |
| 1078 | tSirMacAddr bssId; // Self BSSID |
| 1079 | tSirMacAddr peerMacAddr; |
| 1080 | tANI_U16 aid; |
| 1081 | tSirMacAddr alternateBssId; |
| 1082 | tANI_U8 alternateChannelId; |
| 1083 | tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA |
| 1084 | tSirRSNie rsnIE; // RSN IE received from peer |
| 1085 | tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE |
| 1086 | tANI_U8 reassocReq; //set to true if reassoc |
| 1087 | } tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf; |
| 1088 | #endif |
| 1089 | |
| 1090 | typedef struct tagCsrSummaryStatsInfo |
| 1091 | { |
| 1092 | tANI_U32 retry_cnt[4]; |
| 1093 | tANI_U32 multiple_retry_cnt[4]; |
| 1094 | tANI_U32 tx_frm_cnt[4]; |
| 1095 | //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt |
| 1096 | //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt |
| 1097 | tANI_U32 rx_frm_cnt; |
| 1098 | tANI_U32 frm_dup_cnt; |
| 1099 | tANI_U32 fail_cnt[4]; |
| 1100 | tANI_U32 rts_fail_cnt; |
| 1101 | tANI_U32 ack_fail_cnt; |
| 1102 | tANI_U32 rts_succ_cnt; |
| 1103 | tANI_U32 rx_discard_cnt; |
| 1104 | tANI_U32 rx_error_cnt; |
| 1105 | tANI_U32 tx_byte_cnt; |
| 1106 | |
| 1107 | }tCsrSummaryStatsInfo; |
| 1108 | |
| 1109 | typedef struct tagCsrGlobalClassAStatsInfo |
| 1110 | { |
| 1111 | tANI_U32 rx_frag_cnt; |
| 1112 | tANI_U32 promiscuous_rx_frag_cnt; |
| 1113 | //tANI_U32 rx_fcs_err; |
| 1114 | tANI_U32 rx_input_sensitivity; |
| 1115 | tANI_U32 max_pwr; |
| 1116 | //tANI_U32 default_pwr; |
| 1117 | tANI_U32 sync_fail_cnt; |
| 1118 | tANI_U32 tx_rate; |
| 1119 | //mcs index for HT20 and HT40 rates |
| 1120 | tANI_U32 mcs_index; |
| 1121 | //to defferentiate between HT20 and HT40 rates;short and long guard interval |
| 1122 | tANI_U32 tx_rate_flags; |
| 1123 | |
| 1124 | }tCsrGlobalClassAStatsInfo; |
| 1125 | |
| 1126 | typedef struct tagCsrGlobalClassBStatsInfo |
| 1127 | { |
| 1128 | tANI_U32 uc_rx_wep_unencrypted_frm_cnt; |
| 1129 | tANI_U32 uc_rx_mic_fail_cnt; |
| 1130 | tANI_U32 uc_tkip_icv_err; |
| 1131 | tANI_U32 uc_aes_ccmp_format_err; |
| 1132 | tANI_U32 uc_aes_ccmp_replay_cnt; |
| 1133 | tANI_U32 uc_aes_ccmp_decrpt_err; |
| 1134 | tANI_U32 uc_wep_undecryptable_cnt; |
| 1135 | tANI_U32 uc_wep_icv_err; |
| 1136 | tANI_U32 uc_rx_decrypt_succ_cnt; |
| 1137 | tANI_U32 uc_rx_decrypt_fail_cnt; |
| 1138 | tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt; |
| 1139 | tANI_U32 mcbc_rx_mic_fail_cnt; |
| 1140 | tANI_U32 mcbc_tkip_icv_err; |
| 1141 | tANI_U32 mcbc_aes_ccmp_format_err; |
| 1142 | tANI_U32 mcbc_aes_ccmp_replay_cnt; |
| 1143 | tANI_U32 mcbc_aes_ccmp_decrpt_err; |
| 1144 | tANI_U32 mcbc_wep_undecryptable_cnt; |
| 1145 | tANI_U32 mcbc_wep_icv_err; |
| 1146 | tANI_U32 mcbc_rx_decrypt_succ_cnt; |
| 1147 | tANI_U32 mcbc_rx_decrypt_fail_cnt; |
| 1148 | |
| 1149 | }tCsrGlobalClassBStatsInfo; |
| 1150 | |
| 1151 | typedef struct tagCsrGlobalClassCStatsInfo |
| 1152 | { |
| 1153 | tANI_U32 rx_amsdu_cnt; |
| 1154 | tANI_U32 rx_ampdu_cnt; |
| 1155 | tANI_U32 tx_20_frm_cnt; |
| 1156 | tANI_U32 rx_20_frm_cnt; |
| 1157 | tANI_U32 rx_mpdu_in_ampdu_cnt; |
| 1158 | tANI_U32 ampdu_delimiter_crc_err; |
| 1159 | |
| 1160 | }tCsrGlobalClassCStatsInfo; |
| 1161 | |
| 1162 | typedef struct tagCsrGlobalClassDStatsInfo |
| 1163 | { |
| 1164 | tANI_U32 tx_uc_frm_cnt; |
| 1165 | tANI_U32 tx_mc_frm_cnt; |
| 1166 | tANI_U32 tx_bc_frm_cnt; |
| 1167 | tANI_U32 rx_uc_frm_cnt; |
| 1168 | tANI_U32 rx_mc_frm_cnt; |
| 1169 | tANI_U32 rx_bc_frm_cnt; |
| 1170 | tANI_U32 tx_uc_byte_cnt[4]; |
| 1171 | tANI_U32 tx_mc_byte_cnt; |
| 1172 | tANI_U32 tx_bc_byte_cnt; |
| 1173 | tANI_U32 rx_uc_byte_cnt[4]; |
| 1174 | tANI_U32 rx_mc_byte_cnt; |
| 1175 | tANI_U32 rx_bc_byte_cnt; |
| 1176 | tANI_U32 rx_byte_cnt; |
| 1177 | tANI_U32 num_rx_bytes_crc_ok; |
| 1178 | tANI_U32 rx_rate; |
| 1179 | |
| 1180 | }tCsrGlobalClassDStatsInfo; |
| 1181 | |
| 1182 | typedef struct tagCsrPerStaStatsInfo |
| 1183 | { |
| 1184 | tANI_U32 tx_frag_cnt[4]; |
| 1185 | tANI_U32 tx_ampdu_cnt; |
| 1186 | tANI_U32 tx_mpdu_in_ampdu_cnt; |
| 1187 | } tCsrPerStaStatsInfo; |
| 1188 | |
| 1189 | typedef struct tagCsrRoamSetKey |
| 1190 | { |
| 1191 | eCsrEncryptionType encType; |
| 1192 | tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx |
| 1193 | tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key |
| 1194 | tANI_U8 paeRole; //0 for supplicant |
| 1195 | tANI_U8 keyId; // Kye index |
| 1196 | tANI_U16 keyLength; //Number of bytes containing the key in pKey |
| 1197 | tANI_U8 Key[CSR_MAX_KEY_LEN]; |
| 1198 | tANI_U8 keyRsc[CSR_MAX_RSC_LEN]; |
| 1199 | } tCsrRoamSetKey; |
| 1200 | |
| 1201 | typedef struct tagCsrRoamRemoveKey |
| 1202 | { |
| 1203 | eCsrEncryptionType encType; |
| 1204 | tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key |
| 1205 | tANI_U8 keyId; //key index |
| 1206 | } tCsrRoamRemoveKey; |
| 1207 | |
| 1208 | |
| 1209 | typedef void * tScanResultHandle; |
| 1210 | |
| 1211 | #define CSR_INVALID_SCANRESULT_HANDLE (NULL) |
| 1212 | |
| 1213 | |
| 1214 | |
| 1215 | ////////////////////////////////////////////Common SCAN starts |
| 1216 | |
| 1217 | //void *p2 -- the second context pass in for the caller |
| 1218 | //***what if callback is called before requester gets the scanId?? |
| 1219 | typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status); |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | ///////////////////////////////////////////Common Roam starts |
| 1224 | |
| 1225 | //pContext is the pContext passed in with the roam request |
| 1226 | //pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and |
| 1227 | // eRoamCmdResult for detail valid members. It may be NULL |
| 1228 | //roamId is to identify the callback related roam request. 0 means unsolicit |
| 1229 | //roamStatus is a flag indicating the status of the callback |
| 1230 | //roamResult is the result |
| 1231 | typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId, |
| 1232 | eRoamCmdStatus roamStatus, eCsrRoamResult roamResult); |
| 1233 | |
| 1234 | typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext); |
| 1235 | |
| 1236 | /* --------------------------------------------------------------------------- |
| 1237 | \fn csrRoamGetNumPMKIDCache |
| 1238 | \brief return number of PMKID cache entries |
| 1239 | \return tANI_U32 - the number of PMKID cache entries |
| 1240 | -------------------------------------------------------------------------------*/ |
| 1241 | //tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal); |
| 1242 | |
| 1243 | /* --------------------------------------------------------------------------- |
| 1244 | \fn csrRoamGetPMKIDCache |
| 1245 | \brief return PMKID cache from CSR |
| 1246 | \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the |
| 1247 | needed or actually number in tPmkidCacheInfo. |
| 1248 | \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return |
| 1249 | \return eHalStatus - when fail, it usually means the buffer allocated is not big enough |
| 1250 | -------------------------------------------------------------------------------*/ |
| 1251 | //eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache); |
| 1252 | |
| 1253 | //pProfile - pointer to tCsrRoamProfile |
| 1254 | #define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType) |
| 1255 | #define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType) |
| 1256 | #define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) ) |
| 1257 | #define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType) |
| 1258 | #define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType) |
| 1259 | #define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType ) |
| 1260 | #define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType ) |
| 1261 | #define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) ) |
| 1262 | #ifdef WLAN_SOFTAP_FEATURE |
| 1263 | #define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType ) |
| 1264 | #endif |
| 1265 | |
| 1266 | //pProfile - pointer to tCsrRoamConnectedProfile |
| 1267 | #ifdef WLAN_SOFTAP_FEATURE |
| 1268 | #define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType ) |
| 1269 | #endif |
| 1270 | #define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType ) |
| 1271 | #define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType ) |
| 1272 | #define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) ) |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | ///////////////////////////////////////////Common Roam ends |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | #ifdef WLAN_SOFTAP_FEATURE |
| 1281 | /* --------------------------------------------------------------------------- |
| 1282 | \fn csrSetChannels |
| 1283 | \brief HDD calls this function to change some global settings. |
| 1284 | caller must set the all fields or call csrGetConfigParam to prefill the fields. |
| 1285 | \param pParam - caller allocated memory |
| 1286 | \return eHalStatus |
| 1287 | -------------------------------------------------------------------------------*/ |
| 1288 | |
| 1289 | eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam ); |
| 1290 | |
| 1291 | eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode); |
| 1292 | #endif |
| 1293 | |
| 1294 | |
| 1295 | //enum to string conversion for debug output |
| 1296 | const char * get_eRoamCmdStatus_str(eRoamCmdStatus val); |
| 1297 | const char * get_eCsrRoamResult_str(eCsrRoamResult val); |
| 1298 | /* --------------------------------------------------------------------------- |
| 1299 | \fn csrSetPhyMode |
| 1300 | \brief HDD calls this function to set the phyMode. |
| 1301 | This function must be called after CFG is downloaded and all the band/mode setting already passed into |
| 1302 | CSR. |
| 1303 | \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set. |
| 1304 | See eCsrPhyMode for definition |
| 1305 | \param eBand - specify the operational band (2.4, 5 or both) |
| 1306 | \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether |
| 1307 | a restart is needed to apply the change |
| 1308 | \return eHalStatus |
| 1309 | -------------------------------------------------------------------------------*/ |
| 1310 | eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded); |
| 1311 | |
| 1312 | void csrDumpInit(tHalHandle hHal); |
| 1313 | |
| 1314 | |
| 1315 | /*--------------------------------------------------------------------------- |
| 1316 | This is the type for a link quality callback to be registered with SME |
| 1317 | for indications |
| 1318 | Once the link quality has been indicated, subsequently, link indications are |
| 1319 | posted each time there is a CHANGE in link quality. |
| 1320 | *** If there is no change in link, there will be no indication *** |
| 1321 | |
| 1322 | The indications may be based on one or more criteria internal to SME |
| 1323 | such as RSSI and PER. |
| 1324 | |
| 1325 | \param ind - Indication being posted |
| 1326 | \param pContext - any user data given at callback registration. |
| 1327 | \return None |
| 1328 | |
| 1329 | ---------------------------------------------------------------------------*/ |
| 1330 | typedef void (* csrRoamLinkQualityIndCallback) |
| 1331 | (eCsrRoamLinkQualityInd ind, void *pContext); |
| 1332 | |
| 1333 | |
| 1334 | /*--------------------------------------------------------------------------- |
| 1335 | This is the type for a statistics callback to be registered with SME |
| 1336 | for stats reporting |
| 1337 | |
| 1338 | Since the client requesting for the stats already know which class/type of |
| 1339 | stats it asked for, the callback will carry them in the rsp buffer |
| 1340 | (void * stats) whose size will be same as the size of requested stats & |
| 1341 | will be exactly in the same order requested in the stats mask from LSB to MSB |
| 1342 | |
| 1343 | \param stats - stats rsp buffer sent back with the report |
| 1344 | \param pContext - any user data given at callback registration. |
| 1345 | \return None |
| 1346 | |
| 1347 | ---------------------------------------------------------------------------*/ |
| 1348 | typedef void ( *tCsrStatsCallback) (void * stats, void *pContext); |
| 1349 | |
| 1350 | /*--------------------------------------------------------------------------- |
| 1351 | This is the type for a rssi callback to be registered with SME |
| 1352 | for getting rssi |
| 1353 | |
| 1354 | \param rssi - rssi |
| 1355 | \param pContext - any user data given at callback registration. |
| 1356 | \return None |
| 1357 | |
| 1358 | ---------------------------------------------------------------------------*/ |
| 1359 | |
| 1360 | typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext); |
| 1361 | |
| 1362 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1363 | eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription); |
| 1364 | #endif |
| 1365 | |
| 1366 | /*--------------------------------------------------------------------------- |
| 1367 | This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ) |
| 1368 | |
| 1369 | \param hHal - handle to Hal context |
| 1370 | \param eBand - band value |
| 1371 | \return eHalStatus |
| 1372 | |
| 1373 | ---------------------------------------------------------------------------*/ |
| 1374 | eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand); |
| 1375 | |
| 1376 | /*--------------------------------------------------------------------------- |
| 1377 | This is the function to get the current operating band value |
| 1378 | \param hHal - handl to Hal context |
| 1379 | \return eCsrband - band value |
| 1380 | |
| 1381 | ---------------------------------------------------------------------------*/ |
| 1382 | eCsrBand csrGetCurrentBand (tHalHandle hHal); |
| 1383 | |
| 1384 | #endif |
| 1385 | |