Wifi sometimes stops working in my Compaq laptop.

Hi,
There is a hardware or software issue on my laptop, I don't know which one, that sometimes its WiFi stops working altogether even if it was working fine just two minutes ago. Then I restart it and it works sometimes and sometimes don't.
My device manager does not show WiFi adapter in network adapter list and it disappears from HP Wireless Assistant too.
I have tried updating the bios and diagnostics but it still happens.
Please tell me any solution to this problem because it sometimes destroys my whole work by disconnecting in the middle of something.
Thank You in advance.
