Use libwifi-system to init HAL function table
Note however, that the C++ file in question is actually
not included in this executable's build.
Bug: 29417819
Change-Id: I61b567609ca4ff4f5c6dd36215f880ddeb99387e
Test: Compiles
diff --git a/sl4n/Android.mk b/sl4n/Android.mk
index e349fc2..368dc9a 100644
--- a/sl4n/Android.mk
+++ b/sl4n/Android.mk
@@ -40,6 +40,7 @@
libutils \
libhardware \
libwifi-hal \
+ libwifi-system \
liblog
LOCAL_STATIC_LIBRARIES += \
@@ -49,7 +50,6 @@
LOCAL_STATIC_LIBRARIES += \
libnl \
- libwifi-hal-stub
LOCAL_CFLAGS += -std=c++11 -Wall -Wno-unused-parameter -Wno-missing-field-initializers
diff --git a/sl4n/facades/wifi/wifi_facade.cpp b/sl4n/facades/wifi/wifi_facade.cpp
index 80a3b8f..e3f8575 100644
--- a/sl4n/facades/wifi/wifi_facade.cpp
+++ b/sl4n/facades/wifi/wifi_facade.cpp
@@ -29,8 +29,8 @@
#include <base/strings/string_util.h>
#include <utils/command_receiver.h>
#include <utils/common_utils.h>
-#include <wifi_hal.h>
-#include <wifi_hal_stub.h>
+#include <hardware_legacy/wifi_hal.h>
+#include <wifi_system/hal.h>
#include "wifi_facade.h"
@@ -51,16 +51,7 @@
bool WifiFacade::WifiStartHal() {
if (wifi_hal_handle == NULL) {
- if (init_wifi_stub_hal_func_table(&hal_fn) != 0) {
- LOG(ERROR) << sl4n::kTagStr
- << ": Can not initialize the basic function pointer table";
- return false;
- }
-
- wifi_error res = init_wifi_vendor_hal_func_table(&hal_fn);
- if (res != WIFI_SUCCESS) {
- LOG(ERROR) << sl4n::kTagStr
- << ": Can not initialize the vendor function pointer table";
+ if (!android::wifi_system::init_wifi_hal_function_table(&hal_fn)) {
return false;
}