When such case occurs, you need to recover firmware to the original version. Please do the following steps:
- Power off the device.
- Enter recovery menu by powering on the device while holding both Volume UP and Action buttons (video).
- In the menu choose "restore" (not "reset").
- Wait until device reboots and try to connect to wi-fi.
Sometimes "restore" might not work for the first time, please repeat steps described above one more time.
After that try updating the firmware to the latest via USB.