From 5b96c3c90c2ef6b5de7c9ce1b83503412325b4e2 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 13 Sep 2017 16:33:07 -0700 Subject: [PATCH] qcacld-3.0: Fix Tx BF CNS Value sent in ASSOC request Currently host take min of VHTCaps.csnofBeamformerAntSup and self txBFCsnValue rather than sending self CSN cap. However doing so have certain IOT issue with commercial APs already in market. This IOT issue is found only in our 2x4 solution. Fix this by min only if self CSN is < 4. Change-Id: I819fcc440ef3a74ae0dc9011465d0a5d1f2c5892 CRs-Fixed: 2121133 --- core/sme/src/csr/csr_api_roam.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index a27641f5d33c..a46d51f4303f 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -15158,17 +15158,27 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, /* Set BF CSN value only if SU Bformee is enabled */ if (csr_join_req->vht_config.su_beam_formee) { txBFCsnValue = (uint8_t)value1; - if (IS_BSS_VHT_CAPABLE(pIes->VHTCaps) && - pIes->VHTCaps.csnofBeamformerAntSup) - txBFCsnValue = QDF_MIN(txBFCsnValue, - pIes->VHTCaps.csnofBeamformerAntSup); - else if (IS_BSS_VHT_CAPABLE( - pIes->vendor_vht_ie.VHTCaps) - && pIes->vendor_vht_ie.VHTCaps. - csnofBeamformerAntSup) - txBFCsnValue = QDF_MIN(txBFCsnValue, - pIes->vendor_vht_ie. - VHTCaps.csnofBeamformerAntSup); + /* + * Certain commercial AP display a bad behavior when + * CSN value in assoc request is more than AP's CSN. + * Sending absolute self CSN value with such AP leads to + * IOT issues. However this issue is observed only with + * CSN cap of less than 4. To avoid such issues, take a + * min of self and peer CSN while sending ASSOC request. + */ + if (txBFCsnValue < 4) { + if (IS_BSS_VHT_CAPABLE(pIes->VHTCaps) && + pIes->VHTCaps.csnofBeamformerAntSup) + txBFCsnValue = QDF_MIN(txBFCsnValue, + pIes->VHTCaps.csnofBeamformerAntSup); + else if (IS_BSS_VHT_CAPABLE( + pIes->vendor_vht_ie.VHTCaps) + && pIes->vendor_vht_ie.VHTCaps. + csnofBeamformerAntSup) + txBFCsnValue = QDF_MIN(txBFCsnValue, + pIes->vendor_vht_ie. + VHTCaps.csnofBeamformerAntSup); + } } csr_join_req->vht_config.csnof_beamformer_antSup = txBFCsnValue;