From ea85ee0516677f44089221a2f58aa3c01bcf9840 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Fri, 26 Aug 2016 18:09:20 -0700 Subject: [PATCH] qcacld-3.0: Correct the country code validation check Country code comparison result is checked against true value, but the comparison result is non-zero if the country code is valid, hence checking the result against true fails and do not set the country code. Correct the conditional logic to check if the given country valid or not. Change-Id: Id893cfec8571939e4e455fa35ea95310f4c77263 CRs-Fixed: 1060242 --- core/sme/src/common/sme_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 55b466648655..4f70266c9b64 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -7540,7 +7540,7 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) * if the reset Supplicant country code command is triggered, * enable 11D, reset the country code and return */ - if (true != + if (false == qdf_mem_cmp(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) { pMac->roam.configParam.Is11dSupportEnabled = pMac->roam.configParam.Is11dSupportEnabledOriginal;