From d88ef885e5eebf16b942a9b0458f81b37be53597 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Tue, 14 Aug 2018 15:20:11 +0530 Subject: [PATCH] qcacld-3.0: Add check for DBS mode in start bss Currently the driver doesn't handle the nss update if a prior connection is already present in DBS mode. Suppose if a STA is already connected in 5ghz and the SAP comes up in 2.4ghz, the beacon template should be updated with NSS = 1 Fix is to check whether the current hw_mode is in DBS or not, and change the nss in the beacon template accordingly Change-Id: I54ead1fd26d705a821160b5bc5d816df1d2ab8f4 CRs-Fixed: 2288307 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index dd49f4a9d55e..c565ac92622b 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -581,6 +581,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) uint32_t chanwidth; struct vdev_type_nss *vdev_type_nss; QDF_STATUS cfg_get_wmi_dfs_master_param = QDF_STATUS_SUCCESS; + struct policy_mgr_hw_mode_params hw_mode; /* FEATURE_WLAN_DIAG_SUPPORT */ #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM @@ -853,7 +854,14 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) session->ch_center_freq_seg1 = 0; } } - + if (policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) && + (policy_mgr_get_current_hw_mode(mac_ctx->psoc, &hw_mode) == + QDF_STATUS_SUCCESS) && + hw_mode.dbs_cap) { + session->nss = 1; + pe_debug("HW is in DBS mode. Nss set to [%d]", + session->nss); + } if (session->vhtCapability && (session->ch_width > CH_WIDTH_80MHZ)) { session->nss = 1;