From adfeaded2e78f6e292d54198f7ba63a37625f460 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Fri, 28 Dec 2018 15:39:16 +0530 Subject: [PATCH] qcacld-3.0: Send invalid RSSI absolute threshold value RSSI absolute threshold value sent to firmware in the default case is 0 even when hw db2dbm capability is enabled which can break firmware roaming. Fix is to send min rssi value of -128dbm when hw db2dbm service capability is enabled. Change-Id: I0a595e9f4af170411a0813a3390ddbb57d26bce1 CRs-Fixed: 2376606 --- core/wma/src/wma_scan_roam.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index faa0b3bffffb..915c132c8998 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-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 @@ -1185,13 +1185,21 @@ static QDF_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle, tSirRoamOffloadScanReq *roam_req) { struct ap_profile_params ap_profile; + bool db2dbm_enabled; ap_profile.vdev_id = roam_req->sessionId; wma_roam_scan_fill_ap_profile(roam_req, &ap_profile.profile); - if (!wmi_service_enabled(wma_handle->wmi_handle, - wmi_service_hw_db2dbm_support)) - ap_profile.profile.rssi_abs_thresh -= + + db2dbm_enabled = wmi_service_enabled(wma_handle->wmi_handle, + wmi_service_hw_db2dbm_support); + if (!ap_profile.profile.rssi_abs_thresh) { + if (db2dbm_enabled) + ap_profile.profile.rssi_abs_thresh = WMA_RSSI_MIN_VALUE; + } else { + if (!db2dbm_enabled) + ap_profile.profile.rssi_abs_thresh -= WMA_NOISE_FLOOR_DBM_DEFAULT; + } ap_profile.param = roam_req->score_params; return wmi_unified_send_roam_scan_offload_ap_cmd(wma_handle->wmi_handle, &ap_profile);