From 81fe50a9c41eef3f84323b0b65712aa4e05fe498 Mon Sep 17 00:00:00 2001 From: bings Date: Mon, 27 Nov 2017 14:33:26 +0800 Subject: [PATCH] qcacld-3.0: Restore WMI_DFS_RADAR_EVENTID for Rome FW Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors. Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW requirement. CRs-Fixed: 2149939 Change-Id: I7a5c4f723bedfdeb477ac36ac1290809ca06fb13 --- core/hdd/src/wlan_hdd_main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 06c57e164a8e..d7a071f66ead 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -123,6 +123,7 @@ #include "os_if_nan.h" #include "nan_public_structs.h" #include "wlan_reg_ucfg_api.h" +#include "wlan_dfs_ucfg_api.h" #include "wlan_hdd_rx_monitor.h" #include "sme_power_save_api.h" #include "enet.h" @@ -12785,6 +12786,29 @@ static void hdd_update_score_config( } +/** + * hdd_update_dfs_config() - API to update dfs configuration parameters. + * @hdd_ctx: HDD context + * + * Return: 0 if success else err + */ +static int hdd_update_dfs_config(struct hdd_context *hdd_ctx) +{ + struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc; + struct hdd_config *cfg = hdd_ctx->config; + struct dfs_user_config dfs_cfg; + QDF_STATUS status; + + dfs_cfg.dfs_is_phyerr_filter_offload = !!cfg->fDfsPhyerrFilterOffload; + status = ucfg_dfs_update_config(psoc, &dfs_cfg); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("failed dfs psoc configuration"); + return -EINVAL; + } + + return 0; +} + /** * hdd_update_scan_config - API to update scan configuration parameters * @hdd_ctx: HDD context @@ -12849,6 +12873,10 @@ int hdd_update_components_config(struct hdd_context *hdd_ctx) return ret; ret = hdd_update_dp_config(hdd_ctx); + if (ret) + return ret; + + ret = hdd_update_dfs_config(hdd_ctx); return ret; }