diff options
| author | Pragaspathi Thilagaraj <tpragasp@codeaurora.org> | 2019-12-12 21:14:53 +0530 |
|---|---|---|
| committer | Pragaspathi Thilagaraj <tpragasp@codeaurora.org> | 2020-04-03 15:58:31 +0530 |
| commit | 1ce9846975d2a66d5fcffbfe83c1d33247c1c27f (patch) | |
| tree | fdf3dd39f7d7e4217bcecb31110ac420060acd8b | |
| parent | 9c62f24c58a8814ef553537267390cbbe1773e6d (diff) | |
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
| -rw-r--r-- | core/mac/src/pe/lim/lim_ft.c | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index 73eb4be4110b..1e60e69f7bb8 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -467,8 +467,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. @@ -476,18 +477,40 @@ 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 == SIR_BAND_2_4_GHZ) + 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_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; } } #else @@ -496,13 +519,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; @@ -563,7 +589,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 = |
