summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPragaspathi Thilagaraj <tpragasp@codeaurora.org>2019-12-12 21:14:53 +0530
committerchenpaul <chenpaul@google.com>2020-02-10 17:20:22 +0800
commitda09f1540ba2611e82f94b91173b19d5496e8759 (patch)
tree8e21a4381f390bfedb5526a1854cbbc321ca439e
parent0e58db7f8013299c33d13deb14399797c8ab06b8 (diff)
downloadqcacld-da09f1540ba2611e82f94b91173b19d5496e8759.tar.gz
qcacld-3.0: Fix dot11mode setting in roaming session
The roaming FT session dot11mode value is set with self configuration, peer capability from beacon is not checked to set the value. Check peer AP beacon capabilities along with self configuration to set the dot11mode setting in FT session. Change-Id: Idd0edafccc6664b3b0f41ba7ca3dd8d59094ff3e CRs-Fixed: 2467600 Bug: 145762795
-rw-r--r--core/mac/src/pe/lim/lim_ft.c67
1 files changed, 51 insertions, 16 deletions
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index 3f6357d2d9..6d3e6429d1 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -472,8 +472,9 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
/**
* lim_fill_dot11mode() - to fill 802.11 mode in FT session
* @mac_ctx: pointer to mac ctx
- * @pftSessionEntry: FT session
+ * @ft_session: FT session
* @psessionEntry: PE session
+ * @bcn: AP beacon pointer
*
* This API fills FT session's dot11mode either from pe session or
* from CFG depending on the condition.
@@ -481,18 +482,49 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
* Return: none
*/
static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
- tpPESession pftSessionEntry, tpPESession psessionEntry)
+ tpPESession ft_session,
+ tpPESession psessionEntry,
+ tSchBeaconStruct *bcn)
{
uint32_t self_dot11_mode;
if (psessionEntry->ftPEContext.pFTPreAuthReq &&
!mac_ctx->roam.configParam.isRoamOffloadEnabled) {
- pftSessionEntry->dot11mode =
+ ft_session->dot11mode =
psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
- } else {
- wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11_mode);
- pe_debug("selfDot11Mode: %d", self_dot11_mode);
- pftSessionEntry->dot11mode = self_dot11_mode;
+ return;
+ }
+
+ wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11_mode);
+ pe_debug("selfDot11Mode: %d", self_dot11_mode);
+
+ if (ft_session->limRFBand == BAND_2G)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11G;
+ else
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11A;
+
+ switch (self_dot11_mode) {
+ case WNI_CFG_DOT11_MODE_11AX:
+ case WNI_CFG_DOT11_MODE_11AX_ONLY:
+ if (bcn->he_cap.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11AX;
+ else if (bcn->VHTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11AC;
+ else if (bcn->HTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11N;
+ break;
+ case WNI_CFG_DOT11_MODE_11AC:
+ case WNI_CFG_DOT11_MODE_11AC_ONLY:
+ if (bcn->VHTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11AC;
+ else if (bcn->HTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11N;
+ break;
+ case WNI_CFG_DOT11_MODE_11N:
+ case WNI_CFG_DOT11_MODE_11N_ONLY:
+ if (bcn->HTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11N;
+ break;
}
}
#elif defined(WLAN_FEATURE_HOST_ROAM)
@@ -501,13 +533,16 @@ static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
* @mac_ctx: pointer to mac ctx
* @pftSessionEntry: FT session
* @psessionEntry: PE session
+ * @bcn: AP beacon pointer
*
* This API fills FT session's dot11mode either from pe session.
*
* Return: none
*/
static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
- tpPESession pftSessionEntry, tpPESession psessionEntry)
+ tpPESession pftSessionEntry,
+ tpPESession psessionEntry,
+ tSchBeaconStruct *bcn)
{
pftSessionEntry->dot11mode =
psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
@@ -569,7 +604,14 @@ void lim_fill_ft_session(tpAniSirGlobal pMac,
pftSessionEntry->ssId.length = pBeaconStruct->ssId.length;
qdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
pftSessionEntry->ssId.length);
- lim_fill_dot11mode(pMac, pftSessionEntry, psessionEntry);
+
+ /* Copy The channel Id to the session Table */
+ pftSessionEntry->limReassocChannelId = pbssDescription->channelId;
+ pftSessionEntry->currentOperChannel = pbssDescription->channelId;
+
+ pftSessionEntry->limRFBand = lim_get_rf_band(
+ pftSessionEntry->currentOperChannel);
+ lim_fill_dot11mode(pMac, pftSessionEntry, psessionEntry, pBeaconStruct);
pe_debug("dot11mode: %d", pftSessionEntry->dot11mode);
pftSessionEntry->vhtCapability =
@@ -579,13 +621,6 @@ void lim_fill_ft_session(tpAniSirGlobal pMac,
(IS_DOT11_MODE_HT(pftSessionEntry->dot11mode)
&& pBeaconStruct->HTCaps.present);
- /* Copy The channel Id to the session Table */
- pftSessionEntry->limReassocChannelId = pbssDescription->channelId;
- pftSessionEntry->currentOperChannel = pbssDescription->channelId;
-
- pftSessionEntry->limRFBand = lim_get_rf_band(
- pftSessionEntry->currentOperChannel);
-
if (pftSessionEntry->limRFBand == BAND_2G) {
cbEnabledMode = pMac->roam.configParam.channelBondingMode24GHz;
} else {