aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_priv.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-09-29 14:09:26 (GMT)
committerJouni Malinen <j@w1.fi>2008-09-29 14:09:26 (GMT)
commit38fa7634052e0ac1e6b354c8d536b1844a7f4b28 (patch)
tree18b505d6bddebba6dccb0c489974b18da995569b /wpa_supplicant/wpa_priv.c
parent147bdb3f9cba4931d467db2e7d6f56e9828b7a77 (diff)
downloadhostap-38fa7634052e0ac1e6b354c8d536b1844a7f4b28.zip
hostap-38fa7634052e0ac1e6b354c8d536b1844a7f4b28.tar.gz
hostap-38fa7634052e0ac1e6b354c8d536b1844a7f4b28.tar.bz2
Added set_mode() handler for privsep
Diffstat (limited to 'wpa_supplicant/wpa_priv.c')
-rw-r--r--wpa_supplicant/wpa_priv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_priv.c b/wpa_supplicant/wpa_priv.c
index 4a8d363..231b962 100644
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
@@ -564,6 +564,17 @@ static void wpa_priv_cmd_l2_send(struct wpa_priv_interface *iface,
}
+static void wpa_priv_cmd_set_mode(struct wpa_priv_interface *iface,
+ void *buf, size_t len)
+{
+ if (iface->drv_priv == NULL || iface->driver->set_mode == NULL ||
+ len != sizeof(int))
+ return;
+
+ iface->driver->set_mode(iface->drv_priv, *((int *) buf));
+}
+
+
static void wpa_priv_receive(int sock, void *eloop_ctx, void *sock_ctx)
{
struct wpa_priv_interface *iface = eloop_ctx;
@@ -635,6 +646,9 @@ static void wpa_priv_receive(int sock, void *eloop_ctx, void *sock_ctx)
case PRIVSEP_CMD_L2_SEND:
wpa_priv_cmd_l2_send(iface, &from, cmd_buf, cmd_len);
break;
+ case PRIVSEP_CMD_SET_MODE:
+ wpa_priv_cmd_set_mode(iface, cmd_buf, cmd_len);
+ break;
}
}