From c10ca2a66fac1758baad2d76c151251ab62ddcef Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Fri, 6 Mar 2015 20:17:29 +0530 Subject: [PATCH] TDLS: Allow driver to request TDLS Discovery Request initiation This extends the TDLS operation request mechanism to allow TDLS Discovery Request to be initiated by the driver similarly to the existing Setup and Teardown requests. Signed-off-by: Jouni Malinen --- src/drivers/driver.h | 3 ++- wpa_supplicant/events.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index d35309afb..03bd1a79a 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -4148,7 +4148,8 @@ union wpa_event_data { u8 peer[ETH_ALEN]; enum { TDLS_REQUEST_SETUP, - TDLS_REQUEST_TEARDOWN + TDLS_REQUEST_TEARDOWN, + TDLS_REQUEST_DISCOVER, } oper; u16 reason_code; /* for teardown */ } tdls; diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index a368c6de0..05d751cdf 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2494,6 +2494,10 @@ static void wpa_supplicant_event_tdls(struct wpa_supplicant *wpa_s, wpa_drv_tdls_oper(wpa_s, TDLS_TEARDOWN, data->tdls.peer); break; + case TDLS_REQUEST_DISCOVER: + wpa_tdls_send_discovery_request(wpa_s->wpa, + data->tdls.peer); + break; } } #endif /* CONFIG_TDLS */