How can I fix the Wi-Fi button or prevent Wi-Fi errors when turning it off and back on? Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button.  Hitting the button does nothing, it's not even highlighted.  When I go into Settings -&gt; Wireless and network -&gt; Wi-Fi settings the status under "Wi-Fi" shows Error.  If I click "Wi-Fi" to turn it on from here, it usually turns on without any problems.  Occassionally I have to reboot to fix it.

Is there a fix I can use to make the TouchWiz Wi-Fi button work the same as enabling/disabling the Wi-Fi in Settings?  Or, ideally, is there some way I can prevent the Wi-Fi from getting into an error state when I turn it off and back on?

I have a Galaxy S Vibrant running 2.2, but this has been reported on other Samsung phones as well (example).
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "FXR WiFi Fix And Rescue" app, and it's been tested on the Vibrant. You can also try WiFi Fixer.