I've seen this issue quite a bit.
It's definitely not software related, but hardware related.
What you need to do is:
1) remove the back glass and unplug the battery and remove it.
2) Remove the Emi shield that covers the LCD connector
3) inspect the board and you will see a black big chip (the wifi IC). Looking straight down with the charging pins closer to you, it'll be on the right.
4) THE FIX - you need a hot air type of tool. I'm not sure if a hair dryer will do the trick, but I use a heat gun. You need to apply slight amount of heat. NOT a lot. Just enough to get it hot but not too hot (too hot = you can't touch) like I said, slight heat.
5) put the phone back together and voila. Works!
I've seen roughly 3 phones already same issue same fix. No warranties so far.