瀏覽代碼

qcacld-3.0: skip redundant update request for dual mac cfg

Dual mac configuration is static from wlan module
start to module stop, no need to update for each
adapter starting.
To reduce the time cost on starting adapter, add
a flag to indicate the status of dual mac config,
skip the update request if it's been updated.

Change-Id: I033cda08173503d133a06eca617655d1cefe4d0d
CRs-Fixed: 2839192
Yu Wang 4 年之前
父節點
當前提交
c89472f96a
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 2 0
      core/hdd/inc/wlan_hdd_main.h
  2. 8 0
      core/hdd/src/wlan_hdd_main.c

+ 2 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -1844,6 +1844,7 @@ struct hdd_adapter_ops_history {
  * @is_therm_cmd_supp: get temperature command enable or disable
  * @is_therm_cmd_supp: get temperature command enable or disable
  * @disconnect_for_sta_mon_conc: disconnect if sta monitor intf concurrency
  * @disconnect_for_sta_mon_conc: disconnect if sta monitor intf concurrency
  * @bbm_ctx: bus bandwidth manager context
  * @bbm_ctx: bus bandwidth manager context
+ * @is_dual_mac_cfg_updated: indicate whether dual mac cfg has been updated
  */
  */
 struct hdd_context {
 struct hdd_context {
 	struct wlan_objmgr_psoc *psoc;
 	struct wlan_objmgr_psoc *psoc;
@@ -2190,6 +2191,7 @@ struct hdd_context {
 #ifdef FEATURE_BUS_BANDWIDTH_MGR
 #ifdef FEATURE_BUS_BANDWIDTH_MGR
 	struct bbm_context *bbm_ctx;
 	struct bbm_context *bbm_ctx;
 #endif
 #endif
+	bool is_dual_mac_cfg_updated;
 };
 };
 
 
 /**
 /**

+ 8 - 0
core/hdd/src/wlan_hdd_main.c

@@ -2999,6 +2999,11 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void)
 	if (!policy_mgr_find_if_fw_supports_dbs(hdd_ctx->psoc))
 	if (!policy_mgr_find_if_fw_supports_dbs(hdd_ctx->psoc))
 		return QDF_STATUS_SUCCESS;
 		return QDF_STATUS_SUCCESS;
 
 
+	if (hdd_ctx->is_dual_mac_cfg_updated) {
+		hdd_debug("dual mac config has already been updated, skip");
+		return QDF_STATUS_SUCCESS;
+	}
+
 	cfg.scan_config = 0;
 	cfg.scan_config = 0;
 	cfg.fw_mode_config = 0;
 	cfg.fw_mode_config = 0;
 	cfg.set_dual_mac_cb = policy_mgr_soc_set_dual_mac_cfg_cb;
 	cfg.set_dual_mac_cb = policy_mgr_soc_set_dual_mac_cfg_cb;
@@ -3045,6 +3050,8 @@ wlan_hdd_update_dbs_scan_and_fw_mode_config(void)
 		/* wait for sme_soc_set_dual_mac_config to complete */
 		/* wait for sme_soc_set_dual_mac_config to complete */
 		status =
 		status =
 		    policy_mgr_wait_for_dual_mac_configuration(hdd_ctx->psoc);
 		    policy_mgr_wait_for_dual_mac_configuration(hdd_ctx->psoc);
+		if (QDF_IS_STATUS_SUCCESS(status))
+			hdd_ctx->is_dual_mac_cfg_updated = true;
 	} else {
 	} else {
 		hdd_err("sme_soc_set_dual_mac_config failed %d", status);
 		hdd_err("sme_soc_set_dual_mac_config failed %d", status);
 		return status;
 		return status;
@@ -14402,6 +14409,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 
 
 	/* Once the firmware sequence is completed reset this flag */
 	/* Once the firmware sequence is completed reset this flag */
 	hdd_ctx->imps_enabled = false;
 	hdd_ctx->imps_enabled = false;
+	hdd_ctx->is_dual_mac_cfg_updated = false;
 	hdd_ctx->driver_status = DRIVER_MODULES_CLOSED;
 	hdd_ctx->driver_status = DRIVER_MODULES_CLOSED;
 	hdd_debug("Wlan transitioned (now CLOSED)");
 	hdd_debug("Wlan transitioned (now CLOSED)");