qcacld-3.0: Refactor SAP CFG items
Refactor SAP CFG items gMaxLIModulatedDTIM, gCountryCodePriority, gSapPreferredChanLocation. Change-Id: I52a1b3f782c440b12a2f2dcf82d9dad6cf6e76e0 CRs-Fixed: 2351237
This commit is contained in:
@@ -1026,6 +1026,12 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
cfg_get(psoc, CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME);
|
cfg_get(psoc, CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME);
|
||||||
sap_cfg->reduced_beacon_interval =
|
sap_cfg->reduced_beacon_interval =
|
||||||
cfg_get(psoc, CFG_REDUCED_BEACON_INTERVAL);
|
cfg_get(psoc, CFG_REDUCED_BEACON_INTERVAL);
|
||||||
|
sap_cfg->max_li_modulated_dtim_time =
|
||||||
|
cfg_get(psoc, CFG_MAX_LI_MODULATED_DTIM);
|
||||||
|
sap_cfg->country_code_priority =
|
||||||
|
cfg_get(psoc, CFG_COUNTRY_CODE_PRIORITY);
|
||||||
|
sap_cfg->sap_pref_chan_location =
|
||||||
|
cfg_get(psoc, CFG_SAP_PREF_CHANNEL_LOCATION);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -451,6 +451,82 @@
|
|||||||
0, \
|
0, \
|
||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"reduced beacon interval")
|
"reduced beacon interval")
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gMaxLIModulatedDTIM - Set MaxLIModulate Dtim
|
||||||
|
* @Min: 1
|
||||||
|
* @Max: 10
|
||||||
|
* @Default: 10
|
||||||
|
*
|
||||||
|
* This ini is used to set default MaxLIModulatedDTIM
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_MAX_LI_MODULATED_DTIM CFG_INI_UINT( \
|
||||||
|
"gMaxLIModulatedDTIM", \
|
||||||
|
1, \
|
||||||
|
10, \
|
||||||
|
10, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Max modulated dtim")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gCountryCodePriority - Priority to set country code
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to set default gCountryCodePriority
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: SAP
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_COUNTRY_CODE_PRIORITY CFG_INI_BOOL( \
|
||||||
|
"gCountryCodePriority", \
|
||||||
|
0, \
|
||||||
|
"Country code priority")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gSapPreferredChanLocation - Restrict channel switches between ondoor and
|
||||||
|
* outdoor.
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 2
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used for restricting channel switches between Indoor and outdoor
|
||||||
|
* channels after radar detection.
|
||||||
|
* 0- No preferred channel location
|
||||||
|
* 1- Use indoor channels only
|
||||||
|
* 2- Use outdoor channels only
|
||||||
|
* Related: NA.
|
||||||
|
*
|
||||||
|
* Supported Feature: DFS
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_SAP_PREF_CHANNEL_LOCATION CFG_INI_UINT( \
|
||||||
|
"gSapPreferredChanLocation", \
|
||||||
|
0, \
|
||||||
|
2, \
|
||||||
|
0, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Sap preferred channel location")
|
||||||
|
|
||||||
|
|
||||||
#define CFG_SAP_ALL \
|
#define CFG_SAP_ALL \
|
||||||
CFG(CFG_SSID) \
|
CFG(CFG_SSID) \
|
||||||
@@ -475,6 +551,9 @@
|
|||||||
CFG(CFG_SAP_CH_SWITCH_MODE) \
|
CFG(CFG_SAP_CH_SWITCH_MODE) \
|
||||||
CFG(CFG_SAP_INTERNAL_RESTART) \
|
CFG(CFG_SAP_INTERNAL_RESTART) \
|
||||||
CFG(CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME) \
|
CFG(CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME) \
|
||||||
CFG(CFG_REDUCED_BEACON_INTERVAL)
|
CFG(CFG_REDUCED_BEACON_INTERVAL) \
|
||||||
|
CFG(CFG_MAX_LI_MODULATED_DTIM) \
|
||||||
|
CFG(CFG_COUNTRY_CODE_PRIORITY) \
|
||||||
|
CFG(CFG_SAP_PREF_CHANNEL_LOCATION)
|
||||||
|
|
||||||
#endif /* __CFG_MLME_SAP_H */
|
#endif /* __CFG_MLME_SAP_H */
|
||||||
|
@@ -582,6 +582,38 @@ QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc,
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
|
||||||
bool *value);
|
bool *value);
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_sap_max_modulated_dtim() - get the max modulated dtim
|
||||||
|
* restart
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_sap_chan_pref_location() - get the sap chan pref location
|
||||||
|
* restart
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_chan_pref_location(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_sap_country_priority() - get the sap country code priority
|
||||||
|
* restart
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced
|
* wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced
|
||||||
|
@@ -512,6 +512,9 @@ struct wlan_mlme_wps_params {
|
|||||||
* @sap_ch_switch_mode: Channel switch test mode enable/disable
|
* @sap_ch_switch_mode: Channel switch test mode enable/disable
|
||||||
* @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
|
* @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
|
||||||
* @reduced_beacon_interval: reduced beacon interval value
|
* @reduced_beacon_interval: reduced beacon interval value
|
||||||
|
* @max_li_modulated_dtim_time: Max modulated DTIM time.
|
||||||
|
* @country_code_priority: Country code priority.
|
||||||
|
* @sap_pref_chan_location: SAP Preferred channel location.
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_cfg_sap {
|
struct wlan_mlme_cfg_sap {
|
||||||
uint8_t cfg_ssid[32];
|
uint8_t cfg_ssid[32];
|
||||||
@@ -537,6 +540,9 @@ struct wlan_mlme_cfg_sap {
|
|||||||
bool sap_ch_switch_mode;
|
bool sap_ch_switch_mode;
|
||||||
bool chan_switch_hostapd_rate_enabled_name;
|
bool chan_switch_hostapd_rate_enabled_name;
|
||||||
uint8_t reduced_beacon_interval;
|
uint8_t reduced_beacon_interval;
|
||||||
|
uint8_t max_li_modulated_dtim_time;
|
||||||
|
bool country_code_priority;
|
||||||
|
uint8_t sap_pref_chan_location;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -964,6 +964,54 @@ QDF_STATUS ucfg_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
|
|||||||
return wlan_mlme_get_sap_internal_restart(psoc, value);
|
return wlan_mlme_get_sap_internal_restart(psoc, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_sap_max_modulated_dtim() - get sap max modulated dtim
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Inline UCFG API to be used by HDD/OSIF callers
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
QDF_STATUS ucfg_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value)
|
||||||
|
{
|
||||||
|
return wlan_mlme_get_sap_max_modulated_dtim(psoc, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_pref_chan_location() - get sap pref chan location
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Inline UCFG API to be used by HDD/OSIF callers
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
QDF_STATUS ucfg_mlme_get_pref_chan_location(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value)
|
||||||
|
{
|
||||||
|
return wlan_mlme_get_sap_chan_pref_location(psoc, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_sap_country_priority() - get sap country code priority
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Inline UCFG API to be used by HDD/OSIF callers
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
QDF_STATUS ucfg_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
return wlan_mlme_get_sap_country_priority(psoc, value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_mlme_get_sap_reduces_beacon_interval() - get the sap reduces beacon
|
* ucfg_mlme_get_sap_reduces_beacon_interval() - get the sap reduces beacon
|
||||||
* interval
|
* interval
|
||||||
|
@@ -1383,6 +1383,54 @@ QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
mlme_err("Failed to get MLME Obj");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.sap_cfg.max_li_modulated_dtim_time;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_chan_pref_location(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
mlme_err("Failed to get MLME Obj");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.sap_cfg.sap_pref_chan_location;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool *value)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
mlme_err("Failed to get MLME Obj");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*value = mlme_obj->cfg.sap_cfg.country_code_priority;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
|
QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
|
||||||
*psoc, int *value)
|
*psoc, int *value)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user