wpa_supplicant(hidl): Ensure P2P iface object is removed

The helper function used to determine if the removed interface is P2P or
not does not work in |unregisterInterface| method. This is because
supplicant core resets the internal pointers before notifying the HIDL
control interface.

Error Log being fixed:
01-30 12:57:17.081  4914  4914 D wpa_supplicant: Deregistering interface
from hidl control: p2p0
01-30 12:57:17.081  4914  4914 E wpa_supplicant: Failed to unregister
STA interface with HIDL control: p2p0

Bug: 72497243
Test: Able to close & start P2P settings multiple times & ensure P2P
still works (This triggers multiple P2P iface creation/deletion)

Change-Id: Ie52b4f8bc65e1a8abd40f577f717daea2f653853
1 file changed