wifi: Add legacy HAL stubs

This is a port of all the existing stub functions from HalTool. Will
deprecate and remove HalTool once framework switches over to HIDL.
These stubs are important because the vendor implementations don't fill
a function pointer in the table (when |init_wifi_vendor_hal_func_table| is
invoked) if they don't implement that feature.

Bug: 33540636
Test: Gtests
Change-Id: Ia41c4faa30b517731a162f3999d64a3f2c34e058
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 9234382..d7a1f15 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -20,8 +20,7 @@
 #include <cutils/properties.h>
 
 #include "wifi_legacy_hal.h"
-
-using android::wifi_system::InterfaceTool;
+#include "wifi_legacy_hal_stubs.h"
 
 namespace android {
 namespace hardware {
@@ -256,6 +255,10 @@
   LOG(DEBUG) << "Initialize legacy HAL";
   // TODO: Add back the HAL Tool if we need to. All we need from the HAL tool
   // for now is this function call which we can directly call.
+  if (!initHalFuncTableWithStubs(&global_func_table_)) {
+    LOG(ERROR) << "Failed to initialize legacy hal function table with stubs";
+    return WIFI_ERROR_UNKNOWN;
+  }
   wifi_error status = init_wifi_vendor_hal_func_table(&global_func_table_);
   if (status != WIFI_SUCCESS) {
     LOG(ERROR) << "Failed to initialize legacy hal function table";