Is it the WiFi or the ISP connection that is not working? If it is the ISP connection, then it is not obvious that there is any advantage in doing an iOS upgrade.
If your WiFi is not working and you want to upgrade a device that only has WiFi, then you could use an Ethernet connection to a PC that also has WiFi capability. Set the PC to provide Internet connection sharing and offer a WiFi hotspot. Your Internet connection can come as far as the PC over wired connections, and then use WiFi from the PC to the device you want to upgrade.
Other alternatives. For a portable device, go to McDonalds and enjoy a burger while you upgrade using their WiFi. Or go to an Apple store and upgrade there.
Of course, if it is a WiFi problem and not a problem with your ISP connection, then you need to ascertain that it is not the device itself that has faulty WiFi. If it is the device, then replace it.