OS X Wi-Fi turning on and off, slows mac down while doing so My Wi-Fi is turning on and off every 5 seconds. It's not connecting to anything and just lagging my MacBook Air. Even when I click on AirPlay, it slows down and spins the loading icon. Seems like a bug with the Wi-Fi itself. I have reinstalled OS X and reset the SMC to no avail - still doing the same.
Any suggestions?
It happens—for reasons unknown—that the associated configuration files are corrupt. You find them inside of this directory:

/Library/Preferences/SystemConfiguration/


A good indication of some of these files being corrupt is the configd process hogging the cpu. You can check it in Activity Monitor—making sure that “all processes” are displayed, not just “your processes” (you find this option in the View menu).

You can have the system regenerate the important configuration files that probably make your system go wild by walking through the following steps:


Open /Library/Preferences/SystemConfiguration in the Finder.
Make a copy of the following four files by dragging them onto your desktop:
  preferences.plist
  NetworkInterfaces.plist
  com.apple.airport.preferences.plist
  com.apple.network.identification.plist


Using the Finder (and being logged on as an admin user), delete these four files from the SystemConfiguration directory.
Empty the trash and reboot your Mac.


By peeking into the /Library/Preferences/SystemConfiguration directory you will notice all four files you deleted in the steps above have been regenerated.