浏览代码

qcacld-3.0: Make sure join timeout value is less than max allowed

Join timeout value is taken as 10 times beacon interval, however if
beacon interval is very large, this will make join timeout value to
exceed allowed max, causing join process failure. Make sure to keep
join timeout value less than max allowed.

Change-Id: If2167e602e3231403fbe2ab1936769f2a1b31383
CRs-Fixed: 2100819
Naveen Rawat 7 年之前
父节点
当前提交
e1fbbe0f64
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      core/sme/src/csr/csr_api_roam.c

+ 7 - 2
core/sme/src/csr/csr_api_roam.c

@@ -4308,14 +4308,19 @@ QDF_STATUS csr_roam_prepare_bss_config(tpAniSirGlobal pMac,
 	 * Join timeout: if we find a BeaconInterval in the BssDescription,
 	 * then set the Join Timeout to be 10 x the BeaconInterval.
 	 */
-	if (pBssDesc->beaconInterval)
+	if (pBssDesc->beaconInterval) {
 		/* Make sure it is bigger than the minimal */
 		pBssConfig->uJoinTimeOut =
 			QDF_MAX(10 * pBssDesc->beaconInterval,
 				CSR_JOIN_FAILURE_TIMEOUT_MIN);
-	else
+		/* make sure it is less than max allowed */
+		pBssConfig->uJoinTimeOut =
+			QDF_MIN(pBssConfig->uJoinTimeOut,
+				WNI_CFG_JOIN_FAILURE_TIMEOUT_STAMAX);
+	} else {
 		pBssConfig->uJoinTimeOut =
 			CSR_JOIN_FAILURE_TIMEOUT_DEFAULT;
+	}
 	/* validate CB */
 	if ((pBssConfig->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11N) ||
 	    (pBssConfig->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11N_ONLY) ||