This question already has an answer here:
The Wi-Fi icon in the menu bar is displaying as empty. When I open Network Preferences and press “Turn Wi-Fi On”, nothing happens.
I have tried making the Wi-Fi service inactive, deleting it, then restarting the MacBook and adding the service back.
This fix actually worked, but the problem returned after about thirty minutes.
Since then, I have simply been repeating the process every time the Wi-Fi turns itself off, but it is very inconvenient and I hope it is not the only fix.
I’m afraid that the fact that the Wi-Fi turning itself back off again indicates that it’s a hardware issue.
After seeing a response to another user who had a similar problem, I have also tried using Terminal to “cycle the power to my wireless card”. It had no effect.
After restarting the MacBook again, it now says “Wi-Fi: No hardware installed” and will not let me create a new Wi-Fi service.
After another reboot I was able to turn WiFi on again, but it turned off after about ten minutes. I imagine that I will sometimes get “No Hardware Installed” again in the future.