qcacmn: Move reg_is_regdb_offloaded to reg_services_common.c

Currently, the function "reg_is_regdb_offloaded" always return false
for WIN as "reg_is_regdb_offloaded" is a "static inline" one-line
function defined in a header file "reg_utils.h". Make it common for
both WIN and MCC by moving it to the "reg_services_common.c" file.

Also, by default, initialize the variable
enable_5dot9_ghz_chan_in_master_mode as true for WIN and false for MCC,
in the function wlan_regulatory_psoc_obj_created_notification as
MCC does not support it by default and WIN does it.

Change-Id: Ica023ec0788e1dd6973fef59e33e6e64c336ba26
CRs-Fixed: 2829674
This commit is contained in:
Hariharan Basuthkar
2020-11-24 14:01:29 +05:30
zatwierdzone przez snandini
rodzic f233d51efa
commit 16550e216e
5 zmienionych plików z 45 dodań i 27 usunięć

Wyświetl plik

@@ -65,6 +65,30 @@ struct wlan_regulatory_pdev_priv_obj *reg_get_pdev_obj(
return pdev_reg;
}
/*
* reg_set_5dot9_ghz_chan_in_master_mode - Set 5.9GHz channels to operate
* in master mode.
* @soc_reg_obj - Pointer to soc_reg_obj.
*
* Return: void
*
*/
#ifdef CONFIG_REG_CLIENT
static void
reg_set_5dot9_ghz_chan_in_master_mode(struct wlan_regulatory_psoc_priv_obj
*soc_reg_obj)
{
soc_reg_obj->enable_5dot9_ghz_chan_in_master_mode = false;
}
#else
static void
reg_set_5dot9_ghz_chan_in_master_mode(struct wlan_regulatory_psoc_priv_obj
*soc_reg_obj)
{
soc_reg_obj->enable_5dot9_ghz_chan_in_master_mode = true;
}
#endif
QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
struct wlan_objmgr_psoc *psoc, void *arg_list)
{
@@ -94,7 +118,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
soc_reg_obj->enable_srd_chan_in_master_mode = 0xFF;
soc_reg_obj->enable_11d_in_world_mode = false;
soc_reg_obj->five_dot_nine_ghz_supported = false;
soc_reg_obj->enable_5dot9_ghz_chan_in_master_mode = false;
reg_set_5dot9_ghz_chan_in_master_mode(soc_reg_obj);
soc_reg_obj->retain_nol_across_regdmn_update = false;
for (i = 0; i < MAX_STA_VDEV_CNT; i++)

Wyświetl plik

@@ -4324,3 +4324,16 @@ QDF_STATUS reg_get_unspecified_ap_usable(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_SUCCESS;
}
#endif
bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!psoc_priv_obj) {
reg_err("reg psoc private obj is NULL");
return false;
}
return psoc_priv_obj->offload_enabled;
}

Wyświetl plik

@@ -1457,4 +1457,11 @@ reg_modify_chan_list_for_max_chwidth(struct wlan_objmgr_pdev *pdev,
*/
bool reg_is_phymode_unallowed(enum reg_phymode phy_in, uint32_t phymode_bitmap);
/*
* reg_is_regdb_offloaded() - is regdb offloaded
* @psoc: Pointer to psoc object
*
* Return: true if regdb is offloaded, else false
*/
bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc);
#endif

Wyświetl plik

@@ -813,19 +813,6 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
return status;
}
bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!psoc_priv_obj) {
reg_err("reg psoc private obj is NULL");
return false;
}
return psoc_priv_obj->offload_enabled;
}
void reg_program_mas_chan_list(struct wlan_objmgr_psoc *psoc,
struct regulatory_channel *reg_channels,
uint8_t *alpha2,

Wyświetl plik

@@ -300,14 +300,6 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
struct reg_config_vars config_vars);
/**
* reg_is_regdb_offloaded() - is regdb offloaded
* @psoc: Pointer to psoc object
*
* Return: true if regdb is offloaded, else false
*/
bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc);
/**
* reg_program_mas_chan_list() - Program the master channel list
* @psoc: Pointer to psoc structure
@@ -420,11 +412,6 @@ static inline QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
static inline bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline void reg_program_mas_chan_list(
struct wlan_objmgr_psoc *psoc,
struct regulatory_channel *reg_channels,