|
@@ -496,16 +496,21 @@ QDF_STATUS
|
|
|
wlan_spectral_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
|
|
|
{
|
|
|
struct spectral_context *sc = NULL;
|
|
|
+ QDF_STATUS status;
|
|
|
|
|
|
if (!psoc) {
|
|
|
spectral_err("PSOC is NULL");
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (cfg_get(psoc, CFG_SPECTRAL_DISABLE)) {
|
|
|
- wlan_psoc_nif_feat_cap_set(psoc,
|
|
|
- WLAN_SOC_F_SPECTRAL_INI_DISABLE);
|
|
|
- spectral_info("Spectral is disabled");
|
|
|
+ status = wlan_spectral_init_psoc_feature_cap(psoc);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ spectral_err("Failed to intitialize spectral pdev feature caps");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wlan_spectral_is_feature_disabled_psoc(psoc)) {
|
|
|
+ spectral_info("Spectral feature is disabled");
|
|
|
return QDF_STATUS_COMP_DISABLED;
|
|
|
}
|
|
|
|
|
@@ -535,8 +540,8 @@ wlan_spectral_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc,
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (wlan_spectral_is_feature_disabled(psoc)) {
|
|
|
- spectral_info("Spectral is disabled");
|
|
|
+ if (wlan_spectral_is_feature_disabled_psoc(psoc)) {
|
|
|
+ spectral_info("Spectral feature is disabled");
|
|
|
return QDF_STATUS_COMP_DISABLED;
|
|
|
}
|
|
|
|
|
@@ -560,14 +565,21 @@ wlan_spectral_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg)
|
|
|
struct pdev_spectral *ps = NULL;
|
|
|
struct spectral_context *sc = NULL;
|
|
|
void *target_handle = NULL;
|
|
|
+ QDF_STATUS status;
|
|
|
|
|
|
if (!pdev) {
|
|
|
spectral_err("PDEV is NULL");
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (wlan_spectral_is_feature_disabled(wlan_pdev_get_psoc(pdev))) {
|
|
|
- spectral_info("Spectral is disabled");
|
|
|
+ status = wlan_spectral_init_pdev_feature_caps(pdev);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ spectral_err("Failed to intitialize spectral pdev feature caps");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wlan_spectral_is_feature_disabled_pdev(pdev)) {
|
|
|
+ spectral_info("Spectral feature is disabled");
|
|
|
return QDF_STATUS_COMP_DISABLED;
|
|
|
}
|
|
|
|
|
@@ -615,8 +627,8 @@ wlan_spectral_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (wlan_spectral_is_feature_disabled(wlan_pdev_get_psoc(pdev))) {
|
|
|
- spectral_info("Spectral is disabled");
|
|
|
+ if (wlan_spectral_is_feature_disabled_pdev(pdev)) {
|
|
|
+ spectral_info("Spectral feature is disabled");
|
|
|
return QDF_STATUS_COMP_DISABLED;
|
|
|
}
|
|
|
|