Jelajahi Sumber

qcacld-3.0: Disable peer_unmap_conf_support for FTM mode

In FTM mode, no peer is created in the host. Currently, since
peer_unmap_conf_support feature is enabled, FW is expecting
WMA_SEND_PEER_UNMAP_CONF from host to remove the peer Id from AST.
But host never send this WMI CMD in FTM mode.

Disable peer_unmap_conf_support in FTM mode which allow FW to
delete the peer Id without any WMI CMD expectation from host.

Change-Id: Idf9082adc81187346563f3aedf1f1657164f03cc
CRs-Fixed: 2608929
Alok Kumar 5 tahun lalu
induk
melakukan
a73938f684

+ 2 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -319,6 +319,8 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
 	gen->mgmt_retry_max = cfg_get(psoc, CFG_MGMT_RETRY_MAX);
 	gen->bmiss_skip_full_scan = cfg_get(psoc, CFG_BMISS_SKIP_FULL_SCAN);
 	gen->enable_ring_buffer = cfg_get(psoc, CFG_ENABLE_RING_BUFFER);
+	gen->enable_peer_unmap_conf_support =
+		cfg_get(psoc, CFG_DP_ENABLE_PEER_UMAP_CONF_SUPPORT);
 }
 
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)

+ 9 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -2344,4 +2344,13 @@ wlan_mlme_get_mgmt_max_retry(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS
 wlan_mlme_get_status_ring_buffer(struct wlan_objmgr_psoc *psoc,
 				 bool *enable_ring_buffer);
+
+/**
+ * wlan_mlme_get_peer_unmap_conf() - Indicate if peer unmap confirmation
+ * support is enabled or disabled
+ * @psoc: pointer to psoc object
+ *
+ * Return: true if peer unmap confirmation support is enabled, else false
+ */
+bool wlan_mlme_get_peer_unmap_conf(struct wlan_objmgr_psoc *psoc);
 #endif /* _WLAN_MLME_API_H_ */

+ 2 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1126,6 +1126,7 @@ struct wlan_mlme_chainmask {
  * @bmiss_skip_full_scan: Decide if full scan can be skipped in firmware if no
  * candidate is found in partial scan based on channel map
  * @enable_ring_buffer: Decide to enable/disable ring buffer for bug report
+ * @enable_peer_unmap_conf_support: Indicate whether to send conf for peer unmap
  */
 struct wlan_mlme_generic {
 	enum band_info band_capability;
@@ -1160,6 +1161,7 @@ struct wlan_mlme_generic {
 	uint8_t mgmt_retry_max;
 	bool bmiss_skip_full_scan;
 	bool enable_ring_buffer;
+	bool enable_peer_unmap_conf_support;
 };
 
 /*

+ 12 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -3957,4 +3957,16 @@ ucfg_mlme_get_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc,
 	return wlan_mlme_get_ignore_fw_reg_offload_ind(psoc, disabled);
 }
 
+/**
+ * ucfg_mlme_get_peer_unmap_conf() - Indicate if peer unmap confirmation
+ * support is enabled or disabled
+ * @psoc: pointer to psoc object
+ *
+ * Return: true if peer unmap confirmation support is enabled, else false
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_peer_unmap_conf(struct wlan_objmgr_psoc *psoc)
+{
+	return wlan_mlme_get_peer_unmap_conf(psoc);
+}
 #endif /* _WLAN_MLME_UCFG_API_H_ */

+ 11 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -3700,3 +3700,14 @@ wlan_mlme_get_status_ring_buffer(struct wlan_objmgr_psoc *psoc,
 	*enable_ring_buffer = mlme_obj->cfg.gen.enable_ring_buffer;
 	return QDF_STATUS_SUCCESS;
 }
+
+bool wlan_mlme_get_peer_unmap_conf(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj)
+		return false;
+
+	return mlme_obj->cfg.gen.enable_peer_unmap_conf_support;
+}

+ 2 - 1
core/wma/src/wma_main.c

@@ -6664,7 +6664,8 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event,
 		wlan_res_cfg->new_htt_msg_format = false;
 	}
 
-	if (cfg_get(wma_handle->psoc, CFG_DP_ENABLE_PEER_UMAP_CONF_SUPPORT) &&
+	if (QDF_GLOBAL_FTM_MODE  != cds_get_conparam() &&
+	    ucfg_mlme_get_peer_unmap_conf(wma_handle->psoc) &&
 	    wmi_service_enabled(wmi_handle,
 				wmi_service_peer_unmap_cnf_support)) {
 		wlan_res_cfg->peer_unmap_conf_support = true;