P2P: Add GO negotiation status notification
authorJayant Sane <jayant.sane@intel.com>
Thu, 24 Feb 2011 20:34:52 +0000 (22:34 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Feb 2011 20:34:52 +0000 (22:34 +0200)
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant/notify.c
wpa_supplicant/notify.h
wpa_supplicant/p2p_supplicant.c

index e2ba7db..79f50c7 100644 (file)
@@ -376,4 +376,9 @@ void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
 {
 }
 
+
+void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s, int status)
+{
+}
+
 #endif /* CONFIG_P2P */
index 0495880..3a544c5 100644 (file)
@@ -87,5 +87,7 @@ void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
                                   const char *role);
 void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
                                const u8 *src, u16 dev_passwd_id);
+void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
+                                     int status);
 
 #endif /* NOTIFY_H */
index 1b33ad6..36d30fa 100644 (file)
@@ -1080,11 +1080,13 @@ void wpas_go_neg_completed(void *ctx, struct p2p_go_neg_results *res)
        if (res->status) {
                wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_GO_NEG_FAILURE "status=%d",
                        res->status);
+               wpas_notify_p2p_go_neg_completed(wpa_s, res->status);
                wpas_p2p_remove_pending_group_interface(wpa_s);
                return;
        }
 
        wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_GO_NEG_SUCCESS);
+       wpas_notify_p2p_go_neg_completed(wpa_s, P2P_SC_SUCCESS);
 
        if (wpa_s->create_p2p_iface) {
                struct wpa_supplicant *group_wpa_s =