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