Browse Source

P2P: Add group removed notification

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 14 years ago
parent
commit
408af93ed4
3 changed files with 14 additions and 0 deletions
  1. 7 0
      wpa_supplicant/notify.c
  2. 3 0
      wpa_supplicant/notify.h
  3. 4 0
      wpa_supplicant/p2p_supplicant.c

+ 7 - 0
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 */

+ 3 - 0
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 */

+ 4 - 0
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;