Just a guess but I ran into this type of problem a few days ago.
I installed a second SSD in my early 2011 MBPro. I had to disconnect my battery to do the operation. Once I was finished and turned on the MBPro, I got the expected your clock is not corrrect message. Also I got messages such as krb5kde and nmbd want access through my firewall to allow access to my connection. At the time I did not understand what those two do...I did allow access but then every time I put the MBPro to sleep I had to choose my wireless connection and enter the password.
What fixed that problem was to delete the wireless network then re-add it. Problem solved.
Thanks to Smokerz.
I solved the problem. Few days ago I reset my router to manufacturer's default and then made a setup with the same network name and security code while the router was unlocked, then I changed my mind and changed the settings to a secure WPA or WPA2 with the same network name and password. This caused my mac to connect to Internet whoever every time I logged out it did not stay connected when I woke up or Logged in.
To solve the problem.
Go to Network preferences>advance and delete your network from the list and then reconnect again.
All fixed. thanks to Smokerz
I have been dealing with this issue for over a year, it has been horribly annoying and I have searched these forums several times and tried several different "fixes" that worked for others with no such luck. Then, tonight I searched google for wi-fi fixes and found this link, proving my theory that the search function on this forum is horrid! I don't even care anymore, Smokerz and Daie1963, you are my heroes!!! Thanks so much, this totally worked the first time I tried it, but I have to add a step, and it is important:
After doing the delete and re-add, I had to restart my computer for the changes to work, and work it sure did! I am so happy right now that this issue is finally over!
Thanks again to you guys, you made my day, or month!