From 0a4fb2bbb72b5a7c27d49c4616632be642cd34af Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Tue, 24 Feb 2015 14:27:57 -0800 Subject: wlan : Enable the 11d when invalid country is set by user. Propagation from prima to qcacld-2.0 When invalid country "XX" is set by user, driver enables 11d and fallback to the default country from NV. If this default country is non 00, when driver gets the callback it disables the 11d considering it as a valid country set by user. As a fix update the 11d country to the default country so that driver does not disable the 11d, when invalid country is set by user. CRs-Fixed: 738581 Change-Id: Id337fd3b46fb97fdf3cb39062f3983b78215ef25 --- CORE/SME/src/sme_common/sme_Api.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 87cf4e4ddae3..53205738a6c9 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -8225,6 +8225,18 @@ eHalStatus sme_HandleChangeCountryCode(tpAniSirGlobal pMac, void *pMsgBuf) status = eHAL_STATUS_FAILURE; return status; } + /* + * Update the 11d country to default country from NV bin so that when + * callback is received for this default country, driver will not + * disable the 11d taking it as valid country by user. + */ + smsLog(pMac, LOG1, + FL + ("Set default country code (%c%c) from NV as invalid country received"), + pMsg->countryCode[0],pMsg->countryCode[1]); + vos_mem_copy(pMac->scan.countryCode11d, pMsg->countryCode, + WNI_CFG_COUNTRY_CODE_LEN); + } else { -- cgit v1.2.3