summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-07-27 12:16:08 -0700
committerIrfan Sheriff <isheriff@google.com>2010-07-27 12:17:08 -0700
commit2bb990bfd2580f9be93a413e3a5325057977a828 (patch)
tree568f70a287967bac5b25f4451009cdb3353c38ce /wifi
parent3be78bce2b78d059cb1325367f43873fb3be775a (diff)
downloadhardware_libhardware_legacy-2bb990bfd2580f9be93a413e3a5325057977a828.zip
hardware_libhardware_legacy-2bb990bfd2580f9be93a413e3a5325057977a828.tar.gz
hardware_libhardware_legacy-2bb990bfd2580f9be93a413e3a5325057977a828.tar.bz2
Add is_wifi_driver_loaded
Change-Id: I73600a11891b1380d8bc1bfbc24494410a989fcb
Diffstat (limited to 'wifi')
-rw-r--r--wifi/wifi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c
index 3f8708d..e229120 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -135,7 +135,7 @@ const char *get_dhcp_error_string() {
return dhcp_lasterror();
}
-static int check_driver_loaded() {
+int is_wifi_driver_loaded() {
char driver_status[PROPERTY_VALUE_MAX];
FILE *proc;
char line[sizeof(DRIVER_MODULE_TAG)+10];
@@ -171,7 +171,7 @@ int wifi_load_driver()
char driver_status[PROPERTY_VALUE_MAX];
int count = 100; /* wait at most 20 seconds for completion */
- if (check_driver_loaded()) {
+ if (is_wifi_driver_loaded()) {
return 0;
}
@@ -208,7 +208,7 @@ int wifi_unload_driver()
if (rmmod(DRIVER_MODULE_NAME) == 0) {
while (count-- > 0) {
- if (!check_driver_loaded())
+ if (!is_wifi_driver_loaded())
break;
usleep(500000);
}