wifi(implementation): Set randomized MAC address for AP

Add the plumbing required for setting a random MAC address on AP
startup. The random MAC address is created once for the lifetime of
the daemon and then reused for any further AP creation. This would
ensure that the MAC address is changed on every reboot.

The feature is turned on by default, devices will need to set the
|WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION| in their .mk file to
disable the feature at compile time.

Bug: 78353419
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Change-Id: I054d5249c20cc582b76966313135295873cd0b61
diff --git a/wifi/1.3/default/Android.mk b/wifi/1.3/default/Android.mk
index eb07a9a..7ebea4f 100644
--- a/wifi/1.3/default/Android.mk
+++ b/wifi/1.3/default/Android.mk
@@ -33,6 +33,9 @@
 ifdef WIFI_HIDL_FEATURE_DISABLE_AP
 LOCAL_CPPFLAGS += -DWIFI_HIDL_FEATURE_DISABLE_AP
 endif
+ifdef WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION
+LOCAL_CPPFLAGS += -DWIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION
+endif
 # Allow implicit fallthroughs in wifi_legacy_hal.cpp until they are fixed.
 LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
 LOCAL_SRC_FILES := \
@@ -144,6 +147,7 @@
     tests/mock_wifi_legacy_hal.cpp \
     tests/mock_wifi_mode_controller.cpp \
     tests/ringbuffer_unit_tests.cpp \
+    tests/wifi_ap_iface_unit_tests.cpp \
     tests/wifi_chip_unit_tests.cpp
 LOCAL_STATIC_LIBRARIES := \
     libgmock \