Problems with wi-fi

Some times when i connect to wifi it has a question mark appear in the icon and it works just fine for sometime and then stops working saying "activation of the wireless connection failed". Can anyone give me a permanent solution for this.

Run sudo lshw -class network and post the output.

In Zorin>Settings>Privacy>
Toggle connection check on/off or off/on and "?" will go away.