mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Add new config for BTM offload
Add new config in INI for solicited BTM offload. Those parameters will be sent to firmware. New parameters: * btm_solicited_timeout: Timeout value for waiting BTM request. * btm_max_attempt_cnt: Maximum attempt for sending BTM query to ESS. * btm_sticky_time: Stick time after roaming to new AP by BTM. Change-Id: I24cc680bbfde3d44a57b1e1ccf644c2bed515a2c CRs-Fixed: 2168981
This commit is contained in:
parent
2e9d0b303a
commit
84bb2ea507
7 changed files with 134 additions and 7 deletions
|
|
@ -14032,7 +14032,9 @@ enum hdd_external_acs_freq_band {
|
|||
* 001 match if at least one top priority BSSID only
|
||||
* 010, 011, 100, 101, 110, 111 reserved
|
||||
*
|
||||
* BIT 6-31: Reserved
|
||||
* BIT 6: Set this to 1 will send BTM query frame and 0 not sent.
|
||||
*
|
||||
* BIT 7-31: Reserved
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
|
|
@ -14043,7 +14045,69 @@ enum hdd_external_acs_freq_band {
|
|||
#define CFG_BTM_ENABLE_NAME "btm_offload_config"
|
||||
#define CFG_BTM_ENABLE_MIN (0x00000000)
|
||||
#define CFG_BTM_ENABLE_MAX (0xffffffff)
|
||||
#define CFG_BTM_ENABLE_DEFAULT (0x00000001)
|
||||
#define CFG_BTM_ENABLE_DEFAULT (0x00000041)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* btm_solicited_timeout - timeout value for waiting BTM request
|
||||
* @Min: 1
|
||||
* @Max: 10000
|
||||
* @Default: 100
|
||||
*
|
||||
* This ini is used to configure timeout value for waiting BTM request.
|
||||
* Unit: millionsecond
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_BTM_SOLICITED_TIMEOUT "btm_solicited_timeout"
|
||||
#define CFG_BTM_SOLICITED_TIMEOUT_MIN (1)
|
||||
#define CFG_BTM_SOLICITED_TIMEOUT_MAX (10000)
|
||||
#define CFG_BTM_SOLICITED_TIMEOUT_DEFAULT (100)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* btm_max_attempt_cnt - Maximum attempt for sending BTM query to ESS
|
||||
* @Min: 1
|
||||
* @Max: 0xFFFFFFFF
|
||||
* @Default: 3
|
||||
*
|
||||
* This ini is used to configure maximum attempt for sending BTM query to ESS.
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_BTM_MAX_ATTEMPT_CNT "btm_max_attempt_cnt"
|
||||
#define CFG_BTM_MAX_ATTEMPT_CNT_MIN (0x00000001)
|
||||
#define CFG_BTM_MAX_ATTEMPT_CNT_MAX (0xFFFFFFFF)
|
||||
#define CFG_BTM_MAX_ATTEMPT_CNT_DEFAULT (0x00000003)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* sticky_time - Stick time after roaming to new AP by BTM
|
||||
* @Min: 1
|
||||
* @Max: 0x0000FFFF
|
||||
* @Default: 300
|
||||
*
|
||||
* This ini is used to configure Stick time after roaming to new AP by BTM.
|
||||
* Unit: seconds
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_BTM_STICKY_TIME "btm_sticky_time"
|
||||
#define CFG_BTM_STICKY_TIME_MIN (0x00000001)
|
||||
#define CFG_BTM_STICKY_TIME_MAX (0x0000FFFF)
|
||||
#define CFG_BTM_STICKY_TIME_DEFAULT (300)
|
||||
|
||||
/*
|
||||
* Type declarations
|
||||
|
|
@ -14942,6 +15006,9 @@ struct hdd_config {
|
|||
#ifdef WLAN_FEATURE_SAE
|
||||
bool is_sae_enabled;
|
||||
#endif
|
||||
uint32_t btm_solicited_timeout;
|
||||
uint32_t btm_max_attempt_cnt;
|
||||
uint32_t btm_sticky_time;
|
||||
};
|
||||
|
||||
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
||||
|
|
|
|||
|
|
@ -5425,6 +5425,27 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_IS_SAE_ENABLED_MIN,
|
||||
CFG_IS_SAE_ENABLED_MAX),
|
||||
#endif
|
||||
|
||||
REG_VARIABLE(CFG_BTM_SOLICITED_TIMEOUT, WLAN_PARAM_Integer,
|
||||
struct hdd_config, btm_solicited_timeout,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_BTM_SOLICITED_TIMEOUT_DEFAULT,
|
||||
CFG_BTM_SOLICITED_TIMEOUT_MIN,
|
||||
CFG_BTM_SOLICITED_TIMEOUT_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_BTM_MAX_ATTEMPT_CNT, WLAN_PARAM_Integer,
|
||||
struct hdd_config, btm_max_attempt_cnt,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_BTM_MAX_ATTEMPT_CNT_DEFAULT,
|
||||
CFG_BTM_MAX_ATTEMPT_CNT_MIN,
|
||||
CFG_BTM_MAX_ATTEMPT_CNT_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_BTM_STICKY_TIME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, btm_sticky_time,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_BTM_STICKY_TIME_DEFAULT,
|
||||
CFG_BTM_STICKY_TIME_MIN,
|
||||
CFG_BTM_STICKY_TIME_MAX),
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -7270,6 +7291,12 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
|
|||
hdd_debug("Name = [btm_offload_config] value = [0x%x]",
|
||||
hdd_ctx->config->btm_offload_config);
|
||||
hdd_cfg_print_sae(hdd_ctx);
|
||||
hdd_debug("Name = [btm_solicited_timeout] value = [0x%x]",
|
||||
hdd_ctx->config->btm_solicited_timeout);
|
||||
hdd_debug("Name = [btm_max_attempt_cnt] value = [0x%x]",
|
||||
hdd_ctx->config->btm_max_attempt_cnt);
|
||||
hdd_debug("Name = [btm_sticky_time] value = [0x%x]",
|
||||
hdd_ctx->config->btm_sticky_time);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -9094,9 +9121,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
|
|||
(pConfig->rssi_assoc_reject_enabled *
|
||||
WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP);
|
||||
smeConfig->csrConfig.oce_feature_bitmap = val;
|
||||
smeConfig->csrConfig.btm_offload_config =
|
||||
hdd_ctx->config->btm_offload_config;
|
||||
|
||||
smeConfig->csrConfig.mbo_thresholds.mbo_candidate_rssi_thres =
|
||||
hdd_ctx->config->mbo_candidate_rssi_thres;
|
||||
smeConfig->csrConfig.mbo_thresholds.mbo_current_rssi_thres =
|
||||
|
|
@ -9105,7 +9129,14 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
|
|||
hdd_ctx->config->mbo_current_rssi_mcc_thres;
|
||||
smeConfig->csrConfig.mbo_thresholds.mbo_candidate_rssi_btc_thres =
|
||||
hdd_ctx->config->mbo_candidate_rssi_btc_thres;
|
||||
|
||||
smeConfig->csrConfig.btm_offload_config =
|
||||
hdd_ctx->config->btm_offload_config;
|
||||
smeConfig->csrConfig.btm_solicited_timeout =
|
||||
hdd_ctx->config->btm_solicited_timeout;
|
||||
smeConfig->csrConfig.btm_max_attempt_cnt =
|
||||
hdd_ctx->config->btm_max_attempt_cnt;
|
||||
smeConfig->csrConfig.btm_sticky_time =
|
||||
hdd_ctx->config->btm_sticky_time;
|
||||
hdd_update_bss_score_params(hdd_ctx->config,
|
||||
&smeConfig->csrConfig.bss_score_params);
|
||||
|
||||
|
|
|
|||
|
|
@ -3273,6 +3273,9 @@ typedef struct sSirRoamOffloadScanReq {
|
|||
struct roam_fils_params roam_fils_params;
|
||||
#endif
|
||||
uint32_t btm_offload_config;
|
||||
uint32_t btm_solicited_timeout;
|
||||
uint32_t btm_max_attempt_cnt;
|
||||
uint32_t btm_sticky_time;
|
||||
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
|
||||
|
||||
typedef struct sSirRoamOffloadScanRsp {
|
||||
|
|
|
|||
|
|
@ -1374,6 +1374,9 @@ typedef struct tagCsrConfigParam {
|
|||
uint8_t oce_feature_bitmap;
|
||||
struct csr_mbo_thresholds mbo_thresholds;
|
||||
uint32_t btm_offload_config;
|
||||
uint32_t btm_solicited_timeout;
|
||||
uint32_t btm_max_attempt_cnt;
|
||||
uint32_t btm_sticky_time;
|
||||
} tCsrConfigParam;
|
||||
|
||||
/* Tush */
|
||||
|
|
|
|||
|
|
@ -638,6 +638,9 @@ struct csr_config {
|
|||
uint8_t oce_feature_bitmap;
|
||||
struct csr_mbo_thresholds mbo_thresholds;
|
||||
uint32_t btm_offload_config;
|
||||
uint32_t btm_solicited_timeout;
|
||||
uint32_t btm_max_attempt_cnt;
|
||||
uint32_t btm_sticky_time;
|
||||
};
|
||||
|
||||
struct csr_channel_powerinfo {
|
||||
|
|
|
|||
|
|
@ -3053,6 +3053,12 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
|
|||
sizeof(struct sir_score_config));
|
||||
pMac->roam.configParam.btm_offload_config =
|
||||
pParam->btm_offload_config;
|
||||
pMac->roam.configParam.btm_solicited_timeout =
|
||||
pParam->btm_solicited_timeout;
|
||||
pMac->roam.configParam.btm_max_attempt_cnt =
|
||||
pParam->btm_max_attempt_cnt;
|
||||
pMac->roam.configParam.btm_sticky_time =
|
||||
pParam->btm_sticky_time;
|
||||
|
||||
csr_update_he_config_param(pMac, pParam);
|
||||
}
|
||||
|
|
@ -3323,6 +3329,11 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
|
|||
&pMac->roam.configParam.bss_score_params,
|
||||
sizeof(struct sir_score_config));
|
||||
pParam->btm_offload_config = pMac->roam.configParam.btm_offload_config;
|
||||
pParam->btm_solicited_timeout =
|
||||
pMac->roam.configParam.btm_solicited_timeout;
|
||||
pParam->btm_max_attempt_cnt =
|
||||
pMac->roam.configParam.btm_max_attempt_cnt;
|
||||
pParam->btm_sticky_time = pMac->roam.configParam.btm_sticky_time;
|
||||
|
||||
pParam->mbo_thresholds.mbo_candidate_rssi_thres =
|
||||
pMac->roam.configParam.mbo_thresholds.
|
||||
|
|
@ -18209,7 +18220,13 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
|
|||
req_buf->lca_config_params.num_disallowed_aps =
|
||||
mac_ctx->roam.configParam.num_disallowed_aps;
|
||||
req_buf->btm_offload_config =
|
||||
mac_ctx->roam.configParam.btm_offload_config;
|
||||
mac_ctx->roam.configParam.btm_offload_config;
|
||||
req_buf->btm_solicited_timeout =
|
||||
mac_ctx->roam.configParam.btm_solicited_timeout;
|
||||
req_buf->btm_max_attempt_cnt =
|
||||
mac_ctx->roam.configParam.btm_max_attempt_cnt;
|
||||
req_buf->btm_sticky_time =
|
||||
mac_ctx->roam.configParam.btm_sticky_time;
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
|
|||
|
|
@ -1874,6 +1874,9 @@ static QDF_STATUS wma_roam_scan_btm_offload(tp_wma_handle wma_handle,
|
|||
|
||||
params->vdev_id = roam_req->sessionId;
|
||||
params->btm_offload_config = roam_req->btm_offload_config;
|
||||
params->btm_solicited_timeout = roam_req->btm_solicited_timeout;
|
||||
params->btm_max_attempt_cnt = roam_req->btm_max_attempt_cnt;
|
||||
params->btm_sticky_time = roam_req->btm_sticky_time;
|
||||
status = wmi_unified_send_btm_config(wma_handle->wmi_handle, params);
|
||||
qdf_mem_free(params);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue