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 | } |
| 644 | #endif |
| 645 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 646 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 647 | cfgValue = 5000; |
| 648 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 649 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 650 | if (tx_timer_create(&pMac->lim.limTimers.gLimEseTsmTimer, |
| 651 | "ESE TSM Stats TIMEOUT", |
| 652 | limTimerHandler, SIR_LIM_ESE_TSM_TIMEOUT, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 653 | cfgValue, 0, |
| 654 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 655 | { |
| 656 | // Could not create Join failure timer. |
| 657 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 658 | limLog(pMac, LOGP, FL("could not create Join failure timer")); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 659 | goto err_timer; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 660 | } |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 661 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 662 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 663 | cfgValue = 1000; |
| 664 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 665 | if (tx_timer_create(&pMac->lim.limTimers.gLimDisassocAckTimer, |
| 666 | "DISASSOC ACK TIMEOUT", |
| 667 | limTimerHandler, SIR_LIM_DISASSOC_ACK_TIMEOUT, |
| 668 | cfgValue, 0, |
| 669 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 670 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 671 | limLog(pMac, LOGP, FL("could not DISASSOC ACK TIMEOUT timer")); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 672 | goto err_timer; |
| 673 | } |
| 674 | |
| 675 | cfgValue = 1000; |
| 676 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 677 | if (tx_timer_create(&pMac->lim.limTimers.gLimDeauthAckTimer, |
| 678 | "DISASSOC ACK TIMEOUT", |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 679 | limTimerHandler, SIR_LIM_DEAUTH_ACK_TIMEOUT, |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 680 | cfgValue, 0, |
| 681 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 682 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 683 | limLog(pMac, LOGP, FL("could not create DEAUTH ACK TIMEOUT timer")); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 684 | goto err_timer; |
| 685 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 686 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 687 | 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) |
| 688 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 689 | if (tx_timer_create(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer, |
| 690 | "Single Shot NOA Insert timeout", |
| 691 | limTimerHandler, SIR_LIM_INSERT_SINGLESHOT_NOA_TIMEOUT, |
| 692 | cfgValue, 0, |
| 693 | TX_NO_ACTIVATE) != TX_SUCCESS) |
| 694 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 695 | 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] | 696 | goto err_timer; |
| 697 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 698 | |
Hanumantha Reddy Pothula | 97ea095 | 2015-10-09 11:29:39 +0530 | [diff] [blame] | 699 | cfgValue = WNI_CFG_ACTIVE_PASSIVE_CON_MAX; |
| 700 | if (eSIR_SUCCESS != wlan_cfgGetInt(pMac, WNI_CFG_ACTIVE_PASSIVE_CON, |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 701 | &cfgValue)) |
| 702 | { |
| 703 | limLog(pMac, LOGP, |
| 704 | FL("could not retrieve WNI_CFG_ACTIVE_PASSIVE_CON")); |
| 705 | } |
| 706 | if (cfgValue) |
| 707 | { |
| 708 | cfgValue = ACTIVE_TO_PASSIVE_CONVERISON_TIMEOUT; |
| 709 | cfgValue = SYS_MS_TO_TICKS(cfgValue); |
| 710 | if (tx_timer_create(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer, |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 711 | "ACTIVE TO PASSIVE CHANNEL", limTimerHandler, |
| 712 | SIR_LIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE, cfgValue, 0, |
| 713 | TX_NO_ACTIVATE) != TX_SUCCESS) |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 714 | { |
| 715 | limLog(pMac, LOGW,FL("could not create timer for passive channel to active channel")); |
| 716 | goto err_timer; |
| 717 | } |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 718 | } |
Hanumantha Reddy Pothula | 802d31d | 2015-09-29 17:39:11 +0530 | [diff] [blame] | 719 | else |
| 720 | { |
| 721 | limLog(pMac, LOG1, |
| 722 | FL("gLimActiveToPassiveChannelTimer not created %d"), cfgValue); |
| 723 | } |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 724 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 725 | return TX_SUCCESS; |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 726 | |
| 727 | err_timer: |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 728 | tx_timer_delete(&pMac->lim.limTimers.gLimDeauthAckTimer); |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 729 | tx_timer_delete(&pMac->lim.limTimers.gLimDisassocAckTimer); |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 730 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
| 731 | tx_timer_delete(&pMac->lim.limTimers.gLimEseTsmTimer); |
| 732 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 733 | tx_timer_delete(&pMac->lim.limTimers.gLimFTPreAuthRspTimer); |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame^] | 734 | #ifdef WLAN_FEATURE_LFR_MBB |
| 735 | tx_timer_delete(&pMac->lim.limTimers.glim_pre_auth_mbb_rsp_timer); |
| 736 | #endif |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 737 | tx_timer_delete(&pMac->lim.limTimers.gLimUpdateOlbcCacheTimer); |
| 738 | while(((tANI_S32)--i) >= 0) |
| 739 | { |
| 740 | tx_timer_delete(&pMac->lim.limTimers.gpLimCnfWaitTimer[i]); |
| 741 | } |
| 742 | tx_timer_delete(&pMac->lim.limTimers.gLimKeepaliveTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 743 | tx_timer_delete(&pMac->lim.limTimers.gLimBackgroundScanTimer); |
| 744 | tx_timer_delete(&pMac->lim.limTimers.gLimProbeAfterHBTimer); |
| 745 | tx_timer_delete(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 746 | tx_timer_delete(&pMac->lim.limTimers.gLimAuthFailureTimer); |
| 747 | tx_timer_delete(&pMac->lim.limTimers.gLimAddtsRspTimer); |
| 748 | tx_timer_delete(&pMac->lim.limTimers.gLimReassocFailureTimer); |
| 749 | tx_timer_delete(&pMac->lim.limTimers.gLimAssocFailureTimer); |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 750 | tx_timer_delete(&pMac->lim.limTimers.gLimJoinFailureTimer); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 751 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer); |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 752 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 753 | tx_timer_delete(&pMac->lim.limTimers.gLimQuietBssTimer); |
| 754 | tx_timer_delete(&pMac->lim.limTimers.gLimQuietTimer); |
| 755 | tx_timer_delete(&pMac->lim.limTimers.gLimChannelSwitchTimer); |
| 756 | tx_timer_delete(&pMac->lim.limTimers.gLimMaxChannelTimer); |
| 757 | tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer); |
| 758 | tx_timer_delete(&pMac->lim.limTimers.gLimMinChannelTimer); |
Venkata Prathyusha Kuntupalli | 7a87ff0 | 2013-01-29 10:45:54 -0800 | [diff] [blame] | 759 | tx_timer_delete(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer); |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 760 | tx_timer_delete(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer); |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 761 | |
| 762 | if(NULL != pMac->lim.gLimPreAuthTimerTable.pTable) |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 763 | { |
Sushant Kaushik | f4a2797 | 2015-04-16 16:48:00 +0530 | [diff] [blame] | 764 | vos_mem_vfree(pMac->lim.gLimPreAuthTimerTable.pTable); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 765 | pMac->lim.gLimPreAuthTimerTable.pTable = NULL; |
| 766 | } |
Madan Mohan Koyyalamudi | 694f8d7 | 2012-10-11 16:32:55 -0700 | [diff] [blame] | 767 | |
| 768 | return TX_TIMER_ERROR; |
| 769 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 770 | } /****** end limCreateTimers() ******/ |
| 771 | |
| 772 | |
| 773 | |
| 774 | /** |
| 775 | * limTimerHandler() |
| 776 | * |
| 777 | *FUNCTION: |
| 778 | * This function is called upon |
| 779 | * 1. MIN_CHANNEL, MAX_CHANNEL timer expiration during scanning |
| 780 | * 2. JOIN_FAILURE timer expiration while joining a BSS |
| 781 | * 3. AUTH_FAILURE timer expiration while authenticating with a peer |
| 782 | * 4. Heartbeat timer expiration on STA |
| 783 | * 5. Background scan timer expiration on STA |
| 784 | * 6. AID release, Pre-auth cleanup and Link monitoring timer |
| 785 | * expiration on AP |
| 786 | * |
| 787 | *LOGIC: |
| 788 | * |
| 789 | *ASSUMPTIONS: |
| 790 | * NA |
| 791 | * |
| 792 | *NOTE: |
| 793 | * NA |
| 794 | * |
| 795 | * @param param - Message corresponding to the timer that expired |
| 796 | * |
| 797 | * @return None |
| 798 | */ |
| 799 | |
| 800 | void |
| 801 | limTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 802 | { |
| 803 | tANI_U32 statusCode; |
| 804 | tSirMsgQ msg; |
| 805 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 806 | |
| 807 | // Prepare and post message to LIM Message Queue |
| 808 | |
| 809 | msg.type = (tANI_U16) param; |
| 810 | msg.bodyptr = NULL; |
| 811 | msg.bodyval = 0; |
| 812 | |
Padma, Santhosh Kumar | b036fc7 | 2015-11-13 16:22:23 +0530 | [diff] [blame] | 813 | if ((statusCode = limPostMsgApiHighPri(pMac, &msg)) != eSIR_SUCCESS) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 814 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 815 | FL("posting message %X to LIM failed, reason=%d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 816 | msg.type, statusCode); |
| 817 | } /****** end limTimerHandler() ******/ |
| 818 | |
| 819 | |
| 820 | /** |
| 821 | * limAddtsResponseTimerHandler() |
| 822 | * |
| 823 | *FUNCTION: |
| 824 | * This function is called upon Addts response timer expiration on sta |
| 825 | * |
| 826 | *LOGIC: |
| 827 | * Message SIR_LIM_ADDTS_RSP_TIMEOUT is posted to gSirLimMsgQ |
| 828 | * when this function is executed. |
| 829 | * |
| 830 | *ASSUMPTIONS: |
| 831 | * NA |
| 832 | * |
| 833 | *NOTE: |
| 834 | * NA |
| 835 | * |
| 836 | * @param param - pointer to pre-auth node |
| 837 | * |
| 838 | * @return None |
| 839 | */ |
| 840 | |
| 841 | void |
| 842 | limAddtsResponseTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 843 | { |
| 844 | tSirMsgQ msg; |
| 845 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 846 | |
| 847 | // Prepare and post message to LIM Message Queue |
| 848 | |
| 849 | msg.type = SIR_LIM_ADDTS_RSP_TIMEOUT; |
| 850 | msg.bodyval = param; |
| 851 | msg.bodyptr = NULL; |
| 852 | |
| 853 | limPostMsgApi(pMac, &msg); |
| 854 | } /****** end limAuthResponseTimerHandler() ******/ |
| 855 | |
| 856 | |
| 857 | /** |
| 858 | * limAuthResponseTimerHandler() |
| 859 | * |
| 860 | *FUNCTION: |
| 861 | * This function is called upon Auth response timer expiration on AP |
| 862 | * |
| 863 | *LOGIC: |
| 864 | * Message SIR_LIM_AUTH_RSP_TIMEOUT is posted to gSirLimMsgQ |
| 865 | * when this function is executed. |
| 866 | * |
| 867 | *ASSUMPTIONS: |
| 868 | * NA |
| 869 | * |
| 870 | *NOTE: |
| 871 | * NA |
| 872 | * |
| 873 | * @param param - pointer to pre-auth node |
| 874 | * |
| 875 | * @return None |
| 876 | */ |
| 877 | |
| 878 | void |
| 879 | limAuthResponseTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 880 | { |
| 881 | tSirMsgQ msg; |
| 882 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 883 | |
| 884 | // Prepare and post message to LIM Message Queue |
| 885 | |
| 886 | msg.type = SIR_LIM_AUTH_RSP_TIMEOUT; |
| 887 | msg.bodyptr = NULL; |
| 888 | msg.bodyval = (tANI_U32)param; |
| 889 | |
| 890 | limPostMsgApi(pMac, &msg); |
| 891 | } /****** end limAuthResponseTimerHandler() ******/ |
| 892 | |
| 893 | |
| 894 | |
| 895 | /** |
| 896 | * limAssocFailureTimerHandler() |
| 897 | * |
| 898 | *FUNCTION: |
| 899 | * This function is called upon Re/Assoc failure timer expiration |
| 900 | * on STA |
| 901 | * |
| 902 | *LOGIC: |
| 903 | * Message SIR_LIM_ASSOC_FAIL_TIMEOUT is posted to gSirLimMsgQ |
| 904 | * when this function is executed. |
| 905 | * |
| 906 | *ASSUMPTIONS: |
| 907 | * NA |
| 908 | * |
| 909 | *NOTE: |
| 910 | * NA |
| 911 | * |
| 912 | * @param param - Indicates whether this is assoc or reassoc |
| 913 | * failure timeout |
| 914 | * @return None |
| 915 | */ |
| 916 | |
| 917 | void |
| 918 | limAssocFailureTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 919 | { |
| 920 | tSirMsgQ msg; |
| 921 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 922 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 923 | #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] | 924 | if((LIM_REASSOC == param) && |
Kanchanapally, Vidyullatha | b6da2a6 | 2014-02-06 12:28:52 +0530 | [diff] [blame] | 925 | (NULL != pMac->lim.pSessionEntry) && |
| 926 | (pMac->lim.pSessionEntry->limMlmState == eLIM_MLM_WT_FT_REASSOC_RSP_STATE)) |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 927 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 928 | limLog(pMac, LOGE, FL("Reassoc timeout happened")); |
Sachin Ahuja | 07a4301 | 2015-01-30 17:04:38 +0530 | [diff] [blame] | 929 | #ifdef FEATURE_WLAN_ESE |
| 930 | if (((pMac->lim.pSessionEntry->isESEconnection) && |
| 931 | (pMac->lim.reAssocRetryAttempt < |
| 932 | (LIM_MAX_REASSOC_RETRY_LIMIT - 1)))|| |
| 933 | ((!pMac->lim.pSessionEntry->isESEconnection) && |
| 934 | (pMac->lim.reAssocRetryAttempt < LIM_MAX_REASSOC_RETRY_LIMIT)) |
| 935 | ) |
| 936 | #else |
| 937 | if (pMac->lim.reAssocRetryAttempt < LIM_MAX_REASSOC_RETRY_LIMIT) |
| 938 | #endif |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 939 | { |
| 940 | limSendRetryReassocReqFrame(pMac, pMac->lim.pSessionEntry->pLimMlmReassocRetryReq, pMac->lim.pSessionEntry); |
| 941 | pMac->lim.reAssocRetryAttempt++; |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 942 | 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] | 943 | return; |
| 944 | } |
| 945 | else |
| 946 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 947 | 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] | 948 | if(NULL != pMac->lim.pSessionEntry->pLimMlmReassocRetryReq) |
| 949 | { |
Bansidhar Gopalachari | 72515da | 2013-07-11 11:14:27 +0530 | [diff] [blame] | 950 | vos_mem_free( pMac->lim.pSessionEntry->pLimMlmReassocRetryReq); |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 951 | pMac->lim.pSessionEntry->pLimMlmReassocRetryReq = NULL; |
| 952 | } |
| 953 | } |
| 954 | } |
| 955 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 956 | // Prepare and post message to LIM Message Queue |
| 957 | |
| 958 | msg.type = SIR_LIM_ASSOC_FAIL_TIMEOUT; |
| 959 | msg.bodyval = (tANI_U32)param; |
| 960 | msg.bodyptr = NULL; |
| 961 | |
| 962 | limPostMsgApi(pMac, &msg); |
| 963 | } /****** end limAssocFailureTimerHandler() ******/ |
| 964 | |
| 965 | |
| 966 | /** |
| 967 | * limUpdateOlbcCacheTimerHandler() |
| 968 | * |
| 969 | *FUNCTION: |
| 970 | * This function is called upon update olbc cache timer expiration |
| 971 | * on STA |
| 972 | * |
| 973 | *LOGIC: |
| 974 | * Message SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT is posted to gSirLimMsgQ |
| 975 | * when this function is executed. |
| 976 | * |
| 977 | *ASSUMPTIONS: |
| 978 | * NA |
| 979 | * |
| 980 | *NOTE: |
| 981 | * NA |
| 982 | * |
| 983 | * @param |
| 984 | * |
| 985 | * @return None |
| 986 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 987 | void |
| 988 | limUpdateOlbcCacheTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 989 | { |
| 990 | tSirMsgQ msg; |
| 991 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 992 | |
| 993 | // Prepare and post message to LIM Message Queue |
| 994 | |
| 995 | msg.type = SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT; |
| 996 | msg.bodyval = 0; |
| 997 | msg.bodyptr = NULL; |
| 998 | |
| 999 | limPostMsgApi(pMac, &msg); |
| 1000 | } /****** end limUpdateOlbcCacheTimerHandler() ******/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1001 | |
| 1002 | /** |
| 1003 | * limDeactivateAndChangeTimer() |
| 1004 | * |
| 1005 | *FUNCTION: |
| 1006 | * This function is called to deactivate and change a timer |
| 1007 | * for future re-activation |
| 1008 | * |
| 1009 | *LOGIC: |
| 1010 | * |
| 1011 | *ASSUMPTIONS: |
| 1012 | * NA |
| 1013 | * |
| 1014 | *NOTE: |
| 1015 | * NA |
| 1016 | * |
| 1017 | * @param pMac - Pointer to Global MAC structure |
| 1018 | * @param timerId - enum of timer to be deactivated and changed |
| 1019 | * This enum is defined in limUtils.h file |
| 1020 | * |
| 1021 | * @return None |
| 1022 | */ |
| 1023 | |
| 1024 | void |
| 1025 | limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId) |
| 1026 | { |
| 1027 | tANI_U32 val=0, val1=0; |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 1028 | tpPESession psessionEntry; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1029 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1030 | switch (timerId) |
| 1031 | { |
| 1032 | case eLIM_ADDTS_RSP_TIMER: |
| 1033 | pMac->lim.gLimAddtsRspTimerCount++; |
| 1034 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAddtsRspTimer) != TX_SUCCESS) |
| 1035 | { |
| 1036 | // Could not deactivate AddtsRsp Timer |
| 1037 | // Log error |
| 1038 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1039 | FL("Unable to deactivate AddtsRsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1040 | } |
| 1041 | break; |
| 1042 | |
| 1043 | case eLIM_MIN_CHANNEL_TIMER: |
| 1044 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimMinChannelTimer) |
| 1045 | != TX_SUCCESS) |
| 1046 | { |
| 1047 | // Could not deactivate min channel timer. |
| 1048 | // Log error |
| 1049 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1050 | FL("Unable to deactivate min channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1051 | } |
| 1052 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1053 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1054 | // If a background was triggered via Quiet BSS, |
| 1055 | // then we need to adjust the MIN and MAX channel |
| 1056 | // timer's accordingly to the Quiet duration that |
| 1057 | // was specified |
| 1058 | if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState && |
| 1059 | pMac->lim.gLimTriggerBackgroundScanDuringQuietBss ) |
| 1060 | { |
| 1061 | // gLimQuietDuration is already cached in units of |
| 1062 | // system ticks. No conversion is reqd... |
| 1063 | val = pMac->lim.gLimSpecMgmt.quietDuration; |
| 1064 | } |
| 1065 | else |
| 1066 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1067 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1068 | if(pMac->lim.gpLimMlmScanReq) |
| 1069 | { |
| 1070 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime); |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1071 | if (pMac->btc.btc_scan_compromise_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1072 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1073 | if (pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1074 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1075 | val = SYS_MS_TO_TICKS( |
| 1076 | pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1077 | limLog(pMac, LOG1, FL("Using BTC Min Active Scan time")); |
| 1078 | } |
| 1079 | else |
| 1080 | { |
| 1081 | limLog(pMac, LOGE, FL("BTC Active Scan Min Time is Not Set")); |
| 1082 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1083 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1084 | pMac->roam.configParam.min_chntime_btc_sco) { |
| 1085 | val = SYS_MS_TO_TICKS( |
| 1086 | pMac->roam.configParam.min_chntime_btc_sco); |
| 1087 | limLog(pMac, LOG1, |
| 1088 | FL("Using BTC SCO Min Active Scan time %d"), val); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1089 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1090 | } |
| 1091 | else |
| 1092 | { |
| 1093 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1094 | //No need to change min timer. This is not a scan |
| 1095 | break; |
| 1096 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1097 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1098 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1099 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1100 | |
| 1101 | if (tx_timer_change(&pMac->lim.limTimers.gLimMinChannelTimer, |
| 1102 | val, 0) != TX_SUCCESS) |
| 1103 | { |
| 1104 | // Could not change min channel timer. |
| 1105 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1106 | limLog(pMac, LOGP, FL("Unable to change min channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1107 | } |
| 1108 | |
| 1109 | break; |
| 1110 | |
| 1111 | case eLIM_PERIODIC_PROBE_REQ_TIMER: |
| 1112 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer) |
| 1113 | != TX_SUCCESS) |
| 1114 | { |
| 1115 | // Could not deactivate min channel timer. |
| 1116 | // Log error |
| 1117 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1118 | FL("Unable to deactivate periodic timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1119 | } |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1120 | if(pMac->lim.gpLimMlmScanReq) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1121 | { |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1122 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime)/2; |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1123 | if (pMac->btc.btc_scan_compromise_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1124 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1125 | if (pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1126 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1127 | val = SYS_MS_TO_TICKS( |
| 1128 | pMac->lim.gpLimMlmScanReq->min_chntime_btc_esco)/2; |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1129 | limLog(pMac, LOG1, FL("Using BTC Min Active Scan time")); |
| 1130 | } |
| 1131 | else |
| 1132 | { |
| 1133 | limLog(pMac, LOGE, FL("BTC Active Scan Min Time is Not Set")); |
| 1134 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1135 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1136 | pMac->roam.configParam.min_chntime_btc_sco) { |
| 1137 | val = SYS_MS_TO_TICKS( |
| 1138 | pMac->roam.configParam.min_chntime_btc_sco / 2); |
| 1139 | limLog(pMac, LOG1, |
| 1140 | FL("Using BTC SCO Min Active Scan time %d"), val); |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1141 | } |
| 1142 | } |
| 1143 | /*If val is 0 it means min Channel timer is 0 so take the value from maxChannelTimer*/ |
| 1144 | if (!val) |
| 1145 | { |
| 1146 | |
| 1147 | if(pMac->lim.gpLimMlmScanReq) |
| 1148 | { |
| 1149 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime)/2; |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1150 | if (pMac->btc.btc_scan_compromise_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1151 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1152 | if (pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco) |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1153 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1154 | val = SYS_MS_TO_TICKS( |
| 1155 | pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco)/2; |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1156 | limLog(pMac, LOG1, FL("Using BTC Max Active Scan time")); |
| 1157 | } |
| 1158 | else |
| 1159 | { |
| 1160 | limLog(pMac, LOGE, FL("BTC Active Scan Max Time is Not Set")); |
| 1161 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1162 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1163 | pMac->roam.configParam.max_chntime_btc_sco) { |
| 1164 | val = SYS_MS_TO_TICKS( |
| 1165 | pMac->roam.configParam.max_chntime_btc_sco / 2); |
| 1166 | limLog(pMac, LOG1, |
| 1167 | FL("Using BTC SCO Max Active Scan time %d"), val); |
Sachin Ahuja | 49dedd7 | 2014-11-24 16:35:24 +0530 | [diff] [blame] | 1168 | } |
| 1169 | } |
| 1170 | else |
| 1171 | { |
| 1172 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1173 | //No need to change max timer. This is not a scan |
| 1174 | break; |
| 1175 | } |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1176 | } |
Mahesh A Saptasagar | bfcdcc3 | 2015-09-24 17:41:51 +0530 | [diff] [blame] | 1177 | if (val) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1178 | { |
Mahesh A Saptasagar | bfcdcc3 | 2015-09-24 17:41:51 +0530 | [diff] [blame] | 1179 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer, |
| 1180 | val, 0) != TX_SUCCESS) |
| 1181 | { |
| 1182 | // Could not change min channel timer. |
| 1183 | // Log error |
| 1184 | limLog(pMac, LOGE, FL("Unable to change periodic timer")); |
| 1185 | } |
| 1186 | } |
| 1187 | else |
| 1188 | { |
| 1189 | limLog(pMac, LOGE, FL("Do not change gLimPeriodicProbeReqTimer values," |
| 1190 | "value = %d minchannel time = %d" |
| 1191 | "maxchannel time = %d"), val, |
| 1192 | pMac->lim.gpLimMlmScanReq->minChannelTime, |
| 1193 | pMac->lim.gpLimMlmScanReq->maxChannelTime); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1194 | } |
| 1195 | |
| 1196 | break; |
| 1197 | |
| 1198 | case eLIM_MAX_CHANNEL_TIMER: |
| 1199 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimMaxChannelTimer) |
| 1200 | != TX_SUCCESS) |
| 1201 | { |
| 1202 | // Could not deactivate max channel timer. |
| 1203 | // Log error |
| 1204 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1205 | FL("Unable to deactivate max channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1206 | } |
| 1207 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1208 | // If a background was triggered via Quiet BSS, |
| 1209 | // then we need to adjust the MIN and MAX channel |
| 1210 | // timer's accordingly to the Quiet duration that |
| 1211 | // was specified |
| 1212 | if (pMac->lim.gLimSystemRole != eLIM_AP_ROLE) |
| 1213 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1214 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1215 | |
| 1216 | if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState && |
| 1217 | pMac->lim.gLimTriggerBackgroundScanDuringQuietBss ) |
| 1218 | { |
| 1219 | // gLimQuietDuration is already cached in units of |
| 1220 | // system ticks. No conversion is reqd... |
| 1221 | val = pMac->lim.gLimSpecMgmt.quietDuration; |
| 1222 | } |
| 1223 | else |
| 1224 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1225 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1226 | if(pMac->lim.gpLimMlmScanReq) |
| 1227 | { |
| 1228 | val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime); |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1229 | if (pMac->btc.btc_scan_compromise_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1230 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1231 | if (pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco) |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1232 | { |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1233 | val = SYS_MS_TO_TICKS( |
| 1234 | pMac->lim.gpLimMlmScanReq->max_chntime_btc_esco); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1235 | limLog(pMac, LOG1, FL("Using BTC Max Active Scan time")); |
| 1236 | } |
| 1237 | else |
| 1238 | { |
| 1239 | limLog(pMac, LOGE, FL("BTC Active Scan Max Time is Not Set")); |
| 1240 | } |
Abhishek Singh | 3a93ee4 | 2016-09-29 17:00:03 +0530 | [diff] [blame] | 1241 | } else if (pMac->btc.btc_scan_compromise_sco && |
| 1242 | pMac->roam.configParam.max_chntime_btc_sco) { |
| 1243 | val = SYS_MS_TO_TICKS( |
| 1244 | pMac->roam.configParam.max_chntime_btc_sco); |
| 1245 | limLog(pMac, LOG1, |
| 1246 | FL("Using BTC SCO Max Active Scan time %d"), val); |
Kiran Kumar Lokere | 3527f0c | 2013-02-24 22:21:28 -0800 | [diff] [blame] | 1247 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1248 | } |
| 1249 | else |
| 1250 | { |
| 1251 | limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL ")); |
| 1252 | //No need to change max timer. This is not a scan |
| 1253 | break; |
| 1254 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1255 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1256 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1257 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1258 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1259 | |
| 1260 | if (tx_timer_change(&pMac->lim.limTimers.gLimMaxChannelTimer, |
| 1261 | val, 0) != TX_SUCCESS) |
| 1262 | { |
| 1263 | // Could not change max channel timer. |
| 1264 | // Log error |
| 1265 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1266 | FL("Unable to change max channel timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1267 | } |
| 1268 | |
| 1269 | break; |
| 1270 | |
| 1271 | case eLIM_JOIN_FAIL_TIMER: |
| 1272 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimJoinFailureTimer) |
| 1273 | != TX_SUCCESS) |
| 1274 | { |
| 1275 | /** |
| 1276 | * Could not deactivate Join Failure |
| 1277 | * timer. Log error. |
| 1278 | */ |
| 1279 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1280 | FL("Unable to deactivate Join Failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1281 | } |
| 1282 | |
| 1283 | if (wlan_cfgGetInt(pMac, WNI_CFG_JOIN_FAILURE_TIMEOUT, |
| 1284 | &val) != eSIR_SUCCESS) |
| 1285 | { |
| 1286 | /** |
| 1287 | * Could not get JoinFailureTimeout value |
| 1288 | * from CFG. Log error. |
| 1289 | */ |
| 1290 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1291 | FL("could not retrieve JoinFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1292 | } |
| 1293 | val = SYS_MS_TO_TICKS(val); |
| 1294 | |
| 1295 | if (tx_timer_change(&pMac->lim.limTimers.gLimJoinFailureTimer, |
| 1296 | val, 0) != TX_SUCCESS) |
| 1297 | { |
| 1298 | /** |
| 1299 | * Could not change Join Failure |
| 1300 | * timer. Log error. |
| 1301 | */ |
| 1302 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1303 | FL("Unable to change Join Failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1304 | } |
| 1305 | |
| 1306 | break; |
| 1307 | |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1308 | case eLIM_PERIODIC_JOIN_PROBE_REQ_TIMER: |
| 1309 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer) |
| 1310 | != TX_SUCCESS) |
| 1311 | { |
| 1312 | // Could not deactivate periodic join req Times. |
| 1313 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1314 | FL("Unable to deactivate periodic join request timer")); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1315 | } |
| 1316 | |
| 1317 | val = SYS_MS_TO_TICKS(LIM_JOIN_PROBE_REQ_TIMER_MS); |
| 1318 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer, |
| 1319 | val, 0) != TX_SUCCESS) |
| 1320 | { |
| 1321 | // Could not change periodic join req times. |
| 1322 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1323 | limLog(pMac, LOGP, FL("Unable to change periodic join request timer")); |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1324 | } |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 1325 | |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1326 | break; |
| 1327 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1328 | case eLIM_AUTH_FAIL_TIMER: |
| 1329 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAuthFailureTimer) |
| 1330 | != TX_SUCCESS) |
| 1331 | { |
| 1332 | // Could not deactivate Auth failure timer. |
| 1333 | // Log error |
| 1334 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1335 | FL("Unable to deactivate auth failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1336 | } |
| 1337 | |
| 1338 | // Change timer to reactivate it in future |
| 1339 | if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT, |
| 1340 | &val) != eSIR_SUCCESS) |
| 1341 | { |
| 1342 | /** |
| 1343 | * Could not get AuthFailureTimeout value |
| 1344 | * from CFG. Log error. |
| 1345 | */ |
| 1346 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1347 | FL("could not retrieve AuthFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1348 | } |
| 1349 | val = SYS_MS_TO_TICKS(val); |
| 1350 | |
| 1351 | if (tx_timer_change(&pMac->lim.limTimers.gLimAuthFailureTimer, |
| 1352 | val, 0) != TX_SUCCESS) |
| 1353 | { |
| 1354 | // Could not change Authentication failure timer. |
| 1355 | // Log error |
| 1356 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1357 | FL("unable to change Auth failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1358 | } |
| 1359 | |
| 1360 | break; |
| 1361 | |
Sushant Kaushik | 9e92387 | 2015-04-02 17:09:31 +0530 | [diff] [blame] | 1362 | case eLIM_AUTH_RETRY_TIMER: |
| 1363 | |
| 1364 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer) |
| 1365 | != TX_SUCCESS) |
| 1366 | { |
| 1367 | // Could not deactivate Auth Retry Timer. |
| 1368 | limLog(pMac, LOGP, |
| 1369 | FL("Unable to deactivate Auth Retry timer")); |
| 1370 | } |
| 1371 | if ((psessionEntry = peFindSessionBySessionId(pMac, |
| 1372 | pMac->lim.limTimers.gLimPeriodicAuthRetryTimer.sessionId)) |
| 1373 | == NULL) |
| 1374 | { |
| 1375 | limLog(pMac, LOGP, |
| 1376 | FL("session does not exist for given SessionId : %d"), |
| 1377 | pMac->lim.limTimers.gLimPeriodicAuthRetryTimer.sessionId); |
| 1378 | break; |
| 1379 | } |
| 1380 | /* 3/5 of the beacon interval*/ |
| 1381 | val = psessionEntry->beaconParams.beaconInterval * 3/5; |
| 1382 | val = SYS_MS_TO_TICKS(val); |
| 1383 | if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer, |
| 1384 | val, 0) != TX_SUCCESS) |
| 1385 | { |
| 1386 | // Could not change Auth Retry timer. |
| 1387 | // Log error |
| 1388 | limLog(pMac, LOGP, FL("Unable to change Auth Retry timer")); |
| 1389 | } |
| 1390 | |
| 1391 | break; |
| 1392 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1393 | case eLIM_ASSOC_FAIL_TIMER: |
| 1394 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimAssocFailureTimer) != |
| 1395 | TX_SUCCESS) |
| 1396 | { |
| 1397 | // Could not deactivate Association failure timer. |
| 1398 | // Log error |
| 1399 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1400 | FL("unable to deactivate Association failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1401 | } |
| 1402 | |
| 1403 | // Change timer to reactivate it in future |
| 1404 | if (wlan_cfgGetInt(pMac, WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT, |
| 1405 | &val) != eSIR_SUCCESS) |
| 1406 | { |
| 1407 | /** |
| 1408 | * Could not get AssocFailureTimeout value |
| 1409 | * from CFG. Log error. |
| 1410 | */ |
| 1411 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1412 | FL("could not retrieve AssocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1413 | } |
| 1414 | val = SYS_MS_TO_TICKS(val); |
| 1415 | |
| 1416 | if (tx_timer_change(&pMac->lim.limTimers.gLimAssocFailureTimer, |
| 1417 | val, 0) != TX_SUCCESS) |
| 1418 | { |
| 1419 | // Could not change Association failure timer. |
| 1420 | // Log error |
| 1421 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1422 | FL("unable to change Assoc failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1423 | } |
| 1424 | |
| 1425 | break; |
| 1426 | |
| 1427 | case eLIM_REASSOC_FAIL_TIMER: |
| 1428 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimReassocFailureTimer) != |
| 1429 | TX_SUCCESS) |
| 1430 | { |
| 1431 | // Could not deactivate Reassociation failure timer. |
| 1432 | // Log error |
| 1433 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1434 | FL("unable to deactivate Reassoc failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1435 | } |
| 1436 | |
| 1437 | // Change timer to reactivate it in future |
| 1438 | if (wlan_cfgGetInt(pMac, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, |
| 1439 | &val) != eSIR_SUCCESS) |
| 1440 | { |
| 1441 | /** |
| 1442 | * Could not get ReassocFailureTimeout value |
| 1443 | * from CFG. Log error. |
| 1444 | */ |
| 1445 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1446 | FL("could not retrieve ReassocFailureTimeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1447 | } |
| 1448 | val = SYS_MS_TO_TICKS(val); |
| 1449 | |
| 1450 | if (tx_timer_change(&pMac->lim.limTimers.gLimReassocFailureTimer, |
| 1451 | val, 0) != TX_SUCCESS) |
| 1452 | { |
| 1453 | // Could not change Reassociation failure timer. |
| 1454 | // Log error |
| 1455 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1456 | FL("unable to change Reassociation failure timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1457 | } |
| 1458 | |
| 1459 | break; |
| 1460 | |
| 1461 | case eLIM_HEART_BEAT_TIMER: |
| 1462 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer) != |
| 1463 | TX_SUCCESS) |
| 1464 | { |
| 1465 | // Could not deactivate Heartbeat timer. |
| 1466 | // Log error |
| 1467 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1468 | FL("unable to deactivate Heartbeat timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1469 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1470 | else |
| 1471 | { |
| 1472 | limLog(pMac, LOGW, FL("Deactivated heartbeat link monitoring")); |
| 1473 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1474 | |
| 1475 | if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, |
| 1476 | &val) != eSIR_SUCCESS) |
| 1477 | { |
| 1478 | /** |
| 1479 | * Could not get BEACON_INTERVAL value |
| 1480 | * from CFG. Log error. |
| 1481 | */ |
| 1482 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1483 | FL("could not retrieve BEACON_INTERVAL value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1484 | } |
| 1485 | |
| 1486 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val1) != |
| 1487 | eSIR_SUCCESS) |
| 1488 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1489 | FL("could not retrieve heartbeat failure value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1490 | |
| 1491 | // Change timer to reactivate it in future |
| 1492 | val = SYS_MS_TO_TICKS(val * val1); |
| 1493 | |
| 1494 | if (tx_timer_change(&pMac->lim.limTimers.gLimHeartBeatTimer, |
| 1495 | val, 0) != TX_SUCCESS) |
| 1496 | { |
| 1497 | // Could not change HeartBeat timer. |
| 1498 | // Log error |
| 1499 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1500 | FL("unable to change HeartBeat timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1501 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1502 | else |
| 1503 | { |
Jeff Johnson | 0f4d0bc | 2013-11-03 17:48:50 -0800 | [diff] [blame] | 1504 | limLog(pMac, LOGW, FL("HeartBeat timer value is changed = %u"), val); |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1505 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1506 | break; |
| 1507 | |
| 1508 | case eLIM_PROBE_AFTER_HB_TIMER: |
| 1509 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimProbeAfterHBTimer) != |
| 1510 | TX_SUCCESS) |
| 1511 | { |
| 1512 | // Could not deactivate Heartbeat timer. |
| 1513 | // Log error |
| 1514 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1515 | FL("unable to deactivate probeAfterHBTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1516 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1517 | else |
| 1518 | { |
Kaushik, Sushant | 8489f47 | 2014-01-27 11:41:22 +0530 | [diff] [blame] | 1519 | limLog(pMac, LOG1, FL("Deactivated probe after hb timer")); |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1520 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1521 | |
| 1522 | if (wlan_cfgGetInt(pMac, WNI_CFG_PROBE_AFTER_HB_FAIL_TIMEOUT, |
| 1523 | &val) != eSIR_SUCCESS) |
| 1524 | { |
| 1525 | /** |
| 1526 | * Could not get PROBE_AFTER_HB_FAILURE |
| 1527 | * value from CFG. Log error. |
| 1528 | */ |
| 1529 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1530 | FL("could not retrieve PROBE_AFTER_HB_FAIL_TIMEOUT value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1531 | } |
| 1532 | |
| 1533 | // Change timer to reactivate it in future |
| 1534 | val = SYS_MS_TO_TICKS(val); |
| 1535 | |
| 1536 | if (tx_timer_change(&pMac->lim.limTimers.gLimProbeAfterHBTimer, |
| 1537 | val, 0) != TX_SUCCESS) |
| 1538 | { |
| 1539 | // Could not change HeartBeat timer. |
| 1540 | // Log error |
| 1541 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1542 | FL("unable to change ProbeAfterHBTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1543 | } |
Srinivas Girigowda | 3789b74 | 2013-04-08 16:14:44 -0700 | [diff] [blame] | 1544 | else |
| 1545 | { |
Jeff Johnson | 0f4d0bc | 2013-11-03 17:48:50 -0800 | [diff] [blame] | 1546 | 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] | 1547 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1548 | |
| 1549 | break; |
| 1550 | |
| 1551 | case eLIM_KEEPALIVE_TIMER: |
| 1552 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimKeepaliveTimer) |
| 1553 | != TX_SUCCESS) |
| 1554 | { |
| 1555 | // Could not deactivate Keepalive timer. |
| 1556 | // Log error |
| 1557 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1558 | FL("unable to deactivate KeepaliveTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1559 | } |
| 1560 | |
| 1561 | // Change timer to reactivate it in future |
| 1562 | |
| 1563 | if (wlan_cfgGetInt(pMac, WNI_CFG_KEEPALIVE_TIMEOUT, |
| 1564 | &val) != eSIR_SUCCESS) |
| 1565 | { |
| 1566 | /** |
| 1567 | * Could not get keepalive timeout value |
| 1568 | * from CFG. Log error. |
| 1569 | */ |
| 1570 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1571 | FL("could not retrieve keepalive timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1572 | } |
| 1573 | if (val == 0) |
| 1574 | { |
| 1575 | val = 3000; |
| 1576 | pMac->sch.keepAlive = 0; |
| 1577 | } else |
| 1578 | pMac->sch.keepAlive = 1; |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | val = SYS_MS_TO_TICKS(val + SYS_TICK_DUR_MS - 1); |
| 1583 | |
| 1584 | if (tx_timer_change(&pMac->lim.limTimers.gLimKeepaliveTimer, |
| 1585 | val, val) != TX_SUCCESS) |
| 1586 | { |
| 1587 | // Could not change KeepaliveTimer timer. |
| 1588 | // Log error |
| 1589 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1590 | FL("unable to change KeepaliveTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1591 | } |
| 1592 | |
| 1593 | break; |
| 1594 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1595 | case eLIM_BACKGROUND_SCAN_TIMER: |
| 1596 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimBackgroundScanTimer) |
| 1597 | != TX_SUCCESS) |
| 1598 | { |
| 1599 | // Could not deactivate BackgroundScanTimer timer. |
| 1600 | // Log error |
| 1601 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1602 | FL("unable to deactivate BackgroundScanTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1603 | } |
| 1604 | |
| 1605 | // Change timer to reactivate it in future |
| 1606 | if (wlan_cfgGetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD, |
| 1607 | &val) != eSIR_SUCCESS) |
| 1608 | { |
| 1609 | /** |
| 1610 | * Could not get Background scan period value |
| 1611 | * from CFG. Log error. |
| 1612 | */ |
| 1613 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1614 | FL("could not retrieve Background scan period value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1615 | } |
| 1616 | if (val == 0) |
| 1617 | { |
| 1618 | val = LIM_BACKGROUND_SCAN_PERIOD_DEFAULT_MS; |
| 1619 | pMac->lim.gLimBackgroundScanDisable = true; |
| 1620 | } |
| 1621 | else |
| 1622 | pMac->lim.gLimBackgroundScanDisable = false; |
| 1623 | |
| 1624 | val = SYS_MS_TO_TICKS(val); |
| 1625 | |
| 1626 | if (tx_timer_change(&pMac->lim.limTimers.gLimBackgroundScanTimer, |
| 1627 | val, val) != TX_SUCCESS) |
| 1628 | { |
| 1629 | // Could not change BackgroundScanTimer timer. |
| 1630 | // Log error |
| 1631 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1632 | FL("unable to change BackgroundScanTimer timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1633 | } |
| 1634 | |
| 1635 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1636 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1637 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1638 | case eLIM_CHANNEL_SWITCH_TIMER: |
| 1639 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimChannelSwitchTimer) != eSIR_SUCCESS) |
| 1640 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1641 | limLog(pMac, LOGP, FL("tx_timer_deactivate failed!")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1642 | return; |
| 1643 | } |
| 1644 | |
| 1645 | if (tx_timer_change(&pMac->lim.limTimers.gLimChannelSwitchTimer, |
| 1646 | pMac->lim.gLimChannelSwitch.switchTimeoutValue, |
| 1647 | 0) != TX_SUCCESS) |
| 1648 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1649 | limLog(pMac, LOGP, FL("tx_timer_change failed ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1650 | return; |
| 1651 | } |
| 1652 | break; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1653 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1654 | |
| 1655 | case eLIM_LEARN_DURATION_TIMER: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1656 | break; |
| 1657 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1658 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1659 | case eLIM_QUIET_BSS_TIMER: |
| 1660 | if (TX_SUCCESS != |
| 1661 | tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietBssTimer)) |
| 1662 | { |
| 1663 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1664 | FL("Unable to de-activate gLimQuietBssTimer! Will attempt to activate anyway...")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1665 | } |
| 1666 | |
| 1667 | // gLimQuietDuration appears to be in units of ticks |
| 1668 | // Use it as is |
| 1669 | if (TX_SUCCESS != |
| 1670 | tx_timer_change( &pMac->lim.limTimers.gLimQuietBssTimer, |
| 1671 | pMac->lim.gLimSpecMgmt.quietDuration, |
| 1672 | 0)) |
| 1673 | { |
| 1674 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1675 | FL("Unable to change gLimQuietBssTimer! Will still attempt to activate anyway...")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1676 | } |
| 1677 | break; |
| 1678 | |
| 1679 | case eLIM_QUIET_TIMER: |
| 1680 | if( TX_SUCCESS != tx_timer_deactivate(&pMac->lim.limTimers.gLimQuietTimer)) |
| 1681 | { |
| 1682 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1683 | FL( "Unable to deactivate gLimQuietTimer! Will still attempt to re-activate anyway..." )); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1684 | } |
| 1685 | |
| 1686 | // Set the NEW timeout value, in ticks |
| 1687 | if( TX_SUCCESS != tx_timer_change( &pMac->lim.limTimers.gLimQuietTimer, |
| 1688 | SYS_MS_TO_TICKS(pMac->lim.gLimSpecMgmt.quietTimeoutValue), 0)) |
| 1689 | { |
| 1690 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1691 | FL( "Unable to change gLimQuietTimer! Will still attempt to re-activate anyway..." )); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1692 | } |
| 1693 | break; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1694 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1695 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1696 | #if 0 |
| 1697 | case eLIM_WPS_OVERLAP_TIMER: |
| 1698 | { |
| 1699 | // Restart Learn Interval timer |
| 1700 | |
| 1701 | tANI_U32 WPSOverlapTimer = SYS_MS_TO_TICKS(LIM_WPS_OVERLAP_TIMER_MS); |
| 1702 | |
| 1703 | if (tx_timer_deactivate( |
| 1704 | &pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer) != TX_SUCCESS) |
| 1705 | { |
| 1706 | // Could not deactivate Learn Interval timer. |
| 1707 | // Log error |
| 1708 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1709 | FL("Unable to deactivate WPS overlap timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1710 | } |
| 1711 | |
| 1712 | if (tx_timer_change( |
| 1713 | &pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer, |
| 1714 | WPSOverlapTimer, 0) != TX_SUCCESS) |
| 1715 | { |
| 1716 | // Could not change Learn Interval timer. |
| 1717 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1718 | limLog(pMac, LOGP, FL("Unable to change WPS overlap timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1719 | |
| 1720 | return; |
| 1721 | } |
| 1722 | |
| 1723 | limLog( pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1724 | FL("Setting WPS overlap TIMER to %d ticks"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1725 | WPSOverlapTimer); |
| 1726 | } |
| 1727 | break; |
| 1728 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1729 | |
| 1730 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1731 | case eLIM_FT_PREAUTH_RSP_TIMER: |
| 1732 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimFTPreAuthRspTimer) != TX_SUCCESS) |
| 1733 | { |
| 1734 | /** |
| 1735 | ** Could not deactivate Join Failure |
| 1736 | ** timer. Log error. |
| 1737 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1738 | limLog(pMac, LOGP, FL("Unable to deactivate Preauth response Failure timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1739 | return; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1740 | } |
| 1741 | val = 1000; |
| 1742 | val = SYS_MS_TO_TICKS(val); |
| 1743 | if (tx_timer_change(&pMac->lim.limTimers.gLimFTPreAuthRspTimer, |
| 1744 | val, 0) != TX_SUCCESS) |
| 1745 | { |
| 1746 | /** |
| 1747 | * Could not change Join Failure |
| 1748 | * timer. Log error. |
| 1749 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1750 | limLog(pMac, LOGP, FL("Unable to change Join Failure timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1751 | return; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1752 | } |
| 1753 | break; |
| 1754 | #endif |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame^] | 1755 | |
| 1756 | #ifdef WLAN_FEATURE_LFR_MBB |
| 1757 | case eLIM_PREAUTH_MBB_RSP_TIMER: |
| 1758 | if (tx_timer_deactivate(&pMac->lim.limTimers. |
| 1759 | glim_pre_auth_mbb_rsp_timer) != TX_SUCCESS) { |
| 1760 | limLog(pMac, LOGP, |
| 1761 | FL("Unable to deactivate preauth response mbb timer")); |
| 1762 | return; |
| 1763 | } |
| 1764 | break; |
| 1765 | #endif |
| 1766 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1767 | #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1768 | case eLIM_TSM_TIMER: |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1769 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimEseTsmTimer) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1770 | != TX_SUCCESS) |
| 1771 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1772 | limLog(pMac, LOGE, FL("Unable to deactivate TSM timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1773 | } |
| 1774 | break; |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 1775 | #endif /* FEATURE_WLAN_ESE && !FEATURE_WLAN_ESE_UPLOAD */ |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 1776 | |
| 1777 | case eLIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE: |
| 1778 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer) != TX_SUCCESS) |
| 1779 | { |
| 1780 | /** |
| 1781 | ** Could not deactivate Active to passive channel timer. |
| 1782 | ** Log error. |
| 1783 | **/ |
| 1784 | limLog(pMac, LOGP, FL("Unable to Deactivate " |
| 1785 | "Active to passive channel timer")); |
| 1786 | return; |
| 1787 | } |
| 1788 | val = ACTIVE_TO_PASSIVE_CONVERISON_TIMEOUT; |
| 1789 | val = SYS_MS_TO_TICKS(val); |
| 1790 | if (tx_timer_change(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer, |
| 1791 | val, 0) != TX_SUCCESS) |
| 1792 | { |
| 1793 | /** |
| 1794 | * Could not change timer to check scan type for passive channel. |
| 1795 | * timer. Log error. |
| 1796 | */ |
| 1797 | limLog(pMac, LOGP, FL("Unable to change timer")); |
| 1798 | return; |
| 1799 | } |
| 1800 | break; |
| 1801 | |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1802 | case eLIM_DISASSOC_ACK_TIMER: |
| 1803 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimDisassocAckTimer) != TX_SUCCESS) |
| 1804 | { |
| 1805 | /** |
| 1806 | ** Could not deactivate Join Failure |
| 1807 | ** timer. Log error. |
| 1808 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1809 | limLog(pMac, LOGP, FL("Unable to deactivate Disassoc ack timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1810 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1811 | } |
| 1812 | val = 1000; |
| 1813 | val = SYS_MS_TO_TICKS(val); |
| 1814 | if (tx_timer_change(&pMac->lim.limTimers.gLimDisassocAckTimer, |
| 1815 | val, 0) != TX_SUCCESS) |
| 1816 | { |
| 1817 | /** |
| 1818 | * Could not change Join Failure |
| 1819 | * timer. Log error. |
| 1820 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1821 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1822 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1823 | } |
| 1824 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1825 | |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1826 | case eLIM_DEAUTH_ACK_TIMER: |
| 1827 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimDeauthAckTimer) != TX_SUCCESS) |
| 1828 | { |
| 1829 | /** |
| 1830 | ** Could not deactivate Join Failure |
| 1831 | ** timer. Log error. |
| 1832 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1833 | limLog(pMac, LOGP, FL("Unable to deactivate Deauth ack timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1834 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1835 | } |
| 1836 | val = 1000; |
| 1837 | val = SYS_MS_TO_TICKS(val); |
| 1838 | if (tx_timer_change(&pMac->lim.limTimers.gLimDeauthAckTimer, |
| 1839 | val, 0) != TX_SUCCESS) |
| 1840 | { |
| 1841 | /** |
| 1842 | * Could not change Join Failure |
| 1843 | * timer. Log error. |
| 1844 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1845 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1846 | return; |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1847 | } |
| 1848 | break; |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1849 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1850 | case eLIM_INSERT_SINGLESHOT_NOA_TIMER: |
| 1851 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer) != TX_SUCCESS) |
| 1852 | { |
| 1853 | /** |
| 1854 | ** Could not deactivate SingleShot NOA Insert |
| 1855 | ** timer. Log error. |
| 1856 | **/ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1857 | limLog(pMac, LOGP, FL("Unable to deactivate SingleShot NOA Insert timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1858 | return; |
| 1859 | } |
| 1860 | val = LIM_INSERT_SINGLESHOTNOA_TIMEOUT_VALUE; |
| 1861 | val = SYS_MS_TO_TICKS(val); |
| 1862 | if (tx_timer_change(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer, |
| 1863 | val, 0) != TX_SUCCESS) |
| 1864 | { |
| 1865 | /** |
| 1866 | * Could not change Single Shot NOA Insert |
| 1867 | * timer. Log error. |
| 1868 | */ |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1869 | limLog(pMac, LOGP, FL("Unable to change timer")); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1870 | return; |
| 1871 | } |
| 1872 | break; |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 1873 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1874 | default: |
| 1875 | // Invalid timerId. Log error |
| 1876 | break; |
| 1877 | } |
| 1878 | } /****** end limDeactivateAndChangeTimer() ******/ |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | /**--------------------------------------------------------------- |
| 1883 | \fn limHeartBeatDeactivateAndChangeTimer |
| 1884 | \brief This function deactivates and changes the heart beat |
| 1885 | \ timer, eLIM_HEART_BEAT_TIMER. |
| 1886 | \ |
| 1887 | \param pMac |
| 1888 | \param psessionEntry |
| 1889 | \return None |
| 1890 | ------------------------------------------------------------------*/ |
| 1891 | void |
| 1892 | limHeartBeatDeactivateAndChangeTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
| 1893 | { |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1894 | tANI_U32 val, val1; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1895 | |
Siddharth Bhal | 224da54 | 2014-05-28 07:07:46 +0530 | [diff] [blame] | 1896 | if (NULL == psessionEntry) |
| 1897 | { |
| 1898 | limLog(pMac, LOGE, FL("%s: received session id NULL." |
| 1899 | " Heartbeat timer config failed"), __func__); |
| 1900 | return; |
| 1901 | } |
| 1902 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1903 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1904 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
| 1905 | return; |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1906 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1907 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1908 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer) != TX_SUCCESS) |
| 1909 | limLog(pMac, LOGP, FL("Fail to deactivate HeartBeatTimer ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1910 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1911 | /* HB Timer sessionisation: In case of 2 or more sessions, the HB interval keeps |
| 1912 | changing. to avoid this problem, HeartBeat interval is made constant, by |
| 1913 | 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] | 1914 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1915 | //val = psessionEntry->beaconParams.beaconInterval; |
| 1916 | val = LIM_HB_TIMER_BEACON_INTERVAL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1917 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1918 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val1) != eSIR_SUCCESS) |
| 1919 | limLog(pMac, LOGP, FL("Fail to get WNI_CFG_HEART_BEAT_THRESHOLD ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1920 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1921 | PELOGW(limLog(pMac,LOGW, |
| 1922 | FL("HB Timer Int.=100ms * %d, Beacon Int.=%dms,Session Id=%d "), |
| 1923 | val1, psessionEntry->beaconParams.beaconInterval, |
| 1924 | psessionEntry->peSessionId);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1925 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1926 | /* The HB timer timeout value of 4 seconds (40 beacon intervals) is not |
| 1927 | * enough to judge the peer device inactivity when 32 peers are connected. |
| 1928 | * Hence increasing the HB timer timeout to |
| 1929 | * HBtimeout = (TBTT * num_beacons * num_peers) |
| 1930 | */ |
| 1931 | if (eSIR_IBSS_MODE == psessionEntry->bssType && |
| 1932 | pMac->lim.gLimNumIbssPeers > 0) |
| 1933 | { |
Ravi Joshi | 92a4e14 | 2013-06-27 17:00:42 -0700 | [diff] [blame] | 1934 | val1 = val1 * pMac->lim.gLimNumIbssPeers; |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1935 | } |
Ravi Joshi | 92a4e14 | 2013-06-27 17:00:42 -0700 | [diff] [blame] | 1936 | |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1937 | // Change timer to reactivate it in future |
| 1938 | val = SYS_MS_TO_TICKS(val * val1); |
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 (tx_timer_change(&pMac->lim.limTimers.gLimHeartBeatTimer, val, 0) != TX_SUCCESS) |
| 1941 | limLog(pMac, LOGP, FL("Fail to change HeartBeatTimer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1942 | |
| 1943 | } /****** end limHeartBeatDeactivateAndChangeTimer() ******/ |
| 1944 | |
| 1945 | |
| 1946 | /**--------------------------------------------------------------- |
| 1947 | \fn limReactivateHeartBeatTimer |
| 1948 | \brief This function s called to deactivate, change and |
| 1949 | \ activate a timer. |
| 1950 | \ |
| 1951 | \param pMac - Pointer to Global MAC structure |
| 1952 | \param psessionEntry |
| 1953 | \return None |
| 1954 | ------------------------------------------------------------------*/ |
| 1955 | void |
| 1956 | limReactivateHeartBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
| 1957 | { |
Siddharth Bhal | d31c125 | 2014-05-05 19:34:14 +0530 | [diff] [blame] | 1958 | if (NULL == psessionEntry) |
| 1959 | { |
| 1960 | limLog(pMac, LOGE, FL("%s: received session id NULL." |
| 1961 | " Heartbeat timer config failed"), __func__); |
| 1962 | return; |
| 1963 | } |
| 1964 | |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 1965 | PELOG3(limLog(pMac, LOG3, FL("Rxed Heartbeat. Count=%d"), psessionEntry->LimRxedBeaconCntDuringHB);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1966 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1967 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 1968 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Srinivas Girigowda | 35f6a71 | 2013-04-04 16:48:34 -0700 | [diff] [blame] | 1969 | { |
| 1970 | 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] | 1971 | return; |
Srinivas Girigowda | 35f6a71 | 2013-04-04 16:48:34 -0700 | [diff] [blame] | 1972 | } |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1973 | #endif |
| 1974 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1975 | limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1976 | |
| 1977 | //only start the hearbeat-timer if the timeout value is non-zero |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 1978 | if(pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs > 0) |
| 1979 | { |
| 1980 | /* |
| 1981 | * There is increasing need to limit the apps wakeup due to WLAN |
| 1982 | * activity. During HB monitoring, the beacons from peer are sent to |
| 1983 | * the host causing the host to wakeup. Hence, offloading the HB |
| 1984 | * monitoring to LMAC |
| 1985 | */ |
| 1986 | if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE && |
| 1987 | IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE) |
| 1988 | { |
| 1989 | if (tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer)!= TX_SUCCESS) |
| 1990 | { |
| 1991 | limLog(pMac, LOGP,FL("IBSS HeartBeat Offloaded, Could not deactivate Heartbeat timer")); |
| 1992 | } |
| 1993 | else |
| 1994 | { |
| 1995 | limLog(pMac, LOGE, FL("IBSS HeartBeat Offloaded, Deactivated heartbeat link monitoring")); |
| 1996 | } |
| 1997 | } |
| 1998 | else |
| 1999 | { |
| 2000 | if (tx_timer_activate(&pMac->lim.limTimers.gLimHeartBeatTimer)!= TX_SUCCESS) |
| 2001 | { |
| 2002 | limLog(pMac, LOGP,FL("could not activate Heartbeat timer")); |
| 2003 | } |
| 2004 | else |
| 2005 | { |
| 2006 | limLog(pMac, LOGW, FL("Reactivated heartbeat link monitoring")); |
| 2007 | } |
| 2008 | } |
| 2009 | limResetHBPktCount(psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2010 | } |
| 2011 | |
| 2012 | } /****** end limReactivateHeartBeatTimer() ******/ |
| 2013 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2014 | |
| 2015 | /** |
| 2016 | * limActivateHearBeatTimer() |
| 2017 | * |
| 2018 | * |
| 2019 | * @brief: This function is called to activate heartbeat timer |
| 2020 | * |
| 2021 | *LOGIC: |
| 2022 | * |
| 2023 | *ASSUMPTIONS: |
| 2024 | * NA |
| 2025 | * |
| 2026 | * @note staId for eLIM_AUTH_RSP_TIMER is auth Node Index. |
| 2027 | * |
| 2028 | * @param pMac - Pointer to Global MAC structure |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2029 | * @param psessionEntry - Session Entry |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2030 | * |
| 2031 | * @return TX_SUCCESS - timer is activated |
| 2032 | * errors - fail to start the timer |
| 2033 | */ |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2034 | v_UINT_t limActivateHearBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2035 | { |
| 2036 | v_UINT_t status = TX_TIMER_ERROR; |
| 2037 | |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2038 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 2039 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Ravi Joshi | f7fe8d3 | 2013-09-21 17:02:11 -0700 | [diff] [blame] | 2040 | return (TX_SUCCESS); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2041 | #endif |
| 2042 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2043 | if(TX_AIRGO_TMR_SIGNATURE == pMac->lim.limTimers.gLimHeartBeatTimer.tmrSignature) |
| 2044 | { |
| 2045 | //consider 0 interval a ok case |
| 2046 | if( pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs ) |
| 2047 | { |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2048 | if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE && |
| 2049 | IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE) |
| 2050 | { |
| 2051 | /* HB offload in IBSS mode */ |
| 2052 | status = tx_timer_deactivate(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 2053 | if (TX_SUCCESS != status) |
| 2054 | { |
| 2055 | PELOGE(limLog(pMac, LOGE, |
| 2056 | FL("IBSS HB Offload, Could not deactivate HB timer status(%d)"), |
| 2057 | status);) |
| 2058 | } |
| 2059 | else |
| 2060 | { |
| 2061 | PELOGE(limLog(pMac, LOGE, |
| 2062 | FL("%s] IBSS HB Offloaded, Heartbeat timer deactivated"), |
| 2063 | __func__);) |
| 2064 | } |
| 2065 | |
| 2066 | } |
| 2067 | else |
| 2068 | { |
| 2069 | status = tx_timer_activate(&pMac->lim.limTimers.gLimHeartBeatTimer); |
| 2070 | if ( TX_SUCCESS != status ) |
| 2071 | { |
| 2072 | PELOGE(limLog(pMac, LOGE, |
| 2073 | FL("could not activate Heartbeat timer status(%d)"), status);) |
| 2074 | } |
| 2075 | else |
| 2076 | { |
| 2077 | PELOGE(limLog(pMac, LOGW, |
| 2078 | FL("%s] Activated Heartbeat timer status(%d)"), __func__, status);) |
| 2079 | } |
| 2080 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2081 | } |
| 2082 | else |
| 2083 | { |
| 2084 | status = TX_SUCCESS; |
| 2085 | } |
| 2086 | } |
| 2087 | |
| 2088 | return (status); |
| 2089 | } |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | /** |
| 2094 | * limDeactivateAndChangePerStaIdTimer() |
| 2095 | * |
| 2096 | * |
| 2097 | * @brief: This function is called to deactivate and change a per STA timer |
| 2098 | * for future re-activation |
| 2099 | * |
| 2100 | *LOGIC: |
| 2101 | * |
| 2102 | *ASSUMPTIONS: |
| 2103 | * NA |
| 2104 | * |
| 2105 | * @note staId for eLIM_AUTH_RSP_TIMER is auth Node Index. |
| 2106 | * |
| 2107 | * @param pMac - Pointer to Global MAC structure |
| 2108 | * @param timerId - enum of timer to be deactivated and changed |
| 2109 | * This enum is defined in limUtils.h file |
| 2110 | * @param staId - staId |
| 2111 | * |
| 2112 | * @return None |
| 2113 | */ |
| 2114 | |
| 2115 | void |
| 2116 | limDeactivateAndChangePerStaIdTimer(tpAniSirGlobal pMac, tANI_U32 timerId, tANI_U16 staId) |
| 2117 | { |
| 2118 | tANI_U32 val; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2119 | |
| 2120 | switch (timerId) |
| 2121 | { |
| 2122 | case eLIM_CNF_WAIT_TIMER: |
| 2123 | |
| 2124 | if (tx_timer_deactivate(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId]) |
| 2125 | != TX_SUCCESS) |
| 2126 | { |
| 2127 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2128 | FL("unable to deactivate CNF wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2129 | |
| 2130 | } |
| 2131 | |
| 2132 | // Change timer to reactivate it in future |
| 2133 | |
| 2134 | if (wlan_cfgGetInt(pMac, WNI_CFG_WT_CNF_TIMEOUT, |
| 2135 | &val) != eSIR_SUCCESS) |
| 2136 | { |
| 2137 | /** |
| 2138 | * Could not get cnf timeout value |
| 2139 | * from CFG. Log error. |
| 2140 | */ |
| 2141 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2142 | FL("could not retrieve cnf timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2143 | } |
| 2144 | val = SYS_MS_TO_TICKS(val); |
| 2145 | |
| 2146 | if (tx_timer_change(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId], |
| 2147 | val, val) != TX_SUCCESS) |
| 2148 | { |
| 2149 | // Could not change cnf timer. |
| 2150 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2151 | limLog(pMac, LOGP, FL("unable to change cnf wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2152 | } |
| 2153 | |
| 2154 | break; |
| 2155 | |
| 2156 | case eLIM_AUTH_RSP_TIMER: |
| 2157 | { |
| 2158 | tLimPreAuthNode *pAuthNode; |
| 2159 | |
| 2160 | pAuthNode = limGetPreAuthNodeFromIndex(pMac, &pMac->lim.gLimPreAuthTimerTable, staId); |
| 2161 | |
| 2162 | if (pAuthNode == NULL) |
| 2163 | { |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2164 | limLog(pMac, LOGP, FL("Invalid Pre Auth Index passed :%d"), staId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2165 | break; |
| 2166 | } |
| 2167 | |
| 2168 | if (tx_timer_deactivate(&pAuthNode->timer) != TX_SUCCESS) |
| 2169 | { |
| 2170 | // Could not deactivate auth response timer. |
| 2171 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2172 | limLog(pMac, LOGP, FL("unable to deactivate auth response timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2173 | } |
| 2174 | |
| 2175 | // Change timer to reactivate it in future |
| 2176 | |
| 2177 | if (wlan_cfgGetInt(pMac, WNI_CFG_AUTHENTICATE_RSP_TIMEOUT, &val) != eSIR_SUCCESS) |
| 2178 | { |
| 2179 | /** |
| 2180 | * Could not get auth rsp timeout value |
| 2181 | * from CFG. Log error. |
| 2182 | */ |
| 2183 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2184 | FL("could not retrieve auth response timeout value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2185 | } |
| 2186 | |
| 2187 | val = SYS_MS_TO_TICKS(val); |
| 2188 | |
| 2189 | if (tx_timer_change(&pAuthNode->timer, val, 0) != TX_SUCCESS) |
| 2190 | { |
| 2191 | // Could not change auth rsp timer. |
| 2192 | // Log error |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2193 | limLog(pMac, LOGP, FL("unable to change auth rsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2194 | } |
| 2195 | } |
| 2196 | break; |
| 2197 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2198 | |
| 2199 | default: |
| 2200 | // Invalid timerId. Log error |
| 2201 | break; |
| 2202 | |
| 2203 | } |
| 2204 | } |
| 2205 | |
| 2206 | |
| 2207 | /** |
| 2208 | * limActivateCnfTimer() |
| 2209 | * |
| 2210 | *FUNCTION: |
| 2211 | * This function is called to activate a per STA timer |
| 2212 | * |
| 2213 | *LOGIC: |
| 2214 | * |
| 2215 | *ASSUMPTIONS: |
| 2216 | * NA |
| 2217 | * |
| 2218 | *NOTE: |
| 2219 | * NA |
| 2220 | * |
| 2221 | * @param pMac - Pointer to Global MAC structure |
| 2222 | * @param StaId - staId |
| 2223 | * |
| 2224 | * @return None |
| 2225 | */ |
| 2226 | |
| 2227 | void limActivateCnfTimer(tpAniSirGlobal pMac, tANI_U16 staId, tpPESession psessionEntry) |
| 2228 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2229 | pMac->lim.limTimers.gpLimCnfWaitTimer[staId].sessionId = psessionEntry->peSessionId; |
| 2230 | if (tx_timer_activate(&pMac->lim.limTimers.gpLimCnfWaitTimer[staId]) |
| 2231 | != TX_SUCCESS) |
| 2232 | { |
| 2233 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2234 | FL("could not activate cnf wait timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2235 | } |
| 2236 | } |
| 2237 | |
| 2238 | /** |
| 2239 | * limActivateAuthRspTimer() |
| 2240 | * |
| 2241 | *FUNCTION: |
| 2242 | * This function is called to activate a per STA timer |
| 2243 | * |
| 2244 | *LOGIC: |
| 2245 | * |
| 2246 | *ASSUMPTIONS: |
| 2247 | * NA |
| 2248 | * |
| 2249 | *NOTE: |
| 2250 | * NA |
| 2251 | * |
| 2252 | * @param pMac - Pointer to Global MAC structure |
| 2253 | * @param id - id |
| 2254 | * |
| 2255 | * @return None |
| 2256 | */ |
| 2257 | |
| 2258 | void limActivateAuthRspTimer(tpAniSirGlobal pMac, tLimPreAuthNode *pAuthNode) |
| 2259 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2260 | if (tx_timer_activate(&pAuthNode->timer) != TX_SUCCESS) |
| 2261 | { |
| 2262 | /// Could not activate auth rsp timer. |
| 2263 | // Log error |
| 2264 | limLog(pMac, LOGP, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2265 | FL("could not activate auth rsp timer")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2266 | } |
| 2267 | } |
| 2268 | |
| 2269 | |
| 2270 | /** |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2271 | * limAssocCnfWaitTmerHandler() |
| 2272 | * |
| 2273 | *FUNCTION: |
| 2274 | * This function post a message to send a disassociate frame out. |
| 2275 | * |
| 2276 | *LOGIC: |
| 2277 | * |
| 2278 | *ASSUMPTIONS: |
| 2279 | * |
| 2280 | *NOTE: |
| 2281 | * NA |
| 2282 | * |
| 2283 | * @param |
| 2284 | * |
| 2285 | * @return None |
| 2286 | */ |
| 2287 | |
| 2288 | void |
| 2289 | limCnfWaitTmerHandler(void *pMacGlobal, tANI_U32 param) |
| 2290 | { |
| 2291 | tSirMsgQ msg; |
| 2292 | tANI_U32 statusCode; |
| 2293 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2294 | |
| 2295 | msg.type = SIR_LIM_CNF_WAIT_TIMEOUT; |
| 2296 | msg.bodyval = (tANI_U32)param; |
| 2297 | msg.bodyptr = NULL; |
| 2298 | |
| 2299 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2300 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2301 | FL("posting to LIM failed, reason=%d"), statusCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2302 | |
| 2303 | } |
| 2304 | |
| 2305 | /** |
| 2306 | * limKeepaliveTmerHandler() |
| 2307 | * |
| 2308 | *FUNCTION: |
| 2309 | * This function post a message to send a NULL data frame. |
| 2310 | * |
| 2311 | *LOGIC: |
| 2312 | * |
| 2313 | *ASSUMPTIONS: |
| 2314 | * |
| 2315 | *NOTE: |
| 2316 | * NA |
| 2317 | * |
| 2318 | * @param |
| 2319 | * |
| 2320 | * @return None |
| 2321 | */ |
| 2322 | |
| 2323 | void |
| 2324 | limKeepaliveTmerHandler(void *pMacGlobal, tANI_U32 param) |
| 2325 | { |
| 2326 | tSirMsgQ msg; |
| 2327 | tANI_U32 statusCode; |
| 2328 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2329 | |
| 2330 | msg.type = SIR_LIM_KEEPALIVE_TIMEOUT; |
| 2331 | msg.bodyval = (tANI_U32)param; |
| 2332 | msg.bodyptr = NULL; |
| 2333 | |
| 2334 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2335 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2336 | FL("posting to LIM failed, reason=%d"), statusCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2337 | |
| 2338 | } |
| 2339 | |
| 2340 | void |
| 2341 | limChannelSwitchTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2342 | { |
| 2343 | tSirMsgQ msg; |
| 2344 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2345 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2346 | limLog(pMac, LOG1, |
| 2347 | FL("ChannelSwitch Timer expired. Posting msg to LIM ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2348 | |
| 2349 | msg.type = SIR_LIM_CHANNEL_SWITCH_TIMEOUT; |
| 2350 | msg.bodyval = (tANI_U32)param; |
| 2351 | msg.bodyptr = NULL; |
| 2352 | |
| 2353 | limPostMsgApi(pMac, &msg); |
| 2354 | } |
| 2355 | |
| 2356 | void |
| 2357 | limQuietTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2358 | { |
| 2359 | tSirMsgQ msg; |
| 2360 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2361 | |
| 2362 | msg.type = SIR_LIM_QUIET_TIMEOUT; |
| 2363 | msg.bodyval = (tANI_U32)param; |
| 2364 | msg.bodyptr = NULL; |
| 2365 | |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2366 | limLog(pMac, LOG1, |
| 2367 | FL("Post SIR_LIM_QUIET_TIMEOUT msg. ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2368 | limPostMsgApi(pMac, &msg); |
| 2369 | } |
| 2370 | |
| 2371 | void |
| 2372 | limQuietBssTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2373 | { |
| 2374 | tSirMsgQ msg; |
| 2375 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2376 | |
| 2377 | msg.type = SIR_LIM_QUIET_BSS_TIMEOUT; |
| 2378 | msg.bodyval = (tANI_U32)param; |
| 2379 | msg.bodyptr = NULL; |
Abhishek Singh | 3cbf605 | 2014-12-15 16:46:42 +0530 | [diff] [blame] | 2380 | limLog(pMac, LOG1, |
| 2381 | FL("Post SIR_LIM_QUIET_BSS_TIMEOUT msg. ")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2382 | limPostMsgApi(pMac, &msg); |
| 2383 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2384 | #if 0 |
| 2385 | void |
| 2386 | limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param) |
| 2387 | { |
| 2388 | tSirMsgQ msg; |
| 2389 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2390 | |
| 2391 | msg.type = SIR_LIM_WPS_OVERLAP_TIMEOUT; |
| 2392 | msg.bodyval = (tANI_U32)param; |
| 2393 | msg.bodyptr = NULL; |
| 2394 | PELOG1(limLog(pMac, LOG1, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2395 | FL("Post SIR_LIM_WPS_OVERLAP_TIMEOUT msg. "));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2396 | limPostMsgApi(pMac, &msg); |
| 2397 | } |
| 2398 | #endif |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2399 | |
| 2400 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 2401 | /* ACTIVE_MODE_HB_OFFLOAD */ |
| 2402 | /** |
| 2403 | * limMissedBeaconInActiveMode() |
| 2404 | * |
| 2405 | *FUNCTION: |
| 2406 | * This function handle beacon miss indication from FW |
| 2407 | * in Active mode. |
| 2408 | * |
| 2409 | *LOGIC: |
| 2410 | * |
| 2411 | *ASSUMPTIONS: |
| 2412 | * NA |
| 2413 | * |
| 2414 | *NOTE: |
| 2415 | * NA |
| 2416 | * |
| 2417 | * @param param - Msg Type |
| 2418 | * |
| 2419 | * @return None |
| 2420 | */ |
| 2421 | void |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 2422 | limMissedBeaconInActiveMode(void *pMacGlobal, tpPESession psessionEntry) |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2423 | { |
| 2424 | tANI_U32 statusCode; |
| 2425 | tSirMsgQ msg; |
| 2426 | tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal; |
| 2427 | |
| 2428 | // Prepare and post message to LIM Message Queue |
| 2429 | if(IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
Jeff Johnson | 62c2798 | 2013-02-27 17:53:55 -0800 | [diff] [blame] | 2430 | { |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2431 | 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] | 2432 | msg.bodyptr = psessionEntry; |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2433 | msg.bodyval = 0; |
| 2434 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2435 | FL("Heartbeat failure from Riva")); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2436 | if ((statusCode = limPostMsgApi(pMac, &msg)) != eSIR_SUCCESS) |
| 2437 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 5be73a6 | 2013-04-01 18:40:00 -0700 | [diff] [blame] | 2438 | FL("posting message %X to LIM failed, reason=%d"), |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2439 | msg.type, statusCode); |
| 2440 | } |
| 2441 | } |
| 2442 | #endif |