diff options
| author | Steve Kondik <shade@chemlab.org> | 2013-02-12 22:38:11 -0800 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2013-02-12 22:38:11 -0800 |
| commit | 6c8bc31ebe68911a97c450e123e08f3881cd80ce (patch) | |
| tree | 9486f51f5f4f23a6c0fc2ba856cba832438d38c3 /wifi | |
| parent | 4ab7bb48a4a0d4cecd4e3f5de6d88075a7b20f48 (diff) | |
| parent | a7c17deb32fe28230b77b0dff17bb113088a5c16 (diff) | |
| download | hardware_libhardware_legacy-6c8bc31ebe68911a97c450e123e08f3881cd80ce.tar.gz hardware_libhardware_legacy-6c8bc31ebe68911a97c450e123e08f3881cd80ce.tar.bz2 hardware_libhardware_legacy-6c8bc31ebe68911a97c450e123e08f3881cd80ce.zip | |
Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/hardware/libhardware_legacy into 1.1
Android 4.2.2 release 1
Diffstat (limited to 'wifi')
| -rw-r--r-- | wifi/wifi.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c index b21bfb4..b51dab0 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -888,11 +888,19 @@ int wifi_start_supplicant(int p2p_supported) return -1; } -int wifi_stop_supplicant() +int wifi_stop_supplicant(int p2p_supported) { char supp_status[PROPERTY_VALUE_MAX] = {'\0'}; int count = 50; /* wait at most 5 seconds for completion */ + if (p2p_supported) { + strcpy(supplicant_name, P2P_SUPPLICANT_NAME); + strcpy(supplicant_prop_name, P2P_PROP_NAME); + } else { + strcpy(supplicant_name, SUPPLICANT_NAME); + strcpy(supplicant_prop_name, SUPP_PROP_NAME); + } + /* Check whether supplicant already stopped */ if (property_get(supplicant_prop_name, supp_status, NULL) && strcmp(supp_status, "stopped") == 0) { @@ -909,6 +917,7 @@ int wifi_stop_supplicant() } usleep(100000); } + ALOGE("Failed to stop supplicant"); return -1; } |
