summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgrawal Ashish <ashishka@codeaurora.org>2016-05-05 16:31:20 +0530
committerAkash Patel <akashp@codeaurora.org>2016-05-09 11:28:52 -0700
commitfb87b16193b5d7ab9a2dc05c2519e36a3a5de929 (patch)
tree3cdea3d8cee848b0a8e3f6665e5e61b94e7e6633
parentfdcb2d0b1fb22c63c4f6e49dd3d89c157e19e467 (diff)
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
-rw-r--r--core/sme/src/csr/csr_api_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 0cf923b6b2e3..c337db354395 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/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;