qcacmn: Move reg_get_regd_rules to reg_services_common.c
reg_get_regd_rules is needed to fill the NL_REGDB_UPDATE_EVENT in case of the 6 GHz outdoor AP. Therefore, move reg_get_regd_rules from reg_utils.c to reg_services_common.c. Change-Id: Id99a8bc52ec24044845303fe3772082977962264 CRs-Fixed: 3158134
This commit is contained in:

committed by
Madan Koyyalamudi

parent
3031faee57
commit
409d5044e2
@@ -2557,7 +2557,6 @@ void reg_reset_reg_rules(struct reg_rule_info *reg_rules)
|
|||||||
qdf_mem_zero(reg_rules, sizeof(*reg_rules));
|
qdf_mem_zero(reg_rules, sizeof(*reg_rules));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_REG_CLIENT
|
|
||||||
#ifdef CONFIG_BAND_6GHZ
|
#ifdef CONFIG_BAND_6GHZ
|
||||||
/**
|
/**
|
||||||
* reg_copy_6g_reg_rules() - Copy the 6G reg rules from PSOC to PDEV
|
* 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);
|
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 reg_propagate_mas_chan_list_to_pdev(struct wlan_objmgr_psoc *psoc,
|
||||||
void *object, void *arg)
|
void *object, void *arg)
|
||||||
|
@@ -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);
|
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.
|
* reg_save_reg_rules_to_pdev() - Save psoc reg-rules to pdev.
|
||||||
* @pdev_priv_obj: Pointer to regdb pdev private object.
|
* @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(
|
void reg_save_reg_rules_to_pdev(
|
||||||
struct reg_rule_info *psoc_reg_rules,
|
struct reg_rule_info *psoc_reg_rules,
|
||||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj);
|
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.
|
* reg_compute_pdev_current_chan_list() - Compute pdev current channel list.
|
||||||
|
@@ -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);
|
REG_MAX_SUPP_AP_TYPE + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
||||||
|
}
|
||||||
|
@@ -2517,6 +2517,7 @@ enum channel_state reg_get_chan_state(struct wlan_objmgr_pdev *pdev,
|
|||||||
enum supported_6g_pwr_types
|
enum supported_6g_pwr_types
|
||||||
in_6g_pwr_mode,
|
in_6g_pwr_mode,
|
||||||
bool treat_nol_chan_as_disabled);
|
bool treat_nol_chan_as_disabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reg_get_chan_state_for_320() - Get the channel state of a 320 MHz
|
* reg_get_chan_state_for_320() - Get the channel state of a 320 MHz
|
||||||
* bonded channel.
|
* bonded channel.
|
||||||
@@ -2554,4 +2555,14 @@ reg_get_chan_state_for_320(struct wlan_objmgr_pdev *pdev,
|
|||||||
return CHANNEL_STATE_INVALID;
|
return CHANNEL_STATE_INVALID;
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
@@ -986,30 +986,6 @@ enum country_src reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc,
|
|||||||
return psoc_priv_obj->cc_src;
|
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
|
void reg_reset_ctry_pending_hints(struct wlan_regulatory_psoc_priv_obj
|
||||||
*soc_reg)
|
*soc_reg)
|
||||||
{
|
{
|
||||||
|
@@ -291,16 +291,6 @@ void reg_program_mas_chan_list(struct wlan_objmgr_psoc *psoc,
|
|||||||
struct regulatory_channel *reg_channels,
|
struct regulatory_channel *reg_channels,
|
||||||
uint8_t *alpha2, enum dfs_reg dfs_region);
|
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
|
* reg_get_cc_and_src() - Get country string and country source
|
||||||
* @psoc: Pointer to psoc
|
* @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,
|
static inline enum country_src reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t *alpha2)
|
uint8_t *alpha2)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user