nexus: Add some logging output to WifiController
Signed-off-by: San Mehat <san@google.com>
diff --git a/nexus/WifiController.cpp b/nexus/WifiController.cpp
index 5c5db1a..b7bd6ed 100644
--- a/nexus/WifiController.cpp
+++ b/nexus/WifiController.cpp
@@ -69,7 +69,9 @@
}
int WifiController::enable() {
+
if (!isPoweredUp()) {
+ LOGI("Powering up");
sendStatusBroadcast("Powering up WiFi hardware");
if (powerUp()) {
LOGE("Powerup failed (%s)", strerror(errno));
@@ -78,6 +80,7 @@
}
if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) {
+ LOGI("Loading driver");
sendStatusBroadcast("Loading WiFi driver");
if (loadKernelModule(mModulePath, mModuleArgs)) {
LOGE("Kernel module load failed (%s)", strerror(errno));
@@ -86,6 +89,7 @@
}
if (!isFirmwareLoaded()) {
+ LOGI("Loading firmware");
sendStatusBroadcast("Loading WiFI firmware");
if (loadFirmware()) {
LOGE("Firmware load failed (%s)", strerror(errno));
@@ -94,6 +98,7 @@
}
if (!mSupplicant->isStarted()) {
+ LOGI("Starting WPA Supplicant");
sendStatusBroadcast("Starting WPA Supplicant");
if (mSupplicant->start()) {
LOGE("Supplicant start failed (%s)", strerror(errno));
@@ -113,6 +118,7 @@
mPropMngr->registerProperty("wifi.scanmode", this);
mPropMngr->registerProperty("wifi.interface", this);
+ LOGI("Enabled successfully");
return 0;
out_unloadmodule: