How well this works depends on if the WiFi driver can be put in Access Point/Master mode.
If that doesn't work, you need ad-hoc. This means only 1 device, and WiFi PSM (Power Save Mode) will be disabled which means the device will use considerable juice.