Explorar el Código

qcacld-3.0: Don't Update default country code when no country code is selected

qcacld-2.0 to qcacld-3.0 propagation

At the time of driver load, countryCodeElected will be saved as
default country code.
If Driver changes country code through userspace, driver won't update
countryCodeElected as countryCodeElected is updated only for 11d scan.
In next scan if there are no scan results with 11d country code,
the driver will try to update country code on the basis of
countryCodeElected.
Fix this by not updating country code through 11d if
number of country code count is zero in scan results.

Change-Id: I0e5620a834dd3fef61d8a5f86ce753b9233bf56e
CRs-Fixed: 1004031
Agrawal Ashish hace 9 años
padre
commit
fb87b16193
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      core/sme/src/csr/csr_api_scan.c

+ 4 - 2
core/sme/src/csr/csr_api_scan.c

@@ -2930,8 +2930,8 @@ static void csr_move_temp_scan_results_to_main_list(tpAniSirGlobal pMac,
 			return;
 		}
 	}
-	csr_elected_country_info(pMac);
-	csr_learn_11dcountry_information(pMac, NULL, NULL, true);
+	if (csr_elected_country_info(pMac))
+		csr_learn_11dcountry_information(pMac, NULL, NULL, true);
 }
 
 static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac,
@@ -3327,6 +3327,8 @@ bool csr_elected_country_info(tpAniSirGlobal pMac)
 	uint8_t i, j = 0;
 
 	if (!pMac->scan.countryCodeCount) {
+		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_WARN,
+			"No AP with 11d Country code is present in scan list");
 		return fRet;
 	}
 	maxVotes = pMac->scan.votes11d[0].votes;