]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Allow hostapd_cli to work on Android
authorJeff Johnson <jjohnson@codeaurora.org>
Tue, 4 Sep 2012 05:12:17 +0000 (22:12 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:33 +0000 (16:36 +0200)
Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.

Change-Id: Iabcd8d70ef61fae6656066991240d55e65a032e4

hostapd/Android.mk
hostapd/hostapd_cli.c

index 02d3df314ecedfc03ac1092e33e7d83b45f57825..dada308744dc27cdd8f8561d536e4f0dadce1c97 100644 (file)
@@ -36,6 +36,10 @@ ifeq ($(BOARD_WLAN_DEVICE), mrvl)
 L_CFLAGS += -DANDROID_P2P
 endif
 
+# Use Android specific directory for control interface sockets
+L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
+L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/hostapd\"
+
 # To force sizeof(enum) = 4
 ifeq ($(TARGET_ARCH),arm)
 L_CFLAGS += -mabi=aapcs-linux
index 5f48fc89c079b20ecb0c88399c4c2ff723f16c99..7187abcfebb3d122347edb58309103bf72013c37 100644 (file)
@@ -91,7 +91,12 @@ static const char *commands_help =
 static struct wpa_ctrl *ctrl_conn;
 static int hostapd_cli_quit = 0;
 static int hostapd_cli_attached = 0;
-static const char *ctrl_iface_dir = "/var/run/hostapd";
+
+#ifndef CONFIG_CTRL_IFACE_DIR
+#define CONFIG_CTRL_IFACE_DIR "/var/run/hostapd"
+#endif /* CONFIG_CTRL_IFACE_DIR */
+static const char *ctrl_iface_dir = CONFIG_CTRL_IFACE_DIR;
+
 static char *ctrl_ifname = NULL;
 static const char *pid_file = NULL;
 static const char *action_file = NULL;