qcacmn: Ignore regulatory offload indication from FW

Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.

Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
This commit is contained in:
Rajeev Kumar Sirasanagandla
2019-08-05 21:35:14 +05:30
committed by nshrivas
parent f3f9797014
commit 816b503c44
11 changed files with 96 additions and 0 deletions

View File

@@ -984,6 +984,7 @@ struct wlan_lmac_if_reg_rx_ops {
bool dfs_enable);
QDF_STATUS (*reg_modify_pdev_chan_range)(struct
wlan_objmgr_pdev *pdev);
bool (*reg_ignore_fw_reg_offload_ind)(struct wlan_objmgr_psoc *psoc);
};
#ifdef CONVERGED_P2P_ENABLE

View File

@@ -316,6 +316,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(
rx_ops->reg_rx_ops.reg_modify_pdev_chan_range =
wlan_reg_modify_pdev_chan_range;
rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind =
tgt_reg_ignore_fw_reg_offload_ind;
}
#ifdef CONVERGED_P2P_ENABLE

View File

@@ -86,6 +86,7 @@ struct chan_change_cbk_entry {
* country update is pending for pdev (phy_id).
* @world_country_pending: In this array, element[phy_id] is true if any world
* country update is pending for pdev (phy_id).
* @ignore_fw_reg_offload_ind: Ignore FW reg offload indication
*/
struct wlan_regulatory_psoc_priv_obj {
struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
@@ -104,6 +105,7 @@ struct wlan_regulatory_psoc_priv_obj {
bool dfs_enabled;
enum band_info band_capability;
bool indoor_chan_enabled;
bool ignore_fw_reg_offload_ind;
bool enable_11d_supp_original;
bool enable_11d_supp;
bool is_11d_offloaded;

View File

@@ -3383,3 +3383,29 @@ enum reg_wifi_band reg_freq_to_band(uint16_t freq)
return REG_BAND_UNKNOWN;
}
#endif /* CONFIG_CHAN_FREQ_API */
QDF_STATUS reg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_reg;
psoc_reg = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_reg)) {
reg_err("psoc reg component is NULL");
return QDF_STATUS_E_INVAL;
}
psoc_reg->ignore_fw_reg_offload_ind = true;
return QDF_STATUS_SUCCESS;
}
bool reg_get_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_reg;
psoc_reg = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_reg))
return false;
return psoc_reg->ignore_fw_reg_offload_ind;
}

View File

@@ -905,4 +905,22 @@ uint16_t reg_min_chan_freq(void);
uint16_t reg_max_chan_freq(void);
#endif /* CONFIG_CHAN_FREQ_API */
/**
* reg_set_ignore_fw_reg_offload_ind() - Set if regdb offload indication
* needs to be ignored
* @psoc: Pointer to psoc
*
* Return: QDF_STATUS
*/
QDF_STATUS reg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc);
/**
* reg_get_ignore_fw_reg_offload_ind() - Check whether regdb offload indication
* needs to be ignored
*
* @psoc: Pointer to psoc
*/
bool reg_get_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc);
#endif

View File

@@ -65,4 +65,13 @@ QDF_STATUS tgt_reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS tgt_reg_process_ch_avoid_event(struct wlan_objmgr_psoc *psoc,
struct ch_avoid_ind_type *ch_avoid_evnt);
/**
* tgt_reg_ignore_fw_reg_offload_ind() - Check whether regdb offload indication
* from FW needs to be ignored.
*
* @psoc: Pointer to psoc
*/
bool tgt_reg_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc);
#endif

View File

@@ -371,4 +371,13 @@ struct wlan_psoc_host_hal_reg_capabilities_ext *ucfg_reg_get_hal_reg_cap(
QDF_STATUS ucfg_reg_set_hal_reg_cap(struct wlan_objmgr_psoc *psoc,
struct wlan_psoc_host_hal_reg_capabilities_ext *reg_cap,
uint16_t phy_cnt);
/**
* ucfg_set_ignore_fw_reg_offload_ind() - API to set ignore regdb offload ind
* @psoc: psoc ptr
*
* Return: QDF_STATUS
*/
QDF_STATUS ucfg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc);
#endif

View File

@@ -70,3 +70,8 @@ QDF_STATUS tgt_reg_process_ch_avoid_event(struct wlan_objmgr_psoc *psoc,
{
return reg_process_ch_avoid_event(psoc, ch_avoid_evnt);
}
bool tgt_reg_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc)
{
return reg_get_ignore_fw_reg_offload_ind(psoc);
}

View File

@@ -328,3 +328,8 @@ void ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
reg_restore_cached_channels(pdev);
}
#endif
QDF_STATUS ucfg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc)
{
return reg_set_ignore_fw_reg_offload_ind(psoc);
}