From f2747e04efdc079cc9f91f42b87ab2267bc0d814 Mon Sep 17 00:00:00 2001 From: Kumar Anand Date: Fri, 10 Jan 2020 16:49:13 -0800 Subject: [PATCH] wifi: thermal hal api Use global handle instead of interface handle as thermal mitigation is not interface specific. Bug: 112471991 Test: atest FrameworksWifiTests Change-Id: Ia8aadec7794bd2dbd5954ec0225caa349b31070c --- wifi/1.4/default/wifi_legacy_hal.cpp | 7 +++---- wifi/1.4/default/wifi_legacy_hal.h | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/wifi/1.4/default/wifi_legacy_hal.cpp b/wifi/1.4/default/wifi_legacy_hal.cpp index 6f088d73e3..3ca3226bd9 100644 --- a/wifi/1.4/default/wifi_legacy_hal.cpp +++ b/wifi/1.4/default/wifi_legacy_hal.cpp @@ -824,11 +824,10 @@ wifi_error WifiLegacyHal::setLatencyMode(const std::string& iface_name, mode); } -wifi_error WifiLegacyHal::setThermalMitigationMode( - const std::string& iface_name, wifi_thermal_mode mode, - uint32_t completion_window) { +wifi_error WifiLegacyHal::setThermalMitigationMode(wifi_thermal_mode mode, + uint32_t completion_window) { return global_func_table_.wifi_set_thermal_mitigation_mode( - getIfaceHandle(iface_name), mode, completion_window); + global_handle_, mode, completion_window); } std::pair WifiLegacyHal::getLoggerSupportedFeatureSet( diff --git a/wifi/1.4/default/wifi_legacy_hal.h b/wifi/1.4/default/wifi_legacy_hal.h index 74cc84be30..a7b40a05cc 100644 --- a/wifi/1.4/default/wifi_legacy_hal.h +++ b/wifi/1.4/default/wifi_legacy_hal.h @@ -259,8 +259,7 @@ class WifiLegacyHal { virtual wifi_error resetTxPowerScenario(const std::string& iface_name); wifi_error setLatencyMode(const std::string& iface_name, wifi_latency_mode mode); - wifi_error setThermalMitigationMode(const std::string& iface_name, - wifi_thermal_mode mode, + wifi_error setThermalMitigationMode(wifi_thermal_mode mode, uint32_t completion_window); // Logger/debug functions. std::pair getLoggerSupportedFeatureSet(