[wpa_supplicant] Fix merge error that broke VtsHalWifiSupplicantP2pV1_0Target

Fix merge error in notify.c that broke VTS test case
VtsHalWifiSupplicantP2pV1_0Target. Revert the code, and remove code
related to old dbus interface which has been removed from the upstream
version.

Bug: 131376215
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantP2pV1_0Target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_0Host
Change-Id: I8248ebb3d7b66a2584408b74bc3ac6bba6877a6e
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index bd4b8ae..41dc334 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -60,30 +60,28 @@
 
 int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
 {
-	if (wpa_s->p2p_mgmt)
-		return 0;
+	if (!wpa_s->p2p_mgmt) {
+		if (wpas_dbus_register_interface(wpa_s))
+			return -1;
+	}
 
 	/* HIDL interface wants to keep track of the P2P mgmt iface. */
 	if (wpas_hidl_register_interface(wpa_s))
 		return -1;
 
-	if (wpas_dbus_register_interface(wpa_s))
-		return -1;
-
 	return 0;
 }
 
 
 void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s)
 {
-	if (wpa_s->p2p_mgmt)
-		return;
+	if (!wpa_s->p2p_mgmt) {
+		/* unregister interface in new DBus ctrl iface */
+		wpas_dbus_unregister_interface(wpa_s);
+	}
 
 	/* HIDL interface wants to keep track of the P2P mgmt iface. */
 	wpas_hidl_unregister_interface(wpa_s);
-
-	/* unregister interface in new DBus ctrl iface */
-	wpas_dbus_unregister_interface(wpa_s);
 }