summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVignesh Viswanathan <viswanat@codeaurora.org>2018-09-27 21:55:27 +0530
committerIsaac Chiou <isaacchiou@google.com>2020-02-25 02:14:01 +0000
commitfc294a14124df3c49c00b879deab10825ce51e01 (patch)
treee792afdf4b1505ffeb01ebb3352bd20b2c0d2f52 /core
parent3f90c0a638df03d1f562491c6116c014c16430c8 (diff)
downloadqcacld-fc294a14124df3c49c00b879deab10825ce51e01.tar.gz
qcacld-3.0: Fill Channel width for add_sta params from session entry
Currently the sta_context in add_bss params which is used to send the peer_assoc command to the FW, the ht_enable and vht_enable are set based on the AP's capability from the beacon. However, the channel width is set based on the assoc response frame from the AP. In a scenario where the AP advertises HT and VHT IEs in the beacon but does not send HT and VHT IEs in the assoc response frame, we will end up connecting in VHT/HT mode but with incorrect channel width. Update the sta_context channel width also based on the AP's capability from the beacon so that the connection would happen in the right channel width even if HT/VHT IEs are missing in the assoc response frame. bug: 142350508 bug: 144981147 Merged-In: Idb1907abebf32a34f88e935a30ebb8f1bce1d59c Change-Id: Idb1907abebf32a34f88e935a30ebb8f1bce1d59c CRs-Fixed: 2324434 Signed-off-by: Isaac Chiou <isaacchiou@google.com> (cherry picked from commit dbee01d90764fd2d9c9cabb1d700ae1cf286eca6)
Diffstat (limited to 'core')
-rw-r--r--core/mac/src/pe/lim/lim_assoc_utils.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index a01d870436..01f64d385a 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -3758,34 +3758,23 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
sta_context->enable_su_tx_bformer = 1;
}
- if ((pAssocRsp->HTCaps.supportedChannelWidthSet) &&
- (chanWidthSupp)) {
- pAddBssParams->staContext.ch_width = (uint8_t)
- pAssocRsp->HTInfo.recommendedTxWidthSet;
- if (pAssocRsp->VHTCaps.present)
- vht_oper = &pAssocRsp->VHTOperation;
- else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) {
- vht_oper = &pAssocRsp->
- vendor_vht_ie.VHTOperation;
- pe_debug("VHT Op IE is in vendor Specfic IE");
- }
- /*
- * in limExtractApCapability function intersection of FW
- * advertised channel width and AP advertised channel
- * width has been taken into account for calculating
- * psessionEntry->ch_width
- */
+ chanWidthSupp = lim_get_ht_capability(pMac,
+ eHT_SUPPORTED_CHANNEL_WIDTH_SET,
+ psessionEntry);
+
+ /*
+ * in limExtractApCapability function intersection of FW
+ * advertised channel width and AP advertised channel
+ * width has been taken into account for calculating
+ * psessionEntry->ch_width
+ */
+ if (chanWidthSupp &&
+ ((pAssocRsp->HTCaps.supportedChannelWidthSet) ||
+ (pBeaconStruct->HTCaps.supportedChannelWidthSet))) {
pAddBssParams->staContext.ch_width =
psessionEntry->ch_width;
-
- pe_debug("StaCtx: vhtCap %d ChBW %d TxBF %d",
- pAddBssParams->staContext.vhtCapable,
- pAddBssParams->staContext.ch_width,
- sta_context->vhtTxBFCapable);
- pe_debug("StaContext su_tx_bfer %d",
- sta_context->enable_su_tx_bformer);
} else {
- sta_context->ch_width = CH_WIDTH_20MHZ;
+ sta_context->ch_width = CH_WIDTH_20MHZ;
if ((IS_SIR_STATUS_SUCCESS(
wlan_cfg_get_int(pMac,
WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
@@ -3793,6 +3782,14 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
(false == enableTxBF20MHz))
sta_context->vhtTxBFCapable = 0;
}
+
+ pe_debug("StaCtx: vhtCap %d ChBW %d TxBF %d",
+ pAddBssParams->staContext.vhtCapable,
+ pAddBssParams->staContext.ch_width,
+ sta_context->vhtTxBFCapable);
+ pe_debug("StaContext su_tx_bfer %d",
+ sta_context->enable_su_tx_bformer);
+
pAddBssParams->staContext.mimoPS =
(tSirMacHTMIMOPowerSaveState)
pAssocRsp->HTCaps.mimoPowerSave;