diff --git a/src/wifi/wifid-dbus.c b/src/wifi/wifid-dbus.c index ab9d9e5..276f2c3 100644 --- a/src/wifi/wifid-dbus.c +++ b/src/wifi/wifid-dbus.c @@ -309,6 +309,7 @@ static const sd_bus_vtable peer_dbus_vtable[] = { SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_SIGNAL("ProvisionDiscovery", "ss", 0), SD_BUS_SIGNAL("GoNegRequest", "ss", 0), + SD_BUS_SIGNAL("FormationFailure", "s", 0), SD_BUS_VTABLE_END }; diff --git a/src/wifi/wifid-supplicant.c b/src/wifi/wifid-supplicant.c index 3f3cca1..a87e6f2 100644 --- a/src/wifi/wifid-supplicant.c +++ b/src/wifi/wifid-supplicant.c @@ -1298,6 +1298,20 @@ static void supplicant_event_p2p_group_removed(struct supplicant *s, supplicant_group_free(g); } +static void supplicant_event_p2p_go_neg_failure(struct supplicant *s, + struct wpas_message *ev) +{ + struct peer *p; + + if (s->pending) { + log_debug("peer %s group owner negotiation failed", + s->pending->friendly_name); + p = s->pending->p; + s->pending = NULL; + peer_supplicant_formation_failure(p, "group owner negotiation failed"); + } +} + static void supplicant_event_p2p_group_formation_failure(struct supplicant *s, struct wpas_message *ev) { @@ -1478,6 +1492,8 @@ static void supplicant_event(struct supplicant *s, struct wpas_message *m) supplicant_event_p2p_group_started(s, m); else if (!strcmp(name, "P2P-GROUP-REMOVED")) supplicant_event_p2p_group_removed(s, m); + else if (!strcmp(name, "P2P-GO-NEG-FAILURE")) + supplicant_event_p2p_go_neg_failure(s, m); else if (!strcmp(name, "P2P-GROUP-FORMATION-FAILURE")) supplicant_event_p2p_group_formation_failure(s, m); else if (!strcmp(name, "AP-STA-CONNECTED"))