I usually have problems with the wifi after flashing myself, but heres how I do it:
1. Flash either stock or pre-rooted rom from the thread in xda. Doesn't matter if wifi isn't working here.
(1.5. Root the stock rom with cf-auto-root if it's not already).
2. Install triangle away, and use it.
3. After triangle away finishes up and gives you the option to go to download mode, do that.
4. Flash stock rom (or whatever rom you want), with auto reboot off.
5. Power down phone after its finished. Then power back up, and go into the recovery (it should be the stock recovery).
6. Do "Wipe data partition" then "Wipe cache partition" (phone will reboot after doing this one). You want to go directly to download mode again after the phone reboots.
7. Flash the modem, as "Phone" in odin, with auto reboot off.
8. Restart phone again into download mode, flash modem again with auto reboot off. Then start up phone as normally when flashing is done. Hopefully the wifi works after that.
It is long, and sometimes doesn't work but its my best method so far. Using triangle away seems to help it.
EDIT: Triangle away gives you the option to go straight to download mode after it finishes. Also there is a thread here on xda which has all the modems. If you are restoring to MGA, the Omega thread has the modem in the installation instructions I think.