aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-02-24 20:22:16 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-24 20:22:16 (GMT)
commit56eeb8f2996607e453737211470fcd3b525fddb0 (patch)
treeb773b5a53c853ac24ce5c1fe68e5e645d978f369 /src
parentd642d2d2676b8da7b938f7c9dea4723ac86612ca (diff)
downloadhostap-56eeb8f2996607e453737211470fcd3b525fddb0.zip
hostap-56eeb8f2996607e453737211470fcd3b525fddb0.tar.gz
hostap-56eeb8f2996607e453737211470fcd3b525fddb0.tar.bz2
P2P: Add method to signal lost device
This signal is used to notify users of the P2P state machine or wpa_supplicant of lost devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p.c2
-rw-r--r--src/p2p/p2p.h9
2 files changed, 11 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 76cdf27..3211ba2 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -560,6 +560,8 @@ static void p2p_device_free(struct p2p_data *p2p, struct p2p_device *dev)
if (p2p->pending_client_disc_go == dev)
p2p->pending_client_disc_go = NULL;
+ p2p->cfg->dev_lost(p2p->cfg->cb_ctx, dev->info.p2p_device_addr);
+
os_free(dev);
}
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 0d09d1e..f41e64d 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -442,6 +442,15 @@ struct p2p_config {
int new_device);
/**
+ * dev_lost - Notification of a lost P2P Device
+ * @ctx: Callback context from cb_ctx
+ * @dev_addr: P2P Device Address of the lost P2P Device
+ *
+ * This callback is used to notify that a P2P Device has been deleted.
+ */
+ void (*dev_lost)(void *ctx, const u8 *dev_addr);
+
+ /**
* go_neg_req_rx - Notification of a receive GO Negotiation Request
* @ctx: Callback context from cb_ctx
* @src: Source address of the message triggering this notification