diff mbox

How to use android branch ?

Message ID 20120425222651.GA17079@w1.fi
State Awaiting Upstream
Headers show

Commit Message

Jouni Malinen April 25, 2012, 10:26 p.m. UTC
On Wed, Apr 25, 2012 at 09:18:57PM +0900, Ryu Cheol wrote:
> I believe many of you are interested in newer wpa_supplicant for Android, I do too.
> I tried to run 'fe53fe' version on android-4.0.4 for Galaxy Nexus, but I failed to get it running.
> Before the trying, I just removed hardware/broadcom/wlan/bcmdhd/wpa_supplicant_8_lib.
> I attach two log files of android-4.0.4. The first is the failed one. The second is the log of wpa_supplicant_8 of aosp.

It looks like the control interface is configured incorrectly in the
/data/misc/wifi/p2p_supplicant.conf file:

> D/wpa_supplicant(  762): Reading configuration file '/data/misc/wifi/p2p_supplicant.conf'
> D/wpa_supplicant(  762): ctrl_interface='/data/misc/wifi'

That should really have been ctrl_interface=wlan0 and not that
/data/misc/wifi directory. The wpa_supplicant version in the AOSP
repository is hardcoding this in the implementation, but the proper way
of doing this would be to fix that configuration file. As a workaround,
this change can be applied to the hostap.git version to allow the Wi-Fi
framework to talk to wpa_supplicant in Wi-Fi Direct mode:

That said, it looks like this is not enough to make Wi-Fi Direct fully
functionality with the driver used in Galaxy Nexus. The following
P2P_LISTEN command seems to be failing in an nl80211 command to register
one of the frame types.
diff mbox


diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 6513604..5c9a81a 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -275,7 +275,7 @@  wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s)
 		goto fail;
 #ifdef ANDROID
 	os_snprintf(addr.sun_path, sizeof(addr.sun_path), "wpa_%s",
-		    wpa_s->conf->ctrl_interface);
+		    wpa_s->ifname);
 	priv->sock = android_get_control_socket(addr.sun_path);
 	if (priv->sock >= 0)
 		goto havesock;