summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen Rawat <naveenrawat@codeaurora.org>2017-09-05 12:01:56 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-09-05 12:13:20 -0700
commit7dee4df9ad0bc0907feffd12abc50fbc1b6d2246 (patch)
tree5a8d277962c43477a17cbd09e90331aefa2aa456
parente69be2a4837e9135d71e725eea1177807c0f73f3 (diff)
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
-rw-r--r--core/sme/src/csr/csr_api_roam.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index bab686adc0e9..897dd5264d68 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -4311,14 +4311,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_11AC)