P2P: Use specific go_bssid field instead of generic bssid field

The bssid field stores the value of the P2P Device Address, not the P2P
interface address, but the interface address is the one that is used for
the BSSID of the resulting GO (see
http://lists.infradead.org/pipermail/hostap/2023-February/041392.html
for details).

This was fixed in the patch that was eventually upstreamed. Align it
here.

Bug: 233925359
Test: set up GO on a device with P2P test app, discovered GO on client
device with wifi picker, switched to P2P test app on client device and
joined the group, looked at logs to verify that scan retry mechanism
works as expected (only GO frequency scanned)
Test: persistent connection using WiFi Direct in Settings menu - connect, disconnect, reconnect (no dialog box).

Change-Id: I5aa732c6f72d6e287896d7fc4e0d5b08a1035627
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 926ba7a..cf1a403 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3331,7 +3331,7 @@
 				wpa_s->conf->p2p_go_edmg, NULL,
 				go ? P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE : 0,
 				1, is_p2p_allow_6ghz(wpa_s->global->p2p), 0,
-				false);
+				NULL);
 		} else if (bssid) {
 			wpa_s->user_initiated_pd = 0;
 			wpa_msg_global(wpa_s, MSG_INFO,
@@ -3562,7 +3562,7 @@
 				      P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE :
 				      0, 1,
 				      is_p2p_allow_6ghz(wpa_s->global->p2p), 0,
-				      false);
+				      NULL);
 }
 
 
@@ -4648,7 +4648,7 @@
 					persistent_go->mode ==
 					WPAS_MODE_P2P_GO ?
 					P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE :
-					0, 0, false, 0, false);
+					0, 0, false, 0, NULL);
 			} else if (response_done) {
 				wpas_p2p_group_add(wpa_s, 1, freq,
 						   0, 0, 0, 0, 0, 0, false);
@@ -4771,7 +4771,7 @@
 			NULL,
 			persistent_go->mode == WPAS_MODE_P2P_GO ?
 			P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE : 0, 0,
-			is_p2p_allow_6ghz(wpa_s->global->p2p), 0, false);
+			is_p2p_allow_6ghz(wpa_s->global->p2p), 0, NULL);
 	} else {
 		wpas_p2p_group_add(wpa_s, 1, freq, 0, 0, 0, 0, 0, 0,
 				   is_p2p_allow_6ghz(wpa_s->global->p2p));
@@ -6996,7 +6996,7 @@
 static int wpas_start_p2p_client(struct wpa_supplicant *wpa_s,
 				 struct wpa_ssid *params, int addr_allocated,
 				 int freq, int force_scan, int retry_limit,
-				 bool force_go_bssid)
+				 const u8 *go_bssid)
 {
 	struct wpa_ssid *ssid;
 	int other_iface_found = 0;
@@ -7039,9 +7039,9 @@
 	if (params->passphrase)
 		ssid->passphrase = os_strdup(params->passphrase);
 
-	if (force_go_bssid && params->bssid_set) {
+	if (go_bssid) {
 		ssid->bssid_set = 1;
-		os_memcpy(ssid->bssid, params->bssid, ETH_ALEN);
+		os_memcpy(ssid->bssid, go_bssid, ETH_ALEN);
 	}
 
 	wpa_s->show_group_started = 1;
@@ -7091,7 +7091,7 @@
 				  const struct p2p_channels *channels,
 				  int connection_timeout, int force_scan,
 				  bool allow_6ghz, int retry_limit,
-				  bool force_go_bssid)
+				  const u8 *go_bssid)
 {
 	struct p2p_go_neg_results params;
 	int go = 0, freq;
@@ -7161,7 +7161,7 @@
 
 		return wpas_start_p2p_client(wpa_s, ssid, addr_allocated, freq,
 					     force_scan, retry_limit,
-					     force_go_bssid);
+					     go_bssid);
 	} else {
 		return -1;
 	}