qcacld-3.0: Add RTT related CFG item
ADD RTT MAC randomization CFG item based on converged cfg component Change-Id: I0e1203fc3b3cdab8d9f331c90092b460a02f0fbf CRs-Fixed: 2349709
This commit is contained in:

committed by
nshrivas

parent
3c4fb6e9be
commit
9180c75d61
@@ -160,6 +160,8 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_generic *gen)
|
||||
{
|
||||
gen->rtt3_enabled = cfg_default(CFG_RTT3_ENABLE);
|
||||
gen->rtt_mac_randomization =
|
||||
cfg_get(psoc, CFG_ENABLE_RTT_MAC_RANDOMIZATION);
|
||||
gen->band_capability =
|
||||
cfg_get(psoc, CFG_BAND_CAPABILITY);
|
||||
gen->band = gen->band_capability;
|
||||
|
@@ -73,6 +73,22 @@
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"PMF SA query retry interval for SAP")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_rtt_mac_randomization - Enable/Disable rtt mac randomization
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_RTT_MAC_RANDOMIZATION CFG_INI_BOOL( \
|
||||
"enable_rtt_mac_randomization", \
|
||||
0, \
|
||||
"Enable RTT MAC randomization")
|
||||
|
||||
#define CFG_RTT3_ENABLE CFG_BOOL( \
|
||||
"rtt3_enabled", \
|
||||
1, \
|
||||
@@ -476,6 +492,7 @@
|
||||
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
|
||||
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
|
||||
CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
|
||||
CFG(CFG_ENABLE_RTT_MAC_RANDOMIZATION) \
|
||||
CFG(CFG_RTT3_ENABLE) \
|
||||
CFG(CFG_BAND_CAPABILITY) \
|
||||
CFG(CFG_PREVENT_LINK_DOWN) \
|
||||
|
@@ -257,6 +257,16 @@ QDF_STATUS wlan_mlme_get_prevent_link_down(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS wlan_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *select_5ghz_margin);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_rtt_mac_randomization() - Get the RTT MAC randomization config
|
||||
* @psoc: pointer to psoc object
|
||||
* @rtt_mac_randomization: Pointer to the variable from caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_rtt_mac_randomization(struct wlan_objmgr_psoc *psoc,
|
||||
bool *rtt_mac_randomization);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_crash_inject() - Get the crash inject config
|
||||
* @psoc: pointer to psoc object
|
||||
|
@@ -923,6 +923,7 @@ struct wlan_mlme_chainmask {
|
||||
* @pmf_sa_query_max_retries: PMF query max retries for SAP
|
||||
* @pmf_sa_query_retry_interval: PMF query retry interval for SAP
|
||||
* @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
|
||||
* @rtt_mac_randomization: Enable/Disable RTT MAC randomization
|
||||
* @rtt3_enabled: RTT3 enable or disable info
|
||||
* @prevent_link_down: Enable/Disable prevention of link down
|
||||
* @memory_deep_sleep: Enable/Disable memory deep sleep
|
||||
@@ -945,6 +946,7 @@ struct wlan_mlme_generic {
|
||||
uint8_t pmf_sa_query_max_retries;
|
||||
uint16_t pmf_sa_query_retry_interval;
|
||||
uint16_t dropped_pkt_disconnect_thresh;
|
||||
bool rtt_mac_randomization;
|
||||
bool rtt3_enabled;
|
||||
bool prevent_link_down;
|
||||
bool memory_deep_sleep;
|
||||
|
@@ -261,6 +261,20 @@ QDF_STATUS ucfg_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc,
|
||||
return wlan_mlme_get_select_5ghz_margin(psoc, select_5ghz_margin);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_rtt_mac_randomization() - Get the RTT MAC randomization config
|
||||
* @psoc: pointer to psoc object
|
||||
* @rtt_mac_randomization: Pointer to the variable from caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_rtt_mac_randomization(struct wlan_objmgr_psoc *psoc,
|
||||
bool *rtt_mac_randomization)
|
||||
{
|
||||
return wlan_mlme_get_rtt_mac_randomization(psoc, rtt_mac_randomization);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_crash_inject() - Get the crash inject config
|
||||
* @psoc: pointer to psoc object
|
||||
|
@@ -229,6 +229,22 @@ QDF_STATUS wlan_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_rtt_mac_randomization(struct wlan_objmgr_psoc *psoc,
|
||||
bool *rtt_mac_randomization)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
*rtt_mac_randomization = mlme_obj->cfg.gen.rtt_mac_randomization;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_crash_inject(struct wlan_objmgr_psoc *psoc,
|
||||
bool *crash_inject)
|
||||
{
|
||||
|
@@ -6233,22 +6233,6 @@ enum hdd_link_speed_rpt_type {
|
||||
#define CFG_ENABLE_UNIT_TEST_FRAMEWORK_MAX (1)
|
||||
#define CFG_ENABLE_UINT_TEST_FRAMEWORK_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_rtt_mac_randomization - Enable/Disable rtt mac randomization
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_RTT_MAC_RANDOMIZATION_NAME "enable_rtt_mac_randomization"
|
||||
#define CFG_ENABLE_RTT_MAC_RANDOMIZATION_MIN (0)
|
||||
#define CFG_ENABLE_RTT_MAC_RANDOMIZATION_MAX (1)
|
||||
#define CFG_ENABLE_RTT_MAC_RANDOMIZATION_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableSecondaryRate - Enable/Disable Secondary Retry Rate feature subset
|
||||
@@ -6801,7 +6785,6 @@ struct hdd_config {
|
||||
uint32_t enable_secondary_rate;
|
||||
bool is_unit_test_framework_enabled;
|
||||
bool enable_ftopen;
|
||||
bool enable_rtt_mac_randomization;
|
||||
bool roam_force_rssi_trigger;
|
||||
bool enable_change_channel_bandwidth;
|
||||
|
||||
|
@@ -2475,14 +2475,6 @@ struct reg_table_entry g_registry_table[] = {
|
||||
CFG_ROAM_FT_OPEN_ENABLE_MIN,
|
||||
CFG_ROAM_FT_OPEN_ENABLE_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_RTT_MAC_RANDOMIZATION_NAME,
|
||||
WLAN_PARAM_Integer,
|
||||
struct hdd_config, enable_rtt_mac_randomization,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ENABLE_RTT_MAC_RANDOMIZATION_DEFAULT,
|
||||
CFG_ENABLE_RTT_MAC_RANDOMIZATION_MIN,
|
||||
CFG_ENABLE_RTT_MAC_RANDOMIZATION_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_SECONDARY_RATE_NAME,
|
||||
WLAN_PARAM_HexInteger,
|
||||
struct hdd_config, enable_secondary_rate,
|
||||
|
@@ -4026,6 +4026,7 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
||||
{
|
||||
QDF_STATUS status;
|
||||
int errno;
|
||||
bool bval;
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct sme_session_params sme_session_params = {0};
|
||||
|
||||
@@ -4097,11 +4098,16 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
hdd_debug("setting RTT mac randomization param: %d",
|
||||
hdd_ctx->config->enable_rtt_mac_randomization);
|
||||
bval = false;
|
||||
status = ucfg_mlme_get_rtt_mac_randomization(hdd_ctx->psoc,
|
||||
&bval);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_err("unable to get RTT MAC randomization value");
|
||||
|
||||
hdd_debug("setting RTT mac randomization param: %d", bval);
|
||||
errno = sme_cli_set_command(adapter->session_id,
|
||||
WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC,
|
||||
hdd_ctx->config->enable_rtt_mac_randomization,
|
||||
bval,
|
||||
VDEV_CMD);
|
||||
if (0 != errno)
|
||||
hdd_err("RTT mac randomization param set failed %d",
|
||||
|
Reference in New Issue
Block a user