wifi(implementation): Move set/getMacaddress to a util class
This is just a refactor to move the setMacAddress & getFactoryMacAddress
methods to a util class within the HAL. This can be then reused in AP
iface for mac randomization of SoftAp.
This also fixes a bug in the existing setMacAddress() method, the
current method always sets wlan0 up/down. STA interface could be wlan1
on some devices.
Bug: 78353419
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Test: Manually verified STA MAC randomization still works.
Change-Id: I0bb8154f7e6dcae37c977454423c8c299762260e
diff --git a/wifi/1.3/default/Android.mk b/wifi/1.3/default/Android.mk
index 01fa934..eb07a9a 100644
--- a/wifi/1.3/default/Android.mk
+++ b/wifi/1.3/default/Android.mk
@@ -43,6 +43,7 @@
wifi_ap_iface.cpp \
wifi_chip.cpp \
wifi_feature_flags.cpp \
+ wifi_iface_util.cpp \
wifi_legacy_hal.cpp \
wifi_legacy_hal_stubs.cpp \
wifi_mode_controller.cpp \
@@ -139,6 +140,7 @@
tests/hidl_struct_util_unit_tests.cpp \
tests/main.cpp \
tests/mock_wifi_feature_flags.cpp \
+ tests/mock_wifi_iface_util.cpp \
tests/mock_wifi_legacy_hal.cpp \
tests/mock_wifi_mode_controller.cpp \
tests/ringbuffer_unit_tests.cpp \