OSDN Git Service

wifi: fix unable to unload driver marshmallow-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 6 Sep 2016 17:10:03 +0000 (01:10 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 6 Sep 2016 17:10:03 +0000 (01:10 +0800)
wifi/wifi.c

index 22911bb..4827357 100644 (file)
@@ -396,11 +396,11 @@ int wifi_unload_driver()
     usleep(200000); /* allow to finish interface down */
 #ifdef WIFI_DRIVER_MODULE_PATH
     char modname[PROPERTY_VALUE_MAX];
-    if (!property_get(DRIVER_NAME_PROP, modname, NULL))
-        return -1;
     if (property_get("wlan.no-unload-driver", modname, NULL)
             && strcmp(modname, "1") == 0)
         return 0;
+    if (!property_get(DRIVER_NAME_PROP, modname, NULL))
+        return -1;
 
     if (rmmod(modname) == 0) {
         int count = 20; /* wait at most 10 seconds for completion */