For those who can't apply the above fix due to "S on" (pretty much everyone?) you can try the easier way which I've posted in another thread. Some people said it doesn't help but there's no harm in trying :)
there's a stock setting that can enable Desire S to hold Wi Fi connection a lot better. Go to Settings -> Wireless & networks -> Wi-Fi settings. Click menu button and choose Advanced. Second section from the top is "Best Wi-Fi performance" - tick it. That's it. It really made the difference for me. Dropped Wi Fi signal was a frequent thing with my Desire S but ever since I've ticked this option (~1 week ago) I haven't had such problem at all.