diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index 94b3231ce9..f2328e993d 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -2557,7 +2557,6 @@ void reg_reset_reg_rules(struct reg_rule_info *reg_rules) qdf_mem_zero(reg_rules, sizeof(*reg_rules)); } -#ifdef CONFIG_REG_CLIENT #ifdef CONFIG_BAND_6GHZ /** * reg_copy_6g_reg_rules() - Copy the 6G reg rules from PSOC to PDEV @@ -2663,7 +2662,6 @@ void reg_save_reg_rules_to_pdev( qdf_spin_unlock_bh(&pdev_priv_obj->reg_rules_lock); } -#endif /* CONFIG_REG_CLIENT */ void reg_propagate_mas_chan_list_to_pdev(struct wlan_objmgr_psoc *psoc, void *object, void *arg) diff --git a/umac/regulatory/core/src/reg_build_chan_list.h b/umac/regulatory/core/src/reg_build_chan_list.h index 618b6dfe88..aa59d60867 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.h +++ b/umac/regulatory/core/src/reg_build_chan_list.h @@ -77,7 +77,6 @@ void reg_init_pdev_mas_chan_list( */ void reg_set_ap_pwr_type(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); -#ifdef CONFIG_REG_CLIENT /** * reg_save_reg_rules_to_pdev() - Save psoc reg-rules to pdev. * @pdev_priv_obj: Pointer to regdb pdev private object. @@ -85,13 +84,6 @@ void reg_set_ap_pwr_type(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); void reg_save_reg_rules_to_pdev( struct reg_rule_info *psoc_reg_rules, struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); -#else -static inline void -reg_save_reg_rules_to_pdev(struct reg_rule_info *psoc_reg_rules, - struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj) -{ -} -#endif /** * reg_compute_pdev_current_chan_list() - Compute pdev current channel list. diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 7537943e1a..203c19ea9d 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -9222,3 +9222,27 @@ enum reg_6g_ap_type reg_get_best_pwr_mode(struct wlan_objmgr_pdev *pdev, REG_MAX_SUPP_AP_TYPE + 1); } #endif + +QDF_STATUS reg_get_regd_rules(struct wlan_objmgr_pdev *pdev, + struct reg_rule_info *reg_rules) +{ + struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; + + if (!pdev) { + reg_err("pdev is NULL"); + return QDF_STATUS_E_FAILURE; + } + + pdev_priv_obj = reg_get_pdev_obj(pdev); + if (!pdev_priv_obj) { + reg_err("pdev priv obj is NULL"); + return QDF_STATUS_E_FAILURE; + } + + qdf_spin_lock_bh(&pdev_priv_obj->reg_rules_lock); + qdf_mem_copy(reg_rules, &pdev_priv_obj->reg_rules, + sizeof(struct reg_rule_info)); + qdf_spin_unlock_bh(&pdev_priv_obj->reg_rules_lock); + + return QDF_STATUS_SUCCESS; +} diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index c570a1fe8d..fece732044 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -2517,6 +2517,7 @@ enum channel_state reg_get_chan_state(struct wlan_objmgr_pdev *pdev, enum supported_6g_pwr_types in_6g_pwr_mode, bool treat_nol_chan_as_disabled); + /** * reg_get_chan_state_for_320() - Get the channel state of a 320 MHz * bonded channel. @@ -2554,4 +2555,14 @@ reg_get_chan_state_for_320(struct wlan_objmgr_pdev *pdev, return CHANNEL_STATE_INVALID; } #endif + +/** + * reg_get_regd_rules() - provides the reg domain rules info + * @pdev: pdev pointer + * @reg_rules: regulatory rules + * + * Return: QDF_STATUS + */ +QDF_STATUS reg_get_regd_rules(struct wlan_objmgr_pdev *pdev, + struct reg_rule_info *reg_rules); #endif diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index 3a439c1ac3..8dd37bfecd 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -986,30 +986,6 @@ enum country_src reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc, return psoc_priv_obj->cc_src; } -QDF_STATUS reg_get_regd_rules(struct wlan_objmgr_pdev *pdev, - struct reg_rule_info *reg_rules) -{ - struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; - - if (!pdev) { - reg_err("pdev is NULL"); - return QDF_STATUS_E_FAILURE; - } - - pdev_priv_obj = reg_get_pdev_obj(pdev); - if (!pdev_priv_obj) { - reg_err("pdev priv obj is NULL"); - return QDF_STATUS_E_FAILURE; - } - - qdf_spin_lock_bh(&pdev_priv_obj->reg_rules_lock); - qdf_mem_copy(reg_rules, &pdev_priv_obj->reg_rules, - sizeof(struct reg_rule_info)); - qdf_spin_unlock_bh(&pdev_priv_obj->reg_rules_lock); - - return QDF_STATUS_SUCCESS; -} - void reg_reset_ctry_pending_hints(struct wlan_regulatory_psoc_priv_obj *soc_reg) { diff --git a/umac/regulatory/core/src/reg_utils.h b/umac/regulatory/core/src/reg_utils.h index a8476a9714..5dc2c55be9 100644 --- a/umac/regulatory/core/src/reg_utils.h +++ b/umac/regulatory/core/src/reg_utils.h @@ -291,16 +291,6 @@ void reg_program_mas_chan_list(struct wlan_objmgr_psoc *psoc, struct regulatory_channel *reg_channels, uint8_t *alpha2, enum dfs_reg dfs_region); -/** - * reg_get_regd_rules() - provides the reg domain rules info - * @pdev: pdev pointer - * @reg_rules: regulatory rules - * - * Return: QDF_STATUS - */ -QDF_STATUS reg_get_regd_rules(struct wlan_objmgr_pdev *pdev, - struct reg_rule_info *reg_rules); - /** * reg_get_cc_and_src() - Get country string and country source * @psoc: Pointer to psoc @@ -425,12 +415,6 @@ static inline void reg_program_mas_chan_list( { } -static inline QDF_STATUS reg_get_regd_rules(struct wlan_objmgr_pdev *pdev, - struct reg_rule_info *reg_rules) -{ - return QDF_STATUS_SUCCESS; -} - static inline enum country_src reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc, uint8_t *alpha2) {