At the time, I was completely stock, not root, locked bootloader, nothing. So I though maybe unlocking, rooting, and flashing a custom ROM would fix the problem. I've tried a few different ROMs and they all have the same problem. I can turn the WiFi on and scan, but as soon as I try to connect to any network it freezes and turns off. I even get an error message say that "Settings has become unresponsive" and asks to send an error report to HTC.
Then today, I got another software update message saying there is another software update available but I can't download it since I can't connect to WiFi at all.
Any ideas what I can do to fix the problem?