aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_priv.c
diff options
context:
space:
mode:
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;
}
}