nexus: Implement wifi scanner and fix a lot of bugs

Signed-off-by: San Mehat <san@google.com>
diff --git a/nexus/TiwlanWifiController.cpp b/nexus/TiwlanWifiController.cpp
index ec83825..10606a1 100644
--- a/nexus/TiwlanWifiController.cpp
+++ b/nexus/TiwlanWifiController.cpp
@@ -65,3 +65,17 @@
     property_set(DRIVER_PROP_NAME, "timeout");
     return -1;
 }
+
+bool TiwlanWifiController::isFirmwareLoaded() {
+    char driver_status[PROPERTY_VALUE_MAX];
+    if (property_get(DRIVER_PROP_NAME, driver_status, NULL)) {
+        if (!strcmp(driver_status, "ok"))
+            return true;
+        else {
+            LOGD("Driver status '%s'", driver_status);
+            return false;
+        }
+    }
+    LOGW("Unable to get property '%s'", DRIVER_PROP_NAME);
+    return false;
+}