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, |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 413 | #ifdef FEATURE_WLAN_LFR |
| 414 | eCSR_ROAM_PMK_NOTIFY, |
| 415 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 416 | }eRoamCmdStatus; |
| 417 | |
| 418 | |
| 419 | //comment inside indicates what roaming callback gets |
| 420 | typedef enum |
| 421 | { |
| 422 | eCSR_ROAM_RESULT_NONE, |
| 423 | //this means no more action in CSR |
| 424 | //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back |
| 425 | eCSR_ROAM_RESULT_FAILURE, |
| 426 | //Pass back pointer to tCsrRoamInfo |
| 427 | eCSR_ROAM_RESULT_ASSOCIATED, |
| 428 | eCSR_ROAM_RESULT_NOT_ASSOCIATED, |
| 429 | eCSR_ROAM_RESULT_MIC_FAILURE, |
| 430 | eCSR_ROAM_RESULT_FORCED, |
| 431 | eCSR_ROAM_RESULT_DISASSOC_IND, |
| 432 | eCSR_ROAM_RESULT_DEAUTH_IND, |
| 433 | eCSR_ROAM_RESULT_CAP_CHANGED, |
| 434 | //This means we starts an IBSS |
| 435 | //tCsrRoamInfo's pBssDesc may pass back |
| 436 | eCSR_ROAM_RESULT_IBSS_STARTED, |
| 437 | //START_BSS failed |
| 438 | //tCsrRoamInfo's pBssDesc may pass back |
| 439 | eCSR_ROAM_RESULT_IBSS_START_FAILED, |
| 440 | eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS, |
| 441 | eCSR_ROAM_RESULT_IBSS_JOIN_FAILED, |
| 442 | eCSR_ROAM_RESULT_IBSS_CONNECT, |
| 443 | eCSR_ROAM_RESULT_IBSS_INACTIVE, |
| 444 | //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION |
| 445 | //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid |
| 446 | //If roamStatus is eCSR_ROAM_IBSS_IND, |
| 447 | //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames |
| 448 | eCSR_ROAM_RESULT_IBSS_NEW_PEER, |
| 449 | //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd |
| 450 | eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED, |
| 451 | //Coalescing in the IBSS network (joined an IBSS network) |
| 452 | //Callback pass a BSSID in peerMacOrBssid |
| 453 | eCSR_ROAM_RESULT_IBSS_COALESCED, |
| 454 | //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect. |
| 455 | eCSR_ROAM_RESULT_IBSS_STOP, |
| 456 | eCSR_ROAM_RESULT_LOSTLINK, |
| 457 | eCSR_ROAM_RESULT_MIC_ERROR_UNICAST, |
| 458 | eCSR_ROAM_RESULT_MIC_ERROR_GROUP, |
| 459 | eCSR_ROAM_RESULT_AUTHENTICATED, |
| 460 | eCSR_ROAM_RESULT_NEW_RSN_BSS, |
| 461 | #ifdef FEATURE_WLAN_WAPI |
| 462 | eCSR_ROAM_RESULT_NEW_WAPI_BSS, |
| 463 | #endif /* FEATURE_WLAN_WAPI */ |
| 464 | // WDS started successfully |
| 465 | eCSR_ROAM_RESULT_WDS_STARTED, |
| 466 | // WDS start failed |
| 467 | eCSR_ROAM_RESULT_WDS_START_FAILED, |
| 468 | // WDS stopped |
| 469 | eCSR_ROAM_RESULT_WDS_STOPPED, |
| 470 | // WDS joined successfully in STA mode |
| 471 | eCSR_ROAM_RESULT_WDS_ASSOCIATED, |
| 472 | // A station joined WDS AP |
| 473 | eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND, |
| 474 | // WDS join failed in STA mode |
| 475 | eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED, |
| 476 | // WDS disassociated |
| 477 | eCSR_ROAM_RESULT_WDS_DISASSOCIATED, |
| 478 | #ifdef WLAN_SOFTAP_FEATURE |
| 479 | // INFRA started successfully |
| 480 | eCSR_ROAM_RESULT_INFRA_STARTED, |
| 481 | // INFRA start failed |
| 482 | eCSR_ROAM_RESULT_INFRA_START_FAILED, |
| 483 | // INFRA stopped |
| 484 | eCSR_ROAM_RESULT_INFRA_STOPPED, |
| 485 | // A station joining INFRA AP |
| 486 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND, |
| 487 | // A station joined INFRA AP |
| 488 | eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF, |
| 489 | // INFRA disassociated |
| 490 | eCSR_ROAM_RESULT_INFRA_DISASSOCIATED, |
| 491 | eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND, |
| 492 | #endif |
| 493 | #ifdef WLAN_FEATURE_P2P |
| 494 | eCSR_ROAM_RESULT_SEND_ACTION_FAIL, |
| 495 | #endif |
| 496 | // peer rejected assoc because max assoc limit reached. callback gets pointer to peer |
| 497 | eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED, |
| 498 | }eCsrRoamResult; |
| 499 | |
| 500 | |
| 501 | |
| 502 | /*---------------------------------------------------------------------------- |
| 503 | List of link quality indications HDD can receive from SME |
| 504 | -----------------------------------------------------------------------------*/ |
| 505 | typedef enum |
| 506 | { |
| 507 | eCSR_ROAM_LINK_QUAL_MIN_IND = -1, |
| 508 | |
| 509 | eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */ |
| 510 | eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */ |
| 511 | eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */ |
| 512 | eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */ |
| 513 | |
| 514 | eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */ |
| 515 | |
| 516 | } eCsrRoamLinkQualityInd; |
| 517 | |
| 518 | typedef enum |
| 519 | { |
| 520 | eCSR_DISCONNECT_REASON_UNSPECIFIED = 0, |
| 521 | eCSR_DISCONNECT_REASON_MIC_ERROR, |
| 522 | eCSR_DISCONNECT_REASON_DISASSOC, |
| 523 | eCSR_DISCONNECT_REASON_DEAUTH, |
| 524 | eCSR_DISCONNECT_REASON_HANDOFF, |
| 525 | eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE, |
| 526 | eCSR_DISCONNECT_REASON_IBSS_LEAVE, |
| 527 | }eCsrRoamDisconnectReason; |
| 528 | |
| 529 | typedef enum |
| 530 | { |
| 531 | // Not associated in Infra or participating in an IBSS / Ad-hoc network. |
| 532 | eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED, |
| 533 | // Associated in an Infrastructure network. |
| 534 | eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED, |
| 535 | // Participating in an IBSS network though disconnected (no partner stations |
| 536 | // in the IBSS). |
| 537 | eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED, |
| 538 | // Participating in an IBSS network with partner stations also present |
| 539 | eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED, |
| 540 | // Participating in a WDS network in AP or STA mode but not connected yet |
| 541 | eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED, |
| 542 | // Participating in a WDS network and connected peer to peer |
| 543 | eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED, |
| 544 | #ifdef WLAN_SOFTAP_FEATURE |
| 545 | // Participating in a Infra network in AP not yet in connected state |
| 546 | eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED, |
| 547 | // Participating in a Infra network and connected to a peer |
| 548 | eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED, |
| 549 | #endif |
| 550 | |
| 551 | }eCsrConnectState; |
| 552 | |
| 553 | |
| 554 | // This parameter is no longer supported in the Profile. Need to set this in the global properties |
| 555 | // for the adapter. |
| 556 | typedef enum eCSR_MEDIUM_ACCESS |
| 557 | { |
| 558 | eCSR_MEDIUM_ACCESS_AUTO = 0, |
| 559 | eCSR_MEDIUM_ACCESS_DCF, |
| 560 | eCSR_MEDIUM_ACCESS_eDCF, |
| 561 | eCSR_MEDIUM_ACCESS_HCF, |
| 562 | |
| 563 | eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p, |
| 564 | eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP, |
| 565 | eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify, |
| 566 | eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF, |
| 567 | eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF, |
| 568 | }eCsrMediaAccessType; |
| 569 | |
| 570 | typedef enum |
| 571 | { |
| 572 | eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate. |
| 573 | |
| 574 | eCSR_TX_RATE_1Mbps = 0x00000001, |
| 575 | eCSR_TX_RATE_2Mbps = 0x00000002, |
| 576 | eCSR_TX_RATE_5_5Mbps = 0x00000004, |
| 577 | eCSR_TX_RATE_6Mbps = 0x00000008, |
| 578 | eCSR_TX_RATE_9Mbps = 0x00000010, |
| 579 | eCSR_TX_RATE_11Mbps = 0x00000020, |
| 580 | eCSR_TX_RATE_12Mbps = 0x00000040, |
| 581 | eCSR_TX_RATE_18Mbps = 0x00000080, |
| 582 | eCSR_TX_RATE_24Mbps = 0x00000100, |
| 583 | eCSR_TX_RATE_36Mbps = 0x00000200, |
| 584 | eCSR_TX_RATE_42Mbps = 0x00000400, |
| 585 | eCSR_TX_RATE_48Mbps = 0x00000800, |
| 586 | eCSR_TX_RATE_54Mbps = 0x00001000, |
| 587 | eCSR_TX_RATE_72Mbps = 0x00002000, |
| 588 | eCSR_TX_RATE_84Mbps = 0x00004000, |
| 589 | eCSR_TX_RATE_96Mbps = 0x00008000, |
| 590 | eCSR_TX_RATE_108Mbps = 0x00010000, |
| 591 | eCSR_TX_RATE_126Mbps = 0x00020000, |
| 592 | eCSR_TX_RATE_144Mbps = 0x00040000, |
| 593 | eCSR_TX_RATE_168Mbps = 0x00080000, |
| 594 | eCSR_TX_RATE_192Mbps = 0x00100000, |
| 595 | eCSR_TX_RATE_216Mbps = 0x00200000, |
| 596 | eCSR_TX_RATE_240Mbps = 0x00400000, |
| 597 | |
| 598 | }eCsrExposedTxRate; |
| 599 | |
| 600 | typedef enum |
| 601 | { |
| 602 | eCSR_OPERATING_CHANNEL_ALL = 0, |
| 603 | eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL, |
| 604 | eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL, |
| 605 | }eOperationChannel; |
| 606 | |
| 607 | typedef enum |
| 608 | { |
| 609 | eCSR_DOT11_FRAG_THRESH_AUTO = -1, |
| 610 | eCSR_DOT11_FRAG_THRESH_MIN = 256, |
| 611 | eCSR_DOT11_FRAG_THRESH_MAX = 2346, |
| 612 | eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000 |
| 613 | }eCsrDot11FragThresh; |
| 614 | |
| 615 | |
| 616 | //for channel bonding for ibss |
| 617 | typedef enum |
| 618 | { |
| 619 | eCSR_CB_OFF = 0, |
| 620 | eCSR_CB_AUTO = 1, |
| 621 | eCSR_CB_DOWN = 2, |
| 622 | eCSR_CB_UP = 3, |
| 623 | }eCsrCBChoice; |
| 624 | |
| 625 | //For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode. |
| 626 | #define CSR_CB_CHANNEL_GAP 4 |
| 627 | #define CSR_CB_CENTER_CHANNEL_OFFSET 2 |
| 628 | #define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END ) |
| 629 | |
| 630 | // WEP keysize (in bits)... |
| 631 | typedef enum |
| 632 | { |
| 633 | eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP |
| 634 | eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP |
| 635 | |
| 636 | eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40, |
| 637 | eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104, |
| 638 | eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ), |
| 639 | }eCsrWEPKeySize; |
| 640 | |
| 641 | |
| 642 | // Possible values for the WEP static key ID... |
| 643 | typedef enum |
| 644 | { |
| 645 | |
| 646 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0, |
| 647 | eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3, |
| 648 | eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0, |
| 649 | |
| 650 | eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1, |
| 651 | |
| 652 | }eCsrWEPStaticKeyID; |
| 653 | |
| 654 | #define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 1) |
| 655 | |
| 656 | typedef enum |
| 657 | { |
| 658 | eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE, |
| 659 | eCSR_SECURITY_SET_KEY_ACTION_SET_KEY, |
| 660 | eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY, |
| 661 | }eCsrSetKeyAction; |
| 662 | |
| 663 | typedef enum |
| 664 | { |
| 665 | eCSR_BAND_ALL, |
| 666 | eCSR_BAND_24, |
| 667 | eCSR_BAND_5G, |
| 668 | eCSR_BAND_MAX, |
| 669 | }eCsrBand; |
| 670 | |
| 671 | |
| 672 | typedef enum |
| 673 | { |
| 674 | // Roaming because HDD requested for reassoc by changing one of the fields in |
| 675 | // tCsrRoamModifyProfileFields. OR |
| 676 | // Roaming because SME requested for reassoc by changing one of the fields in |
| 677 | // tCsrRoamModifyProfileFields. |
| 678 | eCsrRoamReasonStaCapabilityChanged, |
| 679 | // Roaming because SME requested for reassoc to a different AP, as part of |
| 680 | // inter AP handoff. |
| 681 | eCsrRoamReasonBetterAP, |
| 682 | // Roaming because SME requested it as the link is lost - placeholder, will |
| 683 | // clean it up once handoff code gets in |
| 684 | eCsrRoamReasonSmeIssuedForLostLink, |
| 685 | |
| 686 | }eCsrRoamReasonCodes; |
| 687 | |
| 688 | typedef enum |
| 689 | { |
| 690 | eCsrRoamWmmAuto = 0, |
| 691 | eCsrRoamWmmQbssOnly = 1, |
| 692 | eCsrRoamWmmNoQos = 2, |
| 693 | |
| 694 | } eCsrRoamWmmUserModeType; |
| 695 | |
| 696 | typedef enum |
| 697 | { |
| 698 | eCSR_REQUESTER_MIN = 0, |
| 699 | eCSR_DIAG, |
| 700 | eCSR_UMA_GAN, |
| 701 | eCSR_HDD |
| 702 | } eCsrStatsRequesterType; |
| 703 | |
| 704 | typedef struct tagPmkidCandidateInfo |
| 705 | { |
| 706 | tCsrBssid BSSID; |
| 707 | tANI_BOOLEAN preAuthSupported; |
| 708 | }tPmkidCandidateInfo; |
| 709 | |
| 710 | typedef struct tagPmkidCacheInfo |
| 711 | { |
| 712 | tCsrBssid BSSID; |
| 713 | tANI_U8 PMKID[CSR_RSN_PMKID_SIZE]; |
| 714 | }tPmkidCacheInfo; |
| 715 | |
| 716 | #ifdef FEATURE_WLAN_WAPI |
| 717 | typedef struct tagBkidCandidateInfo |
| 718 | { |
| 719 | tCsrBssid BSSID; |
| 720 | tANI_BOOLEAN preAuthSupported; |
| 721 | }tBkidCandidateInfo; |
| 722 | |
| 723 | typedef struct tagBkidCacheInfo |
| 724 | { |
| 725 | tCsrBssid BSSID; |
| 726 | tANI_U8 BKID[CSR_WAPI_BKID_SIZE]; |
| 727 | }tBkidCacheInfo; |
| 728 | #endif /* FEATURE_WLAN_WAPI */ |
| 729 | |
| 730 | typedef struct tagCsrKeys |
| 731 | { |
| 732 | tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set |
| 733 | tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ]; |
| 734 | tANI_U8 defaultIndex; |
| 735 | }tCsrKeys; |
| 736 | |
| 737 | /* Following are fields which are part of tCsrRoamConnectedProfile might need |
| 738 | modification dynamically once STA is up & running and this could trigger |
| 739 | reassoc */ |
| 740 | typedef struct tagCsrRoamModifyProfileFields |
| 741 | { |
| 742 | // during connect this specifies ACs U-APSD is to be setup |
| 743 | // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 744 | // During assoc response this COULD carry confirmation of what ACs U-APSD |
| 745 | // got setup for. Later if an APP looking for APSD, SME-QoS might need to |
| 746 | // modify this field |
| 747 | tANI_U8 uapsd_mask; |
| 748 | // HDD might ask to modify this field |
| 749 | tANI_U16 listen_interval; |
| 750 | }tCsrRoamModifyProfileFields; |
| 751 | |
| 752 | typedef struct tagCsrRoamProfile |
| 753 | { |
| 754 | //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs. |
| 755 | //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP |
| 756 | //that we need to join. Index 1 is the SSID for self BSS. |
| 757 | tCsrSSIDs SSIDs; |
| 758 | tCsrBSSIDs BSSIDs; |
| 759 | tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode |
| 760 | eCsrRoamBssType BSSType; |
| 761 | |
| 762 | tCsrAuthList AuthType; |
| 763 | eCsrAuthType negotiatedAuthType; |
| 764 | |
| 765 | tCsrEncryptionList EncryptionType; |
| 766 | //This field is for output only, not for input |
| 767 | eCsrEncryptionType negotiatedUCEncryptionType; |
| 768 | |
| 769 | //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case, |
| 770 | //put all supported encryption types in here |
| 771 | tCsrEncryptionList mcEncryptionType; |
| 772 | //This field is for output only, not for input |
| 773 | eCsrEncryptionType negotiatedMCEncryptionType; |
| 774 | |
| 775 | tCsrKeys Keys; |
| 776 | eCsrCBChoice CBMode; //up, down or auto |
| 777 | tCsrChannelInfo ChannelInfo; |
| 778 | tANI_U8 operationChannel; |
| 779 | tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller. |
| 780 | // during connect this specifies ACs U-APSD is to be setup |
| 781 | // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored). |
| 782 | // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for |
| 783 | tANI_U8 uapsd_mask; |
| 784 | tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE |
| 785 | tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA |
| 786 | tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE |
| 787 | tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN |
| 788 | #ifdef FEATURE_WLAN_WAPI |
| 789 | tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE |
| 790 | tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI |
| 791 | #endif /* FEATURE_WLAN_WAPI */ |
| 792 | |
| 793 | tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join) |
| 794 | tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE |
| 795 | tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc |
| 796 | tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE |
| 797 | |
| 798 | tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0. |
| 799 | /*WPS Association if true => auth and ecryption should be ignored*/ |
| 800 | tANI_BOOLEAN bWPSAssociation; |
| 801 | tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE |
| 802 | tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC |
| 803 | |
| 804 | #ifdef WLAN_SOFTAP_FEATURE |
| 805 | tANI_U8 ieee80211d; |
| 806 | tANI_U8 privacy; |
| 807 | tANI_BOOLEAN fwdWPSPBCProbeReq; |
| 808 | tAniAuthType csr80211AuthType; |
| 809 | tANI_U32 dtimPeriod; |
| 810 | tANI_BOOLEAN ApUapsdEnable; |
| 811 | tANI_BOOLEAN protEnabled; |
| 812 | tANI_BOOLEAN obssProtEnabled; |
| 813 | tANI_U16 cfg_protection; |
| 814 | tANI_U8 wps_state; |
| 815 | #endif |
| 816 | |
| 817 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 818 | tCsrMobilityDomainInfo MDID; |
| 819 | #endif |
| 820 | tVOS_CON_MODE csrPersona; |
| 821 | |
| 822 | }tCsrRoamProfile; |
| 823 | |
| 824 | |
| 825 | typedef struct tagCsrRoamConnectedProfile |
| 826 | { |
| 827 | tSirMacSSid SSID; |
| 828 | tANI_BOOLEAN handoffPermitted; |
| 829 | tANI_BOOLEAN ssidHidden; |
| 830 | tCsrBssid bssid; |
| 831 | eCsrRoamBssType BSSType; |
| 832 | eCsrAuthType AuthType; |
| 833 | tCsrAuthList AuthInfo; |
| 834 | eCsrEncryptionType EncryptionType; |
| 835 | tCsrEncryptionList EncryptionInfo; |
| 836 | eCsrEncryptionType mcEncryptionType; |
| 837 | tCsrEncryptionList mcEncryptionInfo; |
| 838 | eCsrCBChoice CBMode; //up, down or auto |
| 839 | tANI_U8 operationChannel; |
| 840 | tCsrKeys Keys; |
| 841 | // meaningless on connect. It's an OUT param from CSR's point of view |
| 842 | // During assoc response carries the ACM bit-mask i.e. what |
| 843 | // ACs have ACM=1 (if any), |
| 844 | // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored) |
| 845 | tANI_U8 acm_mask; |
| 846 | tCsrRoamModifyProfileFields modifyProfileFields; |
| 847 | tSirBssDescription *pBssDesc; |
| 848 | tANI_BOOLEAN qap; //AP supports QoS |
| 849 | tANI_BOOLEAN qosConnection; //A connection is QoS enabled |
| 850 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 851 | tCsrMobilityDomainInfo MDID; |
| 852 | #endif |
| 853 | |
| 854 | #ifdef FEATURE_WLAN_CCX |
| 855 | tCsrCcxCckmInfo ccxCckmInfo; |
| 856 | tANI_BOOLEAN isCCXAssoc; |
| 857 | #endif |
| 858 | }tCsrRoamConnectedProfile; |
| 859 | |
| 860 | |
| 861 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 862 | typedef struct tagCsr11rConfigParams |
| 863 | { |
| 864 | tANI_BOOLEAN IsFTResourceReqSupported; |
| 865 | } tCsr11rConfigParams; |
| 866 | #endif |
| 867 | |
| 868 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 869 | typedef struct tagCsrNeighborRoamConfigParams |
| 870 | { |
| 871 | |
| 872 | tANI_U32 nNeighborScanTimerPeriod; |
| 873 | tANI_U8 nNeighborLookupRssiThreshold; |
| 874 | tANI_U8 nNeighborReassocRssiThreshold; |
| 875 | tANI_U16 nNeighborScanMinChanTime; |
| 876 | tANI_U16 nNeighborScanMaxChanTime; |
| 877 | sCsrChannel neighborScanChanList; |
| 878 | tANI_U8 nMaxNeighborRetries; |
| 879 | tANI_U16 nNeighborResultsRefreshPeriod; |
| 880 | }tCsrNeighborRoamConfigParams; |
| 881 | #endif |
| 882 | |
| 883 | typedef struct tagCsrConfigParam |
| 884 | { |
| 885 | tANI_U32 FragmentationThreshold; |
| 886 | tANI_U32 channelBondingMode24GHz; |
| 887 | tANI_U32 channelBondingMode5GHz; |
| 888 | eCsrPhyMode phyMode; |
| 889 | eCsrBand eBand; |
| 890 | tANI_U32 RTSThreshold; |
| 891 | tANI_U32 HeartbeatThresh50; |
| 892 | tANI_U32 HeartbeatThresh24; |
| 893 | eCsrCBChoice cbChoice; |
| 894 | eCsrBand bandCapability; //indicate hw capability |
| 895 | tANI_U32 bgScanInterval; |
| 896 | tANI_U16 TxRate; |
| 897 | eCsrRoamWmmUserModeType WMMSupportMode; |
| 898 | tANI_BOOLEAN Is11eSupportEnabled; |
| 899 | tANI_BOOLEAN Is11dSupportEnabled; |
| 900 | tANI_BOOLEAN Is11dSupportEnabledOriginal; |
| 901 | tANI_BOOLEAN Is11hSupportEnabled; |
| 902 | tANI_BOOLEAN shortSlotTime; |
| 903 | tANI_BOOLEAN ProprietaryRatesEnabled; |
| 904 | tANI_U8 AdHocChannel24; |
| 905 | tANI_U8 AdHocChannel5G; |
| 906 | tANI_U32 impsSleepTime; //in units of seconds |
| 907 | tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed |
| 908 | tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds |
| 909 | tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds |
| 910 | tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds, |
| 911 | tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds |
| 912 | tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming |
| 913 | tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category |
| 914 | tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode |
| 915 | |
| 916 | tCsr11dinfo Csr11dinfo; |
| 917 | //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional |
| 918 | //channels are limited to the default channel list. It is an "AND" operation between the |
| 919 | //default channels and the channels in the 802.11d IE. |
| 920 | tANI_BOOLEAN fEnforce11dChannels; |
| 921 | //Country Code Priority |
| 922 | //0 = 802.11D > Country IOCTL > NV |
| 923 | //1 = Country IOCTL > 802.11D > NV |
| 924 | tANI_BOOLEAN fSupplicantCountryCodeHasPriority; |
| 925 | //When true, AP with unknown country code won't be see. |
| 926 | //"Unknown country code" means either Ap doesn't have 11d IE or we cannot |
| 927 | //find a domain for the country code in its 11d IE. |
| 928 | tANI_BOOLEAN fEnforceCountryCodeMatch; |
| 929 | //When true, only APs in the default domain can be seen. If the Ap has "unknown country |
| 930 | //code", or the domain of the country code doesn't match the default domain, the Ap is |
| 931 | //not acceptable. |
| 932 | tANI_BOOLEAN fEnforceDefaultDomain; |
| 933 | |
| 934 | tANI_U16 vccRssiThreshold; |
| 935 | tANI_U32 vccUlMacLossThreshold; |
| 936 | |
| 937 | tANI_U32 nPassiveMinChnTime; //in units of milliseconds |
| 938 | tANI_U32 nPassiveMaxChnTime; //in units of milliseconds |
| 939 | tANI_U32 nActiveMinChnTime; //in units of milliseconds |
| 940 | tANI_U32 nActiveMaxChnTime; //in units of milliseconds |
| 941 | |
| 942 | tANI_BOOLEAN IsIdleScanEnabled; |
| 943 | //in dBm, the maximum TX power |
| 944 | //The actual TX power is the lesser of this value and 11d. |
| 945 | //If 11d is disable, the lesser of this and default setting. |
| 946 | tANI_U8 nTxPowerCap; |
| 947 | tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power |
| 948 | tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save |
| 949 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 950 | tCsr11rConfigParams csr11rConfig; |
| 951 | #endif |
| 952 | #ifdef FEATURE_WLAN_CCX |
| 953 | tANI_U8 isCcxIniFeatureEnabled; |
| 954 | #endif |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 955 | #ifdef FEATURE_WLAN_LFR |
| 956 | tANI_U8 isFastRoamIniFeatureEnabled; |
| 957 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 958 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 959 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 960 | tANI_U8 isFastTransitionEnabled; |
Jeff Johnson | 43971f5 | 2012-07-17 12:26:56 -0700 | [diff] [blame^] | 961 | tANI_U8 RoamRssiDiff; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 962 | #endif |
| 963 | |
| 964 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 965 | tCsrNeighborRoamConfigParams neighborRoamConfig; |
| 966 | #endif |
| 967 | |
| 968 | /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC |
| 969 | * This is mandated by WMM-AC certification */ |
| 970 | tANI_BOOLEAN addTSWhenACMIsOff; |
| 971 | |
| 972 | |
| 973 | /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to |
| 974 | * detect when it happens. Adding this into code because we can't reproduce it easily. |
| 975 | * We don't know when it happens. */ |
| 976 | tANI_BOOLEAN fValidateList; |
| 977 | |
| 978 | /*Customer wants to start with an active scan based on the default country code. |
| 979 | * This optimization will minimize the driver load to association time. |
| 980 | * Based on this flag we will bypass the initial passive scan needed for 11d |
| 981 | * to determine the country code & domain */ |
| 982 | tANI_BOOLEAN fEnableBypass11d; |
| 983 | |
| 984 | /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS |
| 985 | * channels while swipping through both bands can save some time |
| 986 | * (apprx 1.3 sec) */ |
| 987 | tANI_BOOLEAN fEnableDFSChnlScan; |
| 988 | |
| 989 | //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD |
| 990 | tANI_BOOLEAN fScanTwice; |
| 991 | |
| 992 | }tCsrConfigParam; |
| 993 | |
| 994 | //Tush |
| 995 | typedef struct tagCsrUpdateConfigParam |
| 996 | { |
| 997 | tCsr11dinfo Csr11dinfo; |
| 998 | }tCsrUpdateConfigParam; |
| 999 | |
| 1000 | typedef struct tagCsrRoamInfo |
| 1001 | { |
| 1002 | tCsrRoamProfile *pProfile; //may be NULL |
| 1003 | tSirBssDescription *pBssDesc; //May be NULL |
| 1004 | tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0 |
| 1005 | tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0 |
| 1006 | tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0 |
| 1007 | tANI_U32 nFrameLength; |
| 1008 | tANI_U8 frameType; |
| 1009 | tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order |
| 1010 | //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where |
| 1011 | //each frame starts and ends. |
| 1012 | tANI_BOOLEAN fReassocReq; //set to true if for re-association |
| 1013 | tANI_BOOLEAN fReassocRsp; //set to true if for re-association |
| 1014 | tCsrBssid bssid; |
| 1015 | //Only valid in IBSS |
| 1016 | //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED |
| 1017 | tCsrBssid peerMac; |
| 1018 | tSirResultCodes statusCode; |
| 1019 | tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec) |
| 1020 | tANI_U8 staId; // Peer stationId when connected |
| 1021 | /*The DPU signatures will be sent eventually to TL to help it determine the |
| 1022 | association to which a packet belongs to*/ |
| 1023 | /*Unicast DPU signature*/ |
| 1024 | tANI_U8 ucastSig; |
| 1025 | |
| 1026 | /*Broadcast DPU signature*/ |
| 1027 | tANI_U8 bcastSig; |
| 1028 | |
| 1029 | tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open) |
| 1030 | tANI_U8 sessionId; |
| 1031 | tANI_U8 rsnIELen; |
| 1032 | tANI_U8 *prsnIE; |
| 1033 | |
| 1034 | tANI_U8 addIELen; |
| 1035 | tANI_U8 *paddIE; |
| 1036 | |
| 1037 | union |
| 1038 | { |
| 1039 | tSirMicFailureInfo *pMICFailureInfo; |
| 1040 | tCsrRoamConnectedProfile *pConnectedProfile; |
| 1041 | #ifdef WLAN_SOFTAP_FEATURE |
| 1042 | tSirWPSPBCProbeReq *pWPSPBCProbeReq; |
| 1043 | #endif |
| 1044 | } u; |
| 1045 | |
| 1046 | #ifdef WLAN_SOFTAP_FEATURE |
| 1047 | tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA |
| 1048 | tANI_U32 dtimPeriod; |
| 1049 | #endif |
| 1050 | |
| 1051 | #ifdef FEATURE_WLAN_CCX |
| 1052 | tANI_BOOLEAN isCCXAssoc; |
| 1053 | #endif |
| 1054 | #ifdef WLAN_FEATURE_P2P |
| 1055 | void* pRemainCtx; |
| 1056 | tANI_U32 rxChan; |
| 1057 | #endif |
| 1058 | |
| 1059 | // Required for indicating the frames to upper layer |
| 1060 | tANI_U32 beaconLength; |
| 1061 | tANI_U8* beaconPtr; |
| 1062 | tANI_U32 assocReqLength; |
| 1063 | tANI_U8* assocReqPtr; |
| 1064 | }tCsrRoamInfo; |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | typedef struct tagCsrFreqScanInfo |
| 1071 | { |
| 1072 | tANI_U32 nStartFreq; //in unit of MHz |
| 1073 | tANI_U32 nEndFreq; //in unit of MHz |
| 1074 | tSirScanType scanType; |
| 1075 | }tCsrFreqScanInfo; |
| 1076 | |
| 1077 | |
| 1078 | #ifdef WLAN_SOFTAP_FEATURE |
| 1079 | typedef struct sSirSmeAssocIndToUpperLayerCnf |
| 1080 | { |
| 1081 | tANI_U16 messageType; // eWNI_SME_ASSOC_CNF |
| 1082 | tANI_U16 length; |
| 1083 | tANI_U8 sessionId; |
| 1084 | tSirResultCodes statusCode; |
| 1085 | tSirMacAddr bssId; // Self BSSID |
| 1086 | tSirMacAddr peerMacAddr; |
| 1087 | tANI_U16 aid; |
| 1088 | tSirMacAddr alternateBssId; |
| 1089 | tANI_U8 alternateChannelId; |
| 1090 | tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA |
| 1091 | tSirRSNie rsnIE; // RSN IE received from peer |
| 1092 | tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE |
| 1093 | tANI_U8 reassocReq; //set to true if reassoc |
| 1094 | } tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf; |
| 1095 | #endif |
| 1096 | |
| 1097 | typedef struct tagCsrSummaryStatsInfo |
| 1098 | { |
| 1099 | tANI_U32 retry_cnt[4]; |
| 1100 | tANI_U32 multiple_retry_cnt[4]; |
| 1101 | tANI_U32 tx_frm_cnt[4]; |
| 1102 | //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt |
| 1103 | //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt |
| 1104 | tANI_U32 rx_frm_cnt; |
| 1105 | tANI_U32 frm_dup_cnt; |
| 1106 | tANI_U32 fail_cnt[4]; |
| 1107 | tANI_U32 rts_fail_cnt; |
| 1108 | tANI_U32 ack_fail_cnt; |
| 1109 | tANI_U32 rts_succ_cnt; |
| 1110 | tANI_U32 rx_discard_cnt; |
| 1111 | tANI_U32 rx_error_cnt; |
| 1112 | tANI_U32 tx_byte_cnt; |
| 1113 | |
| 1114 | }tCsrSummaryStatsInfo; |
| 1115 | |
| 1116 | typedef struct tagCsrGlobalClassAStatsInfo |
| 1117 | { |
| 1118 | tANI_U32 rx_frag_cnt; |
| 1119 | tANI_U32 promiscuous_rx_frag_cnt; |
| 1120 | //tANI_U32 rx_fcs_err; |
| 1121 | tANI_U32 rx_input_sensitivity; |
| 1122 | tANI_U32 max_pwr; |
| 1123 | //tANI_U32 default_pwr; |
| 1124 | tANI_U32 sync_fail_cnt; |
| 1125 | tANI_U32 tx_rate; |
| 1126 | //mcs index for HT20 and HT40 rates |
| 1127 | tANI_U32 mcs_index; |
| 1128 | //to defferentiate between HT20 and HT40 rates;short and long guard interval |
| 1129 | tANI_U32 tx_rate_flags; |
| 1130 | |
| 1131 | }tCsrGlobalClassAStatsInfo; |
| 1132 | |
| 1133 | typedef struct tagCsrGlobalClassBStatsInfo |
| 1134 | { |
| 1135 | tANI_U32 uc_rx_wep_unencrypted_frm_cnt; |
| 1136 | tANI_U32 uc_rx_mic_fail_cnt; |
| 1137 | tANI_U32 uc_tkip_icv_err; |
| 1138 | tANI_U32 uc_aes_ccmp_format_err; |
| 1139 | tANI_U32 uc_aes_ccmp_replay_cnt; |
| 1140 | tANI_U32 uc_aes_ccmp_decrpt_err; |
| 1141 | tANI_U32 uc_wep_undecryptable_cnt; |
| 1142 | tANI_U32 uc_wep_icv_err; |
| 1143 | tANI_U32 uc_rx_decrypt_succ_cnt; |
| 1144 | tANI_U32 uc_rx_decrypt_fail_cnt; |
| 1145 | tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt; |
| 1146 | tANI_U32 mcbc_rx_mic_fail_cnt; |
| 1147 | tANI_U32 mcbc_tkip_icv_err; |
| 1148 | tANI_U32 mcbc_aes_ccmp_format_err; |
| 1149 | tANI_U32 mcbc_aes_ccmp_replay_cnt; |
| 1150 | tANI_U32 mcbc_aes_ccmp_decrpt_err; |
| 1151 | tANI_U32 mcbc_wep_undecryptable_cnt; |
| 1152 | tANI_U32 mcbc_wep_icv_err; |
| 1153 | tANI_U32 mcbc_rx_decrypt_succ_cnt; |
| 1154 | tANI_U32 mcbc_rx_decrypt_fail_cnt; |
| 1155 | |
| 1156 | }tCsrGlobalClassBStatsInfo; |
| 1157 | |
| 1158 | typedef struct tagCsrGlobalClassCStatsInfo |
| 1159 | { |
| 1160 | tANI_U32 rx_amsdu_cnt; |
| 1161 | tANI_U32 rx_ampdu_cnt; |
| 1162 | tANI_U32 tx_20_frm_cnt; |
| 1163 | tANI_U32 rx_20_frm_cnt; |
| 1164 | tANI_U32 rx_mpdu_in_ampdu_cnt; |
| 1165 | tANI_U32 ampdu_delimiter_crc_err; |
| 1166 | |
| 1167 | }tCsrGlobalClassCStatsInfo; |
| 1168 | |
| 1169 | typedef struct tagCsrGlobalClassDStatsInfo |
| 1170 | { |
| 1171 | tANI_U32 tx_uc_frm_cnt; |
| 1172 | tANI_U32 tx_mc_frm_cnt; |
| 1173 | tANI_U32 tx_bc_frm_cnt; |
| 1174 | tANI_U32 rx_uc_frm_cnt; |
| 1175 | tANI_U32 rx_mc_frm_cnt; |
| 1176 | tANI_U32 rx_bc_frm_cnt; |
| 1177 | tANI_U32 tx_uc_byte_cnt[4]; |
| 1178 | tANI_U32 tx_mc_byte_cnt; |
| 1179 | tANI_U32 tx_bc_byte_cnt; |
| 1180 | tANI_U32 rx_uc_byte_cnt[4]; |
| 1181 | tANI_U32 rx_mc_byte_cnt; |
| 1182 | tANI_U32 rx_bc_byte_cnt; |
| 1183 | tANI_U32 rx_byte_cnt; |
| 1184 | tANI_U32 num_rx_bytes_crc_ok; |
| 1185 | tANI_U32 rx_rate; |
| 1186 | |
| 1187 | }tCsrGlobalClassDStatsInfo; |
| 1188 | |
| 1189 | typedef struct tagCsrPerStaStatsInfo |
| 1190 | { |
| 1191 | tANI_U32 tx_frag_cnt[4]; |
| 1192 | tANI_U32 tx_ampdu_cnt; |
| 1193 | tANI_U32 tx_mpdu_in_ampdu_cnt; |
| 1194 | } tCsrPerStaStatsInfo; |
| 1195 | |
| 1196 | typedef struct tagCsrRoamSetKey |
| 1197 | { |
| 1198 | eCsrEncryptionType encType; |
| 1199 | tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx |
| 1200 | tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key |
| 1201 | tANI_U8 paeRole; //0 for supplicant |
| 1202 | tANI_U8 keyId; // Kye index |
| 1203 | tANI_U16 keyLength; //Number of bytes containing the key in pKey |
| 1204 | tANI_U8 Key[CSR_MAX_KEY_LEN]; |
| 1205 | tANI_U8 keyRsc[CSR_MAX_RSC_LEN]; |
| 1206 | } tCsrRoamSetKey; |
| 1207 | |
| 1208 | typedef struct tagCsrRoamRemoveKey |
| 1209 | { |
| 1210 | eCsrEncryptionType encType; |
| 1211 | tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key |
| 1212 | tANI_U8 keyId; //key index |
| 1213 | } tCsrRoamRemoveKey; |
| 1214 | |
| 1215 | |
| 1216 | typedef void * tScanResultHandle; |
| 1217 | |
| 1218 | #define CSR_INVALID_SCANRESULT_HANDLE (NULL) |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | ////////////////////////////////////////////Common SCAN starts |
| 1223 | |
| 1224 | //void *p2 -- the second context pass in for the caller |
| 1225 | //***what if callback is called before requester gets the scanId?? |
| 1226 | typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status); |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | ///////////////////////////////////////////Common Roam starts |
| 1231 | |
| 1232 | //pContext is the pContext passed in with the roam request |
| 1233 | //pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and |
| 1234 | // eRoamCmdResult for detail valid members. It may be NULL |
| 1235 | //roamId is to identify the callback related roam request. 0 means unsolicit |
| 1236 | //roamStatus is a flag indicating the status of the callback |
| 1237 | //roamResult is the result |
| 1238 | typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId, |
| 1239 | eRoamCmdStatus roamStatus, eCsrRoamResult roamResult); |
| 1240 | |
| 1241 | typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext); |
| 1242 | |
| 1243 | /* --------------------------------------------------------------------------- |
| 1244 | \fn csrRoamGetNumPMKIDCache |
| 1245 | \brief return number of PMKID cache entries |
| 1246 | \return tANI_U32 - the number of PMKID cache entries |
| 1247 | -------------------------------------------------------------------------------*/ |
| 1248 | //tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal); |
| 1249 | |
| 1250 | /* --------------------------------------------------------------------------- |
| 1251 | \fn csrRoamGetPMKIDCache |
| 1252 | \brief return PMKID cache from CSR |
| 1253 | \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the |
| 1254 | needed or actually number in tPmkidCacheInfo. |
| 1255 | \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return |
| 1256 | \return eHalStatus - when fail, it usually means the buffer allocated is not big enough |
| 1257 | -------------------------------------------------------------------------------*/ |
| 1258 | //eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache); |
| 1259 | |
| 1260 | //pProfile - pointer to tCsrRoamProfile |
| 1261 | #define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType) |
| 1262 | #define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType) |
| 1263 | #define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) ) |
| 1264 | #define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType) |
| 1265 | #define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType) |
| 1266 | #define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType ) |
| 1267 | #define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType ) |
| 1268 | #define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) ) |
| 1269 | #ifdef WLAN_SOFTAP_FEATURE |
| 1270 | #define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType ) |
| 1271 | #endif |
| 1272 | |
| 1273 | //pProfile - pointer to tCsrRoamConnectedProfile |
| 1274 | #ifdef WLAN_SOFTAP_FEATURE |
| 1275 | #define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType ) |
| 1276 | #endif |
| 1277 | #define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType ) |
| 1278 | #define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType ) |
| 1279 | #define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) ) |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | ///////////////////////////////////////////Common Roam ends |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | #ifdef WLAN_SOFTAP_FEATURE |
| 1288 | /* --------------------------------------------------------------------------- |
| 1289 | \fn csrSetChannels |
| 1290 | \brief HDD calls this function to change some global settings. |
| 1291 | caller must set the all fields or call csrGetConfigParam to prefill the fields. |
| 1292 | \param pParam - caller allocated memory |
| 1293 | \return eHalStatus |
| 1294 | -------------------------------------------------------------------------------*/ |
| 1295 | |
| 1296 | eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam ); |
| 1297 | |
| 1298 | eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode); |
| 1299 | #endif |
| 1300 | |
| 1301 | |
| 1302 | //enum to string conversion for debug output |
| 1303 | const char * get_eRoamCmdStatus_str(eRoamCmdStatus val); |
| 1304 | const char * get_eCsrRoamResult_str(eCsrRoamResult val); |
| 1305 | /* --------------------------------------------------------------------------- |
| 1306 | \fn csrSetPhyMode |
| 1307 | \brief HDD calls this function to set the phyMode. |
| 1308 | This function must be called after CFG is downloaded and all the band/mode setting already passed into |
| 1309 | CSR. |
| 1310 | \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set. |
| 1311 | See eCsrPhyMode for definition |
| 1312 | \param eBand - specify the operational band (2.4, 5 or both) |
| 1313 | \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether |
| 1314 | a restart is needed to apply the change |
| 1315 | \return eHalStatus |
| 1316 | -------------------------------------------------------------------------------*/ |
| 1317 | eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded); |
| 1318 | |
| 1319 | void csrDumpInit(tHalHandle hHal); |
| 1320 | |
| 1321 | |
| 1322 | /*--------------------------------------------------------------------------- |
| 1323 | This is the type for a link quality callback to be registered with SME |
| 1324 | for indications |
| 1325 | Once the link quality has been indicated, subsequently, link indications are |
| 1326 | posted each time there is a CHANGE in link quality. |
| 1327 | *** If there is no change in link, there will be no indication *** |
| 1328 | |
| 1329 | The indications may be based on one or more criteria internal to SME |
| 1330 | such as RSSI and PER. |
| 1331 | |
| 1332 | \param ind - Indication being posted |
| 1333 | \param pContext - any user data given at callback registration. |
| 1334 | \return None |
| 1335 | |
| 1336 | ---------------------------------------------------------------------------*/ |
| 1337 | typedef void (* csrRoamLinkQualityIndCallback) |
| 1338 | (eCsrRoamLinkQualityInd ind, void *pContext); |
| 1339 | |
| 1340 | |
| 1341 | /*--------------------------------------------------------------------------- |
| 1342 | This is the type for a statistics callback to be registered with SME |
| 1343 | for stats reporting |
| 1344 | |
| 1345 | Since the client requesting for the stats already know which class/type of |
| 1346 | stats it asked for, the callback will carry them in the rsp buffer |
| 1347 | (void * stats) whose size will be same as the size of requested stats & |
| 1348 | will be exactly in the same order requested in the stats mask from LSB to MSB |
| 1349 | |
| 1350 | \param stats - stats rsp buffer sent back with the report |
| 1351 | \param pContext - any user data given at callback registration. |
| 1352 | \return None |
| 1353 | |
| 1354 | ---------------------------------------------------------------------------*/ |
| 1355 | typedef void ( *tCsrStatsCallback) (void * stats, void *pContext); |
| 1356 | |
| 1357 | /*--------------------------------------------------------------------------- |
| 1358 | This is the type for a rssi callback to be registered with SME |
| 1359 | for getting rssi |
| 1360 | |
| 1361 | \param rssi - rssi |
| 1362 | \param pContext - any user data given at callback registration. |
| 1363 | \return None |
| 1364 | |
| 1365 | ---------------------------------------------------------------------------*/ |
| 1366 | |
| 1367 | typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext); |
| 1368 | |
| 1369 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1370 | eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription); |
| 1371 | #endif |
| 1372 | |
| 1373 | /*--------------------------------------------------------------------------- |
| 1374 | This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ) |
| 1375 | |
| 1376 | \param hHal - handle to Hal context |
| 1377 | \param eBand - band value |
| 1378 | \return eHalStatus |
| 1379 | |
| 1380 | ---------------------------------------------------------------------------*/ |
| 1381 | eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand); |
| 1382 | |
| 1383 | /*--------------------------------------------------------------------------- |
| 1384 | This is the function to get the current operating band value |
| 1385 | \param hHal - handl to Hal context |
| 1386 | \return eCsrband - band value |
| 1387 | |
| 1388 | ---------------------------------------------------------------------------*/ |
| 1389 | eCsrBand csrGetCurrentBand (tHalHandle hHal); |
| 1390 | |
| 1391 | #endif |
| 1392 | |