qcacld-3.0: Add static cfg items and APIs for AFC feature
Add 4 static cfg items for AFC feature: CFG_AFC_REG_NO_ACTION, CFG_6GHZ_SP_POWER_MODE_SUPP, CFG_AFC_TIMER_CHECK_DIS, CFG_AFC_REQ_ID_CHECK_DIS. Add APIs to pass these settings to psoc private of regulatory component. Change-Id: I61114fb7bf7d84f939265629bde78813b6295e39 CRs-Fixed: 3153987
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c648b4bd1d
commit
58ce19c7e0
@@ -2738,6 +2738,24 @@ static void mlme_init_powersave_params(struct wlan_objmgr_psoc *psoc,
|
|||||||
cfg_get(psoc, CFG_DTIM_SELECTION_DIVERSITY);
|
cfg_get(psoc, CFG_DTIM_SELECTION_DIVERSITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
|
||||||
|
static void mlme_init_afc_cfg(struct wlan_mlme_reg *reg)
|
||||||
|
{
|
||||||
|
reg->enable_6ghz_sp_pwrmode_supp =
|
||||||
|
cfg_default(CFG_6GHZ_SP_POWER_MODE_SUPP);
|
||||||
|
reg->afc_disable_timer_check =
|
||||||
|
cfg_default(CFG_AFC_TIMER_CHECK_DIS);
|
||||||
|
reg->afc_disable_request_id_check =
|
||||||
|
cfg_default(CFG_AFC_REQ_ID_CHECK_DIS);
|
||||||
|
reg->is_afc_reg_noaction =
|
||||||
|
cfg_default(CFG_AFC_REG_NO_ACTION);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void mlme_init_afc_cfg(struct wlan_mlme_reg *reg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MWS_COEX
|
#ifdef MWS_COEX
|
||||||
static void mlme_init_mwc_cfg(struct wlan_objmgr_psoc *psoc,
|
static void mlme_init_mwc_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_mlme_mwc *mwc)
|
struct wlan_mlme_mwc *mwc)
|
||||||
@@ -2833,6 +2851,7 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
reg->enable_nan_on_indoor_channels =
|
reg->enable_nan_on_indoor_channels =
|
||||||
cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN);
|
cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN);
|
||||||
|
|
||||||
|
mlme_init_afc_cfg(reg);
|
||||||
mlme_init_acs_avoid_freq_list(psoc, reg);
|
mlme_init_acs_avoid_freq_list(psoc, reg);
|
||||||
mlme_init_coex_unsafe_chan_cfg(psoc, reg);
|
mlme_init_coex_unsafe_chan_cfg(psoc, reg);
|
||||||
mlme_init_coex_unsafe_chan_reg_disable_cfg(psoc, reg);
|
mlme_init_coex_unsafe_chan_reg_disable_cfg(psoc, reg);
|
||||||
|
@@ -311,6 +311,84 @@
|
|||||||
1, \
|
1, \
|
||||||
"Enable Pending list req")
|
"Enable Pending list req")
|
||||||
|
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_AFC_SUPPORT)
|
||||||
|
/*
|
||||||
|
* afc_reg_no_action - Whether action to AFC response
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This cfg is used to control whether action to AFC response.
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: SAP
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define CFG_AFC_REG_NO_ACTION CFG_BOOL( \
|
||||||
|
"afc_reg_no_action", false, \
|
||||||
|
"driver/user space action needed for afc resp")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* enable_6ghz_sp_pwrmode_supp - Enable 6Ghz SP power mode
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 1
|
||||||
|
*
|
||||||
|
* This cfg is used to control support of 6Ghz SP power mode.
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: SAP
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define CFG_6GHZ_SP_POWER_MODE_SUPP CFG_BOOL( \
|
||||||
|
"enable_6ghz_sp_pwrmode_supp", true, \
|
||||||
|
"Enable support for SP Power mode in 6GHz")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* afc_disable_timer_check - Disable AFC timer check
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This cfg is used to control whether disable AFC timer check.
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: SAP
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define CFG_AFC_TIMER_CHECK_DIS CFG_BOOL( \
|
||||||
|
"afc_disable_timer_check", false, \
|
||||||
|
"Disable the AFC request timer in FW")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* afc_disable_request_id_check - Disable AFC request id check
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to control whether disable AFC request id check.
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: SAP
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define CFG_AFC_REQ_ID_CHECK_DIS CFG_BOOL( \
|
||||||
|
"afc_disable_request_id_check", false, \
|
||||||
|
"Disable the AFC request ID check in FW")
|
||||||
|
|
||||||
|
#define CFG_AFC_REG_ALL \
|
||||||
|
CFG(CFG_AFC_REG_NO_ACTION) \
|
||||||
|
CFG(CFG_6GHZ_SP_POWER_MODE_SUPP) \
|
||||||
|
CFG(CFG_AFC_TIMER_CHECK_DIS) \
|
||||||
|
CFG(CFG_AFC_REQ_ID_CHECK_DIS)
|
||||||
|
#else
|
||||||
|
#define CFG_AFC_REG_ALL
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* retain_nol_across_regdmn - Retain NOL across reg domain
|
* retain_nol_across_regdmn - Retain NOL across reg domain
|
||||||
@@ -392,6 +470,7 @@
|
|||||||
CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
|
CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
|
||||||
CFG(CFG_SCAN_11D_INTERVAL) \
|
CFG(CFG_SCAN_11D_INTERVAL) \
|
||||||
CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
|
CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
|
||||||
|
CFG_AFC_REG_ALL \
|
||||||
CFG(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN) \
|
CFG(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN) \
|
||||||
CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
|
CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
|
||||||
|
|
||||||
|
@@ -2537,6 +2537,10 @@ enum mlme_reg_srd_master_modes {
|
|||||||
* list command to FW till the current scan is complete.
|
* list command to FW till the current scan is complete.
|
||||||
* @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
|
* @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
|
||||||
* @enable_nan_on_indoor_channels: Enable nan on Indoor channels
|
* @enable_nan_on_indoor_channels: Enable nan on Indoor channels
|
||||||
|
* @enable_6ghz_sp_pwrmode_supp: Enable 6 GHz SP mode support
|
||||||
|
* @afc_disable_timer_check: Disable AFC timer check
|
||||||
|
* @afc_disable_request_id_check: Disable AFC request id check
|
||||||
|
* @is_afc_reg_noaction: Whether no action to AFC power event
|
||||||
* @coex_unsafe_chan_nb_user_prefer: Honor coex unsafe freq event from firmware
|
* @coex_unsafe_chan_nb_user_prefer: Honor coex unsafe freq event from firmware
|
||||||
* or not
|
* or not
|
||||||
* @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
|
* @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
|
||||||
@@ -2561,6 +2565,12 @@ struct wlan_mlme_reg {
|
|||||||
bool enable_pending_chan_list_req;
|
bool enable_pending_chan_list_req;
|
||||||
bool retain_nol_across_regdmn_update;
|
bool retain_nol_across_regdmn_update;
|
||||||
bool enable_nan_on_indoor_channels;
|
bool enable_nan_on_indoor_channels;
|
||||||
|
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
|
||||||
|
bool enable_6ghz_sp_pwrmode_supp;
|
||||||
|
bool afc_disable_timer_check;
|
||||||
|
bool afc_disable_request_id_check;
|
||||||
|
bool is_afc_reg_noaction;
|
||||||
|
#endif
|
||||||
#ifdef FEATURE_WLAN_CH_AVOID_EXT
|
#ifdef FEATURE_WLAN_CH_AVOID_EXT
|
||||||
bool coex_unsafe_chan_nb_user_prefer;
|
bool coex_unsafe_chan_nb_user_prefer;
|
||||||
bool coex_unsafe_chan_reg_disable;
|
bool coex_unsafe_chan_reg_disable;
|
||||||
|
@@ -4763,6 +4763,77 @@ ucfg_mlme_get_vdev_max_mcs_idx(struct wlan_objmgr_vdev *vdev)
|
|||||||
}
|
}
|
||||||
#endif /* WLAN_FEATURE_SON */
|
#endif /* WLAN_FEATURE_SON */
|
||||||
|
|
||||||
|
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_enable_6ghz_sp_mode_support() - Get 6 GHz SP mode support cfg
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: value to be set
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_afc_disable_timer_check() - Get AFC timer check cfg
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: value to be set
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value);
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_afc_disable_request_id_check() - Get AFC request id check cfg
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: value to be set
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_afc_reg_noaction() - Get AFC no action cfg
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: value to be set
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_reg_noaction(struct wlan_objmgr_psoc *psoc, bool *value);
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
ucfg_mlme_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_reg_noaction(struct wlan_objmgr_psoc *psoc, bool *value)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONNECTION_ROAMING_CFG
|
#ifdef CONNECTION_ROAMING_CFG
|
||||||
/**
|
/**
|
||||||
* ucfg_mlme_set_connection_roaming_ini_present() - Set connection roaming ini
|
* ucfg_mlme_set_connection_roaming_ini_present() - Set connection roaming ini
|
||||||
|
@@ -1835,6 +1835,67 @@ bool ucfg_mlme_get_coex_unsafe_chan_reg_disable(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.reg.enable_6ghz_sp_pwrmode_supp;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.reg.afc_disable_timer_check;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.reg.afc_disable_request_id_check;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_get_afc_reg_noaction(struct wlan_objmgr_psoc *psoc, bool *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||||
|
if (!mlme_obj)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.reg.is_afc_reg_noaction;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONNECTION_ROAMING_CFG
|
#ifdef CONNECTION_ROAMING_CFG
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
ucfg_mlme_set_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
|
ucfg_mlme_set_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
|
||||||
|
@@ -255,6 +255,38 @@ void hdd_update_coex_unsafe_chan_reg_disable(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
|
||||||
|
static inline
|
||||||
|
void hdd_update_afc_config(struct hdd_context *hdd_ctx,
|
||||||
|
struct reg_config_vars *config_vars)
|
||||||
|
{
|
||||||
|
bool enable_6ghz_sp_pwrmode_supp = false;
|
||||||
|
bool afc_disable_timer_check = false;
|
||||||
|
bool afc_disable_request_id_check = false;
|
||||||
|
bool is_afc_reg_noaction = false;
|
||||||
|
|
||||||
|
ucfg_mlme_get_enable_6ghz_sp_mode_support(hdd_ctx->psoc,
|
||||||
|
&enable_6ghz_sp_pwrmode_supp);
|
||||||
|
config_vars->enable_6ghz_sp_pwrmode_supp = enable_6ghz_sp_pwrmode_supp;
|
||||||
|
ucfg_mlme_get_afc_disable_timer_check(hdd_ctx->psoc,
|
||||||
|
&afc_disable_timer_check);
|
||||||
|
config_vars->afc_disable_timer_check = afc_disable_timer_check;
|
||||||
|
ucfg_mlme_get_afc_disable_request_id_check(
|
||||||
|
hdd_ctx->psoc, &afc_disable_request_id_check);
|
||||||
|
config_vars->afc_disable_request_id_check =
|
||||||
|
afc_disable_request_id_check;
|
||||||
|
ucfg_mlme_get_afc_reg_noaction(hdd_ctx->psoc,
|
||||||
|
&is_afc_reg_noaction);
|
||||||
|
config_vars->is_afc_reg_noaction = is_afc_reg_noaction;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void hdd_update_afc_config(struct hdd_context *hdd_ctx,
|
||||||
|
struct reg_config_vars *config_vars)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void reg_program_config_vars(struct hdd_context *hdd_ctx,
|
static void reg_program_config_vars(struct hdd_context *hdd_ctx,
|
||||||
struct reg_config_vars *config_vars)
|
struct reg_config_vars *config_vars)
|
||||||
{
|
{
|
||||||
@@ -322,6 +354,7 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
|
|||||||
enable_5dot9_ghz_chan;
|
enable_5dot9_ghz_chan;
|
||||||
hdd_update_coex_unsafe_chan_nb_user_prefer(hdd_ctx, config_vars);
|
hdd_update_coex_unsafe_chan_nb_user_prefer(hdd_ctx, config_vars);
|
||||||
hdd_update_coex_unsafe_chan_reg_disable(hdd_ctx, config_vars);
|
hdd_update_coex_unsafe_chan_reg_disable(hdd_ctx, config_vars);
|
||||||
|
hdd_update_afc_config(hdd_ctx, config_vars);
|
||||||
config_vars->sta_sap_scc_on_indoor_channel =
|
config_vars->sta_sap_scc_on_indoor_channel =
|
||||||
ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(hdd_ctx->psoc);
|
ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(hdd_ctx->psoc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user