From 0695d34623c1ec0dc273e30837ad43f8c7e44d10 Mon Sep 17 00:00:00 2001 From: Sourav Mohapatra Date: Fri, 23 Feb 2018 09:52:53 +0530 Subject: qcacld-2.0: Update correct value for low power stats In the present scenario the value that is being assigned to the effective total on time is incorrect. The cumulative_total_on_time_ms is being assigned which does not take into account the sleep time Subtract the sleep time from the on time to reflect the correct on time Change-Id: I8a9738b1a9592ca182fb93e503a49d6ca336154d CRs-Fixed: 2192936 --- CORE/HDD/src/wlan_hdd_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_debugfs.c b/CORE/HDD/src/wlan_hdd_debugfs.c index b4a7205bf339..57c3d3693a1d 100644 --- a/CORE/HDD/src/wlan_hdd_debugfs.c +++ b/CORE/HDD/src/wlan_hdd_debugfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -652,7 +652,8 @@ static void hdd_power_debugstats_cb(struct power_stats_response *response, power_stats->cumulative_sleep_time_ms = response->cumulative_sleep_time_ms; power_stats->cumulative_total_on_time_ms - = response->cumulative_total_on_time_ms; + = response->cumulative_total_on_time_ms - + response->cumulative_sleep_time_ms; power_stats->deep_sleep_enter_counter = response->deep_sleep_enter_counter; power_stats->last_deep_sleep_enter_tstamp_ms -- cgit v1.2.3