The solution for me was to delete the wifi network and keychain password.
The first time i fixed it by restoring from Time Machine which took a long time. I also tried the renew DHCP, delete com.alf.plist etc to no avail.
Follow this steps:
Go to Network Settings
Turn Airport Off
Click Advanced tab
Select my wifi network and hit minus sign to delete Click Okay Click apply Go to Keychain access in Applications/Utilities Find your network name in the list and delete that password login Then go back to Network settings and turn airport back on Click Advanced Click plus sign then Show Networks Choose your network and re-enter your password Click Okay Click Apply Then airport should work again.