I was having some trouble with my Mac in office when i try to connect wi-fi. When i click the wi-fi button from upper-right side and click on the network i wanted to connect, it was suppose to work but it wasn’t. It was constantly oscilating between “Wi-Fi: On” and “Wi-Fi: Looking for Networks” status.

I tried to fix it from settings but everything was properly set. Then I re-installed OS X but eventhough it took my whole morning, it didn’t help either. I think when re-installing operating system, keeping your whole files and settings is really good feature of Mac but in this case it worked against my benefit.

After some research, i came across this thread on Apple Support Community : Link

Then i was going to follow these instructions from above link:

Test after taking each of the following steps. Back up all data before making any changes.

2. Follow the instructions in this support article under the heading “Symptom: The network connection drops unexpectedly.”

3. Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.

4. From the Location menu at the top of the Network preference pane, select Edit Locations. A sheet will drop down. Click the plus-sign button to create a new location. Give it any name you want. In the new location, set up the Wi-Fi service with the same settings you used before. ClickApply and test.

5. Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.