wpa_supplicant(hidl): Support WPS PIN when device is already GO

Current HIDL implementation doesn't handle ap_iface(GO).
When device is already GO, wpa_supplicant_ap_wps_pin should be called.
This patch just fixes for PIN keypad because Android framework uses only
startWpsPinKeypadInternal for PIN method when DUT is GO.
Hence, startWpsPinDisplayInternal doesn't care.

Bug: 38251521
Test: None

Change-Id: I7aae7c0570d53726460c02ac545c0413cc0da211

Signed-off-by: Glen Kuhne <kuh@google.com>
diff --git a/wpa_supplicant/hidl/1.0/p2p_iface.cpp b/wpa_supplicant/hidl/1.0/p2p_iface.cpp
index 839fcee..ab4014d 100644
--- a/wpa_supplicant/hidl/1.0/p2p_iface.cpp
+++ b/wpa_supplicant/hidl/1.0/p2p_iface.cpp
@@ -1059,6 +1059,15 @@
 	if (!wpa_group_s) {
 		return {SupplicantStatusCode::FAILURE_IFACE_UNKNOWN, ""};
 	}
+#ifdef CONFIG_AP
+	if (wpa_group_s->ap_iface) {
+		if (wpa_supplicant_ap_wps_pin(
+				wpa_group_s, nullptr, pin.c_str(), nullptr, 0, 0) < 0) {
+			return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};
+		}
+		return {SupplicantStatusCode::SUCCESS, ""};
+	}
+#endif /* CONFIG_AP */
 	if (wpas_wps_start_pin(
 		wpa_group_s, nullptr, pin.c_str(), 0, DEV_PW_DEFAULT)) {
 		return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};