Explorar o código

qcacld-3.0: Enable the DBS ini if DBS is mandatory

The driver does not check the device DBS capability
and the DBS ini compatibility.
If the DBS ini gDualMacFeatureDisable is disabled
and HW mandates DBS capability then overide the ini
to always keep it enable.

Change-Id: I2b31453f9c8a04cef7f943b30d3c28f844c276b5
CRs-Fixed: 2551644
gaurank kathpalia %!s(int64=5) %!d(string=hai) anos
pai
achega
bc49149102

+ 13 - 0
cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -151,6 +151,19 @@ policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc,
  */
 QDF_STATUS policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc,
 					   uint8_t *dual_mac_feature);
+
+/**
+ * policy_mgr_set_dual_mac_feature() - to set the dual mac feature value
+ * @psoc: pointer to psoc
+ * @dual_mac_feature: value to be updated
+ *
+ * This API is used to update the dual mac (dual radio) specific feature value
+ *
+ * Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
+ */
+QDF_STATUS policy_mgr_set_dual_mac_feature(struct wlan_objmgr_psoc *psoc,
+					   uint8_t dual_mac_feature);
+
 /**
  * policy_mgr_get_force_1x1() - to find out if 1x1 connection is enforced
  *

+ 17 - 1
cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -71,6 +71,22 @@ policy_mgr_get_enable_overlap_chnl(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS policy_mgr_set_dual_mac_feature(struct wlan_objmgr_psoc *psoc,
+					   uint8_t dual_mac_feature)
+{
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("pm_ctx is NULL");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	pm_ctx->cfg.dual_mac_feature = dual_mac_feature;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 QDF_STATUS policy_mgr_get_dual_mac_feature(struct wlan_objmgr_psoc *psoc,
 					   uint8_t *dual_mac_feature)
 {
@@ -856,7 +872,7 @@ bool policy_mgr_find_if_fw_supports_dbs(struct wlan_objmgr_psoc *psoc)
 	return true;
 }
 
-static bool policy_mgr_find_if_hwlist_has_dbs(struct wlan_objmgr_psoc *psoc)
+bool policy_mgr_find_if_hwlist_has_dbs(struct wlan_objmgr_psoc *psoc)
 {
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 	uint32_t param, i, found = 0;

+ 10 - 0
cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

@@ -396,6 +396,16 @@ QDF_STATUS policy_mgr_get_updated_fw_mode_config(
 bool policy_mgr_is_dual_mac_disabled_in_ini(
 		struct wlan_objmgr_psoc *psoc);
 
+/**
+ * policy_mgr_find_if_hwlist_has_dbs() - Find if hw list has DBS modes or not
+ * @psoc: PSOC object information
+ *
+ * Find if hw list has DBS modes or not
+ *
+ * Return: true or false
+ */
+bool policy_mgr_find_if_hwlist_has_dbs(struct wlan_objmgr_psoc *psoc);
+
 /**
  * policy_mgr_get_mcc_to_scc_switch_mode() - MCC to SCC
  * switch mode value in the user config