Persist and use country code reliably
It looks like we never persisted country code if it wasn't
set on the driver; this is not correct.
Also fixed initial sequence - the cached country code is now
trashed on reboot if config_wifi_revert_country_code_on_cellular_loss
is set. New country codes will be set if telephony stacks
retrieve them; or else, ro.boot.wificountrycode will stick.
Note that there are possible race conditions between telephony
finding country codes and starting Wifi functionality (like SoftAP)
so it is possible that Wifi uses more conservative country code
from ro.boot.wificountrycode even if telephony finds a better
country code later. The situation will recover eventually.
1 file changed