Set the wifi regulatory domain

You can configure your country’s regulatory domain, creating the file /etc/modprobe.d/cfg80211.conf with this content:

options cfg80211 ieee80211_regdom=ES

Don’t forget to change ES with your country code.