qcacmn: Skip CFR target init when feature is disabled

When user disables CFR through INI -
1. Skip CFR SRNG allocations
2. Skip WMI handler registrations for DBR/TX completion events

Change-Id: I4f397e35717dc492aea5af74b167c1111cbc16a9
CRs-Fixed: 2671611
Этот коммит содержится в:
Padma Raghunathan
2020-04-24 12:23:36 +05:30
коммит произвёл nshrivas
родитель 79f10bc2d2
Коммит 0668b9fc45
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@@ -215,6 +215,11 @@ int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
struct pdev_cfr *pa;
struct psoc_cfr *cfr_sc;
if (wlan_cfr_is_feature_disabled(pdev)) {
cfr_err("cfr is disabled");
return QDF_STATUS_E_NOSUPPORT;
}
pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
if (pa == NULL)
return QDF_STATUS_E_FAILURE;
@@ -253,6 +258,11 @@ int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
{
uint32_t target_type;
if (wlan_cfr_is_feature_disabled(pdev)) {
cfr_err("cfr is disabled");
return QDF_STATUS_E_NOSUPPORT;
}
target_type = target_if_cfr_get_target_type(psoc);
if (target_type == TARGET_TYPE_QCA8074V2) {

Просмотреть файл

@@ -123,7 +123,6 @@ QDF_STATUS cfr_6490_init_pdev(struct wlan_objmgr_psoc *psoc,
struct pdev_cfr *cfr_pdev;
struct psoc_cfr *cfr_psoc;
struct wmi_unified *wmi_handle = NULL;
bool is_cfr_disabled;
bool cfr_capable;
QDF_STATUS status;
@@ -153,8 +152,7 @@ QDF_STATUS cfr_6490_init_pdev(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
is_cfr_disabled = cfg_get(psoc, CFG_CFR_DISABLE);
if (is_cfr_disabled) {
if (wlan_cfr_is_feature_disabled(pdev)) {
cfr_pdev->is_cfr_capable = 0;
cfr_psoc->is_cfr_capable = 0;
cfr_info("cfr disabled");