From 26fe75c1d531df04fe34240020a6994ce05b01d2 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Sat, 8 Jun 2019 20:25:04 +0530 Subject: [PATCH] qcacld-3.0: Fill default nss in pe roam sync cb Currently the driver fills the vdev nss, and default nss in ft session according to the band on which the roaming happenend. For eg. if the roaming happenend on 5ghz band, then the nss value would be filled from the nss 5ghz value. But the nss is filled before the channel is populated in the structure, which can lead to wrong nss. Fix is to fill the nss value after the channel has been populated in the session. Change-Id: Ie4fc2452107fe5b1be296be7768868d251796a73 CRs-Fixed: 2467718 --- core/mac/src/pe/lim/lim_api.c | 8 -------- core/mac/src/pe/lim/lim_ft.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index d38c0de600..64f6f9e947 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2381,14 +2381,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx, sir_copy_mac_addr(session_ptr->limReAssocbssId, bss_desc->bssId); ft_session_ptr->csaOffloadEnable = session_ptr->csaOffloadEnable; - /* Assign default configured nss value in the new session */ - if (IS_5G_CH(ft_session_ptr->currentOperChannel)) - ft_session_ptr->vdev_nss = mac_ctx->vdev_type_nss_5g.sta; - else - ft_session_ptr->vdev_nss = mac_ctx->vdev_type_nss_2g.sta; - - ft_session_ptr->nss = ft_session_ptr->vdev_nss; - /* Next routine will update nss and vdev_nss with AP's capabilities */ lim_fill_ft_session(mac_ctx, bss_desc, ft_session_ptr, session_ptr); diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index bbb242a5a0..e4fc72200d 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -583,6 +583,14 @@ void lim_fill_ft_session(struct mac_context *mac, ft_session->limRFBand = lim_get_rf_band( ft_session->currentOperChannel); + /* Assign default configured nss value in the new session */ + if (IS_5G_CH(ft_session->currentOperChannel)) + ft_session->vdev_nss = mac->vdev_type_nss_5g.sta; + else + ft_session->vdev_nss = mac->vdev_type_nss_2g.sta; + + ft_session->nss = ft_session ->vdev_nss; + if (ft_session->limRFBand == BAND_2G) { cbEnabledMode = mac->roam.configParam.channelBondingMode24GHz; } else {