am f1889e00: Merge "Enable EAP-PWD support in wpa_supplicant."
* commit 'f1889e00dfe14199657e4c603e3d94a3df10ae66':
Enable EAP-PWD support in wpa_supplicant.
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 6f6aff6..4f555a0 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -13,6 +13,8 @@
# To ignore possible wrong network configurations
L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
+L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
+
# Set Android log name
L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 9dc2494..df309c5 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -43,9 +43,6 @@
#if defined(ANDROID_BRCM_P2P_PATCH) && !defined(HOSTAPD)
#include "wpa_supplicant_i.h"
#endif
-#ifdef ANDROID
-#define WPA_EVENT_DRIVER_STATE "CTRL-EVENT-DRIVER-STATE "
-#endif
#ifdef CONFIG_LIBNL20
/* libnl 2.0 compatibility code */
#define nl_handle nl_sock
@@ -1519,15 +1516,9 @@
}
drv->associated = 0;
os_memset(&data, 0, sizeof(data));
- if (tb[NL80211_ATTR_REASON_CODE]) {
+ if (tb[NL80211_ATTR_REASON_CODE])
data.disassoc_info.reason_code =
nla_get_u16(tb[NL80211_ATTR_REASON_CODE]);
-#ifdef ANDROID
- if (data.disassoc_info.reason_code == WLAN_REASON_UNSPECIFIED)
- wpa_msg(drv->ctx, MSG_INFO,
- WPA_EVENT_DRIVER_STATE "HANGED");
-#endif
- }
wpa_supplicant_event(drv->ctx, EVENT_DISASSOC, &data);
break;
case NL80211_CMD_MICHAEL_MIC_FAILURE:
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index 50f8dd7..f1ef67f 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -31,6 +31,8 @@
# To ignore possible wrong network configurations
L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
+L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
+
# Set Android log name
L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index a163c28..e05602c 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -923,6 +923,22 @@
if (res >= 0)
pos += res;
+#ifdef ANDROID
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
+ "id=%d state=%d BSSID=" MACSTR,
+ wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
+ wpa_s->wpa_state, MAC2STR(wpa_s->pending_bssid));
+ if (wpa_s->wpa_state == WPA_COMPLETED) {
+ struct wpa_ssid *ssid = wpa_s->current_ssid;
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- connection to "
+ MACSTR " completed %s [id=%d id_str=%s]",
+ MAC2STR(wpa_s->bssid), wpa_s->reassociated_connection ?
+ "(reauth)" : "(auth)",
+ ssid ? ssid->id : -1,
+ ssid && ssid->id_str ? ssid->id_str : "");
+ }
+#endif /* ANDROID */
+
return pos - buf;
}
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 69fa99f..bb64e9a 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -504,6 +504,7 @@
*/
void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec)
{
+#ifndef ANDROID
/* If there's at least one network that should be specifically scanned
* then don't cancel the scan and reschedule. Some drivers do
* background scanning which generates frequent scan results, and that
@@ -525,7 +526,7 @@
return;
}
}
-
+#endif
wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec",
sec, usec);
eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL);