OSDN Git Service

wifi: determine whether to unload the driver by a property
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 21 Dec 2014 05:45:27 +0000 (13:45 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 5 May 2016 09:45:06 +0000 (17:45 +0800)
Currently the brcmfmac driver seems to be buggy to be unloaded.
Don't unload it until we find a real solution.

wifi/wifi.c

index 9bea70d..22911bb 100644 (file)
@@ -398,6 +398,9 @@ int wifi_unload_driver()
     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 (rmmod(modname) == 0) {
         int count = 20; /* wait at most 10 seconds for completion */