diff --git a/target_if/regulatory/src/target_if_reg.c b/target_if/regulatory/src/target_if_reg.c index 666324cab10b..04965082e817 100644 --- a/target_if/regulatory/src/target_if_reg.c +++ b/target_if/regulatory/src/target_if_reg.c @@ -228,8 +228,12 @@ target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc) return reg_ext_cc_supp; } - if (reg_tx_ops->register_master_ext_handler) + if (reg_tx_ops->register_master_ext_handler) { reg_ext_cc_supp = true; + wlan_psoc_nif_fw_ext_cap_set(psoc, + WLAN_SOC_EXT_EVENT_SUPPORTED); + } + return reg_ext_cc_supp; } diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h index ace94f484fb6..453fec522438 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h @@ -146,6 +146,8 @@ #define WLAN_SOC_CEXT_SCAN_PER_CH_CONFIG 0x01000000 /* CAPABILITY: csa offload in case of AP */ #define WLAN_SOC_CEXT_CSA_TX_OFFLOAD 0x02000000 + /* ext event supported by fw */ +#define WLAN_SOC_EXT_EVENT_SUPPORTED 0x04000000 /* feature_flags */ /* CONF: ATH FF enabled */ diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index ae7a45681b23..1e781c36e7c2 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -1046,15 +1046,31 @@ static void reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj) { - qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list, - pdev_priv_obj->cur_chan_list, - (NUM_CHANNELS - NUM_6GHZ_CHANNELS) * - sizeof(struct regulatory_channel)); - qdf_mem_copy(&pdev_priv_obj-> + struct wlan_objmgr_psoc *psoc; + + psoc = wlan_pdev_get_psoc(pdev_priv_obj->pdev_ptr); + if (!psoc) { + reg_err("psoc is NULL"); + return; + } + if (wlan_psoc_nif_fw_ext_cap_get(psoc, + WLAN_SOC_EXT_EVENT_SUPPORTED)) { + qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list, + pdev_priv_obj->cur_chan_list, + (NUM_CHANNELS - NUM_6GHZ_CHANNELS) * + sizeof(struct regulatory_channel)); + + qdf_mem_copy(&pdev_priv_obj-> secondary_cur_chan_list[MIN_6GHZ_CHANNEL], pdev_priv_obj->mas_chan_list_6g_ap [pdev_priv_obj->reg_cur_6g_ap_pwr_type], NUM_6GHZ_CHANNELS * sizeof(struct regulatory_channel)); + } else { + qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list, + pdev_priv_obj->cur_chan_list, + (NUM_CHANNELS) * + sizeof(struct regulatory_channel)); + } } #else /* CONFIG_REG_CLIENT */ static void