]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Notify device expiry via P2P-DEVICE-LOST event
authorJithu Jance <jithu@broadcom.com>
Fri, 28 Oct 2011 19:13:18 +0000 (22:13 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2011 19:13:18 +0000 (22:13 +0300)
This patch will notify applications listening over control socket about
the device expiry [from p2p peer list].

src/common/wpa_ctrl.h
wpa_supplicant/p2p_supplicant.c

index fd096e78a69553300d565b2328e2011442f88013..6cd9de5d17043214243ae648019d3731db5184c1 100644 (file)
@@ -99,6 +99,10 @@ extern "C" {
 
 /** P2P device found */
 #define P2P_EVENT_DEVICE_FOUND "P2P-DEVICE-FOUND "
+
+/** P2P device lost */
+#define P2P_EVENT_DEVICE_LOST "P2P-DEVICE-LOST "
+
 /** A P2P device requested GO negotiation, but we were not ready to start the
  * negotiation */
 #define P2P_EVENT_GO_NEG_REQUEST "P2P-GO-NEG-REQUEST "
index edae2da85926914df4e8bc78f81ebde59d6dd09b..477e0092c307b82447eeef894c7db8fba085a7f9 100644 (file)
@@ -983,6 +983,9 @@ static void wpas_dev_lost(void *ctx, const u8 *dev_addr)
 {
        struct wpa_supplicant *wpa_s = ctx;
 
+       wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_DEVICE_LOST
+               "p2p_dev_addr=" MACSTR, MAC2STR(dev_addr));
+
        wpas_notify_p2p_device_lost(wpa_s, dev_addr);
 }