From 1e30b6ac2925aaa0278fdb22ceb1a9071e8cf193 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 19 Dec 2019 20:43:05 +0530 Subject: [PATCH] qcacld-3.0: Clear Country code information after roaming The connected profile in csr_roam_session is filled after join success with an AP in csr_roam_process_join_res(). The connected profile information also has the country code advertised by the AP over its beacon in the Country Element (EID 7). When STA roams from AP1 having country IE to AP1 which doesn't have country IE, the driver checks if the country IE is present in the AP2 beacon IEs. If the country code is present, new value is copied, else the older country code value is not cleared. This results in beacon report failure when roamed to AP2 due to country code and op class mismatch. Clear the country code in connected profile before checking if the country code IE is present. Change-Id: I503f9761ff33fb245a25b23893360389d7a0b258 CRs-Fixed: 2590117 --- core/sme/src/csr/csr_api_roam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index a2c8c055a14b5..921b6cf8e2f56 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -9341,6 +9341,8 @@ csr_roam_save_connected_information(struct mac_context *mac, p_ext_cap->proxy_arp_service; } + qdf_mem_zero(pConnectProfile->country_code, + WNI_CFG_COUNTRY_CODE_LEN); if (pIesTemp->Country.present) { qdf_mem_copy(pConnectProfile->country_code, pIesTemp->Country.country,