wifiloader: Notify WiFi HAL on module load success

Change-Id: I0c7de00aec571a29f79137bb5b50178b0be91408
tirimbino
Christopher N. Hesse 7 years ago
parent 4ada34bc6d
commit 5b6ec5682e
  1. 2
      wifiloader/Android.mk
  2. 5
      wifiloader/wifiloader.c

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

@ -24,6 +24,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <cutils/log.h> #include <cutils/log.h>
#include <cutils/properties.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/syscall.h> #include <sys/syscall.h>
@ -83,6 +84,10 @@ static int load_module(char const *path)
return -errno; 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); close(fd);
return 0; return 0;
} }

Loading…
Cancel
Save