aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-08-09 19:15:14 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-09 20:18:31 (GMT)
commitb22ecea902e74a77a26ffe753dee62159682b50b (patch)
tree032e169dcb69a5606d6ca623b4deb02454e2e5bf /wpa_supplicant
parent37f8b9da1a7759186b5d70e2e6c50d400ce41ced (diff)
downloadhostap-b22ecea902e74a77a26ffe753dee62159682b50b.zip
hostap-b22ecea902e74a77a26ffe753dee62159682b50b.tar.gz
hostap-b22ecea902e74a77a26ffe753dee62159682b50b.tar.bz2
AOSP: driver_cmd
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface.c17
-rw-r--r--wpa_supplicant/driver_i.h10
2 files changed, 27 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 0f2c18e..77b8535 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -3527,6 +3527,18 @@ static int wpa_supplicant_signal_poll(struct wpa_supplicant *wpa_s, char *buf,
return ret;
}
+#ifdef ANDROID
+static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
+ char *buf, size_t buflen)
+{
+ int ret;
+
+ ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen);
+ if (ret == 0)
+ ret = sprintf(buf, "%s\n", "OK");
+ return ret;
+}
+#endif
char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
char *buf, size_t *resp_len)
@@ -3950,6 +3962,11 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
} else if (os_strncmp(buf, "SIGNAL_POLL", 11) == 0) {
reply_len = wpa_supplicant_signal_poll(wpa_s, reply,
reply_size);
+#ifdef ANDROID
+ } else if (os_strncmp(buf, "DRIVER ", 7) == 0) {
+ reply_len = wpa_supplicant_driver_cmd(wpa_s, buf + 7, reply,
+ reply_size);
+#endif
} else if (os_strcmp(buf, "REAUTHENTICATE") == 0) {
eapol_sm_request_reauth(wpa_s->eapol);
} else {
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index d8567b6..592408e 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -648,6 +648,16 @@ static inline int wpa_drv_tdls_oper(struct wpa_supplicant *wpa_s,
return wpa_s->driver->tdls_oper(wpa_s->drv_priv, oper, peer);
}
+#ifdef ANDROID
+static inline int wpa_drv_driver_cmd(struct wpa_supplicant *wpa_s,
+ char *cmd, char *buf, size_t buf_len)
+{
+ if (!wpa_s->driver->driver_cmd)
+ return -1;
+ return wpa_s->driver->driver_cmd(wpa_s->drv_priv, cmd, buf, buf_len);
+}
+#endif
+
static inline void wpa_drv_set_rekey_info(struct wpa_supplicant *wpa_s,
const u8 *kek, const u8 *kck,
const u8 *replay_ctr)