From 76edfc0c3c4bcd737bf7abae3386e74ffe1fa6c5 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Wed, 7 Sep 2016 01:10:03 +0800 Subject: [PATCH] wifi: fix unable to unload driver --- wifi/wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifi/wifi.c b/wifi/wifi.c index 22911bb..4827357 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -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 */ -- 2.11.0