aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-02-24 20:27:23 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-24 20:27:23 (GMT)
commit408af93ed4cfd61509ecd7d3cb15584f68f997f9 (patch)
tree11f8616bb8b6331ca20bb47c019374655ec5e5d4
parent56eeb8f2996607e453737211470fcd3b525fddb0 (diff)
downloadhostap-408af93ed4cfd61509ecd7d3cb15584f68f997f9.zip
hostap-408af93ed4cfd61509ecd7d3cb15584f68f997f9.tar.gz
hostap-408af93ed4cfd61509ecd7d3cb15584f68f997f9.tar.bz2
P2P: Add group removed notification
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--wpa_supplicant/notify.c7
-rw-r--r--wpa_supplicant/notify.h3
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index f693060..21aef87 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -363,4 +363,11 @@ void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
{
}
+
+void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
+ const struct wpa_ssid *ssid,
+ const char *role)
+{
+}
+
#endif /* CONFIG_P2P */
diff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h
index b423830..6973c45 100644
--- a/wpa_supplicant/notify.h
+++ b/wpa_supplicant/notify.h
@@ -82,5 +82,8 @@ void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
const u8 *dev_addr, int new_device);
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
const u8 *dev_addr);
+void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
+ const struct wpa_ssid *ssid,
+ const char *role);
#endif /* NOTIFY_H */
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a7d07ec..7376059 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -264,6 +264,10 @@ static void wpas_p2p_group_delete(struct wpa_supplicant *wpa_s)
}
wpa_msg(wpa_s->parent, MSG_INFO, P2P_EVENT_GROUP_REMOVED "%s %s%s",
wpa_s->ifname, gtype, reason);
+
+ if (ssid)
+ wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
+
if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
struct wpa_global *global;
char *ifname;