diff --git a/target_if/core/inc/target_if.h b/target_if/core/inc/target_if.h index ce01468430..fa1cb0ab46 100644 --- a/target_if/core/inc/target_if.h +++ b/target_if/core/inc/target_if.h @@ -2573,4 +2573,15 @@ static inline enum QDF_GLOBAL_MODE target_psoc_get_device_mode return psoc_info->info.device_mode; } + +/** + * target_if_set_reg_cc_ext_supp() - Set reg_cc_ext_supp capability + * in WMI_INIT_CMD based on host capability of reg_cc_ext_event. + * + * @tgt_hdl: Pointer to struct target_psoc_info. + * @psoc: Pointer to struct wlan_objmgr_psoc. + * + */ +void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl, + struct wlan_objmgr_psoc *psoc); #endif diff --git a/target_if/core/src/target_if_main.c b/target_if/core/src/target_if_main.c index 39c73970ab..2c9bde2bd5 100644 --- a/target_if/core/src/target_if_main.c +++ b/target_if/core/src/target_if_main.c @@ -844,3 +844,17 @@ target_pdev_scan_radio_is_dfs_enabled(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_E_INVAL; } + +void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl, + struct wlan_objmgr_psoc *psoc) +{ + struct tgt_info *info; + + if (!tgt_hdl) + return; + + info = (&tgt_hdl->info); + + info->wlan_res_cfg.is_reg_cc_ext_event_supported = + target_if_reg_is_reg_cc_ext_event_host_supported(psoc); +} diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index ece7715d0c..fc4dc8b5ce 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -274,6 +274,10 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle, if (err_code) goto exit; + if (wmi_service_enabled(wmi_handle, + wmi_service_reg_cc_ext_event_support)) + target_if_set_reg_cc_ext_supp(tgt_hdl, psoc); + /* dbr_ring_caps could have already come as part of EXT event */ if (info->service_ext2_param.num_dbr_ring_caps) { err_code = init_deinit_populate_dbr_ring_cap_ext2(psoc, diff --git a/target_if/regulatory/inc/target_if_reg.h b/target_if/regulatory/inc/target_if_reg.h index 48f89fb959..634663ccf0 100644 --- a/target_if/regulatory/inc/target_if_reg.h +++ b/target_if/regulatory/inc/target_if_reg.h @@ -64,6 +64,16 @@ QDF_STATUS target_if_reg_set_6ghz_info(struct wlan_objmgr_psoc *psoc); */ QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc); +/** + * target_if_reg_is_reg_cc_ext_event_host_supported() - Populate if reg_cc_ext + * event is supported by host. + * @psoc: psoc pointer + * + * Return: True if host supports, false otherwise. + */ +bool +target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc); + /** * target_if_regulatory_get_rx_ops() - Get regdb rx ops * @psoc: pointer to psoc object @@ -81,4 +91,13 @@ target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc); * Return: Success or Failure */ QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc); + +/** + * target_if_regulatory_get_tx_ops() - Get regdb tx ops + * @psoc: pointer to psoc object + * + * Return: Reg tx_ops + */ +struct wlan_lmac_if_reg_tx_ops * +target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc); #endif /* __TARGET_IF_REG_H__ */ diff --git a/target_if/regulatory/src/target_if_reg.c b/target_if/regulatory/src/target_if_reg.c index f30f4ea8b4..a540b645e7 100644 --- a/target_if/regulatory/src/target_if_reg.c +++ b/target_if/regulatory/src/target_if_reg.c @@ -144,6 +144,20 @@ target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc) return &rx_ops->reg_rx_ops; } +struct wlan_lmac_if_reg_tx_ops * +target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_lmac_if_tx_ops *tx_ops; + + tx_ops = wlan_psoc_get_lmac_if_txops(psoc); + if (!tx_ops) { + target_if_err("tx_ops is NULL"); + return NULL; + } + + return &tx_ops->reg_ops; +} + QDF_STATUS target_if_reg_set_offloaded_info(struct wlan_objmgr_psoc *psoc) { struct wlan_lmac_if_reg_rx_ops *reg_rx_ops; @@ -202,6 +216,24 @@ QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_SUCCESS; } +bool +target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_lmac_if_reg_tx_ops *reg_tx_ops; + bool reg_ext_cc_supp = false; + + reg_tx_ops = target_if_regulatory_get_tx_ops(psoc); + if (!reg_tx_ops) { + target_if_err("reg_tx_ops is NULL"); + return reg_ext_cc_supp; + } + + if (reg_tx_ops->register_master_ext_handler) + reg_ext_cc_supp = true; + + return reg_ext_cc_supp; +} + /** * tgt_reg_chan_list_update_handler() - Channel list update handler * @handle: scn handle 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 9c6bb9025b..719e26bdb5 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 @@ -861,12 +861,10 @@ struct wlan_lmac_if_reg_tx_ops { void *arg); QDF_STATUS (*unregister_master_handler)(struct wlan_objmgr_psoc *psoc, void *arg); -#ifdef CONFIG_BAND_6GHZ QDF_STATUS (*register_master_ext_handler)(struct wlan_objmgr_psoc *psoc, void *arg); QDF_STATUS (*unregister_master_ext_handler) (struct wlan_objmgr_psoc *psoc, void *arg); -#endif QDF_STATUS (*set_country_code)(struct wlan_objmgr_psoc *psoc, void *arg); QDF_STATUS (*fill_umac_legacy_chanlist)(struct wlan_objmgr_pdev *pdev, diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 89b8b797a5..bf34c0e384 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5108,6 +5108,7 @@ typedef enum { wmi_service_go_connected_d3_wow, wmi_service_ext_tpc_reg_support, wmi_service_ndi_txbf_support, + wmi_service_reg_cc_ext_event_support, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF @@ -5247,6 +5248,7 @@ struct wmi_host_fw_abi_ver { * @ast_tid_low_mask_enable: enable tid valid mask for low priority flow * @nan_separate_iface_support: Separate iface creation for NAN * @time_sync_ftm: enable ftm based time sync + * @is_reg_cc_ext_event_supported: Flag to indicate if reg_cc_ext is supported * @max_rnr_neighbours: Max supported RNR neighbors in multisoc APs * @ema_max_vap_cnt: Number of maximum EMA tx-vaps at any instance of time * @ema_max_profile_period: Maximum EMA profile periodicity on any pdev @@ -5354,6 +5356,7 @@ typedef struct { ast_tid_low_mask_enable:8; bool nan_separate_iface_support; bool time_sync_ftm; + bool is_reg_cc_ext_event_supported; uint32_t max_rnr_neighbours; uint32_t ema_max_vap_cnt; uint32_t ema_max_profile_period; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 4607937ca8..7d565d8246 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -7339,6 +7339,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, if (tgt_res_cfg->is_go_connected_d3wow_enabled) WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET( resource_cfg->flags2, 1); + + WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET( + resource_cfg->host_service_flags, + tgt_res_cfg->is_reg_cc_ext_event_supported); } /* copy_hw_mode_id_in_init_cmd() - Helper routine to copy hw_mode in init cmd @@ -15762,6 +15766,8 @@ static void populate_tlv_service(uint32_t *wmi_service) WMI_SERVICE_EXT_TPC_REG_SUPPORT; wmi_service[wmi_service_ndi_txbf_support] = WMI_SERVICE_NDI_TXBF_SUPPORT; + wmi_service[wmi_service_reg_cc_ext_event_support] = + WMI_SERVICE_REG_CC_EXT_EVENT_SUPPORT; } /**