wifi(implementation): Use the active iface for chip operation
For the chip level operations, the actual interface itself does not
matter. So, instead of hard-coding these operations to wlan0 interface,
find the first active interface to use. This will still return wlan0 if
it's active, but if only AP is up (& pinned to wlan1), then it will use
wlan1 instead.
Bug: 129358937
Test: ./data/android.hardware.wifi@1.0-service-tests
Test: Verified manually that SAR commands are now correctly sent down.
Change-Id: I5a6175579027cbb45c09d32633ed81b9f72224dd
diff --git a/wifi/1.3/default/wifi_legacy_hal.h b/wifi/1.3/default/wifi_legacy_hal.h
index 4d6beb3..5df9487 100644
--- a/wifi/1.3/default/wifi_legacy_hal.h
+++ b/wifi/1.3/default/wifi_legacy_hal.h
@@ -254,9 +254,9 @@
uint32_t cmd_id);
wifi_error setScanningMacOui(const std::string& iface_name,
const std::array<uint8_t, 3>& oui);
- wifi_error selectTxPowerScenario(const std::string& iface_name,
- wifi_power_scenario scenario);
- wifi_error resetTxPowerScenario(const std::string& iface_name);
+ virtual wifi_error selectTxPowerScenario(const std::string& iface_name,
+ wifi_power_scenario scenario);
+ virtual wifi_error resetTxPowerScenario(const std::string& iface_name);
wifi_error setLatencyMode(const std::string& iface_name,
wifi_latency_mode mode);
// Logger/debug functions.