Prechádzať zdrojové kódy

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
Krunal Soni 7 rokov pred
rodič
commit
e6a1cda95e

+ 1 - 0
core/mac/inc/ani_global.h

@@ -933,6 +933,7 @@ typedef struct sAniSirGlobal {
 
 
 	csr_readyToSuspendCallback readyToSuspendCallback;
 	csr_readyToSuspendCallback readyToSuspendCallback;
 	void *readyToSuspendContext;
 	void *readyToSuspendContext;
+	uint8_t lteCoexAntShare;
 	uint8_t beacon_offload;
 	uint8_t beacon_offload;
 	bool pmf_offload;
 	bool pmf_offload;
 	uint32_t fEnableDebugLog;
 	uint32_t fEnableDebugLog;

+ 1 - 0
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 &&
 	if (mac_ctx->roam.configParam.is_force_1x1 &&
 	    is_vendor_ap_present &&
 	    is_vendor_ap_present &&
+	    mac_ctx->lteCoexAntShare &&
 	    IS_24G_CH(session->currentOperChannel)) {
 	    IS_24G_CH(session->currentOperChannel)) {
 		session->supported_nss_1x1 = true;
 		session->supported_nss_1x1 = true;
 		session->vdev_nss = 1;
 		session->vdev_nss = 1;

+ 3 - 2
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);
 			bss_ies, bss_ie_len) != NULL);
 
 
 		if (mac_ctx->roam.configParam.is_force_1x1 &&
 		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 */
 			/* SET vdev param */
 			pe_debug("sending SMPS intolrent vdev_param");
 			pe_debug("sending SMPS intolrent vdev_param");
 			wma_cli_set_command(session_entry->smeSessionId,
 			wma_cli_set_command(session_entry->smeSessionId,

+ 1 - 0
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);
 	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
 
 
+	mac_ctx->lteCoexAntShare = cfg->lte_coex_ant_share;
 	mac_ctx->beacon_offload = cfg->beacon_offload;
 	mac_ctx->beacon_offload = cfg->beacon_offload;
 	mac_ctx->pmf_offload = cfg->pmf_offload;
 	mac_ctx->pmf_offload = cfg->pmf_offload;
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,

+ 2 - 0
core/wma/inc/wma_tgt_cfg.h

@@ -38,6 +38,7 @@
  * @early_rx: early rx
  * @early_rx: early rx
  * @pno_offload: pno offload
  * @pno_offload: pno offload
  * @beacon_offload: beacon offload
  * @beacon_offload: beacon offload
+ * @lte_coex_ant_share: LTE coex ant share
  * @en_tdls: enable tdls
  * @en_tdls: enable tdls
  * @en_tdls_offchan: enable tdls offchan
  * @en_tdls_offchan: enable tdls offchan
  * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
  * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
@@ -57,6 +58,7 @@ struct wma_tgt_services {
 #endif /* FEATURE_WLAN_SCAN_PNO */
 #endif /* FEATURE_WLAN_SCAN_PNO */
 	bool beacon_offload;
 	bool beacon_offload;
 	bool pmf_offload;
 	bool pmf_offload;
+	uint32_t lte_coex_ant_share;
 #ifdef FEATURE_WLAN_TDLS
 #ifdef FEATURE_WLAN_TDLS
 	bool en_tdls;
 	bool en_tdls;
 	bool en_tdls_offchan;
 	bool en_tdls_offchan;

+ 2 - 1
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))
 	if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_EXTSCAN))
 		g_fw_wlan_feat_caps |= (1 << EXTENDED_SCAN);
 		g_fw_wlan_feat_caps |= (1 << EXTENDED_SCAN);
 #endif /* FEATURE_WLAN_EXTSCAN */
 #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
 #ifdef FEATURE_WLAN_TDLS
 	/* Enable TDLS */
 	/* Enable TDLS */
 	if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_TDLS)) {
 	if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_TDLS)) {