diff --git a/target_if/dfs/src/target_if_dfs.c b/target_if/dfs/src/target_if_dfs.c index da0e178772..ab9d44cd29 100644 --- a/target_if/dfs/src/target_if_dfs.c +++ b/target_if/dfs/src/target_if_dfs.c @@ -214,6 +214,26 @@ static bool target_if_dfs_offload(struct wlan_objmgr_psoc *psoc) wmi_service_dfs_phyerr_offload); } +/** + * target_if_dfs_bangradar_320_supp: Check the service of + * 'wmi_service_bang_radar_320_support' whether the bang radar 320 is + * supported or not. If the service is enabled, then it returns true. + */ + +static bool target_if_dfs_bangradar_320_supp(struct wlan_objmgr_psoc *psoc) +{ + wmi_unified_t wmi_handle; + + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); + if (!wmi_handle) { + target_if_err("null wmi_handle"); + return false; + } + + return wmi_service_enabled(wmi_handle, + wmi_service_bang_radar_320_support); +} + #ifdef WLAN_FEATURE_11BE /** * target_if_dfs_is_radar_found_chan_freq_eq_center_freq: Check whether the @@ -449,6 +469,8 @@ QDF_STATUS target_if_register_dfs_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) target_if_register_dfs_tx_ops_send_avg(dfs_tx_ops); dfs_tx_ops->dfs_is_tgt_offload = &target_if_dfs_offload; + dfs_tx_ops->dfs_is_tgt_bangradar_320_supp = + &target_if_dfs_bangradar_320_supp; dfs_tx_ops->dfs_is_tgt_radar_found_chan_freq_eq_center_freq = &target_if_dfs_is_radar_found_chan_freq_eq_center_freq; diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 04e7ff7de2..601f2a0d91 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1065,6 +1065,7 @@ struct dfs_rcac_params { * @dfs_cac_started_chan: CAC started channel. * @dfs_pdev_obj: DFS pdev object. * @dfs_is_offload_enabled: Set if DFS offload enabled. + * @dfs_is_bangradar_320_supported: Set if DFS 320MHZ enabled. * @dfs_is_radar_found_chan_freq_eq_center_freq: * Set if chan_freq parameter of the radar * found wmi event indicates channel center. @@ -1275,6 +1276,7 @@ struct wlan_dfs { uint16_t dfs_agile_precac_freq_mhz; #endif bool dfs_is_offload_enabled; + bool dfs_is_bangradar_320_supported; bool dfs_is_radar_found_chan_freq_eq_center_freq; int dfs_use_nol; qdf_spinlock_t dfs_nol_lock; diff --git a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c index ff99a0738e..e30e999325 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c @@ -487,6 +487,18 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs_offload %d", dfs->dfs_is_offload_enabled); + if (!dfs_tx_ops->dfs_is_tgt_bangradar_320_supp) { + dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, + "dfs_is_tgt_bangradar_320_supp is null"); + dfs_destroy_object(dfs); + return QDF_STATUS_E_FAILURE; + } + + dfs->dfs_is_bangradar_320_supported = + dfs_tx_ops->dfs_is_tgt_bangradar_320_supp(psoc); + dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs_bangradar_320_support %d", + dfs->dfs_is_bangradar_320_supported); + if (!dfs_tx_ops->dfs_is_tgt_radar_found_chan_freq_eq_center_freq) { dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs_is_radar_found_chan_freq_eq_center_freq is null"); diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 18f5d2f16d..c2ada2a580 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -1130,6 +1130,7 @@ struct wlan_lmac_if_reg_tx_ops { * @dfs_ocac_abort_cmd: Send Off-Channel CAC abort command. * @dfs_is_pdev_5ghz: Check if the given pdev is 5GHz. * @dfs_set_phyerr_filter_offload: Config phyerr filter offload. + * @dfs_is_tgt_bangradar_320_supp: To check host DFS 320MHZ support or not * @dfs_is_tgt_radar_found_chan_freq_eq_center_freq: * Check if chan_freq parameter of the * radar found wmi event points to channel @@ -1181,6 +1182,7 @@ struct wlan_lmac_if_dfs_tx_ops { struct wlan_objmgr_pdev *pdev, bool dfs_phyerr_filter_offload); bool (*dfs_is_tgt_offload)(struct wlan_objmgr_psoc *psoc); + bool (*dfs_is_tgt_bangradar_320_supp)(struct wlan_objmgr_psoc *psoc); bool (*dfs_is_tgt_radar_found_chan_freq_eq_center_freq) (struct wlan_objmgr_psoc *psoc); QDF_STATUS (*dfs_send_offload_enable_cmd)(