ソースを参照

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
Paul Zhang 7 年 前
コミット
0f85b41310

+ 2 - 2
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;

+ 1 - 1
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;