hardware/libhardware_legacy
修订版 | 76edfc0c3c4bcd737bf7abae3386e74ffe1fa6c5 (tree) |
---|---|
时间 | 2016-09-07 02:10:03 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
wifi: fix unable to unload driver
@@ -396,11 +396,11 @@ int wifi_unload_driver() | ||
396 | 396 | usleep(200000); /* allow to finish interface down */ |
397 | 397 | #ifdef WIFI_DRIVER_MODULE_PATH |
398 | 398 | char modname[PROPERTY_VALUE_MAX]; |
399 | - if (!property_get(DRIVER_NAME_PROP, modname, NULL)) | |
400 | - return -1; | |
401 | 399 | if (property_get("wlan.no-unload-driver", modname, NULL) |
402 | 400 | && strcmp(modname, "1") == 0) |
403 | 401 | return 0; |
402 | + if (!property_get(DRIVER_NAME_PROP, modname, NULL)) | |
403 | + return -1; | |
404 | 404 | |
405 | 405 | if (rmmod(modname) == 0) { |
406 | 406 | int count = 20; /* wait at most 10 seconds for completion */ |