From 0f85b41310adc1b2f215bc99ca86b7e9909ef739 Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Thu, 18 Jan 2018 19:14:51 +0800 Subject: [PATCH] qcacld-3.0: Setting the right country IE for SAP Currently, when sap starts, it will get the default country code for the country IE if 80211d enabled. Using api wlan_reg_read_current_country() instead of wlan_reg_read_default_country() to get the current country. Change-Id: I67e63630c56b17d0d6890704bc1852e40185cf48 CRs-Fixed: 2170425 --- core/mac/src/sys/legacy/src/utils/src/parser_api.c | 4 ++-- core/sap/src/sap_ch_select.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index f2e02079726b..fe25fab5196e 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -378,7 +378,7 @@ populate_dot11f_country(tpAniSirGlobal pMac, return eSIR_SUCCESS; } - wlan_reg_read_default_country(pMac->psoc, code); + wlan_reg_read_current_country(pMac->psoc, code); qdf_mem_copy(pDot11f->country, code, 2); @@ -6080,7 +6080,7 @@ tSirRetStatus populate_dot11f_timing_advert_frame(tpAniSirGlobal mac_ctx, item = WNI_CFG_MAX_TX_POWER_5; CFG_GET_STR(nSirStatus, mac_ctx, item, temp, len, WNI_CFG_MAX_TX_POWER_5_LEN); - wlan_reg_read_default_country(mac_ctx->psoc, code); + wlan_reg_read_current_country(mac_ctx->psoc, code); qdf_mem_copy(&frame->Country, code, 2); if (len > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE) len = MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE; diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 859cb54cdef4..2046cd88a991 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -2571,7 +2571,7 @@ uint8_t sap_select_channel(tHalHandle hal, struct sap_context *sap_ctx, sap_process_avoid_ie(hal, sap_ctx, scan_result, spect_info); #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ - wlan_reg_read_default_country(mac_ctx->psoc, country); + wlan_reg_read_current_country(mac_ctx->psoc, country); wlan_reg_get_domain_from_country_code(&domain, country, SOURCE_DRIVER); #ifdef SOFTAP_CHANNEL_RANGE start_ch_num = sap_ctx->acs_cfg->start_ch;