hostapd: Allow hostapd_cli to work on Android

Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jeff Johnson 2012-09-03 22:12:17 -07:00 committed by Jouni Malinen
parent 1c6edec60c
commit 2d39a4d8a5
2 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,10 @@ ifeq ($(BOARD_WLAN_DEVICE), mrvl)
L_CFLAGS += -DANDROID_P2P L_CFLAGS += -DANDROID_P2P
endif 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 # To force sizeof(enum) = 4
ifeq ($(TARGET_ARCH),arm) ifeq ($(TARGET_ARCH),arm)
L_CFLAGS += -mabi=aapcs-linux L_CFLAGS += -mabi=aapcs-linux

View file

@ -91,7 +91,12 @@ static const char *commands_help =
static struct wpa_ctrl *ctrl_conn; static struct wpa_ctrl *ctrl_conn;
static int hostapd_cli_quit = 0; static int hostapd_cli_quit = 0;
static int hostapd_cli_attached = 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 char *ctrl_ifname = NULL;
static const char *pid_file = NULL; static const char *pid_file = NULL;
static const char *action_file = NULL; static const char *action_file = NULL;