From e6a1cda95e9f673d458abe3d534df4bd6e8a3fe9 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Wed, 27 Sep 2017 15:23:02 -0700 Subject: [PATCH] qcacld-3.0: Bring back changes of Antenna sharing for STA Change-id Iafd5666179d079c7bcc950277092cef3046356bf was added to remove antenna sharing support from SAP and STA case but customer needs those changes for SAP case only. So bringing back changes for STA case. CRs-Fixed: 2117829 Change-Id: I79f7c5ae1fd642f0b26170f066a5409638cdd873 --- core/mac/inc/ani_global.h | 1 + core/mac/src/pe/lim/lim_prop_exts_utils.c | 1 + core/mac/src/pe/lim/lim_send_sme_rsp_messages.c | 5 +++-- core/sme/src/common/sme_api.c | 1 + core/wma/inc/wma_tgt_cfg.h | 2 ++ core/wma/src/wma_main.c | 3 ++- 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index a2394e219946..359cea70f857 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -933,6 +933,7 @@ typedef struct sAniSirGlobal { csr_readyToSuspendCallback readyToSuspendCallback; void *readyToSuspendContext; + uint8_t lteCoexAntShare; uint8_t beacon_offload; bool pmf_offload; uint32_t fEnableDebugLog; diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index 67fef7dc89a7..ecc38de0e09e 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -293,6 +293,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, if (mac_ctx->roam.configParam.is_force_1x1 && is_vendor_ap_present && + mac_ctx->lteCoexAntShare && IS_24G_CH(session->currentOperChannel)) { session->supported_nss_1x1 = true; session->vdev_nss = 1; diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index 82f7459820c6..666f6e0ce446 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -389,8 +389,9 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, bss_ies, bss_ie_len) != NULL); if (mac_ctx->roam.configParam.is_force_1x1 && - is_vendor_ap_1_present && (session_entry->nss == 2) && - IS_5G_CH(session_entry->currentOperChannel)) { + is_vendor_ap_1_present && (session_entry->nss == 2) && + (mac_ctx->lteCoexAntShare == 0 || + IS_5G_CH(session_entry->currentOperChannel))) { /* SET vdev param */ pe_debug("sending SMPS intolrent vdev_param"); wma_cli_set_command(session_entry->smeSessionId, diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index f371ed29206a..6d18b740b6fe 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -14251,6 +14251,7 @@ void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); + mac_ctx->lteCoexAntShare = cfg->lte_coex_ant_share; mac_ctx->beacon_offload = cfg->beacon_offload; mac_ctx->pmf_offload = cfg->pmf_offload; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index dbb35af65884..2b07ae21dc5a 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -38,6 +38,7 @@ * @early_rx: early rx * @pno_offload: pno offload * @beacon_offload: beacon offload + * @lte_coex_ant_share: LTE coex ant share * @en_tdls: enable tdls * @en_tdls_offchan: enable tdls offchan * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf @@ -57,6 +58,7 @@ struct wma_tgt_services { #endif /* FEATURE_WLAN_SCAN_PNO */ bool beacon_offload; bool pmf_offload; + uint32_t lte_coex_ant_share; #ifdef FEATURE_WLAN_TDLS bool en_tdls; bool en_tdls_offchan; diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 03ec6aa9b7a1..431179ea02a6 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -4074,7 +4074,8 @@ static inline void wma_update_target_services(tp_wma_handle wh, if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_EXTSCAN)) g_fw_wlan_feat_caps |= (1 << EXTENDED_SCAN); #endif /* FEATURE_WLAN_EXTSCAN */ - + cfg->lte_coex_ant_share = WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, + WMI_SERVICE_LTE_ANT_SHARE_SUPPORT); #ifdef FEATURE_WLAN_TDLS /* Enable TDLS */ if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_TDLS)) {