P2P: Add group removed notification

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2011-02-24 22:27:23 +02:00 committed by Jouni Malinen
parent 56eeb8f299
commit 408af93ed4
3 changed files with 14 additions and 0 deletions

View file

@ -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 */ #endif /* CONFIG_P2P */

View file

@ -82,5 +82,8 @@ void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
const u8 *dev_addr, int new_device); const u8 *dev_addr, int new_device);
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s, void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
const u8 *dev_addr); 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 */ #endif /* NOTIFY_H */

View file

@ -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_msg(wpa_s->parent, MSG_INFO, P2P_EVENT_GROUP_REMOVED "%s %s%s",
wpa_s->ifname, gtype, reason); 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) { if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
struct wpa_global *global; struct wpa_global *global;
char *ifname; char *ifname;