Add HAL APIs 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 the legacy HAL, we call the API in Broadcom HAL to
enable/disable WiFi TX power limits.
Bug: 215193418
Test: New APIs work fine
Change-Id: I1fbe71c3380514e2eba96adc5902d2028a55e006
diff --git a/wifi/1.6/default/wifi_legacy_hal.cpp b/wifi/1.6/default/wifi_legacy_hal.cpp
index bb8cf59..2211897 100644
--- a/wifi/1.6/default/wifi_legacy_hal.cpp
+++ b/wifi/1.6/default/wifi_legacy_hal.cpp
@@ -1585,6 +1585,10 @@
return status;
}
+wifi_error WifiLegacyHal::enableWifiTxPowerLimits(const std::string& iface_name, bool enable) {
+ return global_func_table_.wifi_enable_tx_power_limits(getIfaceHandle(iface_name), enable);
+}
+
void WifiLegacyHal::invalidate() {
global_handle_ = nullptr;
iface_name_to_handle_.clear();