diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index b25cf3cdec45..44a639a9abc6 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -2017,6 +2017,8 @@ static void mlme_init_btm_cfg(struct wlan_objmgr_psoc *psoc, btm->rct_validity_timer = cfg_get(psoc, CFG_BTM_VALIDITY_TIMER); btm->disassoc_timer_threshold = cfg_get(psoc, CFG_BTM_DISASSOC_TIMER_THRESHOLD); + btm->btm_query_bitmask = cfg_get(psoc, CFG_BTM_QUERY_BITMASK); + } /** diff --git a/components/mlme/dispatcher/inc/cfg_mlme_btm.h b/components/mlme/dispatcher/inc/cfg_mlme_btm.h index 668e96eddc61..1da6604ef7a8 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_btm.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_btm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -236,6 +236,39 @@ CFG_VALUE_OR_DEFAULT, \ "BTM disassociation timer threshold") +/* + * + * btm_query_bitmask - To send BTM query with candidate list on various roam + * scans reasons + * @Min: 0 + * @Max: 0xFFFFFFFF + * @Default: 0x8 + * + * This new ini is introduced to configure the bitmask for various roam scan + * reasons. Fw sends "BTM query with preferred candidate list" only for those + * roam scans which are enable through this bitmask. + + * For Example: + * Bitmask : 0x8 (LOW_RSSI) refer enum WMI_ROAM_TRIGGER_REASON_ID + * Bitmask : 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE) + * refer enum WMI_ROAM_TRIGGER_REASON_ID + * + * Related: None + * + * Supported Feature: Roaming + * + * Usage: External + * + * + */ +#define CFG_BTM_QUERY_BITMASK CFG_INI_UINT( \ + "btm_query_bitmask", \ + 0, \ + 0xFFFFFFFF, \ + 0x8, \ + CFG_VALUE_OR_DEFAULT, \ + "btm query with candidate list bitmask") + #define CFG_BTM_ALL \ CFG(CFG_PREFER_BTM_QUERY) \ CFG(CFG_ENABLE_BTM_ABRIDGE) \ @@ -244,6 +277,7 @@ CFG(CFG_BTM_MAX_ATTEMPT_CNT) \ CFG(CFG_BTM_STICKY_TIME) \ CFG(CFG_BTM_VALIDITY_TIMER) \ - CFG(CFG_BTM_DISASSOC_TIMER_THRESHOLD) + CFG(CFG_BTM_DISASSOC_TIMER_THRESHOLD) \ + CFG(CFG_BTM_QUERY_BITMASK) #endif /* CFG_MLME_BTM_H_ */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 5f9ac8082790..73cd1b5f26d1 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1848,6 +1848,8 @@ struct wlan_mlme_wifi_pos_cfg { * @rct_validity_timer: Timeout values for roam cache table entries * @disassoc_timer_threshold: Disassociation timeout till which roam scan need * not be triggered + * @btm_query_bitmask: Bitmask to send BTM query with candidate list on + * various roam */ struct wlan_mlme_btm { bool prefer_btm_query; @@ -1858,6 +1860,7 @@ struct wlan_mlme_btm { uint32_t btm_sticky_time; uint32_t rct_validity_timer; uint32_t disassoc_timer_threshold; + uint32_t btm_query_bitmask; }; /** diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 378fec541206..d5832d83f553 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2318,6 +2318,7 @@ struct roam_offload_scan_req { bool bss_load_trig_enabled; struct wmi_bss_load_config bss_load_config; bool roaming_scan_policy; + uint32_t btm_query_bitmask; }; struct roam_offload_scan_rsp { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 60f84c08e3eb..daf35456edfc 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -18093,6 +18093,9 @@ csr_create_roam_scan_offload_request(struct mac_context *mac_ctx, req_buf->rct_validity_timer = mac_ctx->mlme_cfg->btm.rct_validity_timer; req_buf->disassoc_timer_threshold = mac_ctx->mlme_cfg->btm.disassoc_timer_threshold; + req_buf->btm_query_bitmask = + mac_ctx->mlme_cfg->btm.btm_query_bitmask; + #ifdef WLAN_FEATURE_ROAM_OFFLOAD QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index da12db642050..2b4947a04fb5 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1425,9 +1425,11 @@ wma_roam_scan_btm_offload(tp_wma_handle wma_handle, params->btm_max_attempt_cnt = roam_req->btm_max_attempt_cnt; params->btm_sticky_time = roam_req->btm_sticky_time; params->disassoc_timer_threshold = roam_req->disassoc_timer_threshold; + params->btm_query_bitmask = roam_req->btm_query_bitmask; - WMA_LOGD("%s: Sending BTM offload to FW for vdev %u btm_offload_config %u", - __func__, params->vdev_id, params->btm_offload_config); + WMA_LOGD("%s: Sending BTM offload to FW for vdev %u btm_offload_config %u btm_query_bitmask %u", + __func__, params->vdev_id, params->btm_offload_config, + params->btm_query_bitmask); status = wmi_unified_send_btm_config(wma_handle->wmi_handle, params); qdf_mem_free(params);