Ad-hoc Wi-fi connection was possible on windows desktop until Windows 7 edition. Ad-hoc Wi-fi connection is also relevant today using Linux desktop (ubuntu) with wpa_supplicant installed and a good wifi PCI installed. You can turn on hotspot configured with ssid and passphrase on phone1 and it can be connected from wifi settings on phone2. In this way you can make connection via wifi between 2 phones. This is technically AccessPoint Mode & Station Mode connection establishment.