浏览代码

qcacld-3.0: Don't re-initialize timer if initialization is evaluated to zero

qcacld-2.0 to qcacld-3.0 propagation.

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
(cherry picked from commit 0d91c221310d699374b9d4373f7b5cd52ece3ac8)
Anurag Chouhan 8 年之前
父节点
当前提交
1a73428e0d
共有 1 个文件被更改,包括 15 次插入7 次删除
  1. 15 7
      core/mac/src/pe/lim/lim_timer_utils.c

+ 15 - 7
core/mac/src/pe/lim/lim_timer_utils.c

@@ -691,14 +691,22 @@ void lim_deactivate_and_change_timer(tpAniSirGlobal pMac, uint32_t timerId)
 		val =
 			SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime) /
 			2;
-		if (tx_timer_change
-			    (&pMac->lim.limTimers.gLimPeriodicProbeReqTimer, val,
-			    0) != TX_SUCCESS) {
-			/* Could not change min channel timer. */
-			/* Log error */
-			lim_log(pMac, LOGP,
+		if (val) {
+			if (tx_timer_change(
+			    &pMac->lim.limTimers.gLimPeriodicProbeReqTimer,
+			    val, 0) != TX_SUCCESS) {
+				/* Could not change min channel timer. */
+				/* Log error */
+				lim_log(pMac, LOGP,
 				FL("Unable to change periodic timer"));
-		}
+			}
+		} else
+			lim_log(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;