From f0be1f4df34dcc716fc987389d896fe06d6bd4a4 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Wed, 4 Nov 2020 20:33:50 +0530 Subject: [PATCH] qcacld-3.0: Use correct api to get country info Currently for ll stats host fill country information from mac context which is not updated with latest country information. To address above issue use correct api to fill country info for ll stats. Change-Id: I744b172cf935e44568b9ee902a97275887e45001 CRs-Fixed: 2805196 --- core/hdd/src/wlan_hdd_stats.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index cf2b9609ade9..8e3db3dfdfe7 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -587,9 +587,6 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, struct wifi_interface_info *info) { struct hdd_station_ctx *sta_ctx; - mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle; - /* pre-existing layering violation */ - struct mac_context *mac = MAC_CONTEXT(mac_handle); info->mode = hdd_map_device_to_ll_iface_mode(adapter->device_mode); @@ -632,11 +629,8 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, } } - qdf_mem_copy(info->countryStr, - mac->scan.countryCodeCurrent, REG_ALPHA2_LEN + 1); - - qdf_mem_copy(info->apCountryStr, - mac->scan.countryCodeCurrent, REG_ALPHA2_LEN + 1); + wlan_reg_get_cc_and_src(adapter->hdd_ctx->psoc, info->countryStr); + wlan_reg_get_cc_and_src(adapter->hdd_ctx->psoc, info->apCountryStr); return true; }