diff --git a/components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h b/components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h index a3ab0cb6a6d7..a29a1615bc16 100644 --- a/components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h +++ b/components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h @@ -347,22 +347,18 @@ QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc, /** * ucfg_fwol_get_sae_enable() - Get SAE feature enable status * @psoc: pointer to the psoc object - * @sae_enable: Pointer to return SAE feature enable status * - * Return: QDF Status + * Return: True if enabled else false */ -QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc, - bool *sae_enable); +bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc); /** * ucfg_fwol_get_gcmp_enable() - Get GCMP feature enable status * @psoc: pointer to the psoc object - * @gcmp_enable: Pointer to return GCMP feature enable status * - * Return: QDF Status + * Return: True if enabled else false */ -QDF_STATUS ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc, - bool *gcmp_enable); +bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc); /** * ucfg_fwol_get_enable_tx_sch_delay() - Get enable tx sch delay diff --git a/components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c b/components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c index b461e9ad5ee3..01ba6a4834b1 100644 --- a/components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c +++ b/components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c @@ -590,43 +590,20 @@ QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc, } #ifdef WLAN_FEATURE_SAE -QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc, - bool *sae_enable) +bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc) { - struct wlan_fwol_psoc_obj *fwol_obj; - - fwol_obj = fwol_get_psoc_obj(psoc); - if (!fwol_obj) { - fwol_err("Failed to get FWOL obj"); - *sae_enable = cfg_default(CFG_IS_SAE_ENABLED); - return QDF_STATUS_E_FAILURE; - } - - *sae_enable = fwol_obj->cfg.sae_enable; - return QDF_STATUS_SUCCESS; + return cfg_get(psoc, CFG_IS_SAE_ENABLED); } #else -QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc, - bool *sae_enable) +bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc) { - return QDF_STATUS_E_NOSUPPORT; + return false; } #endif -QDF_STATUS ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc, - bool *gcmp_enable) +bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc) { - struct wlan_fwol_psoc_obj *fwol_obj; - - fwol_obj = fwol_get_psoc_obj(psoc); - if (!fwol_obj) { - fwol_err("Failed to get FWOL obj"); - *gcmp_enable = cfg_default(CFG_ENABLE_GCMP); - return QDF_STATUS_E_FAILURE; - } - - *gcmp_enable = fwol_obj->cfg.gcmp_enable; - return QDF_STATUS_SUCCESS; + return cfg_get(psoc, CFG_ENABLE_GCMP); } QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc, diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a26a430c23e7..f13d94a97937 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12624,25 +12624,20 @@ static void wlan_hdd_cfg80211_set_wiphy_scan_flags(struct wiphy *wiphy) /** * wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature * @wiphy: Pointer to wiphy - * @config: pointer to config * * This function is used to indicate the support of SAE * * Return: None */ -static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy, - struct hdd_config *config) +static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy) { struct hdd_context *hdd_ctx = wiphy_priv(wiphy); - bool sae_enable; - ucfg_fwol_get_sae_enable(hdd_ctx->psoc, &sae_enable); - if (sae_enable) + if (ucfg_fwol_get_sae_enable(hdd_ctx->psoc)) wiphy->features |= NL80211_FEATURE_SAE; } #else -static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy, - struct hdd_config *config) +static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy) { } #endif @@ -12764,7 +12759,6 @@ int wlan_hdd_cfg80211_init(struct device *dev, int num_dsrc_ch, len_dsrc_ch, num_srd_ch, len_srd_ch; uint32_t *cipher_suites; uint8_t allow_mcc_go_diff_bi = 0, enable_mcc = 0; - bool gcmp_enabled = false; hdd_enter(); @@ -12803,7 +12797,7 @@ int wlan_hdd_cfg80211_init(struct device *dev, wlan_hdd_cfg80211_set_wiphy_scan_flags(wiphy); - wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy, pCfg); + wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy); hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg); wlan_hdd_cfg80211_add_connected_pno_support(wiphy); @@ -12898,11 +12892,7 @@ int wlan_hdd_cfg80211_init(struct device *dev, } /*Initialise the supported cipher suite details */ - if (QDF_IS_STATUS_ERROR(ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc, - &gcmp_enabled))) - hdd_err("Unable to get GCMP feature enable config param"); - - if (gcmp_enabled) { + if (ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc)) { cipher_suites = qdf_mem_malloc(sizeof(hdd_cipher_suites) + sizeof(hdd_gcmp_cipher_suits)); if (!cipher_suites) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 5ae9f053897a..89ec8f66921d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11307,13 +11307,8 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx) if (0 != wlan_hdd_set_wow_pulse(hdd_ctx, true)) hdd_debug("Failed to set wow pulse"); - bval = false; - if (QDF_IS_STATUS_ERROR(ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc, - &bval))) - hdd_err("Unable to get GCMP enable config param"); - sme_cli_set_command(0, WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, - bval, PDEV_CMD); + ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc), PDEV_CMD); auto_power_fail_mode = ucfg_pmo_get_auto_power_fail_mode(hdd_ctx->psoc);