That was a known issue with a few iPhones. Sync your data to your computer, restore the iPhone to factory, restore the iOS, do any updates, and then re-sync to restore all your apps, photos, music, etc. That should fix the WIFI problem.
Thanks Sword, I’ll give that a whirl.