rdkb][common][hal][Refactor setRadioCountryCode]
[Description]
Refactor setRadioCountryCode. Add default country code US.
If we set empty country, radio would fail to bring up.
[Release-log]
N/A
Change-Id: Ic763e42a82ccf0fb4cdb71322ccff42f008d21f0
diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index ab88904..67931d8 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -1096,6 +1096,9 @@
if(NULL == CountryCode || strlen(CountryCode) >= 32 )
return RETURN_ERR;
+ if (strlen(CountryCode) == 0)
+ strcpy(CountryCode, "US");
+
params.name = "country_code";
params.value = CountryCode;
sprintf(config_file,"%s%d.conf",CONFIG_PREFIX, radioIndex);