Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 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. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 20 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 22 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [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. |
| 26 | */ |
| 27 | |
| 28 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | * This file limTimerUtils.cc contains the utility functions |
| 30 | * LIM uses for handling various timers. |
| 31 | * Author: Chandra Modumudi |
| 32 | * Date: 02/13/02 |
| 33 | * History:- |
| 34 | * Date Modified by Modification Information |
| 35 | * -------------------------------------------------------------------- |
| 36 | */ |
| 37 | |
| 38 | #include "limTypes.h" |
| 39 | #include "limUtils.h" |
| 40 | #include "limAssocUtils.h" |
| 41 | #include "limSecurityUtils.h" |
| 42 | #include "pmmApi.h" |
Padma, Santhosh Kumar | b036fc7 | 2015-11-13 16:22:23 +0530 | [diff] [blame] | 43 | #include "limApi.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 44 | |
| 45 | // default value 5000 ms for background scan period when it is disabled |
| 46 | #define LIM_BACKGROUND_SCAN_PERIOD_DEFAULT_MS 5000 |
| 47 | // channel Switch Timer in ticks |
| 48 | #define LIM_CHANNEL_SWITCH_TIMER_TICKS 1 |
| 49 | // Lim Quite timer in ticks |
| 50 | #define LIM_QUIET_TIMER_TICKS 100 |
Jeff Johnson | feddb2d | 2012-12-10 14:41:22 -0800 | [diff] [blame] | 51 | // Lim Quite BSS timer interval in ticks |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 52 | #define LIM_QUIET_BSS_TIMER_TICK 100 |
| 53 | // Lim KeepAlive timer default (3000)ms |
| 54 | #define LIM_KEEPALIVE_TIMER_MS 3000 |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 55 | // Lim JoinProbeRequest Retry timer default (200)ms |
| 56 | #define LIM_JOIN_PROBE_REQ_TIMER_MS 200 |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 57 | #define LIM_AUTH_RETRY_TIMER_MS 60 |
| 58 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 59 | |
| 60 | //default beacon interval value used in HB timer interval calculation |
| 61 | #define LIM_HB_TIMER_BEACON_INTERVAL 100 |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 62 | |
Madan Mohan Koyyalamudi | 98b82ce | 2013-07-11 17:03:55 +0530 | [diff] [blame] | 63 | /* This timer is a periodic timer which expires at every 1 sec to |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 64 | convert ACTIVE DFS channel to DFS channels */ |
Madan Mohan Koyyalamudi | 98b82ce | 2013-07-11 17:03:55 +0530 | [diff] [blame] | 65 | #define ACTIVE_TO_PASSIVE_CONVERISON_TIMEOUT 1000 |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 66 | |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 67 | #ifdef WLAN_FEATURE_LFR_MBB |
| 68 | #define PREAUTH_REASSOC_TIMEOUT 500 |
| 69 | #endif |
| 70 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 71 | /** |
| 72 | * limCreateTimers() |
| 73 | * |
| 74 | *FUNCTION: |
| 75 | * This function is called upon receiving |
| 76 | * 1. SME_START_REQ for STA in ESS role |
| 77 | * 2. SME_START_BSS_REQ for AP role & STA in IBSS role |
| 78 | * |
| 79 | *LOGIC: |
| 80 | * |
| 81 | *ASSUMPTIONS: |
| 82 | * NA |
| 83 | * |
| 84 | *NOTE: |
| 85 | * NA |
| 86 | * |
| 87 | * @param pMac - Pointer to Global MAC structure |
| 88 | * |
| 89 | * @return None |
| 90 | */ |
| 91 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 92 | v_UINT_t |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 93 | limCreateTimers(tpAniSirGlobal pMac) |
| 94 | { |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 95 | tANI_U32 cfgValue, i=0; |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 96 | tANI_U32 cfgValue1; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 97 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 98 | PELOG1(limLog(pMac, LOG1, FL("Creating Timers used by LIM module in Role %d"), pMac->lim.gLimSystemRole);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 99 | |
| 100 | if (wlan_cfgGetInt(pMac, WNI_CFG_ACTIVE_MINIMUM_CHANNEL_TIME, |
| 101 | &cfgValue) != eSIR_SUCCESS) |
| 102 | { |
| 103 | /** |
| 104 | * Could not get MinChannelTimeout value |
| 105 | * from CFG. Log error. |
| 106 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 107 | limLog(pMac, LOGP, FL("could not retrieve MinChannelTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 108 | } |
| 109 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 110 | |
| 111 | // Create MIN/MAX channel timers and activate them later |
| 112 | if (tx_timer_create(&pMac->lim.limTimers.gLimMinChannelTimer, |
| 113 | "MIN CHANNEL TIMEOUT", |
| 114 | limTimerHandler, SIR_LIM_MIN_CHANNEL_TIMEOUT, |
| 115 | cfgValue, 0, |
| 116 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 117 | { |
| 118 | /// Could not start min channel timer. |
| 119 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 120 | limLog(pMac, LOGP, FL("could not create MIN channel timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 121 | return TX_TIMER_ERROR; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 122 | } |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 123 | PELOG2(limLog(pMac, LOG2, FL("Created MinChannelTimer"));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 124 | |
| 125 | /* Periodic probe request timer value is half of the Min channel |
| 126 | * timer. Probe request sends periodically till min/max channel |
| 127 | * timer expires |
| 128 | */ |
| 129 | |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 130 | cfgValue1 = cfgValue/2 ; |
| 131 | if( cfgValue1 >= 1) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 132 | { |
| 133 | // Create periodic probe request timer and activate them later |
| 134 | if (tx_timer_create(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer, |
| 135 | "Periodic Probe Request Timer", |
| 136 | limTimerHandler, SIR_LIM_PERIODIC_PROBE_REQ_TIMEOUT, |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 137 | cfgValue1, 0, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 138 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 139 | { |
| 140 | /// Could not start Periodic Probe Req timer. |
| 141 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 142 | limLog(pMac, LOGP, FL("could not create periodic probe timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 143 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 144 | } |
| 145 | } |
| 146 | |
| 147 | |
| 148 | if (wlan_cfgGetInt(pMac, WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME, |
| 149 | &cfgValue) != eSIR_SUCCESS) |
| 150 | { |
| 151 | /** |
| 152 | * Could not get MAXChannelTimeout value |
| 153 | * from CFG. Log error. |
| 154 | */ |
| 155 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 156 | FL("could not retrieve MAXChannelTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 157 | } |
| 158 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 159 | |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 160 | /* Limiting max numm of probe req for each channel scan */ |
| 161 | pMac->lim.maxProbe = (cfgValue/cfgValue1); |
| 162 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 163 | if (tx_timer_create(&pMac->lim.limTimers.gLimMaxChannelTimer, |
| 164 | "MAX CHANNEL TIMEOUT", |
| 165 | limTimerHandler, SIR_LIM_MAX_CHANNEL_TIMEOUT, |
| 166 | cfgValue, 0, |
| 167 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 168 | { |
| 169 | /// Could not start max channel timer. |
| 170 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 171 | limLog(pMac, LOGP, FL("could not create MAX channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 172 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 173 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 174 | } |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 175 | PELOG2(limLog(pMac, LOG2, FL("Created MaxChannelTimer"));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 176 | |
| 177 | if (pMac->lim.gLimSystemRole != eLIM_AP_ROLE) |
| 178 | { |
| 179 | // Create Channel Switch Timer |
| 180 | if (tx_timer_create(&pMac->lim.limTimers.gLimChannelSwitchTimer, |
| 181 | "CHANNEL SWITCH TIMER", |
| 182 | limChannelSwitchTimerHandler, |
| 183 | 0, // expiration_input |
| 184 | LIM_CHANNEL_SWITCH_TIMER_TICKS, // initial_ticks |
| 185 | 0, // reschedule_ticks |
| 186 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 187 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 188 | limLog(pMac, LOGP, FL("failed to create Channel Switch timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 189 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | // |
| 193 | // Create Quiet Timer |
| 194 | // This is used on the STA to go and shut-off |
| 195 | // Tx/Rx "after" the specified quiteInterval |
| 196 | // |
| 197 | if (tx_timer_create(&pMac->lim.limTimers.gLimQuietTimer, |
| 198 | "QUIET TIMER", |
| 199 | limQuietTimerHandler, |
| 200 | SIR_LIM_QUIET_TIMEOUT, // expiration_input |
| 201 | LIM_QUIET_TIMER_TICKS, // initial_ticks |
| 202 | 0, // reschedule_ticks |
| 203 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 204 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 205 | limLog(pMac, LOGP, FL("failed to create Quiet Begin Timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 206 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | // |
| 210 | // Create Quiet BSS Timer |
| 211 | // After the specified quiteInterval, determined by |
| 212 | // gLimQuietTimer, this timer, gLimQuietBssTimer, |
| 213 | // trigger and put the STA to sleep for the specified |
| 214 | // gLimQuietDuration |
| 215 | // |
| 216 | if (tx_timer_create(&pMac->lim.limTimers.gLimQuietBssTimer, |
| 217 | "QUIET BSS TIMER", |
| 218 | limQuietBssTimerHandler, |
| 219 | SIR_LIM_QUIET_BSS_TIMEOUT, // expiration_input |
| 220 | LIM_QUIET_BSS_TIMER_TICK, // initial_ticks |
| 221 | 0, // reschedule_ticks |
| 222 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 223 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 224 | limLog(pMac, LOGP, FL("failed to create Quiet Begin Timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 225 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | if (wlan_cfgGetInt(pMac, WNI_CFG_JOIN_FAILURE_TIMEOUT, |
| 229 | &cfgValue) != eSIR_SUCCESS) |
| 230 | { |
| 231 | /** |
| 232 | * Could not get JoinFailureTimeout value |
| 233 | * from CFG. Log error. |
| 234 | */ |
| 235 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 236 | FL("could not retrieve JoinFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 237 | } |
| 238 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 239 | |
| 240 | // Create Join failure timer and activate it later |
| 241 | if (tx_timer_create(&pMac->lim.limTimers.gLimJoinFailureTimer, |
| 242 | "JOIN FAILURE TIMEOUT", |
| 243 | limTimerHandler, SIR_LIM_JOIN_FAIL_TIMEOUT, |
| 244 | cfgValue, 0, |
| 245 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 246 | { |
| 247 | /// Could not create Join failure timer. |
| 248 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 249 | limLog(pMac, LOGP, FL("could not create Join failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 250 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 251 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 252 | } |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 253 | |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 254 | //Send unicast probe req frame every 200 ms |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 255 | if ((tx_timer_create(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer, |
| 256 | "Periodic Join Probe Request Timer", |
| 257 | limTimerHandler, SIR_LIM_PERIODIC_JOIN_PROBE_REQ_TIMEOUT, |
| 258 | SYS_MS_TO_TICKS(LIM_JOIN_PROBE_REQ_TIMER_MS), 0, |
| 259 | TX_NO_ACTIVATE)) != TX_SUCCESS) |
| 260 | { |
| 261 | /// Could not create Periodic Join Probe Request timer. |
| 262 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 263 | limLog(pMac, LOGP, FL("could not create Periodic Join Probe Request timer")); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 264 | goto err_timer; |
| 265 | } |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 266 | //Send Auth frame every 60 ms |
| 267 | if ((tx_timer_create(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer, |
| 268 | "Periodic AUTH Timer", |
| 269 | limTimerHandler, SIR_LIM_AUTH_RETRY_TIMEOUT, |
| 270 | SYS_MS_TO_TICKS(LIM_AUTH_RETRY_TIMER_MS), 0, |
| 271 | TX_NO_ACTIVATE)) != TX_SUCCESS) |
| 272 | { |
| 273 | /// Could not create Periodic Join Probe Request timer. |
| 274 | // Log error |
| 275 | limLog(pMac, LOGP, FL("could not create Periodic AUTH Timer timer")); |
| 276 | goto err_timer; |
| 277 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 278 | if (wlan_cfgGetInt(pMac, WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT, |
| 279 | &cfgValue) != eSIR_SUCCESS) |
| 280 | { |
| 281 | /** |
| 282 | * Could not get AssocFailureTimeout value |
| 283 | * from CFG. Log error. |
| 284 | */ |
| 285 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 286 | FL("could not retrieve AssocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 287 | } |
| 288 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 289 | |
| 290 | // Create Association failure timer and activate it later |
| 291 | if (tx_timer_create(&pMac->lim.limTimers.gLimAssocFailureTimer, |
| 292 | "ASSOC FAILURE TIMEOUT", |
| 293 | limAssocFailureTimerHandler, LIM_ASSOC, |
| 294 | cfgValue, 0, |
| 295 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 296 | { |
| 297 | /// Could not create Assoc failure timer. |
| 298 | // Log error |
| 299 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 300 | FL("could not create Association failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 301 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 302 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 303 | } |
| 304 | if (wlan_cfgGetInt(pMac, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, |
| 305 | &cfgValue) != eSIR_SUCCESS) |
| 306 | { |
| 307 | /** |
| 308 | * Could not get ReassocFailureTimeout value |
| 309 | * from CFG. Log error. |
| 310 | */ |
| 311 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 312 | FL("could not retrieve ReassocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 313 | } |
| 314 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 315 | |
| 316 | // Create Association failure timer and activate it later |
| 317 | if (tx_timer_create(&pMac->lim.limTimers.gLimReassocFailureTimer, |
| 318 | "REASSOC FAILURE TIMEOUT", |
| 319 | limAssocFailureTimerHandler, LIM_REASSOC, |
| 320 | cfgValue, 0, |
| 321 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 322 | { |
| 323 | /// Could not create Reassoc failure timer. |
| 324 | // Log error |
| 325 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 326 | FL("could not create Reassociation failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 327 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 328 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | if (wlan_cfgGetInt(pMac, WNI_CFG_ADDTS_RSP_TIMEOUT, &cfgValue) != eSIR_SUCCESS) |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 332 | limLog(pMac, LOGP, FL("Fail to get WNI_CFG_ADDTS_RSP_TIMEOUT ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 333 | |
| 334 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 335 | |
| 336 | // Create Addts response timer and activate it later |
| 337 | if (tx_timer_create(&pMac->lim.limTimers.gLimAddtsRspTimer, |
| 338 | "ADDTS RSP TIMEOUT", |
| 339 | limAddtsResponseTimerHandler, |
| 340 | SIR_LIM_ADDTS_RSP_TIMEOUT, |
| 341 | cfgValue, 0, |
| 342 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 343 | { |
| 344 | /// Could not create Auth failure timer. |
| 345 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 346 | limLog(pMac, LOGP, FL("could not create Addts response timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 347 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 348 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 349 | } |
| 350 | |
| 351 | if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT, |
| 352 | &cfgValue) != eSIR_SUCCESS) |
| 353 | { |
| 354 | /** |
| 355 | * Could not get AuthFailureTimeout value |
| 356 | * from CFG. Log error. |
| 357 | */ |
| 358 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 359 | FL("could not retrieve AuthFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 360 | } |
| 361 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 362 | |
| 363 | // Create Auth failure timer and activate it later |
| 364 | if (tx_timer_create(&pMac->lim.limTimers.gLimAuthFailureTimer, |
| 365 | "AUTH FAILURE TIMEOUT", |
| 366 | limTimerHandler, |
| 367 | SIR_LIM_AUTH_FAIL_TIMEOUT, |
| 368 | cfgValue, 0, |
| 369 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 370 | { |
| 371 | /// Could not create Auth failure timer. |
| 372 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 373 | limLog(pMac, LOGP, FL("could not create Auth failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 374 | |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 375 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 376 | } |
Jeff Johnson | 41707a4 | 2013-02-14 07:54:26 -0800 | [diff] [blame] | 377 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 378 | if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, |
| 379 | &cfgValue) != eSIR_SUCCESS) |
| 380 | { |
| 381 | /** |
| 382 | * Could not get BEACON_INTERVAL value |
| 383 | * from CFG. Log error. |
| 384 | */ |
| 385 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 386 | FL("could not retrieve BEACON_INTERVAL value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 387 | } |
| 388 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 389 | |
| 390 | if (tx_timer_create(&pMac->lim.limTimers.gLimHeartBeatTimer, |
| 391 | "Heartbeat TIMEOUT", |
| 392 | limTimerHandler, |
| 393 | SIR_LIM_HEART_BEAT_TIMEOUT, |
| 394 | cfgValue, |
| 395 | 0, |
| 396 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 397 | { |
| 398 | /// Could not start Heartbeat timer. |
| 399 | // Log error |
| 400 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 401 | FL("call to create heartbeat timer failed")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 402 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 403 | } |
| 404 | |
| 405 | if (wlan_cfgGetInt(pMac, WNI_CFG_PROBE_AFTER_HB_FAIL_TIMEOUT, |
| 406 | &cfgValue) != eSIR_SUCCESS) |
| 407 | { |
| 408 | /** |
| 409 | * Could not get PROBE_AFTER_HB_FAILURE |
| 410 | * value from CFG. Log error. |
| 411 | */ |
| 412 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 413 | FL("could not retrieve PROBE_AFTER_HB_FAIL_TIMEOUT value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | // Change timer to reactivate it in future |
| 417 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 418 | |
| 419 | if (tx_timer_create(&pMac->lim.limTimers.gLimProbeAfterHBTimer, |
| 420 | "Probe after Heartbeat TIMEOUT", |
| 421 | limTimerHandler, |
| 422 | SIR_LIM_PROBE_HB_FAILURE_TIMEOUT, |
| 423 | cfgValue, |
| 424 | 0, |
| 425 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 426 | { |
| 427 | // Could not creat wt-probe-after-HeartBeat-failure timer. |
| 428 | // Log error |
| 429 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 430 | FL("unable to create ProbeAfterHBTimer")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 431 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 432 | } |
| 433 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 434 | if (wlan_cfgGetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD, |
| 435 | &cfgValue) != eSIR_SUCCESS) |
| 436 | { |
| 437 | /** |
| 438 | * Could not get Background scan period value |
| 439 | * from CFG. Log error. |
| 440 | */ |
| 441 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 442 | FL("could not retrieve Background scan period value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | /* |
| 446 | * setting period to zero means disabling background scans when associated |
| 447 | * the way we do this is to set a flag indicating this and keeping |
| 448 | * the timer running, since it will be used for PDU leak workarounds |
| 449 | * as well as background scanning during SME idle states |
| 450 | */ |
| 451 | if (cfgValue == 0) |
| 452 | { |
| 453 | cfgValue = LIM_BACKGROUND_SCAN_PERIOD_DEFAULT_MS; |
| 454 | pMac->lim.gLimBackgroundScanDisable = true; |
| 455 | } |
| 456 | else |
| 457 | pMac->lim.gLimBackgroundScanDisable = false; |
| 458 | |
| 459 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 460 | |
| 461 | if (tx_timer_create(&pMac->lim.limTimers.gLimBackgroundScanTimer, |
| 462 | "Background scan TIMEOUT", |
| 463 | limTimerHandler, |
| 464 | SIR_LIM_CHANNEL_SCAN_TIMEOUT, |
| 465 | cfgValue, |
| 466 | cfgValue, |
| 467 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 468 | { |
| 469 | /// Could not start background scan timer. |
| 470 | // Log error |
| 471 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 472 | FL("call to create background scan timer failed")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 473 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 474 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 475 | } |
| 476 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 477 | /** |
| 478 | * Create keepalive timer and activate it right away for AP role |
| 479 | */ |
| 480 | |
| 481 | if (wlan_cfgGetInt(pMac, WNI_CFG_KEEPALIVE_TIMEOUT, |
| 482 | &cfgValue) != eSIR_SUCCESS) |
| 483 | { |
| 484 | /** |
| 485 | * Could not get keepalive timeout value |
| 486 | * from CFG. Log error. |
| 487 | */ |
| 488 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 489 | FL("could not retrieve keepalive timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 490 | } |
| 491 | |
| 492 | // A value of zero implies keep alive should be disabled |
| 493 | if (cfgValue == 0) |
| 494 | { |
| 495 | cfgValue = LIM_KEEPALIVE_TIMER_MS; |
| 496 | pMac->sch.keepAlive = 0; |
| 497 | } else |
| 498 | pMac->sch.keepAlive = 1; |
| 499 | |
| 500 | |
| 501 | cfgValue = SYS_MS_TO_TICKS(cfgValue + SYS_TICK_DUR_MS - 1); |
| 502 | |
| 503 | if (tx_timer_create(&pMac->lim.limTimers.gLimKeepaliveTimer, |
| 504 | "KEEPALIVE_TIMEOUT", |
| 505 | limKeepaliveTmerHandler, |
| 506 | 0, |
| 507 | cfgValue, |
| 508 | cfgValue, |
| 509 | (pMac->lim.gLimSystemRole == eLIM_AP_ROLE) ? |
| 510 | TX_AUTO_ACTIVATE : TX_NO_ACTIVATE) |
| 511 | != TX_SUCCESS) |
| 512 | { |
| 513 | // Cannot create keepalive timer. Log error. |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 514 | limLog(pMac, LOGP, FL("Cannot create keepalive timer.")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 515 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 516 | } |
| 517 | |
| 518 | /** |
| 519 | * Create all CNF_WAIT Timers upfront |
| 520 | */ |
| 521 | |
| 522 | if (wlan_cfgGetInt(pMac, WNI_CFG_WT_CNF_TIMEOUT, |
| 523 | &cfgValue) != eSIR_SUCCESS) |
| 524 | { |
| 525 | /** |
| 526 | * Could not get CNF_WAIT timeout value |
| 527 | * from CFG. Log error. |
| 528 | */ |
| 529 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 530 | FL("could not retrieve CNF timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 531 | } |
| 532 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 533 | |
| 534 | for (i=0; i<pMac->lim.maxStation; i++) |
| 535 | { |
| 536 | if (tx_timer_create(&pMac->lim.limTimers.gpLimCnfWaitTimer[i], |
| 537 | "CNF_MISS_TIMEOUT", |
| 538 | limCnfWaitTmerHandler, |
| 539 | (tANI_U32)i, |
| 540 | cfgValue, |
| 541 | 0, |
| 542 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 543 | { |
| 544 | // Cannot create timer. Log error. |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 545 | limLog(pMac, LOGP, FL("Cannot create CNF wait timer.")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 546 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 547 | } |
| 548 | } |
| 549 | |
| 550 | /* |
| 551 | ** Alloc and init table for the preAuth timer list |
| 552 | ** |
| 553 | **/ |
| 554 | |
| 555 | // get max number of Preauthentication |
| 556 | if (wlan_cfgGetInt(pMac, WNI_CFG_MAX_NUM_PRE_AUTH, |
| 557 | &cfgValue) != eSIR_SUCCESS) |
| 558 | { |
| 559 | /* |
| 560 | ** Could not get max preauth value |
| 561 | ** from CFG. Log error. |
| 562 | **/ |
| 563 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 564 | FL("could not retrieve mac preauth value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 565 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 566 | pMac->lim.gLimPreAuthTimerTable.numEntry = cfgValue; |
Sushant Kaushik | f4a2797 | 2015-04-16 16:48:00 +0530 | [diff] [blame] | 567 | pMac->lim.gLimPreAuthTimerTable.pTable = vos_mem_vmalloc(cfgValue*sizeof(tLimPreAuthNode)); |
Bansidhar Gopalachari | 72515da | 2013-07-11 11:14:27 +0530 | [diff] [blame] | 568 | if(pMac->lim.gLimPreAuthTimerTable.pTable == NULL) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 569 | { |
Bansidhar Gopalachari | 72515da | 2013-07-11 11:14:27 +0530 | [diff] [blame] | 570 | limLog(pMac, LOGP, FL("AllocateMemory failed!")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 571 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 572 | } |
| 573 | |
| 574 | limInitPreAuthTimerTable(pMac, &pMac->lim.gLimPreAuthTimerTable); |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 575 | PELOG1(limLog(pMac, LOG1, FL("alloc and init table for preAuth timers"));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 576 | |
| 577 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 578 | { |
| 579 | /** |
| 580 | * Create OLBC cache aging timer |
| 581 | */ |
| 582 | if (wlan_cfgGetInt(pMac, WNI_CFG_OLBC_DETECT_TIMEOUT, |
| 583 | &cfgValue) != eSIR_SUCCESS) |
| 584 | { |
| 585 | /** |
| 586 | * Could not get OLBC detect timeout value |
| 587 | * from CFG. Log error. |
| 588 | */ |
| 589 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 590 | FL("could not retrieve OLBD detect timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 591 | } |
| 592 | |
| 593 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 594 | |
| 595 | if (tx_timer_create( |
| 596 | &pMac->lim.limTimers.gLimUpdateOlbcCacheTimer, |
| 597 | "OLBC UPDATE CACHE TIMEOUT", |
| 598 | limUpdateOlbcCacheTimerHandler, |
| 599 | SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT, |
| 600 | cfgValue, |
| 601 | cfgValue, |
Madan Mohan Koyyalamudi | 788b4ee | 2012-09-25 10:42:09 -0700 | [diff] [blame] | 602 | TX_NO_ACTIVATE) != TX_SUCCESS) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 603 | { |
| 604 | // Cannot create update OLBC cache timer |
| 605 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 606 | limLog(pMac, LOGP, FL("Cannot create update OLBC cache timer")); |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 607 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 608 | } |
| 609 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 610 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 611 | // In future we need to use the auth timer, cause |
| 612 | // the pre auth session will be introduced before sending |
| 613 | // Auth frame. |
| 614 | // We need to go off channel and come back to home channel |
| 615 | cfgValue = 1000; |
| 616 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 617 | |
| 618 | if (tx_timer_create(&pMac->lim.limTimers.gLimFTPreAuthRspTimer, |
| 619 | "FT PREAUTH RSP TIMEOUT", |
| 620 | limTimerHandler, SIR_LIM_FT_PREAUTH_RSP_TIMEOUT, |
| 621 | cfgValue, 0, |
| 622 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 623 | { |
| 624 | // Could not create Join failure timer. |
| 625 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 626 | limLog(pMac, LOGP, FL("could not create Join failure timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 627 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 628 | } |
| 629 | #endif |
| 630 | |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 631 | #ifdef WLAN_FEATURE_LFR_MBB |
| 632 | cfgValue = PREAUTH_REASSOC_TIMEOUT; |
| 633 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 634 | |
| 635 | if (tx_timer_create(&pMac->lim.limTimers.glim_pre_auth_mbb_rsp_timer, |
| 636 | "PREAUTH MBB RSP TIMEOUT", |
| 637 | limTimerHandler, SIR_LIM_PREAUTH_MBB_RSP_TIMEOUT, |
| 638 | cfgValue, 0, |
| 639 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 640 | { |
| 641 | limLog(pMac, LOGP, FL("could not create PREAUTH_MBB_RSP timer")); |
| 642 | goto err_timer; |
| 643 | } |
Padma, Santhosh Kumar | f4966dc | 2017-01-03 18:56:00 +0530 | [diff] [blame^] | 644 | |
| 645 | cfgValue = PREAUTH_REASSOC_TIMEOUT; |
| 646 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 647 | |
| 648 | if (tx_timer_create(&pMac->lim.limTimers.glim_reassoc_mbb_rsp_timer, |
| 649 | "REASSOC MBB RSP TIMEOUT", |
| 650 | limTimerHandler, SIR_LIM_REASSOC_MBB_RSP_TIMEOUT, |
| 651 | cfgValue, 0, |
| 652 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 653 | { |
| 654 | limLog(pMac, LOGP, FL("could not create REASSOC_MBB_RSP timer")); |
| 655 | goto err_timer; |
| 656 | } |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 657 | #endif |
| 658 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 659 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 660 | cfgValue = 5000; |
| 661 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 662 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 663 | if (tx_timer_create(&pMac->lim.limTimers.gLimEseTsmTimer, |
| 664 | "ESE TSM Stats TIMEOUT", |
| 665 | limTimerHandler, SIR_LIM_ESE_TSM_TIMEOUT, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 666 | cfgValue, 0, |
| 667 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 668 | { |
| 669 | // Could not create Join failure timer. |
| 670 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 671 | limLog(pMac, LOGP, FL("could not create Join failure timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 672 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 673 | } |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 674 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 675 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 676 | cfgValue = 1000; |
| 677 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 678 | if (tx_timer_create(&pMac->lim.limTimers.gLimDisassocAckTimer, |
| 679 | "DISASSOC ACK TIMEOUT", |
| 680 | limTimerHandler, SIR_LIM_DISASSOC_ACK_TIMEOUT, |
| 681 | cfgValue, 0, |
| 682 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 683 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 684 | limLog(pMac, LOGP, FL("could not DISASSOC ACK TIMEOUT timer")); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 685 | goto err_timer; |
| 686 | } |
| 687 | |
| 688 | cfgValue = 1000; |
| 689 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 690 | if (tx_timer_create(&pMac->lim.limTimers.gLimDeauthAckTimer, |
| 691 | "DISASSOC ACK TIMEOUT", |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 692 | limTimerHandler, SIR_LIM_DEAUTH_ACK_TIMEOUT, |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 693 | cfgValue, 0, |
| 694 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 695 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 696 | limLog(pMac, LOGP, FL("could not create DEAUTH ACK TIMEOUT timer")); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 697 | goto err_timer; |
| 698 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 699 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 700 | cfgValue = LIM_INSERT_SINGLESHOTNOA_TIMEOUT_VALUE; // (> no of BI* no of TUs per BI * 1TU in msec + p2p start time offset*1 TU in msec = 2*100*1.024 + 5*1.024 = 204.8 + 5.12 = 209.20) |
| 701 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 702 | if (tx_timer_create(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer, |
| 703 | "Single Shot NOA Insert timeout", |
| 704 | limTimerHandler, SIR_LIM_INSERT_SINGLESHOT_NOA_TIMEOUT, |
| 705 | cfgValue, 0, |
| 706 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 707 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 708 | limLog(pMac, LOGP, FL("could not create Single Shot NOA Insert Timeout timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 709 | goto err_timer; |
| 710 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 711 | |
Hanumantha Reddy Pothula | 97ea095 | 2015-10-09 11:29:39 +0530 | [diff] [blame] | 712 | cfgValue = WNI_CFG_ACTIVE_PASSIVE_CON_MAX; |
| 713 | if (eSIR_SUCCESS != wlan_cfgGetInt(pMac, WNI_CFG_ACTIVE_PASSIVE_CON, |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 714 | &cfgValue)) |
| 715 | { |
| 716 | limLog(pMac, LOGP, |
| 717 | FL("could not retrieve WNI_CFG_ACTIVE_PASSIVE_CON")); |
| 718 | } |
| 719 | if (cfgValue) |
| 720 | { |
| 721 | cfgValue = ACTIVE_TO_PASSIVE_CONVERISON_TIMEOUT; |
| 722 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 723 | if (tx_timer_create(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer, |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 724 | "ACTIVE TO PASSIVE CHANNEL", limTimerHandler, |
| 725 | SIR_LIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE, cfgValue, 0, |
| 726 | TX_NO_ACTIVATE) != TX_SUCCESS) |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 727 | { |
| 728 | limLog(pMac, LOGW,FL("could not create timer for passive channel to active channel")); |
| 729 | goto err_timer; |
| 730 | } |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 731 | } |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 732 | else |
| 733 | { |
| 734 | limLog(pMac, LOG1, |
| 735 | FL("gLimActiveToPassiveChannelTimer not created %d"), cfgValue); |
| 736 | } |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 737 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 738 | return TX_SUCCESS; |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 739 | |
| 740 | err_timer: |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 741 | tx_timer_delete(&pMac->lim.limTimers.gLimDeauthAckTimer); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 742 | tx_timer_delete(&pMac->lim.limTimers.gLimDisassocAckTimer); |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 743 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
| 744 | tx_timer_delete(&pMac->lim.limTimers.gLimEseTsmTimer); |
| 745 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 746 | tx_timer_delete(&pMac->lim.limTimers.gLimFTPreAuthRspTimer); |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 747 | #ifdef WLAN_FEATURE_LFR_MBB |
| 748 | tx_timer_delete(&pMac->lim.limTimers.glim_pre_auth_mbb_rsp_timer); |
Padma, Santhosh Kumar | f4966dc | 2017-01-03 18:56:00 +0530 | [diff] [blame^] | 749 | tx_timer_delete(&pMac->lim.limTimers.glim_reassoc_mbb_rsp_timer); |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 750 | #endif |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 751 | tx_timer_delete(&pMac->lim.limTimers.gLimUpdateOlbcCacheTimer); |
| 752 | while(((tANI_S32)--i) >= 0) |
| 753 | { |
| 754 | tx_timer_delete(&pMac->lim.limTimers.gpLimCnfWaitTimer[i]); |
| 755 | } |
| 756 | tx_timer_delete(&pMac->lim.limTimers.gLimKeepaliveTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 757 | tx_timer_delete(&pMac->lim.limTimers.gLimBackgroundScanTimer); |
| 758 | tx_timer_delete(&pMac->lim.limTimers.gLimProbeAfterHBTimer); |
| 759 | tx_timer_delete(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 760 | tx_timer_delete(&pMac->lim.limTimers.gLimAuthFailureTimer); |
| 761 | tx_timer_delete(&pMac->lim.limTimers.gLimAddtsRspTimer); |
| 762 | tx_timer_delete(&pMac->lim.limTimers.gLimReassocFailureTimer); |
| 763 | tx_timer_delete(&pMac->lim.limTimers.gLimAssocFailureTimer); |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 764 | tx_timer_delete(&pMac->lim.limTimers.gLimJoinFailureTimer); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 765 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer); |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 766 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 767 | tx_timer_delete(&pMac->lim.limTimers.gLimQuietBssTimer); |
| 768 | tx_timer_delete(&pMac->lim.limTimers.gLimQuietTimer); |
| 769 | tx_timer_delete(&pMac->lim.limTimers.gLimChannelSwitchTimer); |
| 770 | tx_timer_delete(&pMac->lim.limTimers.gLimMaxChannelTimer); |
| 771 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer); |
| 772 | tx_timer_delete(&pMac->lim.limTimers.gLimMinChannelTimer); |
Venkata Prathyusha Kuntupalli | 7a87ff0 | 2013-01-29 10:45:54 -0800 | [diff] [blame] | 773 | tx_timer_delete(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer); |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 774 | tx_timer_delete(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 775 | |
| 776 | if(NULL != pMac->lim.gLimPreAuthTimerTable.pTable) |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 777 | { |
Sushant Kaushik | f4a2797 | 2015-04-16 16:48:00 +0530 | [diff] [blame] | 778 | vos_mem_vfree(pMac->lim.gLimPreAuthTimerTable.pTable); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 779 | pMac->lim.gLimPreAuthTimerTable.pTable = NULL; |
| 780 | } |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 781 | |
| 782 | return TX_TIMER_ERROR; |
| 783 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 784 | } /****** end limCreateTimers() ******/ |
| 785 | |
| 786 | |
| 787 | |
| 788 | /** |
| 789 | * limTimerHandler() |
| 790 | * |
| 791 | *FUNCTION: |
| 792 | * This function is called upon |
| 793 | * 1. MIN_CHANNEL, MAX_CHANNEL timer expiration during scanning |
| 794 | * 2. JOIN_FAILURE timer expiration while joining a BSS |
| 795 | * 3. AUTH_FAILURE timer expiration while authenticating with a peer |
| 796 | * 4. Heartbeat timer expiration on STA |
| 797 | * 5. Background scan timer expiration on STA |
| 798 | * 6. AID release, Pre-auth cleanup and Link monitoring timer |
| 799 | * expiration on AP |
| 800 | * |
| 801 | *LOGIC: |
| 802 | * |
| 803 | *ASSUMPTIONS: |
| 804 | * NA |
| 805 | * |
| 806 | *NOTE: |
| 807 | * NA |
| 808 | * |
| 809 | * @param param - Message corresponding to the timer that expired |
| 810 | * |
| 811 | * @return None |
| 812 | */ |
| 813 | |
| 814 | void |
| 815 | limTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 816 | { |
| 817 | tANI_U32 statusCode; |
| 818 | tSirMsgQ msg; |
| 819 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 820 | |
| 821 | // Prepare and post message to LIM Message Queue |
| 822 | |
| 823 | msg.type = (tANI_U16) param; |
| 824 | msg.bodyptr = NULL; |
| 825 | msg.bodyval = 0; |
| 826 | |
Padma, Santhosh Kumar | b036fc7 | 2015-11-13 16:22:23 +0530 | [diff] [blame] | 827 | if ((statusCode = limPostMsgApiHighPri(pMac, &msg)) != eSIR_SUCCESS) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 828 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 829 | FL("posting message %X to LIM failed, reason=%d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 830 | msg.type, statusCode); |
| 831 | } /****** end limTimerHandler() ******/ |
| 832 | |
| 833 | |
| 834 | /** |
| 835 | * limAddtsResponseTimerHandler() |
| 836 | * |
| 837 | *FUNCTION: |
| 838 | * This function is called upon Addts response timer expiration on sta |
| 839 | * |
| 840 | *LOGIC: |
| 841 | * Message SIR_LIM_ADDTS_RSP_TIMEOUT is posted to gSirLimMsgQ |
| 842 | * when this function is executed. |
| 843 | * |
| 844 | *ASSUMPTIONS: |
| 845 | * NA |
| 846 | * |
| 847 | *NOTE: |
| 848 | * NA |
| 849 | * |
| 850 | * @param param - pointer to pre-auth node |
| 851 | * |
| 852 | * @return None |
| 853 | */ |
| 854 | |
| 855 | void |
| 856 | limAddtsResponseTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 857 | { |
| 858 | tSirMsgQ msg; |
| 859 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 860 | |
| 861 | // Prepare and post message to LIM Message Queue |
| 862 | |
| 863 | msg.type = SIR_LIM_ADDTS_RSP_TIMEOUT; |
| 864 | msg.bodyval = param; |
| 865 | msg.bodyptr = NULL; |
| 866 | |
| 867 | limPostMsgApi(pMac, &msg); |
| 868 | } /****** end limAuthResponseTimerHandler() ******/ |
| 869 | |
| 870 | |
| 871 | /** |
| 872 | * limAuthResponseTimerHandler() |
| 873 | * |
| 874 | *FUNCTION: |
| 875 | * This function is called upon Auth response timer expiration on AP |
| 876 | * |
| 877 | *LOGIC: |
| 878 | * Message SIR_LIM_AUTH_RSP_TIMEOUT is posted to gSirLimMsgQ |
| 879 | * when this function is executed. |
| 880 | * |
| 881 | *ASSUMPTIONS: |
| 882 | * NA |
| 883 | * |
| 884 | *NOTE: |
| 885 | * NA |
| 886 | * |
| 887 | * @param param - pointer to pre-auth node |
| 888 | * |
| 889 | * @return None |
| 890 | */ |
| 891 | |
| 892 | void |
| 893 | limAuthResponseTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 894 | { |
| 895 | tSirMsgQ msg; |
| 896 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 897 | |
| 898 | // Prepare and post message to LIM Message Queue |
| 899 | |
| 900 | msg.type = SIR_LIM_AUTH_RSP_TIMEOUT; |
| 901 | msg.bodyptr = NULL; |
| 902 | msg.bodyval = (tANI_U32)param; |
| 903 | |
| 904 | limPostMsgApi(pMac, &msg); |
| 905 | } /****** end limAuthResponseTimerHandler() ******/ |
| 906 | |
| 907 | |
| 908 | |
| 909 | /** |
| 910 | * limAssocFailureTimerHandler() |
| 911 | * |
| 912 | *FUNCTION: |
| 913 | * This function is called upon Re/Assoc failure timer expiration |
| 914 | * on STA |
| 915 | * |
| 916 | *LOGIC: |
| 917 | * Message SIR_LIM_ASSOC_FAIL_TIMEOUT is posted to gSirLimMsgQ |
| 918 | * when this function is executed. |
| 919 | * |
| 920 | *ASSUMPTIONS: |
| 921 | * NA |
| 922 | * |
| 923 | *NOTE: |
| 924 | * NA |
| 925 | * |
| 926 | * @param param - Indicates whether this is assoc or reassoc |
| 927 | * failure timeout |
| 928 | * @return None |
| 929 | */ |
| 930 | |
| 931 | void |
| 932 | limAssocFailureTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 933 | { |
| 934 | tSirMsgQ msg; |
| 935 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 936 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 937 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 938 | if((LIM_REASSOC == param) && |
Kanchanapally, Vidyullatha | b6da2a6 | 2014-02-06 12:28:52 +0530 | [diff] [blame] | 939 | (NULL != pMac->lim.pSessionEntry) && |
| 940 | (pMac->lim.pSessionEntry->limMlmState == eLIM_MLM_WT_FT_REASSOC_RSP_STATE)) |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 941 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 942 | limLog(pMac, LOGE, FL("Reassoc timeout happened")); |
Sachin Ahuja | 07a4301 | 2015-01-30 17:04:38 +0530 | [diff] [blame] | 943 | #ifdef FEATURE_WLAN_ESE |
| 944 | if (((pMac->lim.pSessionEntry->isESEconnection) && |
| 945 | (pMac->lim.reAssocRetryAttempt < |
| 946 | (LIM_MAX_REASSOC_RETRY_LIMIT - 1)))|| |
| 947 | ((!pMac->lim.pSessionEntry->isESEconnection) && |
| 948 | (pMac->lim.reAssocRetryAttempt < LIM_MAX_REASSOC_RETRY_LIMIT)) |
| 949 | ) |
| 950 | #else |
| 951 | if (pMac->lim.reAssocRetryAttempt < LIM_MAX_REASSOC_RETRY_LIMIT) |
| 952 | #endif |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 953 | { |
| 954 | limSendRetryReassocReqFrame(pMac, pMac->lim.pSessionEntry->pLimMlmReassocRetryReq, pMac->lim.pSessionEntry); |
| 955 | pMac->lim.reAssocRetryAttempt++; |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 956 | limLog(pMac, LOGW, FL("Reassoc request retry is sent %d times"), pMac->lim.reAssocRetryAttempt); |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 957 | return; |
| 958 | } |
| 959 | else |
| 960 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 961 | limLog(pMac, LOGW, FL("Reassoc request retry MAX(%d) reached"), LIM_MAX_REASSOC_RETRY_LIMIT); |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 962 | if(NULL != pMac->lim.pSessionEntry->pLimMlmReassocRetryReq) |
| 963 | { |
Bansidhar Gopalachari | 72515da | 2013-07-11 11:14:27 +0530 | [diff] [blame] | 964 | vos_mem_free( pMac->lim.pSessionEntry->pLimMlmReassocRetryReq); |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 965 | pMac->lim.pSessionEntry->pLimMlmReassocRetryReq = NULL; |
| 966 | } |
| 967 | } |
| 968 | } |
| 969 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 970 | // Prepare and post message to LIM Message Queue |
| 971 | |
| 972 | msg.type = SIR_LIM_ASSOC_FAIL_TIMEOUT; |
| 973 | msg.bodyval = (tANI_U32)param; |
| 974 | msg.bodyptr = NULL; |
| 975 | |
| 976 | limPostMsgApi(pMac, &msg); |
| 977 | } /****** end limAssocFailureTimerHandler() ******/ |
| 978 | |
| 979 | |
| 980 | /** |
| 981 | * limUpdateOlbcCacheTimerHandler() |
| 982 | * |
| 983 | *FUNCTION: |
| 984 | * This function is called upon update olbc cache timer expiration |
| 985 | * on STA |
| 986 | * |
| 987 | *LOGIC: |
| 988 | * Message SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT is posted to gSirLimMsgQ |
| 989 | * when this function is executed. |
| 990 | * |
| 991 | *ASSUMPTIONS: |
| 992 | * NA |
| 993 | * |
| 994 | *NOTE: |
| 995 | * NA |
| 996 | * |
| 997 | * @param |
| 998 | * |
| 999 | * @return None |
| 1000 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1001 | void |
| 1002 | limUpdateOlbcCacheTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 1003 | { |
| 1004 | tSirMsgQ msg; |
| 1005 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 1006 | |
| 1007 | // Prepare and post message to LIM Message Queue |
| 1008 | |
| 1009 | msg.type = SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT; |
| 1010 | msg.bodyval = 0; |
| 1011 | msg.bodyptr = NULL; |
| 1012 | |
| 1013 | limPostMsgApi(pMac, &msg); |
| 1014 | } /****** end limUpdateOlbcCacheTimerHandler() ******/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1015 | |
| 1016 | /** |
| 1017 | * limDeactivateAndChangeTimer() |
| 1018 | * |
| 1019 | *FUNCTION: |
| 1020 | * This function is called to deactivate and change a timer |
| 1021 | * for future re-activation |
| 1022 | * |
| 1023 | *LOGIC: |
| 1024 | * |
| 1025 | *ASSUMPTIONS: |
| 1026 | * NA |
| 1027 | * |
| 1028 | *NOTE: |
| 1029 | * NA |
| 1030 | * |
| 1031 | * @param pMac - Pointer to Global MAC structure |
| 1032 | * @param timerId - enum of timer to be deactivated and changed |
| 1033 | * This enum is defined in limUtils.h file |
| 1034 | * |
| 1035 | * @return None |
| 1036 | */ |
| 1037 | |
| 1038 | void |
| 1039 | limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId) |
| 1040 | { |
| 1041 | tANI_U32 val=0, val1=0; |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 1042 | tpPESession psessionEntry; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1043 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1044 | switch (timerId) |
| 1045 | { |
| 1046 | case eLIM_ADDTS_RSP_TIMER: |
| 1047 | pMac->lim.gLimAddtsRspTimerCount++; |
| 1048 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAddtsRspTimer) != TX_SUCCESS) |
| 1049 | { |
| 1050 | // Could not deactivate AddtsRsp Timer |
| 1051 | // Log error |
| 1052 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1053 | FL("Unable to deactivate AddtsRsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1054 | } |
| 1055 | break; |
| 1056 | |
| 1057 | case eLIM_MIN_CHANNEL_TIMER: |
| 1058 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimMinChannelTimer) |
| 1059 | != TX_SUCCESS) |
| 1060 | { |
| 1061 | // Could not deactivate min channel timer. |
| 1062 | // Log error |
| 1063 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1064 | FL("Unable to deactivate min channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1065 | } |
| 1066 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1067 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1068 | // If a background was triggered via Quiet BSS, |
| 1069 | // then we need to adjust the MIN and MAX channel |
| 1070 | // timer's accordingly to the Quiet duration that |
| 1071 | // was specified |
| 1072 | if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState && |
| 1073 | pMac->lim.gLimTriggerBackgroundScanDuringQuietBss ) |
| 1074 | { |
| 1075 | // gLimQuietDuration is already cached in units of |
| 1076 | // system ticks. No conversion is reqd... |
| 1077 | val = pMac->lim.gLimSpecMgmt.quietDuration; |
| 1078 | } |
| 1079 | else |
| 1080 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1081 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1082 | if(pMac->lim.gpLimMlmScanReq) |
| 1083 | { |
| 1084 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime); |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1085 | if (pMac->btc.btc_scan_compromise_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1086 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1087 | if (pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1088 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1089 | val = SYS_MS_TO_TICKS( |
| 1090 | pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1091 | limLog(pMac, LOG1, FL("Using BTC Min Active Scan time")); |
| 1092 | } |
| 1093 | else |
| 1094 | { |
| 1095 | limLog(pMac, LOGE, FL("BTC Active Scan Min Time is Not Set")); |
| 1096 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1097 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1098 | pMac->roam.configParam.min_chntime_btc_sco) { |
| 1099 | val = SYS_MS_TO_TICKS( |
| 1100 | pMac->roam.configParam.min_chntime_btc_sco); |
| 1101 | limLog(pMac, LOG1, |
| 1102 | FL("Using BTC SCO Min Active Scan time %d"), val); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1103 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1104 | } |
| 1105 | else |
| 1106 | { |
| 1107 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1108 | //No need to change min timer. This is not a scan |
| 1109 | break; |
| 1110 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1111 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1112 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1113 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1114 | |
| 1115 | if (tx_timer_change(&pMac->lim.limTimers.gLimMinChannelTimer, |
| 1116 | val, 0) != TX_SUCCESS) |
| 1117 | { |
| 1118 | // Could not change min channel timer. |
| 1119 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1120 | limLog(pMac, LOGP, FL("Unable to change min channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1121 | } |
| 1122 | |
| 1123 | break; |
| 1124 | |
| 1125 | case eLIM_PERIODIC_PROBE_REQ_TIMER: |
| 1126 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer) |
| 1127 | != TX_SUCCESS) |
| 1128 | { |
| 1129 | // Could not deactivate min channel timer. |
| 1130 | // Log error |
| 1131 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1132 | FL("Unable to deactivate periodic timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1133 | } |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1134 | if(pMac->lim.gpLimMlmScanReq) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1135 | { |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1136 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime)/2; |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1137 | if (pMac->btc.btc_scan_compromise_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1138 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1139 | if (pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1140 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1141 | val = SYS_MS_TO_TICKS( |
| 1142 | pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco)/2; |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1143 | limLog(pMac, LOG1, FL("Using BTC Min Active Scan time")); |
| 1144 | } |
| 1145 | else |
| 1146 | { |
| 1147 | limLog(pMac, LOGE, FL("BTC Active Scan Min Time is Not Set")); |
| 1148 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1149 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1150 | pMac->roam.configParam.min_chntime_btc_sco) { |
| 1151 | val = SYS_MS_TO_TICKS( |
| 1152 | pMac->roam.configParam.min_chntime_btc_sco / 2); |
| 1153 | limLog(pMac, LOG1, |
| 1154 | FL("Using BTC SCO Min Active Scan time %d"), val); |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1155 | } |
| 1156 | } |
| 1157 | /*If val is 0 it means min Channel timer is 0 so take the value from maxChannelTimer*/ |
| 1158 | if (!val) |
| 1159 | { |
| 1160 | |
| 1161 | if(pMac->lim.gpLimMlmScanReq) |
| 1162 | { |
| 1163 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime)/2; |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1164 | if (pMac->btc.btc_scan_compromise_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1165 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1166 | if (pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1167 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1168 | val = SYS_MS_TO_TICKS( |
| 1169 | pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco)/2; |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1170 | limLog(pMac, LOG1, FL("Using BTC Max Active Scan time")); |
| 1171 | } |
| 1172 | else |
| 1173 | { |
| 1174 | limLog(pMac, LOGE, FL("BTC Active Scan Max Time is Not Set")); |
| 1175 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1176 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1177 | pMac->roam.configParam.max_chntime_btc_sco) { |
| 1178 | val = SYS_MS_TO_TICKS( |
| 1179 | pMac->roam.configParam.max_chntime_btc_sco / 2); |
| 1180 | limLog(pMac, LOG1, |
| 1181 | FL("Using BTC SCO Max Active Scan time %d"), val); |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1182 | } |
| 1183 | } |
| 1184 | else |
| 1185 | { |
| 1186 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1187 | //No need to change max timer. This is not a scan |
| 1188 | break; |
| 1189 | } |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1190 | } |
Mahesh A Saptasagar | bfcdcc3 | 2015-09-24 17:41:51 +0530 | [diff] [blame] | 1191 | if (val) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1192 | { |
Mahesh A Saptasagar | bfcdcc3 | 2015-09-24 17:41:51 +0530 | [diff] [blame] | 1193 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer, |
| 1194 | val, 0) != TX_SUCCESS) |
| 1195 | { |
| 1196 | // Could not change min channel timer. |
| 1197 | // Log error |
| 1198 | limLog(pMac, LOGE, FL("Unable to change periodic timer")); |
| 1199 | } |
| 1200 | } |
| 1201 | else |
| 1202 | { |
| 1203 | limLog(pMac, LOGE, FL("Do not change gLimPeriodicProbeReqTimer values," |
| 1204 | "value = %d minchannel time = %d" |
| 1205 | "maxchannel time = %d"), val, |
| 1206 | pMac->lim.gpLimMlmScanReq->minChannelTime, |
| 1207 | pMac->lim.gpLimMlmScanReq->maxChannelTime); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1208 | } |
| 1209 | |
| 1210 | break; |
| 1211 | |
| 1212 | case eLIM_MAX_CHANNEL_TIMER: |
| 1213 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimMaxChannelTimer) |
| 1214 | != TX_SUCCESS) |
| 1215 | { |
| 1216 | // Could not deactivate max channel timer. |
| 1217 | // Log error |
| 1218 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1219 | FL("Unable to deactivate max channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1220 | } |
| 1221 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1222 | // If a background was triggered via Quiet BSS, |
| 1223 | // then we need to adjust the MIN and MAX channel |
| 1224 | // timer's accordingly to the Quiet duration that |
| 1225 | // was specified |
| 1226 | if (pMac->lim.gLimSystemRole != eLIM_AP_ROLE) |
| 1227 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1228 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1229 | |
| 1230 | if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState && |
| 1231 | pMac->lim.gLimTriggerBackgroundScanDuringQuietBss ) |
| 1232 | { |
| 1233 | // gLimQuietDuration is already cached in units of |
| 1234 | // system ticks. No conversion is reqd... |
| 1235 | val = pMac->lim.gLimSpecMgmt.quietDuration; |
| 1236 | } |
| 1237 | else |
| 1238 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1239 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1240 | if(pMac->lim.gpLimMlmScanReq) |
| 1241 | { |
| 1242 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime); |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1243 | if (pMac->btc.btc_scan_compromise_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1244 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1245 | if (pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1246 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1247 | val = SYS_MS_TO_TICKS( |
| 1248 | pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1249 | limLog(pMac, LOG1, FL("Using BTC Max Active Scan time")); |
| 1250 | } |
| 1251 | else |
| 1252 | { |
| 1253 | limLog(pMac, LOGE, FL("BTC Active Scan Max Time is Not Set")); |
| 1254 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1255 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1256 | pMac->roam.configParam.max_chntime_btc_sco) { |
| 1257 | val = SYS_MS_TO_TICKS( |
| 1258 | pMac->roam.configParam.max_chntime_btc_sco); |
| 1259 | limLog(pMac, LOG1, |
| 1260 | FL("Using BTC SCO Max Active Scan time %d"), val); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1261 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1262 | } |
| 1263 | else |
| 1264 | { |
| 1265 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1266 | //No need to change max timer. This is not a scan |
| 1267 | break; |
| 1268 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1269 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1270 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1271 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1272 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1273 | |
| 1274 | if (tx_timer_change(&pMac->lim.limTimers.gLimMaxChannelTimer, |
| 1275 | val, 0) != TX_SUCCESS) |
| 1276 | { |
| 1277 | // Could not change max channel timer. |
| 1278 | // Log error |
| 1279 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1280 | FL("Unable to change max channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1281 | } |
| 1282 | |
| 1283 | break; |
| 1284 | |
| 1285 | case eLIM_JOIN_FAIL_TIMER: |
| 1286 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimJoinFailureTimer) |
| 1287 | != TX_SUCCESS) |
| 1288 | { |
| 1289 | /** |
| 1290 | * Could not deactivate Join Failure |
| 1291 | * timer. Log error. |
| 1292 | */ |
| 1293 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1294 | FL("Unable to deactivate Join Failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1295 | } |
| 1296 | |
| 1297 | if (wlan_cfgGetInt(pMac, WNI_CFG_JOIN_FAILURE_TIMEOUT, |
| 1298 | &val) != eSIR_SUCCESS) |
| 1299 | { |
| 1300 | /** |
| 1301 | * Could not get JoinFailureTimeout value |
| 1302 | * from CFG. Log error. |
| 1303 | */ |
| 1304 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1305 | FL("could not retrieve JoinFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1306 | } |
| 1307 | val = SYS_MS_TO_TICKS(val); |
| 1308 | |
| 1309 | if (tx_timer_change(&pMac->lim.limTimers.gLimJoinFailureTimer, |
| 1310 | val, 0) != TX_SUCCESS) |
| 1311 | { |
| 1312 | /** |
| 1313 | * Could not change Join Failure |
| 1314 | * timer. Log error. |
| 1315 | */ |
| 1316 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1317 | FL("Unable to change Join Failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1318 | } |
| 1319 | |
| 1320 | break; |
| 1321 | |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1322 | case eLIM_PERIODIC_JOIN_PROBE_REQ_TIMER: |
| 1323 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer) |
| 1324 | != TX_SUCCESS) |
| 1325 | { |
| 1326 | // Could not deactivate periodic join req Times. |
| 1327 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1328 | FL("Unable to deactivate periodic join request timer")); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1329 | } |
| 1330 | |
| 1331 | val = SYS_MS_TO_TICKS(LIM_JOIN_PROBE_REQ_TIMER_MS); |
| 1332 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer, |
| 1333 | val, 0) != TX_SUCCESS) |
| 1334 | { |
| 1335 | // Could not change periodic join req times. |
| 1336 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1337 | limLog(pMac, LOGP, FL("Unable to change periodic join request timer")); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1338 | } |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 1339 | |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1340 | break; |
| 1341 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1342 | case eLIM_AUTH_FAIL_TIMER: |
| 1343 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAuthFailureTimer) |
| 1344 | != TX_SUCCESS) |
| 1345 | { |
| 1346 | // Could not deactivate Auth failure timer. |
| 1347 | // Log error |
| 1348 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1349 | FL("Unable to deactivate auth failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1350 | } |
| 1351 | |
| 1352 | // Change timer to reactivate it in future |
| 1353 | if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT, |
| 1354 | &val) != eSIR_SUCCESS) |
| 1355 | { |
| 1356 | /** |
| 1357 | * Could not get AuthFailureTimeout value |
| 1358 | * from CFG. Log error. |
| 1359 | */ |
| 1360 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1361 | FL("could not retrieve AuthFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1362 | } |
| 1363 | val = SYS_MS_TO_TICKS(val); |
| 1364 | |
| 1365 | if (tx_timer_change(&pMac->lim.limTimers.gLimAuthFailureTimer, |
| 1366 | val, 0) != TX_SUCCESS) |
| 1367 | { |
| 1368 | // Could not change Authentication failure timer. |
| 1369 | // Log error |
| 1370 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1371 | FL("unable to change Auth failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1372 | } |
| 1373 | |
| 1374 | break; |
| 1375 | |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 1376 | case eLIM_AUTH_RETRY_TIMER: |
| 1377 | |
| 1378 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer) |
| 1379 | != TX_SUCCESS) |
| 1380 | { |
| 1381 | // Could not deactivate Auth Retry Timer. |
| 1382 | limLog(pMac, LOGP, |
| 1383 | FL("Unable to deactivate Auth Retry timer")); |
| 1384 | } |
| 1385 | if ((psessionEntry = peFindSessionBySessionId(pMac, |
| 1386 | pMac->lim.limTimers.gLimPeriodicAuthRetryTimer.sessionId)) |
| 1387 | == NULL) |
| 1388 | { |
| 1389 | limLog(pMac, LOGP, |
| 1390 | FL("session does not exist for given SessionId : %d"), |
| 1391 | pMac->lim.limTimers.gLimPeriodicAuthRetryTimer.sessionId); |
| 1392 | break; |
| 1393 | } |
| 1394 | /* 3/5 of the beacon interval*/ |
| 1395 | val = psessionEntry->beaconParams.beaconInterval * 3/5; |
| 1396 | val = SYS_MS_TO_TICKS(val); |
| 1397 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer, |
| 1398 | val, 0) != TX_SUCCESS) |
| 1399 | { |
| 1400 | // Could not change Auth Retry timer. |
| 1401 | // Log error |
| 1402 | limLog(pMac, LOGP, FL("Unable to change Auth Retry timer")); |
| 1403 | } |
| 1404 | |
| 1405 | break; |
| 1406 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1407 | case eLIM_ASSOC_FAIL_TIMER: |
| 1408 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAssocFailureTimer) != |
| 1409 | TX_SUCCESS) |
| 1410 | { |
| 1411 | // Could not deactivate Association failure timer. |
| 1412 | // Log error |
| 1413 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1414 | FL("unable to deactivate Association failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1415 | } |
| 1416 | |
| 1417 | // Change timer to reactivate it in future |
| 1418 | if (wlan_cfgGetInt(pMac, WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT, |
| 1419 | &val) != eSIR_SUCCESS) |
| 1420 | { |
| 1421 | /** |
| 1422 | * Could not get AssocFailureTimeout value |
| 1423 | * from CFG. Log error. |
| 1424 | */ |
| 1425 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1426 | FL("could not retrieve AssocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1427 | } |
| 1428 | val = SYS_MS_TO_TICKS(val); |
| 1429 | |
| 1430 | if (tx_timer_change(&pMac->lim.limTimers.gLimAssocFailureTimer, |
| 1431 | val, 0) != TX_SUCCESS) |
| 1432 | { |
| 1433 | // Could not change Association failure timer. |
| 1434 | // Log error |
| 1435 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1436 | FL("unable to change Assoc failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1437 | } |
| 1438 | |
| 1439 | break; |
| 1440 | |
| 1441 | case eLIM_REASSOC_FAIL_TIMER: |
| 1442 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimReassocFailureTimer) != |
| 1443 | TX_SUCCESS) |
| 1444 | { |
| 1445 | // Could not deactivate Reassociation failure timer. |
| 1446 | // Log error |
| 1447 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1448 | FL("unable to deactivate Reassoc failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1449 | } |
| 1450 | |
| 1451 | // Change timer to reactivate it in future |
| 1452 | if (wlan_cfgGetInt(pMac, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, |
| 1453 | &val) != eSIR_SUCCESS) |
| 1454 | { |
| 1455 | /** |
| 1456 | * Could not get ReassocFailureTimeout value |
| 1457 | * from CFG. Log error. |
| 1458 | */ |
| 1459 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1460 | FL("could not retrieve ReassocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1461 | } |
| 1462 | val = SYS_MS_TO_TICKS(val); |
| 1463 | |
| 1464 | if (tx_timer_change(&pMac->lim.limTimers.gLimReassocFailureTimer, |
| 1465 | val, 0) != TX_SUCCESS) |
| 1466 | { |
| 1467 | // Could not change Reassociation failure timer. |
| 1468 | // Log error |
| 1469 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1470 | FL("unable to change Reassociation failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1471 | } |
| 1472 | |
| 1473 | break; |
| 1474 | |
| 1475 | case eLIM_HEART_BEAT_TIMER: |
| 1476 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer) != |
| 1477 | TX_SUCCESS) |
| 1478 | { |
| 1479 | // Could not deactivate Heartbeat timer. |
| 1480 | // Log error |
| 1481 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1482 | FL("unable to deactivate Heartbeat timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1483 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1484 | else |
| 1485 | { |
| 1486 | limLog(pMac, LOGW, FL("Deactivated heartbeat link monitoring")); |
| 1487 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1488 | |
| 1489 | if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, |
| 1490 | &val) != eSIR_SUCCESS) |
| 1491 | { |
| 1492 | /** |
| 1493 | * Could not get BEACON_INTERVAL value |
| 1494 | * from CFG. Log error. |
| 1495 | */ |
| 1496 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1497 | FL("could not retrieve BEACON_INTERVAL value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1498 | } |
| 1499 | |
| 1500 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val1) != |
| 1501 | eSIR_SUCCESS) |
| 1502 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1503 | FL("could not retrieve heartbeat failure value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1504 | |
| 1505 | // Change timer to reactivate it in future |
| 1506 | val = SYS_MS_TO_TICKS(val * val1); |
| 1507 | |
| 1508 | if (tx_timer_change(&pMac->lim.limTimers.gLimHeartBeatTimer, |
| 1509 | val, 0) != TX_SUCCESS) |
| 1510 | { |
| 1511 | // Could not change HeartBeat timer. |
| 1512 | // Log error |
| 1513 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1514 | FL("unable to change HeartBeat timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1515 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1516 | else |
| 1517 | { |
Jeff Johnson | 0f4d0bc | 2013-11-03 17:48:50 -0800 | [diff] [blame] | 1518 | limLog(pMac, LOGW, FL("HeartBeat timer value is changed = %u"), val); |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1519 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1520 | break; |
| 1521 | |
| 1522 | case eLIM_PROBE_AFTER_HB_TIMER: |
| 1523 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimProbeAfterHBTimer) != |
| 1524 | TX_SUCCESS) |
| 1525 | { |
| 1526 | // Could not deactivate Heartbeat timer. |
| 1527 | // Log error |
| 1528 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1529 | FL("unable to deactivate probeAfterHBTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1530 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1531 | else |
| 1532 | { |
Kaushik, Sushant | 8489f47 | 2014-01-27 11:41:22 +0530 | [diff] [blame] | 1533 | limLog(pMac, LOG1, FL("Deactivated probe after hb timer")); |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1534 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1535 | |
| 1536 | if (wlan_cfgGetInt(pMac, WNI_CFG_PROBE_AFTER_HB_FAIL_TIMEOUT, |
| 1537 | &val) != eSIR_SUCCESS) |
| 1538 | { |
| 1539 | /** |
| 1540 | * Could not get PROBE_AFTER_HB_FAILURE |
| 1541 | * value from CFG. Log error. |
| 1542 | */ |
| 1543 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1544 | FL("could not retrieve PROBE_AFTER_HB_FAIL_TIMEOUT value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1545 | } |
| 1546 | |
| 1547 | // Change timer to reactivate it in future |
| 1548 | val = SYS_MS_TO_TICKS(val); |
| 1549 | |
| 1550 | if (tx_timer_change(&pMac->lim.limTimers.gLimProbeAfterHBTimer, |
| 1551 | val, 0) != TX_SUCCESS) |
| 1552 | { |
| 1553 | // Could not change HeartBeat timer. |
| 1554 | // Log error |
| 1555 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1556 | FL("unable to change ProbeAfterHBTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1557 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1558 | else |
| 1559 | { |
Jeff Johnson | 0f4d0bc | 2013-11-03 17:48:50 -0800 | [diff] [blame] | 1560 | limLog(pMac, LOGW, FL("Probe after HB timer value is changed = %u"), val); |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1561 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1562 | |
| 1563 | break; |
| 1564 | |
| 1565 | case eLIM_KEEPALIVE_TIMER: |
| 1566 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimKeepaliveTimer) |
| 1567 | != TX_SUCCESS) |
| 1568 | { |
| 1569 | // Could not deactivate Keepalive timer. |
| 1570 | // Log error |
| 1571 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1572 | FL("unable to deactivate KeepaliveTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1573 | } |
| 1574 | |
| 1575 | // Change timer to reactivate it in future |
| 1576 | |
| 1577 | if (wlan_cfgGetInt(pMac, WNI_CFG_KEEPALIVE_TIMEOUT, |
| 1578 | &val) != eSIR_SUCCESS) |
| 1579 | { |
| 1580 | /** |
| 1581 | * Could not get keepalive timeout value |
| 1582 | * from CFG. Log error. |
| 1583 | */ |
| 1584 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1585 | FL("could not retrieve keepalive timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1586 | } |
| 1587 | if (val == 0) |
| 1588 | { |
| 1589 | val = 3000; |
| 1590 | pMac->sch.keepAlive = 0; |
| 1591 | } else |
| 1592 | pMac->sch.keepAlive = 1; |
| 1593 | |
| 1594 | |
| 1595 | |
| 1596 | val = SYS_MS_TO_TICKS(val + SYS_TICK_DUR_MS - 1); |
| 1597 | |
| 1598 | if (tx_timer_change(&pMac->lim.limTimers.gLimKeepaliveTimer, |
| 1599 | val, val) != TX_SUCCESS) |
| 1600 | { |
| 1601 | // Could not change KeepaliveTimer timer. |
| 1602 | // Log error |
| 1603 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1604 | FL("unable to change KeepaliveTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1605 | } |
| 1606 | |
| 1607 | break; |
| 1608 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1609 | case eLIM_BACKGROUND_SCAN_TIMER: |
| 1610 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimBackgroundScanTimer) |
| 1611 | != TX_SUCCESS) |
| 1612 | { |
| 1613 | // Could not deactivate BackgroundScanTimer timer. |
| 1614 | // Log error |
| 1615 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1616 | FL("unable to deactivate BackgroundScanTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1617 | } |
| 1618 | |
| 1619 | // Change timer to reactivate it in future |
| 1620 | if (wlan_cfgGetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD, |
| 1621 | &val) != eSIR_SUCCESS) |
| 1622 | { |
| 1623 | /** |
| 1624 | * Could not get Background scan period value |
| 1625 | * from CFG. Log error. |
| 1626 | */ |
| 1627 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1628 | FL("could not retrieve Background scan period value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1629 | } |
| 1630 | if (val == 0) |
| 1631 | { |
| 1632 | val = LIM_BACKGROUND_SCAN_PERIOD_DEFAULT_MS; |
| 1633 | pMac->lim.gLimBackgroundScanDisable = true; |
| 1634 | } |
| 1635 | else |
| 1636 | pMac->lim.gLimBackgroundScanDisable = false; |
| 1637 | |
| 1638 | val = SYS_MS_TO_TICKS(val); |
| 1639 | |
| 1640 | if (tx_timer_change(&pMac->lim.limTimers.gLimBackgroundScanTimer, |
| 1641 | val, val) != TX_SUCCESS) |
| 1642 | { |
| 1643 | // Could not change BackgroundScanTimer timer. |
| 1644 | // Log error |
| 1645 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1646 | FL("unable to change BackgroundScanTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1647 | } |
| 1648 | |
| 1649 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1650 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1651 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1652 | case eLIM_CHANNEL_SWITCH_TIMER: |
| 1653 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != eSIR_SUCCESS) |
| 1654 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1655 | limLog(pMac, LOGP, FL("tx_timer_deactivate failed!")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1656 | return; |
| 1657 | } |
| 1658 | |
| 1659 | if (tx_timer_change(&pMac->lim.limTimers.gLimChannelSwitchTimer, |
| 1660 | pMac->lim.gLimChannelSwitch.switchTimeoutValue, |
| 1661 | 0) != TX_SUCCESS) |
| 1662 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1663 | limLog(pMac, LOGP, FL("tx_timer_change failed ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1664 | return; |
| 1665 | } |
| 1666 | break; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1667 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1668 | |
| 1669 | case eLIM_LEARN_DURATION_TIMER: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1670 | break; |
| 1671 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1672 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1673 | case eLIM_QUIET_BSS_TIMER: |
| 1674 | if (TX_SUCCESS != |
| 1675 | tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer)) |
| 1676 | { |
| 1677 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1678 | FL("Unable to de-activate gLimQuietBssTimer! Will attempt to activate anyway...")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1679 | } |
| 1680 | |
| 1681 | // gLimQuietDuration appears to be in units of ticks |
| 1682 | // Use it as is |
| 1683 | if (TX_SUCCESS != |
| 1684 | tx_timer_change( &pMac->lim.limTimers.gLimQuietBssTimer, |
| 1685 | pMac->lim.gLimSpecMgmt.quietDuration, |
| 1686 | 0)) |
| 1687 | { |
| 1688 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1689 | FL("Unable to change gLimQuietBssTimer! Will still attempt to activate anyway...")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1690 | } |
| 1691 | break; |
| 1692 | |
| 1693 | case eLIM_QUIET_TIMER: |
| 1694 | if( TX_SUCCESS != tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietTimer)) |
| 1695 | { |
| 1696 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1697 | FL( "Unable to deactivate gLimQuietTimer! Will still attempt to re-activate anyway..." )); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1698 | } |
| 1699 | |
| 1700 | // Set the NEW timeout value, in ticks |
| 1701 | if( TX_SUCCESS != tx_timer_change( &pMac->lim.limTimers.gLimQuietTimer, |
| 1702 | SYS_MS_TO_TICKS(pMac->lim.gLimSpecMgmt.quietTimeoutValue), 0)) |
| 1703 | { |
| 1704 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1705 | FL( "Unable to change gLimQuietTimer! Will still attempt to re-activate anyway..." )); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1706 | } |
| 1707 | break; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1708 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1709 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1710 | #if 0 |
| 1711 | case eLIM_WPS_OVERLAP_TIMER: |
| 1712 | { |
| 1713 | // Restart Learn Interval timer |
| 1714 | |
| 1715 | tANI_U32 WPSOverlapTimer = SYS_MS_TO_TICKS(LIM_WPS_OVERLAP_TIMER_MS); |
| 1716 | |
| 1717 | if (tx_timer_deactivate( |
| 1718 | &pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer) != TX_SUCCESS) |
| 1719 | { |
| 1720 | // Could not deactivate Learn Interval timer. |
| 1721 | // Log error |
| 1722 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1723 | FL("Unable to deactivate WPS overlap timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1724 | } |
| 1725 | |
| 1726 | if (tx_timer_change( |
| 1727 | &pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer, |
| 1728 | WPSOverlapTimer, 0) != TX_SUCCESS) |
| 1729 | { |
| 1730 | // Could not change Learn Interval timer. |
| 1731 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1732 | limLog(pMac, LOGP, FL("Unable to change WPS overlap timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1733 | |
| 1734 | return; |
| 1735 | } |
| 1736 | |
| 1737 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1738 | FL("Setting WPS overlap TIMER to %d ticks"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1739 | WPSOverlapTimer); |
| 1740 | } |
| 1741 | break; |
| 1742 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1743 | |
| 1744 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1745 | case eLIM_FT_PREAUTH_RSP_TIMER: |
| 1746 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimFTPreAuthRspTimer) != TX_SUCCESS) |
| 1747 | { |
| 1748 | /** |
| 1749 | ** Could not deactivate Join Failure |
| 1750 | ** timer. Log error. |
| 1751 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1752 | limLog(pMac, LOGP, FL("Unable to deactivate Preauth response Failure timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1753 | return; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1754 | } |
| 1755 | val = 1000; |
| 1756 | val = SYS_MS_TO_TICKS(val); |
| 1757 | if (tx_timer_change(&pMac->lim.limTimers.gLimFTPreAuthRspTimer, |
| 1758 | val, 0) != TX_SUCCESS) |
| 1759 | { |
| 1760 | /** |
| 1761 | * Could not change Join Failure |
| 1762 | * timer. Log error. |
| 1763 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1764 | limLog(pMac, LOGP, FL("Unable to change Join Failure timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1765 | return; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1766 | } |
| 1767 | break; |
| 1768 | #endif |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 1769 | |
| 1770 | #ifdef WLAN_FEATURE_LFR_MBB |
| 1771 | case eLIM_PREAUTH_MBB_RSP_TIMER: |
| 1772 | if (tx_timer_deactivate(&pMac->lim.limTimers. |
| 1773 | glim_pre_auth_mbb_rsp_timer) != TX_SUCCESS) { |
| 1774 | limLog(pMac, LOGP, |
| 1775 | FL("Unable to deactivate preauth response mbb timer")); |
| 1776 | return; |
| 1777 | } |
| 1778 | break; |
Padma, Santhosh Kumar | f4966dc | 2017-01-03 18:56:00 +0530 | [diff] [blame^] | 1779 | case eLIM_REASSOC_MBB_RSP_TIMER: |
| 1780 | if (tx_timer_deactivate(&pMac->lim.limTimers. |
| 1781 | glim_reassoc_mbb_rsp_timer) != TX_SUCCESS) { |
| 1782 | limLog(pMac, LOGP, |
| 1783 | FL("Unable to deactivate reassoc response mbb timer")); |
| 1784 | return; |
| 1785 | } |
| 1786 | break; |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 1787 | #endif |
| 1788 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1789 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1790 | case eLIM_TSM_TIMER: |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1791 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimEseTsmTimer) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1792 | != TX_SUCCESS) |
| 1793 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1794 | limLog(pMac, LOGE, FL("Unable to deactivate TSM timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1795 | } |
| 1796 | break; |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1797 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 1798 | |
| 1799 | case eLIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE: |
| 1800 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer) != TX_SUCCESS) |
| 1801 | { |
| 1802 | /** |
| 1803 | ** Could not deactivate Active to passive channel timer. |
| 1804 | ** Log error. |
| 1805 | **/ |
| 1806 | limLog(pMac, LOGP, FL("Unable to Deactivate " |
| 1807 | "Active to passive channel timer")); |
| 1808 | return; |
| 1809 | } |
| 1810 | val = ACTIVE_TO_PASSIVE_CONVERISON_TIMEOUT; |
| 1811 | val = SYS_MS_TO_TICKS(val); |
| 1812 | if (tx_timer_change(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer, |
| 1813 | val, 0) != TX_SUCCESS) |
| 1814 | { |
| 1815 | /** |
| 1816 | * Could not change timer to check scan type for passive channel. |
| 1817 | * timer. Log error. |
| 1818 | */ |
| 1819 | limLog(pMac, LOGP, FL("Unable to change timer")); |
| 1820 | return; |
| 1821 | } |
| 1822 | break; |
| 1823 | |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1824 | case eLIM_DISASSOC_ACK_TIMER: |
| 1825 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimDisassocAckTimer) != TX_SUCCESS) |
| 1826 | { |
| 1827 | /** |
| 1828 | ** Could not deactivate Join Failure |
| 1829 | ** timer. Log error. |
| 1830 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1831 | limLog(pMac, LOGP, FL("Unable to deactivate Disassoc ack timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1832 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1833 | } |
| 1834 | val = 1000; |
| 1835 | val = SYS_MS_TO_TICKS(val); |
| 1836 | if (tx_timer_change(&pMac->lim.limTimers.gLimDisassocAckTimer, |
| 1837 | val, 0) != TX_SUCCESS) |
| 1838 | { |
| 1839 | /** |
| 1840 | * Could not change Join Failure |
| 1841 | * timer. Log error. |
| 1842 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1843 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1844 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1845 | } |
| 1846 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1847 | |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1848 | case eLIM_DEAUTH_ACK_TIMER: |
| 1849 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimDeauthAckTimer) != TX_SUCCESS) |
| 1850 | { |
| 1851 | /** |
| 1852 | ** Could not deactivate Join Failure |
| 1853 | ** timer. Log error. |
| 1854 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1855 | limLog(pMac, LOGP, FL("Unable to deactivate Deauth ack timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1856 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1857 | } |
| 1858 | val = 1000; |
| 1859 | val = SYS_MS_TO_TICKS(val); |
| 1860 | if (tx_timer_change(&pMac->lim.limTimers.gLimDeauthAckTimer, |
| 1861 | val, 0) != TX_SUCCESS) |
| 1862 | { |
| 1863 | /** |
| 1864 | * Could not change Join Failure |
| 1865 | * timer. Log error. |
| 1866 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1867 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1868 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1869 | } |
| 1870 | break; |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1871 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1872 | case eLIM_INSERT_SINGLESHOT_NOA_TIMER: |
| 1873 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer) != TX_SUCCESS) |
| 1874 | { |
| 1875 | /** |
| 1876 | ** Could not deactivate SingleShot NOA Insert |
| 1877 | ** timer. Log error. |
| 1878 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1879 | limLog(pMac, LOGP, FL("Unable to deactivate SingleShot NOA Insert timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1880 | return; |
| 1881 | } |
| 1882 | val = LIM_INSERT_SINGLESHOTNOA_TIMEOUT_VALUE; |
| 1883 | val = SYS_MS_TO_TICKS(val); |
| 1884 | if (tx_timer_change(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer, |
| 1885 | val, 0) != TX_SUCCESS) |
| 1886 | { |
| 1887 | /** |
| 1888 | * Could not change Single Shot NOA Insert |
| 1889 | * timer. Log error. |
| 1890 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1891 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1892 | return; |
| 1893 | } |
| 1894 | break; |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 1895 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1896 | default: |
| 1897 | // Invalid timerId. Log error |
| 1898 | break; |
| 1899 | } |
| 1900 | } /****** end limDeactivateAndChangeTimer() ******/ |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | /**--------------------------------------------------------------- |
| 1905 | \fn limHeartBeatDeactivateAndChangeTimer |
| 1906 | \brief This function deactivates and changes the heart beat |
| 1907 | \ timer, eLIM_HEART_BEAT_TIMER. |
| 1908 | \ |
| 1909 | \param pMac |
| 1910 | \param psessionEntry |
| 1911 | \return None |
| 1912 | ------------------------------------------------------------------*/ |
| 1913 | void |
| 1914 | limHeartBeatDeactivateAndChangeTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
| 1915 | { |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1916 | tANI_U32 val, val1; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1917 | |
Siddharth Bhal | 224da54 | 2014-05-28 07:07:46 +0530 | [diff] [blame] | 1918 | if (NULL == psessionEntry) |
| 1919 | { |
| 1920 | limLog(pMac, LOGE, FL("%s: received session id NULL." |
| 1921 | " Heartbeat timer config failed"), __func__); |
| 1922 | return; |
| 1923 | } |
| 1924 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1925 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1926 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
| 1927 | return; |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1928 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1929 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1930 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer) != TX_SUCCESS) |
| 1931 | limLog(pMac, LOGP, FL("Fail to deactivate HeartBeatTimer ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1932 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1933 | /* HB Timer sessionisation: In case of 2 or more sessions, the HB interval keeps |
| 1934 | changing. to avoid this problem, HeartBeat interval is made constant, by |
| 1935 | fixing beacon interval to 100ms immaterial of the beacon interval of the session */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1936 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1937 | //val = psessionEntry->beaconParams.beaconInterval; |
| 1938 | val = LIM_HB_TIMER_BEACON_INTERVAL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1939 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1940 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val1) != eSIR_SUCCESS) |
| 1941 | limLog(pMac, LOGP, FL("Fail to get WNI_CFG_HEART_BEAT_THRESHOLD ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1942 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1943 | PELOGW(limLog(pMac,LOGW, |
| 1944 | FL("HB Timer Int.=100ms * %d, Beacon Int.=%dms,Session Id=%d "), |
| 1945 | val1, psessionEntry->beaconParams.beaconInterval, |
| 1946 | psessionEntry->peSessionId);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1947 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1948 | /* The HB timer timeout value of 4 seconds (40 beacon intervals) is not |
| 1949 | * enough to judge the peer device inactivity when 32 peers are connected. |
| 1950 | * Hence increasing the HB timer timeout to |
| 1951 | * HBtimeout = (TBTT * num_beacons * num_peers) |
| 1952 | */ |
| 1953 | if (eSIR_IBSS_MODE == psessionEntry->bssType && |
| 1954 | pMac->lim.gLimNumIbssPeers > 0) |
| 1955 | { |
Ravi Joshi | 92a4e14 | 2013-06-27 17:00:42 -0700 | [diff] [blame] | 1956 | val1 = val1 * pMac->lim.gLimNumIbssPeers; |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1957 | } |
Ravi Joshi | 92a4e14 | 2013-06-27 17:00:42 -0700 | [diff] [blame] | 1958 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1959 | // Change timer to reactivate it in future |
| 1960 | val = SYS_MS_TO_TICKS(val * val1); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1961 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1962 | if (tx_timer_change(&pMac->lim.limTimers.gLimHeartBeatTimer, val, 0) != TX_SUCCESS) |
| 1963 | limLog(pMac, LOGP, FL("Fail to change HeartBeatTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1964 | |
| 1965 | } /****** end limHeartBeatDeactivateAndChangeTimer() ******/ |
| 1966 | |
| 1967 | |
| 1968 | /**--------------------------------------------------------------- |
| 1969 | \fn limReactivateHeartBeatTimer |
| 1970 | \brief This function s called to deactivate, change and |
| 1971 | \ activate a timer. |
| 1972 | \ |
| 1973 | \param pMac - Pointer to Global MAC structure |
| 1974 | \param psessionEntry |
| 1975 | \return None |
| 1976 | ------------------------------------------------------------------*/ |
| 1977 | void |
| 1978 | limReactivateHeartBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
| 1979 | { |
Siddharth Bhal | d31c125 | 2014-05-05 19:34:14 +0530 | [diff] [blame] | 1980 | if (NULL == psessionEntry) |
| 1981 | { |
| 1982 | limLog(pMac, LOGE, FL("%s: received session id NULL." |
| 1983 | " Heartbeat timer config failed"), __func__); |
| 1984 | return; |
| 1985 | } |
| 1986 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1987 | PELOG3(limLog(pMac, LOG3, FL("Rxed Heartbeat. Count=%d"), psessionEntry->LimRxedBeaconCntDuringHB);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1988 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1989 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 1990 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Srinivas Girigowda | 35f6a71 | 2013-04-04 16:48:34 -0700 | [diff] [blame] | 1991 | { |
| 1992 | limLog(pMac, LOGW, FL("Active offload feature is enabled, FW takes care of HB monitoring")); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1993 | return; |
Srinivas Girigowda | 35f6a71 | 2013-04-04 16:48:34 -0700 | [diff] [blame] | 1994 | } |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1995 | #endif |
| 1996 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1997 | limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1998 | |
| 1999 | //only start the hearbeat-timer if the timeout value is non-zero |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2000 | if(pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs > 0) |
| 2001 | { |
| 2002 | /* |
| 2003 | * There is increasing need to limit the apps wakeup due to WLAN |
| 2004 | * activity. During HB monitoring, the beacons from peer are sent to |
| 2005 | * the host causing the host to wakeup. Hence, offloading the HB |
| 2006 | * monitoring to LMAC |
| 2007 | */ |
| 2008 | if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE && |
| 2009 | IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE) |
| 2010 | { |
| 2011 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer)!= TX_SUCCESS) |
| 2012 | { |
| 2013 | limLog(pMac, LOGP,FL("IBSS HeartBeat Offloaded, Could not deactivate Heartbeat timer")); |
| 2014 | } |
| 2015 | else |
| 2016 | { |
| 2017 | limLog(pMac, LOGE, FL("IBSS HeartBeat Offloaded, Deactivated heartbeat link monitoring")); |
| 2018 | } |
| 2019 | } |
| 2020 | else |
| 2021 | { |
| 2022 | if (tx_timer_activate(&pMac->lim.limTimers.gLimHeartBeatTimer)!= TX_SUCCESS) |
| 2023 | { |
| 2024 | limLog(pMac, LOGP,FL("could not activate Heartbeat timer")); |
| 2025 | } |
| 2026 | else |
| 2027 | { |
| 2028 | limLog(pMac, LOGW, FL("Reactivated heartbeat link monitoring")); |
| 2029 | } |
| 2030 | } |
| 2031 | limResetHBPktCount(psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2032 | } |
| 2033 | |
| 2034 | } /****** end limReactivateHeartBeatTimer() ******/ |
| 2035 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2036 | |
| 2037 | /** |
| 2038 | * limActivateHearBeatTimer() |
| 2039 | * |
| 2040 | * |
| 2041 | * @brief: This function is called to activate heartbeat timer |
| 2042 | * |
| 2043 | *LOGIC: |
| 2044 | * |
| 2045 | *ASSUMPTIONS: |
| 2046 | * NA |
| 2047 | * |
| 2048 | * @note staId for eLIM_AUTH_RSP_TIMER is auth Node Index. |
| 2049 | * |
| 2050 | * @param pMac - Pointer to Global MAC structure |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2051 | * @param psessionEntry - Session Entry |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2052 | * |
| 2053 | * @return TX_SUCCESS - timer is activated |
| 2054 | * errors - fail to start the timer |
| 2055 | */ |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2056 | v_UINT_t limActivateHearBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2057 | { |
| 2058 | v_UINT_t status = TX_TIMER_ERROR; |
| 2059 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2060 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 2061 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Ravi Joshi | f7fe8d3 | 2013-09-21 17:02:11 -0700 | [diff] [blame] | 2062 | return (TX_SUCCESS); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2063 | #endif |
| 2064 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2065 | if(TX_AIRGO_TMR_SIGNATURE == pMac->lim.limTimers.gLimHeartBeatTimer.tmrSignature) |
| 2066 | { |
| 2067 | //consider 0 interval a ok case |
| 2068 | if( pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs ) |
| 2069 | { |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2070 | if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE && |
| 2071 | IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE) |
| 2072 | { |
| 2073 | /* HB offload in IBSS mode */ |
| 2074 | status = tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 2075 | if (TX_SUCCESS != status) |
| 2076 | { |
| 2077 | PELOGE(limLog(pMac, LOGE, |
| 2078 | FL("IBSS HB Offload, Could not deactivate HB timer status(%d)"), |
| 2079 | status);) |
| 2080 | } |
| 2081 | else |
| 2082 | { |
| 2083 | PELOGE(limLog(pMac, LOGE, |
| 2084 | FL("%s] IBSS HB Offloaded, Heartbeat timer deactivated"), |
| 2085 | __func__);) |
| 2086 | } |
| 2087 | |
| 2088 | } |
| 2089 | else |
| 2090 | { |
| 2091 | status = tx_timer_activate(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 2092 | if ( TX_SUCCESS != status ) |
| 2093 | { |
| 2094 | PELOGE(limLog(pMac, LOGE, |
| 2095 | FL("could not activate Heartbeat timer status(%d)"), status);) |
| 2096 | } |
| 2097 | else |
| 2098 | { |
| 2099 | PELOGE(limLog(pMac, LOGW, |
| 2100 | FL("%s] Activated Heartbeat timer status(%d)"), __func__, status);) |
| 2101 | } |
| 2102 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2103 | } |
| 2104 | else |
| 2105 | { |
| 2106 | status = TX_SUCCESS; |
| 2107 | } |
| 2108 | } |
| 2109 | |
| 2110 | return (status); |
| 2111 | } |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | /** |
| 2116 | * limDeactivateAndChangePerStaIdTimer() |
| 2117 | * |
| 2118 | * |
| 2119 | * @brief: This function is called to deactivate and change a per STA timer |
| 2120 | * for future re-activation |
| 2121 | * |
| 2122 | *LOGIC: |
| 2123 | * |
| 2124 | *ASSUMPTIONS: |
| 2125 | * NA |
| 2126 | * |
| 2127 | * @note staId for eLIM_AUTH_RSP_TIMER is auth Node Index. |
| 2128 | * |
| 2129 | * @param pMac - Pointer to Global MAC structure |
| 2130 | * @param timerId - enum of timer to be deactivated and changed |
| 2131 | * This enum is defined in limUtils.h file |
| 2132 | * @param staId - staId |
| 2133 | * |
| 2134 | * @return None |
| 2135 | */ |
| 2136 | |
| 2137 | void |
| 2138 | limDeactivateAndChangePerStaIdTimer(tpAniSirGlobal pMac, tANI_U32 timerId, tANI_U16 staId) |
| 2139 | { |
| 2140 | tANI_U32 val; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2141 | |
| 2142 | switch (timerId) |
| 2143 | { |
| 2144 | case eLIM_CNF_WAIT_TIMER: |
| 2145 | |
| 2146 | if (tx_timer_deactivate(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId]) |
| 2147 | != TX_SUCCESS) |
| 2148 | { |
| 2149 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2150 | FL("unable to deactivate CNF wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2151 | |
| 2152 | } |
| 2153 | |
| 2154 | // Change timer to reactivate it in future |
| 2155 | |
| 2156 | if (wlan_cfgGetInt(pMac, WNI_CFG_WT_CNF_TIMEOUT, |
| 2157 | &val) != eSIR_SUCCESS) |
| 2158 | { |
| 2159 | /** |
| 2160 | * Could not get cnf timeout value |
| 2161 | * from CFG. Log error. |
| 2162 | */ |
| 2163 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2164 | FL("could not retrieve cnf timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2165 | } |
| 2166 | val = SYS_MS_TO_TICKS(val); |
| 2167 | |
| 2168 | if (tx_timer_change(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId], |
| 2169 | val, val) != TX_SUCCESS) |
| 2170 | { |
| 2171 | // Could not change cnf timer. |
| 2172 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2173 | limLog(pMac, LOGP, FL("unable to change cnf wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2174 | } |
| 2175 | |
| 2176 | break; |
| 2177 | |
| 2178 | case eLIM_AUTH_RSP_TIMER: |
| 2179 | { |
| 2180 | tLimPreAuthNode *pAuthNode; |
| 2181 | |
| 2182 | pAuthNode = limGetPreAuthNodeFromIndex(pMac, &pMac->lim.gLimPreAuthTimerTable, staId); |
| 2183 | |
| 2184 | if (pAuthNode == NULL) |
| 2185 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2186 | limLog(pMac, LOGP, FL("Invalid Pre Auth Index passed :%d"), staId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2187 | break; |
| 2188 | } |
| 2189 | |
| 2190 | if (tx_timer_deactivate(&pAuthNode->timer) != TX_SUCCESS) |
| 2191 | { |
| 2192 | // Could not deactivate auth response timer. |
| 2193 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2194 | limLog(pMac, LOGP, FL("unable to deactivate auth response timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2195 | } |
| 2196 | |
| 2197 | // Change timer to reactivate it in future |
| 2198 | |
| 2199 | if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_RSP_TIMEOUT, &val) != eSIR_SUCCESS) |
| 2200 | { |
| 2201 | /** |
| 2202 | * Could not get auth rsp timeout value |
| 2203 | * from CFG. Log error. |
| 2204 | */ |
| 2205 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2206 | FL("could not retrieve auth response timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2207 | } |
| 2208 | |
| 2209 | val = SYS_MS_TO_TICKS(val); |
| 2210 | |
| 2211 | if (tx_timer_change(&pAuthNode->timer, val, 0) != TX_SUCCESS) |
| 2212 | { |
| 2213 | // Could not change auth rsp timer. |
| 2214 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2215 | limLog(pMac, LOGP, FL("unable to change auth rsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2216 | } |
| 2217 | } |
| 2218 | break; |
| 2219 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2220 | |
| 2221 | default: |
| 2222 | // Invalid timerId. Log error |
| 2223 | break; |
| 2224 | |
| 2225 | } |
| 2226 | } |
| 2227 | |
| 2228 | |
| 2229 | /** |
| 2230 | * limActivateCnfTimer() |
| 2231 | * |
| 2232 | *FUNCTION: |
| 2233 | * This function is called to activate a per STA timer |
| 2234 | * |
| 2235 | *LOGIC: |
| 2236 | * |
| 2237 | *ASSUMPTIONS: |
| 2238 | * NA |
| 2239 | * |
| 2240 | *NOTE: |
| 2241 | * NA |
| 2242 | * |
| 2243 | * @param pMac - Pointer to Global MAC structure |
| 2244 | * @param StaId - staId |
| 2245 | * |
| 2246 | * @return None |
| 2247 | */ |
| 2248 | |
| 2249 | void limActivateCnfTimer(tpAniSirGlobal pMac, tANI_U16 staId, tpPESession psessionEntry) |
| 2250 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2251 | pMac->lim.limTimers.gpLimCnfWaitTimer[staId].sessionId = psessionEntry->peSessionId; |
| 2252 | if (tx_timer_activate(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId]) |
| 2253 | != TX_SUCCESS) |
| 2254 | { |
| 2255 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2256 | FL("could not activate cnf wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2257 | } |
| 2258 | } |
| 2259 | |
| 2260 | /** |
| 2261 | * limActivateAuthRspTimer() |
| 2262 | * |
| 2263 | *FUNCTION: |
| 2264 | * This function is called to activate a per STA timer |
| 2265 | * |
| 2266 | *LOGIC: |
| 2267 | * |
| 2268 | *ASSUMPTIONS: |
| 2269 | * NA |
| 2270 | * |
| 2271 | *NOTE: |
| 2272 | * NA |
| 2273 | * |
| 2274 | * @param pMac - Pointer to Global MAC structure |
| 2275 | * @param id - id |
| 2276 | * |
| 2277 | * @return None |
| 2278 | */ |
| 2279 | |
| 2280 | void limActivateAuthRspTimer(tpAniSirGlobal pMac, tLimPreAuthNode *pAuthNode) |
| 2281 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2282 | if (tx_timer_activate(&pAuthNode->timer) != TX_SUCCESS) |
| 2283 | { |
| 2284 | /// Could not activate auth rsp timer. |
| 2285 | // Log error |
| 2286 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2287 | FL("could not activate auth rsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | |
| 2292 | /** |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2293 | * limAssocCnfWaitTmerHandler() |
| 2294 | * |
| 2295 | *FUNCTION: |
| 2296 | * This function post a message to send a disassociate frame out. |
| 2297 | * |
| 2298 | *LOGIC: |
| 2299 | * |
| 2300 | *ASSUMPTIONS: |
| 2301 | * |
| 2302 | *NOTE: |
| 2303 | * NA |
| 2304 | * |
| 2305 | * @param |
| 2306 | * |
| 2307 | * @return None |
| 2308 | */ |
| 2309 | |
| 2310 | void |
| 2311 | limCnfWaitTmerHandler(void *pMacGlobal, tANI_U32 param) |
| 2312 | { |
| 2313 | tSirMsgQ msg; |
| 2314 | tANI_U32 statusCode; |
| 2315 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2316 | |
| 2317 | msg.type = SIR_LIM_CNF_WAIT_TIMEOUT; |
| 2318 | msg.bodyval = (tANI_U32)param; |
| 2319 | msg.bodyptr = NULL; |
| 2320 | |
| 2321 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2322 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2323 | FL("posting to LIM failed, reason=%d"), statusCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2324 | |
| 2325 | } |
| 2326 | |
| 2327 | /** |
| 2328 | * limKeepaliveTmerHandler() |
| 2329 | * |
| 2330 | *FUNCTION: |
| 2331 | * This function post a message to send a NULL data frame. |
| 2332 | * |
| 2333 | *LOGIC: |
| 2334 | * |
| 2335 | *ASSUMPTIONS: |
| 2336 | * |
| 2337 | *NOTE: |
| 2338 | * NA |
| 2339 | * |
| 2340 | * @param |
| 2341 | * |
| 2342 | * @return None |
| 2343 | */ |
| 2344 | |
| 2345 | void |
| 2346 | limKeepaliveTmerHandler(void *pMacGlobal, tANI_U32 param) |
| 2347 | { |
| 2348 | tSirMsgQ msg; |
| 2349 | tANI_U32 statusCode; |
| 2350 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2351 | |
| 2352 | msg.type = SIR_LIM_KEEPALIVE_TIMEOUT; |
| 2353 | msg.bodyval = (tANI_U32)param; |
| 2354 | msg.bodyptr = NULL; |
| 2355 | |
| 2356 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2357 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2358 | FL("posting to LIM failed, reason=%d"), statusCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2359 | |
| 2360 | } |
| 2361 | |
| 2362 | void |
| 2363 | limChannelSwitchTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2364 | { |
| 2365 | tSirMsgQ msg; |
| 2366 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2367 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2368 | limLog(pMac, LOG1, |
| 2369 | FL("ChannelSwitch Timer expired. Posting msg to LIM ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2370 | |
| 2371 | msg.type = SIR_LIM_CHANNEL_SWITCH_TIMEOUT; |
| 2372 | msg.bodyval = (tANI_U32)param; |
| 2373 | msg.bodyptr = NULL; |
| 2374 | |
| 2375 | limPostMsgApi(pMac, &msg); |
| 2376 | } |
| 2377 | |
| 2378 | void |
| 2379 | limQuietTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2380 | { |
| 2381 | tSirMsgQ msg; |
| 2382 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2383 | |
| 2384 | msg.type = SIR_LIM_QUIET_TIMEOUT; |
| 2385 | msg.bodyval = (tANI_U32)param; |
| 2386 | msg.bodyptr = NULL; |
| 2387 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2388 | limLog(pMac, LOG1, |
| 2389 | FL("Post SIR_LIM_QUIET_TIMEOUT msg. ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2390 | limPostMsgApi(pMac, &msg); |
| 2391 | } |
| 2392 | |
| 2393 | void |
| 2394 | limQuietBssTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2395 | { |
| 2396 | tSirMsgQ msg; |
| 2397 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2398 | |
| 2399 | msg.type = SIR_LIM_QUIET_BSS_TIMEOUT; |
| 2400 | msg.bodyval = (tANI_U32)param; |
| 2401 | msg.bodyptr = NULL; |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2402 | limLog(pMac, LOG1, |
| 2403 | FL("Post SIR_LIM_QUIET_BSS_TIMEOUT msg. ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2404 | limPostMsgApi(pMac, &msg); |
| 2405 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2406 | #if 0 |
| 2407 | void |
| 2408 | limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2409 | { |
| 2410 | tSirMsgQ msg; |
| 2411 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2412 | |
| 2413 | msg.type = SIR_LIM_WPS_OVERLAP_TIMEOUT; |
| 2414 | msg.bodyval = (tANI_U32)param; |
| 2415 | msg.bodyptr = NULL; |
| 2416 | PELOG1(limLog(pMac, LOG1, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2417 | FL("Post SIR_LIM_WPS_OVERLAP_TIMEOUT msg. "));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2418 | limPostMsgApi(pMac, &msg); |
| 2419 | } |
| 2420 | #endif |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2421 | |
| 2422 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 2423 | /* ACTIVE_MODE_HB_OFFLOAD */ |
| 2424 | /** |
| 2425 | * limMissedBeaconInActiveMode() |
| 2426 | * |
| 2427 | *FUNCTION: |
| 2428 | * This function handle beacon miss indication from FW |
| 2429 | * in Active mode. |
| 2430 | * |
| 2431 | *LOGIC: |
| 2432 | * |
| 2433 | *ASSUMPTIONS: |
| 2434 | * NA |
| 2435 | * |
| 2436 | *NOTE: |
| 2437 | * NA |
| 2438 | * |
| 2439 | * @param param - Msg Type |
| 2440 | * |
| 2441 | * @return None |
| 2442 | */ |
| 2443 | void |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 2444 | limMissedBeaconInActiveMode(void *pMacGlobal, tpPESession psessionEntry) |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2445 | { |
| 2446 | tANI_U32 statusCode; |
| 2447 | tSirMsgQ msg; |
| 2448 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2449 | |
| 2450 | // Prepare and post message to LIM Message Queue |
| 2451 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 2452 | { |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2453 | msg.type = (tANI_U16) SIR_LIM_HEART_BEAT_TIMEOUT; |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 2454 | msg.bodyptr = psessionEntry; |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2455 | msg.bodyval = 0; |
| 2456 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2457 | FL("Heartbeat failure from Riva")); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2458 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2459 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2460 | FL("posting message %X to LIM failed, reason=%d"), |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2461 | msg.type, statusCode); |
| 2462 | } |
| 2463 | } |
| 2464 | #endif |