From a3d5c27286db35d9d10622b2a3dfbdbb11e690d2 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Mon, 4 Jun 2018 19:36:02 +0530 Subject: [PATCH] qcacld-3.0: Send BTM offload disable to FW during RSO Stop Currently, BTM offload config from the ini is sent to the FW as part of the RSO start for the vdev which has roaming enabled. In case of STA+STA concurrency, when roaming is enabled for second STA, BTM config is sent for the second STA vdev leading the FW to assert as the FW already has BTM offload enabled for the previous STA session and supports only one vdev with BTM offload enabled at a time. Send BTM offload config with flags as disabled as part of RSO Stop so that the FW de-inits the BTM offload on the current connected vdev before it inits BTM offload config on the new vdev for the second STA. Change-Id: I7af499b0f7c77b5d52e6c74b09c28c845bdfcd9a CRs-Fixed: 2251994 --- core/sme/src/csr/csr_api_roam.c | 10 ++++++++-- core/wma/src/wma_scan_roam.c | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index d69aa247715e..fdef15b82662 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -18518,8 +18518,14 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, mac_ctx->roam.configParam.rssi_channel_penalization; 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; + + /* For RSO Stop, we need to notify FW to deinit BTM */ + if (command == ROAM_SCAN_OFFLOAD_STOP) + req_buf->btm_offload_config = 0; + else + req_buf->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 = diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 9e3cf4a87aa5..6f24724938dd 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1342,9 +1342,14 @@ static QDF_STATUS wma_roam_scan_btm_offload(tp_wma_handle wma_handle, 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; + + WMA_LOGD("%s: Sending BTM offload to FW for vdev %u btm_offload_config %u", + __func__, params->vdev_id, params->btm_offload_config); + status = wmi_unified_send_btm_config(wma_handle->wmi_handle, params); qdf_mem_free(params); + return status; } @@ -1592,6 +1597,13 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, } } + /* Send BTM config as disabled during RSO Stop */ + qdf_status = wma_roam_scan_btm_offload(wma_handle, roam_req); + if (qdf_status != QDF_STATUS_SUCCESS) { + WMA_LOGE(FL("Sending BTM config to fw failed")); + break; + } + wma_handle->suitable_ap_hb_failure = false; if (wma_handle->roam_offload_enabled) { uint32_t mode;