From 4172a388c763bdad38c0223caefa416230860adc Mon Sep 17 00:00:00 2001 From: Isaac Chiou Date: Wed, 16 Mar 2022 18:50:49 +0800 Subject: [PATCH] Add HAL APIs and configurations for Tx power limits To lower the instantaneous battery current draw of WiFi, we provide a way to allow PowerManager to enable/disable Tx power limits. In this CL, we define an API in WiFi HAL, and can be referenced by Broadcom HAL. Bug: 215193418 Test: New APIs work fine Change-Id: I907687a4d71f48869617edc6e013639dfbccb851 --- include/hardware_legacy/wifi_hal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h index 45b9fa1..952e894 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -1016,6 +1016,16 @@ typedef struct { wifi_error (*wifi_chre_register_handler)(wifi_interface_handle iface, wifi_chre_handler handler); + /**@brief wifi_enable_tx_power_limits + * Enable WiFi Tx power limis + * @param wifi_interface_handle + * @param isEnable : If enable TX limit or not + * @return Synchronous wifi_error + */ + wifi_error (*wifi_enable_tx_power_limits) (wifi_interface_handle iface, + bool isEnable); + + /* * when adding new functions make sure to add stubs in * hal_tool.cpp::init_wifi_stub_hal_func_table