p2p: update GO device information when group is started

If a GC leaves a group and re-connects to the GO quickly, the GC
might be at connected state but show no GO device.
This is a timing issue that GC removes GO device after previous
group removal clean-up and then be invited immediately.

Bug: 140534718
Test: connect to a peer and check logs.
Change-Id: I3b49257058cab0c47b2a60d54c07544690a88db1
diff --git a/wpa_supplicant/hidl/1.3/hidl_manager.cpp b/wpa_supplicant/hidl/1.3/hidl_manager.cpp
index f019c94..a7fd3f5 100644
--- a/wpa_supplicant/hidl/1.3/hidl_manager.cpp
+++ b/wpa_supplicant/hidl/1.3/hidl_manager.cpp
@@ -1247,6 +1247,16 @@
 	bool hidl_is_go = (client == 0 ? true : false);
 	bool hidl_is_persistent = (persistent == 1 ? true : false);
 
+	// notify the group device again to ensure the framework knowing this device.
+	struct p2p_data *p2p = wpa_s->global->p2p;
+	struct p2p_device *dev = p2p_get_device(p2p, wpa_group_s->go_dev_addr);
+	if (NULL != dev) {
+		wpa_printf(MSG_DEBUG, "P2P: Update GO device on group started.");
+		p2p->cfg->dev_found(p2p->cfg->cb_ctx, wpa_group_s->go_dev_addr,
+				&dev->info, !(dev->flags & P2P_DEV_REPORTED_ONCE));
+		dev->flags |= P2P_DEV_REPORTED | P2P_DEV_REPORTED_ONCE;
+	}
+
 	callWithEachP2pIfaceCallback(
 	    wpa_s->ifname,
 	    std::bind(