Can I use my iPhone as a hotspot on Wifi (instead of 3G/4G)?
Solution 1:
You can do this with USB or Bluetooth tethering on jailbroken iOS devices using an app such as MyWi. There are many other jailbreak apps for this function, so it's worth shopping around.
Some will only share the 3G internet connection, but I understand others will share any internet connection over USB or bluetooth.
You can't use wifi tethering to connect your computer to a wifi network your phone knows about.
The hotspot creates a new wireless network, but the iPhone is capable of attaching to only one wireless network at a time. It cannot connect to a wireless network with internet and create its own wireless network to share.
Since the iPhone is on the wireless network, though, you can get your computer on that same network since it will likely be in range.
Solution 2:
According to an Apple Support KB:
You cannot use your Wi-Fi connection for Internet connectivity while other devices are using Wi-Fi for Personal Hotspot. You can share only a cellular data connection; you cannot share a Wi-Fi connection.
This KB mentions the support for hotspots, by device:
While this Apple Support information might not apply to jail-broken devices, it's good for reference.