Same Problem
I upgraded to the new iOS 5.1 on my iPhone 3gs and the wifi stopped working unless I'm right next to my router (just discovered that last night after a reset). Away from home my phone doesn't pick up any routers at all even though my computer will work just fine. The location services also stopped working properly, which is something I read about in another thread. I think something in the iOS5 screws up the 3gs wifi.