I think I've found the root of the problem and a solution (well, it works for me anyway).
If Bluetooth is enabled and you have a Magic Mouse (as I do), I have issues with wireless recovering correctly after waking up IF the Magic Mouse isn't switched on ready to reconnect. If the mouse is switched on, wireless reconnects to the wireless network flawlessly.
This isn't always convenient as I don't always carry my Magic Mouse with me thus need to ensure Bluetooth is disabled in order to overcome the erratic reconnection of wireless.
With a combination of a couple of utilities, I've configured my macbook pro retina to disable bluetooth on sleep and to reenable it on wake after 5 seconds.
The utilities I have used are: blueutil and controlpanel v1.4.0
This has FINALLY given me a tolerable workabout for an horendous problem.
The solution of manually disabling bluetooth or toggling wi-fi on and off is an annoying workaround, at least this method is automated.
Thinking more about it also, it's probably not just the Magic Mouse, it's probably anything bluetooth related. I noticed that if i removed the pairing of my mouse and ensured NOTHING was listed in bluetooth devices, even with bluetooth switched on, wi-fi reconnects flawlessly, it only faultered (pretty persistently I'll add) when a bluetooth item was paired (presumably attempting to connect to it and clashing with the wi-fi activity).
Downloaded utilities from:
blueutil - http://www.frederikseiffert.de/blueutil/
control panel - http://www.controlplaneapp.com
I then created two shell scripts called bluetooth-on.sh and bluetooth-off.sh containing the following
bluetooth-on.sh
#!/bin/sh
blueutil on
bluetooth-off.sh
#!/bin/sh
blueutil off
I then used the Sleep/Wake features of the ControlPlane application to run the scripts at sleep/wake. You'll need to chmod u+x the script files to make them executable.
I really hope this helps someone! If it does help, please give credit where it's due to the developers of the software and to me for hopefully (and finally) finding an half decent and non-intrusive workaround.
Thanks
Mark Smith
msitgroup
P.S. Incidentally, the SMC and PRAM resets + other tricks such as adding network locations did nothing for me, only the bluetooth disabling seems to fix it on my MBP. I've a feeling it may have only affected other people coincidentally with a combination of their magic mouse being switched on already, bluetooth already being disabled already etc etc. This has been through hours of different scenario testings and I can now guarantee using the above software packages that my MBP starts up with wireless working every single time whereas before, it was problematic at least 3 in 4 wakeups.