]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: wext: Add driver state events
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 25 Nov 2011 19:08:52 +0000 (21:08 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 29 Nov 2011 13:18:21 +0000 (15:18 +0200)
src/drivers/android_drv.h [new file with mode: 0644]
src/drivers/driver_wext.c

diff --git a/src/drivers/android_drv.h b/src/drivers/android_drv.h
new file mode 100644 (file)
index 0000000..5417116
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Android driver interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ */
+
+#ifndef ANDROID_DRV_H
+#define ANDROID_DRV_H
+
+#define WPA_EVENT_DRIVER_STATE "CTRL-EVENT-DRIVER-STATE "
+
+#endif /* ANDROID_DRV_H */
index 90976852fb67527f691ed0ccd68e6f3530f111be..a4152b411fc95536eee87e8834a1ccf7fb164cfa 100644 (file)
@@ -37,6 +37,9 @@
 #include "driver.h"
 #include "driver_wext.h"
 
+#ifdef ANDROID
+#include "android_drv.h"
+#endif /* ANDROID */
 
 static int wpa_driver_wext_flush_pmkid(void *priv);
 static int wpa_driver_wext_get_range(void *priv);
@@ -302,6 +305,14 @@ wpa_driver_wext_event_wireless_custom(void *ctx, char *custom)
                }
                wpa_supplicant_event(ctx, EVENT_STKSTART, &data);
 #endif /* CONFIG_PEERKEY */
+#ifdef ANDROID
+       } else if (os_strncmp(custom, "STOP", 4) == 0) {
+               wpa_msg(ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STOPPED");
+       } else if (os_strncmp(custom, "START", 5) == 0) {
+               wpa_msg(ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STARTED");
+       } else if (os_strncmp(custom, "HANG", 4) == 0) {
+               wpa_msg(ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
+#endif /* ANDROID */
        }
 }