wifiloader: Notify WiFi HAL on module load success

Change-Id: I0c7de00aec571a29f79137bb5b50178b0be91408
This commit is contained in:
Christopher N. Hesse 2018-01-22 00:20:06 +01:00
parent 4ada34bc6d
commit 5b6ec5682e
2 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
wifiloader.c
LOCAL_SHARED_LIBRARIES := \
liblog libutils
libcutils liblog libutils
ifneq ($(WIFI_DRIVER_MODULE_NAME),)
LOCAL_CFLAGS += -DWIFI_DRIVER_MODULE_NAME=\"$(WIFI_DRIVER_MODULE_NAME)\"

View File

@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <cutils/log.h>
#include <cutils/properties.h>
#include <sys/stat.h>
#include <sys/syscall.h>
@ -83,6 +84,10 @@ static int load_module(char const *path)
return -errno;
}
// let wifi HAL know we succeeded
ALOGV("Successfully loaded WLAN module: %s", WIFI_DRIVER_MODULE_NAME);
property_set("wlan.driver.status", "ok");
close(fd);
return 0;
}