mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Add ini param to control RTT mac randomization
Add change to allow randomizing mac address used in STA mode RTT ranging using ini param control. Change-Id: Ief3814ef758476d2617d8176daade2128c2b250a CRs-Fixed: 2205953
This commit is contained in:
parent
a95af7cbac
commit
2b43089fc7
3 changed files with 38 additions and 0 deletions
|
|
@ -13978,9 +13978,26 @@ enum hdd_external_acs_policy {
|
|||
#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)
|
||||
|
||||
/*
|
||||
* Type declarations
|
||||
*/
|
||||
|
||||
struct hdd_config {
|
||||
/* Bitmap to track what is explicitly configured */
|
||||
DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
|
||||
|
|
@ -14853,6 +14870,7 @@ struct hdd_config {
|
|||
HDD_GREEN_AP_CFG_FIELDS
|
||||
bool is_unit_test_framework_enabled;
|
||||
bool enable_ftopen;
|
||||
bool enable_rtt_mac_randomization;
|
||||
};
|
||||
|
||||
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
||||
|
|
|
|||
|
|
@ -5351,6 +5351,14 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_ROAM_FT_OPEN_ENABLE_DEFAULT,
|
||||
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),
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3905,6 +3905,18 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
|||
goto hdd_vdev_destroy_procedure;
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
hdd_debug("setting RTT mac randomization param: %d",
|
||||
hdd_ctx->config->enable_rtt_mac_randomization);
|
||||
errno = sme_cli_set_command(adapter->session_id,
|
||||
WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC,
|
||||
hdd_ctx->config->enable_rtt_mac_randomization,
|
||||
VDEV_CMD);
|
||||
if (0 != errno)
|
||||
hdd_err("RTT mac randomization param set failed %d",
|
||||
errno);
|
||||
}
|
||||
|
||||
hdd_info("vdev %d created successfully", adapter->session_id);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue