What made my Air finally connect to wi-fi after sleep.
I finally got my mid 2011 MBA to connect to my preferred network when waking from sleep. It is something you may have read elsewhere but I can confirm it worked for me. You have to disable the "deep sleep mode". When a Air goes into deep sleep is when (for me) it failed to wake my network back up. I switched off deep sleep and not only does it wake up faster it wakes up connected to the Wi-fi network. How do you turn off deep sleep? Using the terminal command
sudo pmset -a hibernatemode 0
If you are like me you may say what is a terminal command? Go to spotlight (that magnifying glass icon top right corner of your screen) and type terminal. Click the Terminal next to Applications. Copy paste the command I posted above and supply your password if you have one. What this does is disables the deep sleep mode that the Air's use for maximum battery life while left sleeping and on battery. This is why my Air always connected to wi-fi when it was plugged in to power, because it never enters deep sleep when on external power. Now the computer goes to sleep and wakes up as intended and no more turning airport on and off to start wi-fi back up. Try for yourself and if it does not work...your Air is broken (I guess).
If it did not work and you want to put the computer back to the way it was go back to terminal as above and then copy and paste this command back in.
sudo pmset -a hibernatemode 3
In case you worried your computer now does not sleep, it does. It goes into plain sleep mode as the old Macbooks that awoke just fine used to do.
MacBook Air, Mac OS X (10.7.3)