Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013, The Linux Foundation. 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 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 24 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 25 | * |
| 26 | * |
| 27 | * Permission to use, copy, modify, and/or distribute this software for |
| 28 | * any purpose with or without fee is hereby granted, provided that the |
| 29 | * above copyright notice and this permission notice appear in all |
| 30 | * copies. |
| 31 | * |
| 32 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 33 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 35 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 36 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 37 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 39 | * PERFORMANCE OF THIS SOFTWARE. |
| 40 | */ |
| 41 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 42 | /** ------------------------------------------------------------------------- * |
| 43 | ------------------------------------------------------------------------- * |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 44 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 45 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 46 | \file csrInternal.h |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 47 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 48 | Define internal data structure for MAC. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 49 | |
| 50 | Copyright (C) 2006 Airgo Networks, Incorporated |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 51 | ========================================================================== */ |
| 52 | #ifndef CSRINTERNAL_H__ |
| 53 | #define CSRINTERNAL_H__ |
| 54 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 55 | #include "vos_status.h" |
| 56 | #include "vos_lock.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 57 | |
| 58 | #include "palTimer.h" |
| 59 | #include "csrSupport.h" |
| 60 | #include "vos_nvitem.h" |
| 61 | #include "wlan_qct_tl.h" |
| 62 | |
| 63 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 64 | #include "csrNeighborRoam.h" |
| 65 | #endif |
| 66 | |
| 67 | #define CSR_MAX_STA (HAL_NUM_STA) |
| 68 | |
| 69 | #define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80 |
| 70 | |
| 71 | #define CSR_TITAN_MAX_RATE_MIMO_CB 240 |
| 72 | #define CSR_TITAN_MAX_RATE_MIMO 126 |
| 73 | |
| 74 | //define scan return criteria. LIM should use these define as well |
| 75 | #define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 ) |
| 76 | #define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 ) |
| 77 | #define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 ) |
| 78 | #define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 ) |
| 79 | #define CSR_SCAN_RETURN_AFTER_EITHER_BAND_11d_FOUND ( CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND | CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ) |
Madan Mohan Koyyalamudi | 4c8c635 | 2012-10-15 16:40:16 -0700 | [diff] [blame] | 80 | #define CSR_NUM_RSSI_CAT 15 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 81 | #define CSR_MAX_STATISTICS_REQ 10 |
| 82 | |
| 83 | //Support for multiple session |
| 84 | #define CSR_SESSION_ID_INVALID 0xFF // session ID invalid |
| 85 | #define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a |
| 86 | // session is for Infra, IBSS or BT-AMP |
| 87 | |
| 88 | #define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \ |
| 89 | && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) ) |
| 90 | #define CSR_GET_SESSION( pMac, sessionId ) \ |
| 91 | ( \ |
| 92 | (sessionId < CSR_ROAM_SESSION_MAX) ? \ |
| 93 | (&(pMac)->roam.roamSession[(sessionId)]) :\ |
| 94 | NULL \ |
| 95 | ) |
| 96 | |
Madan Mohan Koyyalamudi | d502607 | 2012-11-30 14:56:21 -0800 | [diff] [blame] | 97 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR) |
| 98 | #define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \ |
| 99 | ( \ |
| 100 | (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \ |
| 101 | ) |
| 102 | #endif |
| 103 | |
Madan Mohan Koyyalamudi | 470d2cf | 2012-09-28 14:43:44 -0700 | [diff] [blame] | 104 | //Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.) |
| 105 | #define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 106 | |
| 107 | typedef enum |
| 108 | { |
| 109 | //eCSR_CFG_DOT11_MODE_BEST = 0, |
| 110 | eCSR_CFG_DOT11_MODE_TAURUS = 0, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 111 | eCSR_CFG_DOT11_MODE_ABG, |
| 112 | eCSR_CFG_DOT11_MODE_11A, |
| 113 | eCSR_CFG_DOT11_MODE_11B, |
| 114 | eCSR_CFG_DOT11_MODE_11G, |
| 115 | eCSR_CFG_DOT11_MODE_11N, |
| 116 | eCSR_CFG_DOT11_MODE_POLARIS, |
| 117 | eCSR_CFG_DOT11_MODE_TITAN, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 118 | #ifdef WLAN_FEATURE_11AC |
| 119 | eCSR_CFG_DOT11_MODE_11AC, |
| 120 | #endif |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 121 | eCSR_CFG_DOT11_MODE_11G_ONLY, |
| 122 | eCSR_CFG_DOT11_MODE_11N_ONLY, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 123 | #ifdef WLAN_FEATURE_11AC |
| 124 | eCSR_CFG_DOT11_MODE_11AC_ONLY, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 125 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 126 | //This value can never set to CFG. It is for CSR's internal use |
| 127 | eCSR_CFG_DOT11_MODE_AUTO, |
| 128 | }eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE |
| 129 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 130 | typedef enum etCsrRoamCommands |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 131 | { |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 132 | eCsrRoamNoCommand, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 133 | eCsrRoamCommandScan, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 134 | eCsrRoamCommandRoam, |
| 135 | eCsrRoamCommandWmStatusChange, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 136 | eCsrRoamCommandSetKey, |
| 137 | eCsrRoamCommandRemoveKey, |
| 138 | |
| 139 | } eCsrRoamCommands; |
| 140 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 141 | typedef enum |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 142 | { |
| 143 | eCsrScanOther = 1, |
| 144 | eCsrScanLostLink1, |
| 145 | eCsrScanLostLink2, |
| 146 | eCsrScanLostLink3, |
| 147 | eCsrScanLostLink4, |
| 148 | eCsrScan11d1, //First 11d scan |
| 149 | eCsrScan11d2, //First 11d scan has failed |
| 150 | eCsrScan11dDone, //11d scan succeeded, try the rest of the channel |
| 151 | eCsrScanUserRequest, |
| 152 | eCsrScanGetResult, |
| 153 | eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state |
| 154 | eCsrScanForSsid, |
| 155 | eCsrScanForCapsChange, |
| 156 | eCsrScanBGScanAbort, |
| 157 | eCsrScanBGScanEnable, |
| 158 | eCsrScanIdleScan, |
| 159 | eCsrScanGetScanChnInfo, //To get the list of channels scanned |
| 160 | |
| 161 | eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states |
| 162 | eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO |
| 163 | eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer) |
| 164 | eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 165 | eCsrScanP2PFindPeer |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 166 | }eCsrScanReason; |
| 167 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 168 | typedef enum |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 169 | { |
| 170 | eCsrNoConnection, // Roaming because we have not established the initial connection. |
| 171 | eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP. |
| 172 | eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated. |
| 173 | eCsrHddIssued, // roaming because an 802.11 request was issued to the driver. |
| 174 | eCsrLostLink1, // roaming because we lost link to an associated AP |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 175 | eCsrLostLink2, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 176 | eCsrLostLink3, |
| 177 | eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure |
| 178 | eCsrHddIssuedReassocToSameAP, |
| 179 | eCsrSmeIssuedReassocToSameAP, |
| 180 | eCsrSmeIssuedReassocToDiffAP, |
| 181 | eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated. |
| 182 | eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP |
| 183 | eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile |
| 184 | eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network |
| 185 | eCsrForcedIbssLeave, |
| 186 | eCsrStopBss, |
| 187 | eCsrSmeIssuedFTReassoc, |
| 188 | eCsrForcedDisassocSta, |
| 189 | eCsrForcedDeauthSta, |
Madan Mohan Koyyalamudi | 286b60e | 2012-10-11 12:59:07 -0700 | [diff] [blame] | 190 | eCsrPerformPreauth, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 191 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 192 | }eCsrRoamReason; |
| 193 | |
| 194 | typedef enum |
| 195 | { |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 196 | eCSR_ROAM_SUBSTATE_NONE = 0, |
| 197 | eCSR_ROAM_SUBSTATE_START_BSS_REQ, |
| 198 | eCSR_ROAM_SUBSTATE_JOIN_REQ, |
| 199 | eCSR_ROAM_SUBSTATE_REASSOC_REQ, |
| 200 | eCSR_ROAM_SUBSTATE_DISASSOC_REQ, |
| 201 | eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, |
| 202 | eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect |
| 203 | eCSR_ROAM_SUBSTATE_AUTH_REQ, |
| 204 | eCSR_ROAM_SUBSTATE_CONFIG, |
| 205 | eCSR_ROAM_SUBSTATE_DEAUTH_REQ, |
| 206 | eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, |
| 207 | eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, |
| 208 | eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 209 | eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, |
| 210 | eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, |
| 211 | eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, |
| 212 | eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, |
| 213 | eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC, |
| 214 | // max is 15 unless the bitfield is expanded... |
| 215 | } eCsrRoamSubState; |
| 216 | |
| 217 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 218 | typedef enum |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 219 | { |
| 220 | eCSR_ROAMING_STATE_STOP = 0, |
| 221 | eCSR_ROAMING_STATE_IDLE, |
| 222 | eCSR_ROAMING_STATE_SCANNING, |
| 223 | eCSR_ROAMING_STATE_JOINING, |
| 224 | eCSR_ROAMING_STATE_JOINED, |
| 225 | }eCsrRoamState; |
| 226 | |
| 227 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 228 | typedef enum |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 229 | { |
| 230 | eCsrContinueRoaming, |
| 231 | eCsrStopRoaming, |
| 232 | eCsrStartIbss, |
| 233 | eCsrStartIbssSameIbss, |
| 234 | eCsrReassocToSelfNoCapChange, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 235 | eCsrStopRoamingDueToConcurrency, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 236 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 237 | }eCsrJoinState; |
| 238 | |
| 239 | typedef enum |
| 240 | { |
| 241 | eCsrNotRoaming, |
| 242 | eCsrLostlinkRoamingDisassoc, |
| 243 | eCsrLostlinkRoamingDeauth, |
| 244 | eCsrDynamicRoaming, |
| 245 | eCsrReassocRoaming, |
| 246 | }eCsrRoamingReason; |
| 247 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 248 | typedef enum |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 249 | { |
| 250 | eCsrDisassociated, |
| 251 | eCsrDeauthenticated |
| 252 | |
| 253 | }eCsrRoamWmStatusChangeTypes; |
| 254 | |
| 255 | typedef enum |
| 256 | { |
| 257 | eCsrSummaryStats = 0, |
| 258 | eCsrGlobalClassAStats, |
| 259 | eCsrGlobalClassBStats, |
| 260 | eCsrGlobalClassCStats, |
| 261 | eCsrGlobalClassDStats, |
| 262 | eCsrPerStaStats, |
| 263 | eCsrMaxStats |
| 264 | }eCsrRoamStatsClassTypes; |
| 265 | |
| 266 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 267 | typedef enum |
| 268 | { |
| 269 | eCSR_WLAN_STATUS_CONNECT =0, |
| 270 | eCSR_WLAN_STATUS_DISCONNECT |
| 271 | |
| 272 | }eCsrDiagWlanStatusEventSubtype; |
| 273 | |
| 274 | typedef enum |
| 275 | { |
| 276 | eCSR_REASON_UNSPECIFIED = 0, |
| 277 | eCSR_REASON_USER_REQUESTED, |
| 278 | eCSR_REASON_MIC_ERROR, |
| 279 | eCSR_REASON_DISASSOC, |
| 280 | eCSR_REASON_DEAUTH, |
| 281 | eCSR_REASON_HANDOFF, |
| 282 | |
| 283 | }eCsrDiagWlanStatusEventReason; |
| 284 | |
| 285 | typedef enum |
| 286 | { |
| 287 | eCSR_WLAN_HANDOFF_EVENT =0, |
| 288 | |
| 289 | }eCsrDiagWlanHandoffEventSubtype; |
| 290 | |
| 291 | typedef enum |
| 292 | { |
| 293 | eCSR_WLAN_VCC_EVENT =0, |
| 294 | |
| 295 | }eCsrDiagWlanVccEventSubtype; |
| 296 | |
| 297 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 298 | |
| 299 | typedef struct tagCsrChannel |
| 300 | { |
| 301 | tANI_U8 numChannels; |
| 302 | tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 303 | }tCsrChannel; |
| 304 | |
| 305 | typedef struct tagScanProfile |
| 306 | { |
| 307 | tANI_U32 minChnTime; |
| 308 | tANI_U32 maxChnTime; |
| 309 | tANI_U32 restTime; //This is ignored if not associated |
| 310 | tANI_U32 numOfChannels; |
| 311 | tANI_U8 *pChannelList; |
| 312 | tSirScanType scanType; //active or passive |
| 313 | eCsrRoamBssType bssType; //BSS or IBSS |
| 314 | tANI_U8 ssid[WNI_CFG_SSID_LEN]; |
| 315 | tANI_U8 bReturnAfter1stMatch; |
| 316 | tANI_U8 fUniqueResult; |
| 317 | tANI_U8 freshScan; |
| 318 | tCsrBssid bssid; |
| 319 | }tScanProfile; |
| 320 | |
| 321 | typedef struct tagBssConfigParam |
| 322 | { |
| 323 | eCsrMediaAccessType qosType; |
| 324 | tSirMacSSid SSID; |
| 325 | tANI_U32 uRTSThresh; |
| 326 | tANI_U32 uDeferThresh; // |
| 327 | eCsrCfgDot11Mode uCfgDot11Mode; |
| 328 | eCsrBand eBand; |
| 329 | tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX]; |
| 330 | tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX]; |
| 331 | eCsrExposedTxRate txRate; |
| 332 | tAniAuthType authType; |
| 333 | eCsrEncryptionType encType; |
| 334 | tANI_U32 uShortSlotTime; |
| 335 | tANI_U32 uHTSupport; //High throughput |
| 336 | tANI_U32 uPowerLimit; |
| 337 | tANI_U32 uHeartBeatThresh; |
| 338 | tANI_U32 uJoinTimeOut; |
| 339 | tSirMacCapabilityInfo BssCap; |
| 340 | tANI_BOOLEAN f11hSupport; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 341 | ePhyChanBondState cbMode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 342 | }tBssConfigParam; |
| 343 | |
| 344 | |
| 345 | typedef struct tagCsrRoamStartBssParams |
| 346 | { |
| 347 | tSirMacSSid ssId; |
| 348 | tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS) |
| 349 | tSirNwType sirNwType; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 350 | ePhyChanBondState cbMode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 351 | tSirMacRateSet operationalRateSet; |
| 352 | tSirMacRateSet extendedRateSet; |
| 353 | tANI_U8 operationChn; |
| 354 | eCsrCfgDot11Mode uCfgDot11Mode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 355 | tANI_U8 privacy; |
| 356 | tANI_BOOLEAN fwdWPSPBCProbeReq; |
| 357 | tANI_BOOLEAN protEnabled; |
| 358 | tANI_BOOLEAN obssProtEnabled; |
| 359 | tAniAuthType authType; |
| 360 | tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller. |
| 361 | tANI_U16 ht_protection; |
| 362 | tANI_U32 dtimPeriod; |
| 363 | tANI_U8 ApUapsdEnable; |
| 364 | tANI_U8 ssidHidden; |
| 365 | tANI_U8 wps_state; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 366 | tVOS_CON_MODE bssPersona; |
| 367 | tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored. |
| 368 | tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 369 | tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update |
| 370 | // beaconInterval |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 371 | }tCsrRoamStartBssParams; |
| 372 | |
| 373 | |
| 374 | typedef struct tagScanCmd |
| 375 | { |
| 376 | tANI_U32 scanID; |
| 377 | csrScanCompleteCallback callback; |
| 378 | void *pContext; |
| 379 | eCsrScanReason reason; |
| 380 | eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX]; |
| 381 | tCsrRoamProfile *pToRoamProfile; |
| 382 | tANI_U32 roamId; //this is the ID related to the pToRoamProfile |
| 383 | union |
| 384 | { |
| 385 | tCsrScanRequest scanRequest; |
| 386 | tCsrBGScanRequest bgScanRequest; |
| 387 | }u; |
| 388 | }tScanCmd; |
| 389 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 390 | typedef struct tagRoamCmd |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 391 | { |
| 392 | tANI_U32 roamId; |
| 393 | eCsrRoamReason roamReason; |
| 394 | tCsrRoamProfile roamProfile; |
| 395 | tScanResultHandle hBSSList; //BSS list fits the profile |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 396 | tListElem *pRoamBssEntry; //point to the current BSS in the list that is roaming. It starts from head to tail |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 397 | tSirBssDescription *pLastRoamBss; //the last BSS we try and failed |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 398 | tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 399 | tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile |
| 400 | tANI_BOOLEAN fReassoc; //whether this command is for reassociation |
| 401 | tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated |
| 402 | //this is for CSR internal used only. And it should not be assigned when creating the command |
| 403 | //This causes the roam command not to do anything. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 404 | tANI_BOOLEAN fReassocToSelfNoCapChange; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 405 | |
| 406 | tANI_BOOLEAN fStopWds; |
| 407 | tSirMacAddr peerMac; |
| 408 | tSirMacReasonCodes reason; |
| 409 | }tRoamCmd; |
| 410 | |
| 411 | typedef struct tagSetKeyCmd |
| 412 | { |
| 413 | tANI_U32 roamId; |
| 414 | eCsrEncryptionType encType; |
| 415 | eCsrAuthType authType; |
| 416 | tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx |
| 417 | tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key |
| 418 | tANI_U8 paeRole; //0 for supplicant |
| 419 | tANI_U8 keyId; // Kye index |
| 420 | tANI_U8 keyLength; //Number of bytes containing the key in pKey |
| 421 | tANI_U8 Key[CSR_MAX_KEY_LEN]; |
| 422 | tANI_U8 keyRsc[CSR_MAX_RSC_LEN]; |
| 423 | } tSetKeyCmd; |
| 424 | |
| 425 | typedef struct tahRemoveKeyCmd |
| 426 | { |
| 427 | tANI_U32 roamId; |
| 428 | eCsrEncryptionType encType; |
| 429 | eCsrAuthType authType; |
| 430 | tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key |
| 431 | tANI_U8 keyId; //key index |
| 432 | } tRemoveKeyCmd; |
| 433 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 434 | typedef struct tagWmStatusChangeCmd |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 435 | { |
| 436 | eCsrRoamWmStatusChangeTypes Type; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 437 | union |
| 438 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 439 | tSirSmeDeauthInd DeauthIndMsg; |
| 440 | tSirSmeDisassocInd DisassocIndMsg; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 441 | }u; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 442 | |
| 443 | }tWmStatusChangeCmd; |
| 444 | |
| 445 | typedef struct tagAddStaForSessionCmd |
| 446 | { |
| 447 | //Session self mac addr |
| 448 | tSirMacAddr selfMacAddr; |
| 449 | }tAddStaForSessionCmd; |
| 450 | |
| 451 | typedef struct tagDelStaForSessionCmd |
| 452 | { |
| 453 | //Session self mac addr |
| 454 | tSirMacAddr selfMacAddr; |
| 455 | csrRoamSessionCloseCallback callback; |
| 456 | void *pContext; |
| 457 | }tDelStaForSessionCmd; |
| 458 | |
| 459 | //This structure represents one scan request |
| 460 | typedef struct tagCsrCmd |
| 461 | { |
| 462 | tListElem Link; |
| 463 | eCsrRoamCommands command; |
| 464 | tANI_U8 sessionId; // Session ID for this command |
| 465 | union |
| 466 | { |
| 467 | tScanCmd scanCmd; |
| 468 | tRoamCmd roamCmd; |
| 469 | tWmStatusChangeCmd wmStatusChangeCmd; |
| 470 | tSetKeyCmd setKeyCmd; |
| 471 | tRemoveKeyCmd removeKeyCmd; |
| 472 | tAddStaForSessionCmd addStaSessionCmd; |
| 473 | tDelStaForSessionCmd delStaSessionCmd; |
| 474 | }u; |
| 475 | }tCsrCmd; |
| 476 | |
| 477 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 478 | typedef struct tagCsr11rConfig |
| 479 | { |
| 480 | tANI_BOOLEAN IsFTResourceReqSupported; |
| 481 | } tCsr11rConfig; |
| 482 | #endif |
| 483 | |
| 484 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 485 | typedef struct tagCsrNeighborRoamConfig |
| 486 | { |
| 487 | tANI_U32 nNeighborScanTimerPeriod; |
| 488 | tANI_U8 nNeighborLookupRssiThreshold; |
| 489 | tANI_U8 nNeighborReassocRssiThreshold; |
| 490 | tANI_U16 nNeighborScanMinChanTime; |
| 491 | tANI_U16 nNeighborScanMaxChanTime; |
| 492 | sCsrChannel neighborScanChanList; |
| 493 | tANI_U8 nMaxNeighborRetries; |
| 494 | tANI_U16 nNeighborResultsRefreshPeriod; |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame] | 495 | tANI_U16 nEmptyScanRefreshPeriod; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 496 | }tCsrNeighborRoamConfig; |
| 497 | #endif |
| 498 | |
| 499 | typedef struct tagCsrConfig |
| 500 | { |
| 501 | tANI_U32 agingCount; |
| 502 | tANI_U32 FragmentationThreshold; |
| 503 | tANI_U32 channelBondingMode24GHz; |
| 504 | tANI_U32 channelBondingMode5GHz; |
| 505 | tANI_U32 RTSThreshold; |
| 506 | eCsrPhyMode phyMode; |
| 507 | eCsrCfgDot11Mode uCfgDot11Mode; |
| 508 | eCsrBand eBand; |
| 509 | tANI_U32 HeartbeatThresh50; |
| 510 | tANI_U32 HeartbeatThresh24; |
| 511 | tANI_U32 bgScanInterval; |
| 512 | eCsrCBChoice cbChoice; |
| 513 | eCsrBand bandCapability; //indicate hw capability |
| 514 | eCsrRoamWmmUserModeType WMMSupportMode; |
| 515 | tANI_BOOLEAN Is11eSupportEnabled; |
| 516 | tANI_BOOLEAN Is11dSupportEnabled; |
| 517 | tANI_BOOLEAN Is11dSupportEnabledOriginal; |
| 518 | tANI_BOOLEAN Is11hSupportEnabled; |
| 519 | tANI_BOOLEAN shortSlotTime; |
| 520 | tANI_BOOLEAN ProprietaryRatesEnabled; |
| 521 | tANI_BOOLEAN fenableMCCMode; |
| 522 | tANI_U16 TxRate; |
Madan Mohan Koyyalamudi | 167b95e | 2012-11-27 15:53:38 -0800 | [diff] [blame] | 523 | tANI_U8 fAllowMCCGODiffBI; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 524 | tANI_U8 AdHocChannel24; |
| 525 | tANI_U8 AdHocChannel5G; |
| 526 | tANI_U32 impsSleepTime; //in units of microseconds |
| 527 | tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds |
| 528 | tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds |
| 529 | tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds, |
| 530 | tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds |
| 531 | tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value |
| 532 | int RSSICat[CSR_NUM_RSSI_CAT]; |
| 533 | tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category |
| 534 | tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming |
| 535 | //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 536 | //channels are limited to the default channel list. It is an "AND" operation between the |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 537 | //default channels and the channels in the 802.11d IE. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 538 | tANI_BOOLEAN fEnforce11dChannels; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 539 | //Country Code Priority |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 540 | //0 = 802.11D > Configured Country > NV |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 541 | //1 = Configured Country > 802.11D > NV |
| 542 | tANI_BOOLEAN fSupplicantCountryCodeHasPriority; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 543 | //When true, AP with unknown country code won't be see. |
| 544 | //"Unknown country code" means either Ap doesn't have 11d IE or we cannot |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 545 | //find a domain for the country code in its 11d IE. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 546 | tANI_BOOLEAN fEnforceCountryCodeMatch; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 547 | //When true, only APs in the default domain can be seen. If the Ap has "unknown country |
| 548 | //code", or the doamin of the country code doesn't match the default domain, the Ap is |
| 549 | //not acceptable. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 550 | tANI_BOOLEAN fEnforceDefaultDomain; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 551 | |
| 552 | tANI_U16 vccRssiThreshold; |
| 553 | tANI_U32 vccUlMacLossThreshold; |
| 554 | |
| 555 | tANI_U32 nPassiveMinChnTime; //in units of milliseconds |
| 556 | tANI_U32 nPassiveMaxChnTime; //in units of milliseconds |
| 557 | tANI_U32 nActiveMinChnTime; //in units of milliseconds |
| 558 | tANI_U32 nActiveMaxChnTime; //in units of milliseconds |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 559 | |
| 560 | tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds |
| 561 | tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds |
Madan Mohan Koyyalamudi | 4ff9cd6 | 2012-10-30 17:48:57 -0700 | [diff] [blame] | 562 | #ifdef WLAN_AP_STA_CONCURRENCY |
| 563 | tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds |
| 564 | tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds |
| 565 | tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds |
| 566 | tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds |
| 567 | tANI_U32 nRestTimeConc; //in units of milliseconds |
Vinay Malekal | 05fdc81 | 2012-12-17 13:04:30 -0800 | [diff] [blame] | 568 | tANI_U8 nNumChanCombinedConc; //number of channels combined |
| 569 | //in each split scan operation |
Madan Mohan Koyyalamudi | 4ff9cd6 | 2012-10-30 17:48:57 -0700 | [diff] [blame] | 570 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 571 | |
| 572 | tANI_BOOLEAN IsIdleScanEnabled; |
| 573 | //in dBm, the maximum TX power |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 574 | //The actual TX power is the lesser of this value and 11d. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 575 | //If 11d is disable, the lesser of this and default setting. |
| 576 | tANI_U8 nTxPowerCap; |
| 577 | tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power |
| 578 | tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 579 | tANI_U32 dtimPeriod; |
| 580 | tANI_BOOLEAN ssidHidden; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 581 | |
| 582 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 583 | tCsr11rConfig csr11rConfig; |
| 584 | #endif |
| 585 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 586 | #ifdef FEATURE_WLAN_LFR |
| 587 | tANI_U8 isFastRoamIniFeatureEnabled; |
| 588 | #endif |
| 589 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 590 | #ifdef FEATURE_WLAN_CCX |
| 591 | tANI_U8 isCcxIniFeatureEnabled; |
| 592 | #endif |
| 593 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 594 | #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] | 595 | tANI_U8 isFastTransitionEnabled; |
Jeff Johnson | 43971f5 | 2012-07-17 12:26:56 -0700 | [diff] [blame] | 596 | tANI_U8 RoamRssiDiff; |
Madan Mohan Koyyalamudi | 62b55b0 | 2012-12-03 16:45:39 -0800 | [diff] [blame] | 597 | tANI_U8 nImmediateRoamRssiDiff; |
Madan Mohan Koyyalamudi | d502607 | 2012-11-30 14:56:21 -0800 | [diff] [blame] | 598 | tANI_BOOLEAN nRoamPrefer5GHz; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 599 | #endif |
| 600 | |
| 601 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 602 | tCsrNeighborRoamConfig neighborRoamConfig; |
| 603 | #endif |
| 604 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 605 | /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 606 | * This is mandated by WMM-AC certification */ |
| 607 | tANI_BOOLEAN addTSWhenACMIsOff; |
| 608 | |
| 609 | tANI_BOOLEAN fValidateList; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 610 | //Remove this code once SLM_Sessionization is supported |
Madan Mohan Koyyalamudi | 96dd30d | 2012-10-05 17:24:51 -0700 | [diff] [blame] | 611 | //BMPS_WORKAROUND_NOT_NEEDED |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 612 | tANI_BOOLEAN doBMPSWorkaround; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 613 | |
| 614 | //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD |
| 615 | tANI_BOOLEAN fScanTwice; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 616 | #ifdef WLAN_FEATURE_11AC |
| 617 | tANI_U32 nVhtChannelWidth; |
Shailender Karmuchi | 08f87c2 | 2013-01-17 12:51:24 -0800 | [diff] [blame] | 618 | tANI_U8 txBFEnable; |
Shailender Karmuchi | cc3fe44 | 2013-02-16 18:18:33 -0800 | [diff] [blame] | 619 | tANI_U8 txBFCsnValue; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 620 | #endif |
Gopichand Nakkala | b2d2c31 | 2013-01-04 11:41:02 -0800 | [diff] [blame] | 621 | tANI_U8 txLdpcEnable; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 622 | |
| 623 | }tCsrConfig; |
| 624 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 625 | typedef struct tagCsrChannelPowerInfo |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 626 | { |
| 627 | tListElem link; |
| 628 | tANI_U8 firstChannel; |
| 629 | tANI_U8 numChannels; |
| 630 | tANI_U8 txPower; |
| 631 | tANI_U8 interChannelOffset; |
| 632 | }tCsrChannelPowerInfo; |
| 633 | |
| 634 | typedef struct tagRoamJoinStatus |
| 635 | { |
| 636 | tSirResultCodes statusCode; |
| 637 | //this is set to unspecified if statusCode indicates timeout. Or it is the failed reason from the other BSS(per 802.11 spec) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 638 | tANI_U32 reasonCode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 639 | }tCsrRoamJoinStatus; |
| 640 | |
| 641 | typedef struct tagCsrOsChannelMask |
| 642 | { |
| 643 | tANI_U8 numChannels; |
| 644 | tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 645 | tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 646 | }tCsrOsChannelMask; |
| 647 | |
| 648 | |
| 649 | typedef struct tagCsrScanStruct |
| 650 | { |
| 651 | tScanProfile scanProfile; |
| 652 | tANI_U32 nextScanID; |
Madan Mohan Koyyalamudi | ca43cdf | 2012-09-24 13:15:49 -0700 | [diff] [blame] | 653 | tDblLinkList scanResultList; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 654 | tDblLinkList tempScanResults; |
| 655 | tANI_BOOLEAN fScanEnable; |
| 656 | tANI_BOOLEAN fFullScanIssued; |
| 657 | tPalTimerHandle hTimerGetResult; |
| 658 | #ifdef WLAN_AP_STA_CONCURRENCY |
| 659 | tPalTimerHandle hTimerStaApConcTimer; |
| 660 | #endif |
| 661 | tPalTimerHandle hTimerIdleScan; |
| 662 | tPalTimerHandle hTimerResultAging; |
Sandeep Puligilla | 2b6dc63 | 2012-12-17 14:44:16 -0800 | [diff] [blame] | 663 | tPalTimerHandle hTimerResultCfgAging; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 664 | tPalTimerHandle hTimerBgScan; |
| 665 | //changes on every scan, it is used as a flag for whether 11d info is found on every scan |
Sandeep Puligilla | 2b6dc63 | 2012-12-17 14:44:16 -0800 | [diff] [blame] | 666 | tANI_U8 channelOf11dInfo; |
| 667 | tANI_U8 scanResultCfgAgingTime; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 668 | //changes on every scan, a flag to tell whether conflict 11d info found on each BSS |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 669 | tANI_BOOLEAN fAmbiguous11dInfoFound; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 670 | //Tush: changes on every scan, a flag to tell whether the applied 11d info present in one of the scan results |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 671 | tANI_BOOLEAN fCurrent11dInfoMatch; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 672 | tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default |
| 673 | tSirScanType curScanType; |
| 674 | tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand |
| 675 | tCsrChannel channels11d; |
| 676 | tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV |
| 677 | tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV |
| 678 | tANI_U32 numChannelsDefault; //total channels of NV |
| 679 | tCsrChannel base20MHzChannels; //The channel base to work on |
| 680 | tCsrChannel base40MHzChannels; //center channels for 40MHz channels |
| 681 | tDblLinkList channelPowerInfoList24; |
| 682 | tDblLinkList channelPowerInfoList5G; |
| 683 | tANI_U32 nLastAgeTimeOut; |
| 684 | tANI_U32 nAgingCountDown; |
| 685 | tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN+1]; //The country code from NV |
| 686 | tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN+1]; |
| 687 | tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN+1]; |
| 688 | v_REGDOMAIN_t domainIdDefault; //default regulatory domain |
| 689 | v_REGDOMAIN_t domainIdCurrent; //current regulatory domain |
| 690 | tANI_BOOLEAN f11dInfoApplied; |
| 691 | tANI_BOOLEAN fCancelIdleScan; |
| 692 | #ifdef FEATURE_WLAN_WAPI |
| 693 | // tANI_U16 NumBkidCandidate; |
| 694 | // tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */ |
| 695 | #endif /* FEATURE_WLAN_WAPI */ |
| 696 | tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList |
| 697 | tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN]; |
| 698 | //the ChannelInfo member is not used in this structure. |
| 699 | //numBGScanChannel and bgScanChannelList are used for the BG scan channel info |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 700 | tCsrBGScanRequest bgScanParams; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 701 | tANI_BOOLEAN fRestartIdleScan; |
| 702 | tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan |
| 703 | tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition |
| 704 | tANI_U16 nBssLimit; //the maximum number of BSS in scan cache |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 705 | /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 706 | * detect when it happens. Adding this into code because we can't reproduce it easily. |
| 707 | * We don't know when it happens. */ |
| 708 | tANI_BOOLEAN fValidateList; |
| 709 | /*Customer wants to start with an active scan based on the default country code. |
| 710 | * This optimization will minimize the driver load to association time. |
| 711 | * Based on this flag we will bypass the initial passive scan needed for 11d |
| 712 | * to determine the country code & domain */ |
| 713 | tANI_BOOLEAN fEnableBypass11d; |
| 714 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 715 | /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS |
| 716 | * channels while swipping through both bands can save some time |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 717 | * (apprx 1.3 sec) */ |
| 718 | tANI_BOOLEAN fEnableDFSChnlScan; |
| 719 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 720 | /* |
| 721 | * To enable/disable scanning only 2.4Ghz channels on first scan |
| 722 | */ |
| 723 | tANI_BOOLEAN fFirstScanOnly2GChnl; |
| 724 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 725 | tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands |
| 726 | |
| 727 | #ifdef WLAN_AP_STA_CONCURRENCY |
| 728 | tDblLinkList scanCmdPendingList; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 729 | #endif |
Madan Mohan Koyyalamudi | 470d2cf | 2012-09-28 14:43:44 -0700 | [diff] [blame] | 730 | tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found |
Madan Mohan Koyyalamudi | 3f65e31 | 2012-11-06 15:31:12 -0800 | [diff] [blame] | 731 | |
| 732 | tANI_BOOLEAN fIgnore_chan165; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 733 | }tCsrScanStruct; |
| 734 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 735 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 736 | /* |
| 737 | * struct to carry TDLS discovery info.. |
| 738 | */ |
| 739 | typedef struct sCsrTdlsContext |
| 740 | { |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 741 | tDblLinkList tdlsPotentialPeerList ; |
| 742 | tANI_U16 tdlsCommonFlag ; |
| 743 | tANI_U16 tdlsCommonState ; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 744 | tANI_U16 tdlsPeerCount ; |
| 745 | }tCsrTdlsCtxStruct; |
| 746 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 747 | typedef struct sCsrTdlsPeerLinkInfo |
| 748 | { |
| 749 | tListElem tdlsPeerStaLink ; |
| 750 | tSirTdlsPeerInfo tdlsDisPeerInfo ; |
| 751 | }tCsrTdlsPeerLinkinfo ; |
| 752 | #endif |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 753 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 754 | |
| 755 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 756 | |
| 757 | //Save the connected information. This structure + connectedProfile |
| 758 | //should contain all information about the connection |
| 759 | typedef struct tagRoamCsrConnectedInfo |
| 760 | { |
| 761 | tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0 |
| 762 | tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0 |
| 763 | tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0 |
| 764 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 765 | tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 766 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 767 | #ifdef FEATURE_WLAN_CCX |
| 768 | tANI_U32 nTspecIeLength; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 769 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 770 | tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order |
| 771 | //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where |
| 772 | //each frame starts and ends. |
| 773 | tANI_U8 staId; |
| 774 | }tCsrRoamConnectedInfo; |
| 775 | |
| 776 | |
| 777 | typedef struct tagCsrLinkQualityIndInfo |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 778 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 779 | csrRoamLinkQualityIndCallback callback; |
| 780 | void *context; |
| 781 | }tCsrLinkQualityIndInfo; |
| 782 | |
| 783 | typedef struct tagCsrPeStatsReqInfo |
| 784 | { |
| 785 | tListElem link; /* list links */ |
| 786 | tANI_U32 statsMask; |
| 787 | tANI_U32 periodicity; |
| 788 | tANI_BOOLEAN rspPending; |
| 789 | vos_timer_t hPeStatsTimer; |
| 790 | tANI_BOOLEAN timerRunning; |
| 791 | tANI_U8 staId; |
| 792 | tANI_U8 numClient; |
| 793 | tpAniSirGlobal pMac; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 794 | /* To remember if the peStats timer is stopped successfully or not */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 795 | tANI_BOOLEAN timerStopFailed; |
| 796 | |
| 797 | }tCsrPeStatsReqInfo; |
| 798 | |
| 799 | typedef struct tagCsrStatsClientReqInfo |
| 800 | { |
| 801 | tListElem link; /* list links */ |
| 802 | eCsrStatsRequesterType requesterId; |
| 803 | tCsrStatsCallback callback; |
| 804 | tANI_U32 periodicity; |
| 805 | void *pContext; |
| 806 | tANI_U32 statsMask; |
| 807 | tCsrPeStatsReqInfo *pPeStaEntry; |
| 808 | tANI_U8 staId; |
| 809 | vos_timer_t timer; |
| 810 | tANI_BOOLEAN timerExpired; |
| 811 | tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP |
| 812 | }tCsrStatsClientReqInfo; |
| 813 | |
| 814 | typedef struct tagCsrTlStatsReqInfo |
| 815 | { |
| 816 | tANI_U32 periodicity; |
| 817 | tANI_BOOLEAN timerRunning; |
| 818 | tPalTimerHandle hTlStatsTimer; |
| 819 | tANI_U8 numClient; |
| 820 | }tCsrTlStatsReqInfo; |
| 821 | |
| 822 | typedef struct tagCsrRoamSession |
| 823 | { |
| 824 | tANI_U8 sessionId; // Session ID |
| 825 | tANI_BOOLEAN sessionActive; // TRUE if it is used |
| 826 | tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS. |
| 827 | csrRoamCompleteCallback callback; |
| 828 | void *pContext; |
| 829 | eCsrConnectState connectState; |
| 830 | tCsrRoamConnectedProfile connectedProfile; |
| 831 | tCsrRoamConnectedInfo connectedInfo; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 832 | tCsrRoamProfile *pCurRoamProfile; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 833 | tSirBssDescription *pConnectBssDesc; |
| 834 | tANI_U16 NumPmkidCache; |
| 835 | tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED]; |
| 836 | tANI_U8 cJoinAttemps; |
| 837 | //This may or may not have the up-to-date valid channel list |
| 838 | //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time |
| 839 | tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 840 | tANI_S32 sPendingCommands; //0 means CSR is ok to low power |
| 841 | #ifdef FEATURE_WLAN_WAPI |
| 842 | tANI_U16 NumBkidCache; |
| 843 | tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED]; |
| 844 | #endif /* FEATURE_WLAN_WAPI */ |
| 845 | tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming) |
| 846 | //to remember some parameters needed for START_BSS. |
| 847 | //All member must be set every time we try to join or start an IBSS or BT-AMP |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 848 | tCsrRoamStartBssParams bssParams; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 849 | tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE; |
| 850 | tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS) |
| 851 | tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE |
| 852 | tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp |
| 853 | #ifdef FEATURE_WLAN_WAPI |
| 854 | tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE; |
| 855 | tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS) |
| 856 | tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE |
| 857 | tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp |
| 858 | #endif /* FEATURE_WLAN_WAPI */ |
| 859 | tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE; |
| 860 | tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join |
| 861 | tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE |
| 862 | tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request |
| 863 | |
| 864 | tANI_TIMESTAMP roamingStartTime; //in units of 10ms |
| 865 | tCsrTimerInfo roamingTimerInfo; |
| 866 | eCsrRoamingReason roamingReason; |
| 867 | tANI_BOOLEAN fCancelRoaming; |
| 868 | tPalTimerHandle hTimerRoaming; |
| 869 | tPalTimerHandle hTimerIbssJoining; |
| 870 | tCsrTimerInfo ibssJoinTimerInfo; |
| 871 | tANI_BOOLEAN ibss_join_pending; |
| 872 | eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires |
| 873 | tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure |
| 874 | //The status code returned from PE for deauth or disassoc (in case of lostlink), or our own dynamic roaming |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 875 | tANI_U32 roamingStatusCode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 876 | tANI_U16 NumPmkidCandidate; |
| 877 | tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED]; |
| 878 | #ifdef FEATURE_WLAN_WAPI |
| 879 | tANI_U16 NumBkidCandidate; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 880 | tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 881 | #endif |
| 882 | tANI_BOOLEAN fWMMConnection; |
| 883 | #ifdef FEATURE_WLAN_BTAMP_UT_RF |
| 884 | //To retry a join later when it fails if so desired |
| 885 | tPalTimerHandle hTimerJoinRetry; |
| 886 | tCsrTimerInfo joinRetryTimerInfo; |
| 887 | tANI_U32 maxRetryCount; |
| 888 | #endif |
| 889 | #ifdef FEATURE_WLAN_CCX |
| 890 | tCsrCcxCckmInfo ccxCckmInfo; |
| 891 | tANI_BOOLEAN isPrevApInfoValid; |
| 892 | tSirMacSSid prevApSSID; |
| 893 | tCsrBssid prevApBssid; |
| 894 | tANI_U8 prevOpChannel; |
| 895 | tANI_U16 clientDissSecs; |
| 896 | tANI_U32 roamTS1; |
| 897 | #endif |
| 898 | tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 899 | /* to force the AP initiate fresh 802.1x authentication after re-association need to clear |
Madan Mohan Koyyalamudi | ea22cdc | 2012-10-18 21:02:23 -0700 | [diff] [blame] | 900 | * the PMKID cache. To clear the cache in this particular case this is added |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 901 | * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */ |
Madan Mohan Koyyalamudi | ea22cdc | 2012-10-18 21:02:23 -0700 | [diff] [blame] | 902 | tANI_BOOLEAN fIgnorePMKIDCache; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 903 | } tCsrRoamSession; |
| 904 | |
| 905 | typedef struct tagCsrRoamStruct |
| 906 | { |
| 907 | tANI_U32 nextRoamId; |
| 908 | tDblLinkList roamCmdPendingList; |
| 909 | tDblLinkList channelList5G; |
| 910 | tDblLinkList channelList24; |
| 911 | tCsrConfig configParam; |
| 912 | tANI_U32 numChannelsEeprom; //total channels of eeprom |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 913 | tCsrChannel base20MHzChannels; //The channel base to work on |
| 914 | tCsrChannel base40MHzChannels; //center channels for 40MHz channels |
| 915 | eCsrRoamState curState[CSR_ROAM_SESSION_MAX]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 916 | eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX]; |
| 917 | //This may or may not have the up-to-date valid channel list |
| 918 | //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time |
| 919 | tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 920 | tANI_U32 numValidChannels; //total number of channels in CFG |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 921 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 922 | tANI_S32 sPendingCommands; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 923 | tPalTimerHandle hTimerWaitForKey; //To support timeout for WaitForKey state |
| 924 | tCsrSummaryStatsInfo summaryStatsInfo; |
| 925 | tCsrGlobalClassAStatsInfo classAStatsInfo; |
| 926 | tCsrGlobalClassBStatsInfo classBStatsInfo; |
| 927 | tCsrGlobalClassCStatsInfo classCStatsInfo; |
| 928 | tCsrGlobalClassDStatsInfo classDStatsInfo; |
| 929 | tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA]; |
| 930 | tDblLinkList statsClientReqList; |
| 931 | tDblLinkList peStatsReqList; |
| 932 | tCsrTlStatsReqInfo tlStatsReqInfo; |
| 933 | eCsrRoamLinkQualityInd vccLinkQuality; |
| 934 | tCsrLinkQualityIndInfo linkQualityIndInfo; |
| 935 | v_CONTEXT_t gVosContext; //used for interaction with TL |
| 936 | //To specify whether an association or a IBSS is WMM enabled |
| 937 | //This parameter is only valid during a join or start BSS command is being executed |
| 938 | //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */ |
| 939 | v_U8_t ucACWeights[WLANTL_MAX_AC]; |
| 940 | /* TODO : Upto here */ |
| 941 | tCsrTimerInfo WaitForKeyTimerInfo; |
| 942 | tCsrRoamSession *roamSession; |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 943 | tANI_U32 transactionId; // Current transaction ID for internal use. |
| 944 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 945 | tCsrNeighborRoamControlInfo neighborRoamInfo; |
| 946 | #endif |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 947 | #ifdef FEATURE_WLAN_LFR |
| 948 | tANI_U8 isFastRoamIniFeatureEnabled; |
| 949 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 950 | #ifdef FEATURE_WLAN_CCX |
| 951 | tANI_U8 isCcxIniFeatureEnabled; |
| 952 | #endif |
Jeff Johnson | 43971f5 | 2012-07-17 12:26:56 -0700 | [diff] [blame] | 953 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR) |
| 954 | tANI_U8 RoamRssiDiff; |
| 955 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 956 | }tCsrRoamStruct; |
| 957 | |
| 958 | |
| 959 | #define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId) |
| 960 | #define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] ) |
| 961 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 962 | #define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId ) |
| 963 | #define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 964 | #define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId ) |
| 965 | #define CSR_IS_ROAM_JOINING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINING, sessionId ) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 966 | #define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 967 | #define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId ) |
| 968 | |
| 969 | #define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId]) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 970 | #define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId) |
| 971 | #define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId) |
| 972 | #define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId) |
| 973 | #define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId) |
| 974 | #define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId) |
| 975 | #define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId) |
| 976 | #define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId) |
| 977 | #define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId) |
| 978 | #define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId) |
| 979 | #define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId) |
| 980 | #define CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, sessionId) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 981 | #define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId) |
| 982 | #define CSR_IS_ROAM_SUBSTATE_WAITFORKEY(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 983 | #define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId) |
| 984 | #define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId) |
| 985 | #define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId) |
| 986 | #define CSR_IS_ROAM_SUBSTATE_HO_RT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC, sessionId) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 987 | |
| 988 | #define CSR_IS_PHY_MODE_B_ONLY(pMac) \ |
| 989 | ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\ |
| 990 | (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode)) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 991 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 992 | #define CSR_IS_PHY_MODE_G_ONLY(pMac) \ |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 993 | (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode) |
| 994 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 995 | #define CSR_IS_PHY_MODE_A_ONLY(pMac) \ |
| 996 | ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\ |
| 997 | (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode)) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 998 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 999 | #ifdef WLAN_FEATURE_11AC |
| 1000 | #define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \ |
| 1001 | ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \ |
| 1002 | (eCSR_DOT11_MODE_11ac & (phyMode)) || \ |
| 1003 | (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \ |
| 1004 | (eCSR_DOT11_MODE_AUTO & (phyMode))) |
| 1005 | #else |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1006 | #define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \ |
| 1007 | ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \ |
| 1008 | (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \ |
| 1009 | (eCSR_DOT11_MODE_AUTO & (phyMode))) |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1010 | #endif |
| 1011 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1012 | |
| 1013 | // this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning |
| 1014 | // it is NOT operating in the 5.0 GHz band. |
| 1015 | #define CSR_IS_24_BAND_ONLY(pMac) \ |
| 1016 | (eCSR_BAND_24 == (pMac)->roam.configParam.eBand) |
| 1017 | |
| 1018 | #define CSR_IS_5G_BAND_ONLY(pMac) \ |
| 1019 | (eCSR_BAND_5G == (pMac)->roam.configParam.eBand) |
| 1020 | |
| 1021 | #define CSR_IS_RADIO_DUAL_BAND(pMac) \ |
| 1022 | (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) |
| 1023 | |
| 1024 | #define CSR_IS_RADIO_BG_ONLY(pMac) \ |
| 1025 | (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability) |
| 1026 | |
| 1027 | // this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning |
| 1028 | // it is NOT operating in the 2.4 GHz band |
| 1029 | #define CSR_IS_RADIO_A_ONLY(pMac) \ |
| 1030 | (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability) |
| 1031 | |
| 1032 | // this function returns TRUE if the NIC is operating in both bands. |
| 1033 | #define CSR_IS_OPEARTING_DUAL_BAND(pMac) \ |
| 1034 | ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand)) |
| 1035 | |
| 1036 | // this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the |
| 1037 | // 2.4 GHz band also). |
| 1038 | #define CSR_IS_OPERATING_A_BAND(pMac) \ |
| 1039 | (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac))) |
| 1040 | |
| 1041 | // this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the |
| 1042 | // 5.0 GHz band also). |
| 1043 | #define CSR_IS_OPERATING_BG_BAND(pMac) \ |
| 1044 | (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac))) |
| 1045 | |
| 1046 | #define CSR_IS_CHANNEL_5GHZ(chnNum) \ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1047 | (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1048 | |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame] | 1049 | #define CSR_IS_CHANNEL_DFS(chnNum) \ |
| 1050 | (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum)) |
| 1051 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1052 | #define CSR_IS_CHANNEL_24GHZ(chnNum) \ |
| 1053 | (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER)) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1054 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1055 | #define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2)) |
| 1056 | |
| 1057 | |
| 1058 | #define CSR_IS_11D_INFO_FOUND(pMac) \ |
| 1059 | (0 != (pMac)->scan.channelOf11dInfo) |
| 1060 | // DEAUTHIND |
| 1061 | #define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \ |
| 1062 | (eCsrDynamicRoaming == (pSession)->roamingReason) || \ |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1063 | (eCsrReassocRoaming == (pSession)->roamingReason)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1064 | |
| 1065 | |
| 1066 | #define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command ) |
| 1067 | |
| 1068 | #define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff) |
| 1069 | // DEAUTHIND |
| 1070 | #define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason))) |
| 1071 | |
| 1072 | //Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR |
| 1073 | void csrScanSuspendIMPS( tpAniSirGlobal pMac ); |
| 1074 | //Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS |
| 1075 | //because IMPS maybe disabled. |
| 1076 | void csrScanResumeIMPS( tpAniSirGlobal pMac ); |
| 1077 | |
| 1078 | eHalStatus csrInitGetChannels(tpAniSirGlobal pMac); |
| 1079 | |
| 1080 | eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId, |
| 1081 | tCsrRoamModifyProfileFields *pModifyProfileFields); |
| 1082 | /* --------------------------------------------------------------------------- |
| 1083 | \fn csrGetModifyProfileFields |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1084 | \brief HDD or SME - QOS calls this function to get the current values of |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1085 | connected profile fields changing which can cause reassoc. |
| 1086 | This function must be called after CFG is downloaded and STA is in connected |
| 1087 | state. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1088 | \param pModifyProfileFields - pointer to the connected profile fields |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1089 | changing which can cause reassoc |
| 1090 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1091 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1092 | -------------------------------------------------------------------------------*/ |
| 1093 | eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId, |
| 1094 | tCsrRoamModifyProfileFields * pModifyProfileFields); |
| 1095 | void csrSetGlobalCfgs( tpAniSirGlobal pMac ); |
| 1096 | void csrSetDefaultDot11Mode( tpAniSirGlobal pMac ); |
| 1097 | void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo); |
| 1098 | tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId); |
| 1099 | tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1100 | tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1101 | tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1102 | tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1103 | tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1104 | tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1105 | tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1106 | tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1107 | tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1108 | tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac ); |
| 1109 | tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac ); |
Madan Mohan Koyyalamudi | 48081ef | 2012-12-04 16:49:55 -0800 | [diff] [blame] | 1110 | tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac ); |
| 1111 | tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac ); |
Madan Mohan Koyyalamudi | d3d2259 | 2012-09-24 14:01:29 -0700 | [diff] [blame] | 1112 | tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1113 | tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac ); |
| 1114 | tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac ); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1115 | tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac ); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1116 | tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1117 | tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac ); |
| 1118 | tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac ); |
| 1119 | tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
| 1120 | eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId ); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1121 | tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId, |
| 1122 | tSirBssDescription *pBssDesc); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1123 | tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1124 | /*---------------------------------------------------------------------------- |
| 1125 | \fn csrRoamRegisterLinkQualityIndCallback |
| 1126 | |
| 1127 | \brief |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1128 | a CSR function to allow HDD to register a callback handler with CSR for |
| 1129 | link quality indications. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1130 | |
| 1131 | Only one callback may be registered at any time. |
| 1132 | In order to deregister the callback, a NULL cback may be provided. |
| 1133 | |
| 1134 | Registration happens in the task context of the caller. |
| 1135 | |
| 1136 | \param callback - Call back being registered |
| 1137 | \param pContext - user data |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1138 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1139 | DEPENDENCIES: After CSR open |
| 1140 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1141 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1142 | -----------------------------------------------------------------------------*/ |
| 1143 | eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac, |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1144 | csrRoamLinkQualityIndCallback callback, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1145 | void *pContext); |
| 1146 | /* --------------------------------------------------------------------------- |
| 1147 | \fn csrGetStatistics |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1148 | \brief csr function that client calls to register a callback to get |
| 1149 | different PHY level statistics from CSR. |
| 1150 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1151 | \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc |
| 1152 | \param statsMask - The different category/categories of stats requester is looking for |
| 1153 | \param callback - SME sends back the requested stats using the callback |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1154 | \param periodicity - If requester needs periodic update, 0 means it's an one |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1155 | time request |
| 1156 | \param cache - If requester is happy with cached stats |
| 1157 | \param staId - The station ID for which the stats is requested for |
| 1158 | \param pContext - user context to be passed back along with the callback |
| 1159 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1160 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1161 | ---------------------------------------------------------------------------*/ |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1162 | eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId, |
| 1163 | tANI_U32 statsMask, |
| 1164 | tCsrStatsCallback callback, |
| 1165 | tANI_U32 periodicity, tANI_BOOLEAN cache, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1166 | tANI_U8 staId, void *pContext); |
| 1167 | |
| 1168 | |
| 1169 | eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext); |
Srinivas Girigowda | d34cedb | 2013-01-25 13:33:11 -0800 | [diff] [blame] | 1170 | #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR) |
| 1171 | eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac, |
| 1172 | tCsrRssiCallback callback, |
| 1173 | tANI_U8 staId, |
| 1174 | tCsrBssid bssId, |
| 1175 | void * pContext, |
| 1176 | void * pVosContext); |
| 1177 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1178 | eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext); |
| 1179 | /* --------------------------------------------------------------------------- |
| 1180 | \fn csrGetConfigParam |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1181 | \brief HDD calls this function to get the global settings currently maintained by CSR. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1182 | \param pParam - caller allocated memory |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1183 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1184 | -------------------------------------------------------------------------------*/ |
| 1185 | eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam); |
| 1186 | |
| 1187 | /* --------------------------------------------------------------------------- |
| 1188 | \fn csrMsgProcessor |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1189 | \brief HDD calls this function to change some global settings. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1190 | caller must set the all fields or call csrGetConfigParam to prefill the fields. |
| 1191 | \param pParam - caller allocated memory |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1192 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1193 | -------------------------------------------------------------------------------*/ |
| 1194 | eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam); |
| 1195 | |
| 1196 | |
| 1197 | /* --------------------------------------------------------------------------- |
| 1198 | \fn csrMsgProcessor |
| 1199 | \brief HDD calls this function for the messages that are handled by CSR. |
| 1200 | \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type. |
| 1201 | The beginning of the buffer can always map to tSirSmeRsp. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1202 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1203 | -------------------------------------------------------------------------------*/ |
| 1204 | eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf ); |
| 1205 | |
| 1206 | /* --------------------------------------------------------------------------- |
| 1207 | \fn csrOpen |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1208 | \brief This function must be called before any API call to CSR. |
| 1209 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1210 | -------------------------------------------------------------------------------*/ |
| 1211 | eHalStatus csrOpen(tpAniSirGlobal pMac); |
| 1212 | /* --------------------------------------------------------------------------- |
| 1213 | \fn csrClose |
| 1214 | \brief To close down CSR module. There should not be any API call into CSR after calling this function. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1215 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1216 | -------------------------------------------------------------------------------*/ |
| 1217 | eHalStatus csrClose(tpAniSirGlobal pMac); |
| 1218 | /* --------------------------------------------------------------------------- |
| 1219 | \fn csrStart |
| 1220 | \brief To start CSR. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1221 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1222 | -------------------------------------------------------------------------------*/ |
| 1223 | eHalStatus csrStart(tpAniSirGlobal pMac); |
| 1224 | /* --------------------------------------------------------------------------- |
| 1225 | \fn csrStop |
| 1226 | \brief To stop CSR. CSR still keeps its current setting. |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1227 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1228 | -------------------------------------------------------------------------------*/ |
| 1229 | eHalStatus csrStop(tpAniSirGlobal pMac); |
| 1230 | /* --------------------------------------------------------------------------- |
| 1231 | \fn csrReady |
| 1232 | \brief To let CSR is ready to operate |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1233 | \return eHalStatus |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1234 | -------------------------------------------------------------------------------*/ |
| 1235 | eHalStatus csrReady(tpAniSirGlobal pMac); |
| 1236 | |
| 1237 | #ifdef FEATURE_WLAN_WAPI |
| 1238 | eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum, |
| 1239 | tBkidCacheInfo *pBkidCache); |
| 1240 | |
| 1241 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1242 | eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1243 | tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems ); |
| 1244 | tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId); |
| 1245 | eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache, |
| 1246 | tANI_U32 numItems ); |
| 1247 | /* --------------------------------------------------------------------------- |
| 1248 | \fn csrRoamGetWapiReqIE |
| 1249 | \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1250 | \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1251 | needed or IE length in pBuf. |
| 1252 | \param pBuf - Caller allocated memory that contain the IE field, if any, upon return |
| 1253 | \return eHalStatus - when fail, it usually means the buffer allocated is not big enough |
| 1254 | -------------------------------------------------------------------------------*/ |
| 1255 | eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf); |
| 1256 | |
| 1257 | /* --------------------------------------------------------------------------- |
| 1258 | \fn csrRoamGetWapiRspIE |
| 1259 | \brief return the WAPI IE from the beacon or probe rsp if connected |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1260 | \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1261 | needed or IE length in pBuf. |
| 1262 | \param pBuf - Caller allocated memory that contain the IE field, if any, upon return |
| 1263 | \return eHalStatus - when fail, it usually means the buffer allocated is not big enough |
| 1264 | -------------------------------------------------------------------------------*/ |
| 1265 | eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1266 | tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1267 | tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe ); |
| 1268 | #endif /* FEATURE_WLAN_WAPI */ |
| 1269 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1270 | eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES ); |
| 1271 | eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1272 | void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy ); |
| 1273 | tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac ); |
| 1274 | tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 1275 | tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac ); |
| 1276 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1277 | eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1278 | tCsrRoamConnectedProfile *pProfile); |
| 1279 | tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId); |
| 1280 | |
| 1281 | void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac ); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1282 | void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1283 | tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels ); |
| 1284 | |
| 1285 | #endif |
| 1286 | |
| 1287 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1288 | //Returns whether the current association is a 11r assoc or not |
| 1289 | tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac); |
| 1290 | #endif |
| 1291 | |
| 1292 | #ifdef FEATURE_WLAN_CCX |
| 1293 | //Returns whether the current association is a CCX assoc or not |
| 1294 | tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac); |
| 1295 | #endif |
| 1296 | |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1297 | //Remove this code once SLM_Sessionization is supported |
Madan Mohan Koyyalamudi | 96dd30d | 2012-10-05 17:24:51 -0700 | [diff] [blame] | 1298 | //BMPS_WORKAROUND_NOT_NEEDED |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1299 | void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac); |
Mohit Khanna | 349bc39 | 2012-09-11 17:24:52 -0700 | [diff] [blame] | 1300 | |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 1301 | #ifdef FEATURE_WLAN_LFR |
| 1302 | //Returns whether "Legacy Fast Roaming" is enabled...or not |
Madan Mohan Koyyalamudi | 03aae5f | 2012-11-28 01:51:22 +0530 | [diff] [blame] | 1303 | tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId); |
Madan Mohan Koyyalamudi | 470d2cf | 2012-09-28 14:43:44 -0700 | [diff] [blame] | 1304 | tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel ); |
| 1305 | VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel ); |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 1306 | #endif |
| 1307 | |