wlan: Don't re-initialize timer if initialization is evaluated to zero
Do not re-initialize periodic probe request timer if the calculated
value for "initScheduleTimeInMsecs" from max channel timer is zero.
Change-Id: I7cc03d84088c8c3f2b1e704c2e6c8c24c1a01189
CRs-Fixed: 909143
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c
index 204df07..f4bed14 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.c
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.c
@@ -1130,12 +1130,23 @@
break;
}
}
- if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer,
- val, 0) != TX_SUCCESS)
+ if (val)
{
- // Could not change min channel timer.
- // Log error
- limLog(pMac, LOGP, FL("Unable to change periodic timer"));
+ if (tx_timer_change(&pMac->lim.limTimers.gLimPeriodicProbeReqTimer,
+ val, 0) != TX_SUCCESS)
+ {
+ // Could not change min channel timer.
+ // Log error
+ limLog(pMac, LOGE, FL("Unable to change periodic timer"));
+ }
+ }
+ else
+ {
+ limLog(pMac, LOGE, FL("Do not change gLimPeriodicProbeReqTimer values,"
+ "value = %d minchannel time = %d"
+ "maxchannel time = %d"), val,
+ pMac->lim.gpLimMlmScanReq->minChannelTime,
+ pMac->lim.gpLimMlmScanReq->maxChannelTime);
}
break;