|
@@ -7675,6 +7675,12 @@ QDF_STATUS sme_get_cfg_valid_channels(tHalHandle hHal, uint8_t *aValidChannels,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+void sme_set_cc_src(tHalHandle hHal, enum country_src cc_src)
|
|
|
+{
|
|
|
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hHal);
|
|
|
+
|
|
|
+ mac_ctx->reg_hint_src = cc_src;
|
|
|
+}
|
|
|
/* ---------------------------------------------------------------------------
|
|
|
|
|
|
\fn sme_handle_change_country_code
|
|
@@ -7830,23 +7836,25 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|
|
|
|
|
sms_log(mac_ctx, LOG1, FL(" called"));
|
|
|
|
|
|
- if (!mac_ctx->is_11d_hint) {
|
|
|
- if (user_ctry_priority)
|
|
|
- mac_ctx->roam.configParam.Is11dSupportEnabled = false;
|
|
|
- else {
|
|
|
- if (mac_ctx->roam.configParam.Is11dSupportEnabled &&
|
|
|
- mac_ctx->scan.countryCode11d[0] != 0) {
|
|
|
-
|
|
|
- sms_log(mac_ctx, LOGW,
|
|
|
- FL("restore 11d"));
|
|
|
-
|
|
|
- status = csr_get_regulatory_domain_for_country(
|
|
|
- mac_ctx,
|
|
|
- mac_ctx->scan.countryCode11d,
|
|
|
- ®_domain_id,
|
|
|
- SOURCE_11D);
|
|
|
-
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
+ if (SOURCE_11D != mac_ctx->reg_hint_src) {
|
|
|
+ if (SOURCE_DRIVER != mac_ctx->reg_hint_src) {
|
|
|
+ if (user_ctry_priority)
|
|
|
+ mac_ctx->roam.configParam.Is11dSupportEnabled =
|
|
|
+ false;
|
|
|
+ else {
|
|
|
+ if (mac_ctx->roam.configParam.Is11dSupportEnabled &&
|
|
|
+ mac_ctx->scan.countryCode11d[0] != 0) {
|
|
|
+
|
|
|
+ sms_log(mac_ctx, LOGW,
|
|
|
+ FL("restore 11d"));
|
|
|
+
|
|
|
+ status = csr_get_regulatory_domain_for_country(
|
|
|
+ mac_ctx,
|
|
|
+ mac_ctx->scan.countryCode11d,
|
|
|
+ ®_domain_id,
|
|
|
+ SOURCE_11D);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -7858,7 +7866,6 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|
|
qdf_mem_copy(mac_ctx->scan.countryCode11d,
|
|
|
msg->countryCode,
|
|
|
WNI_CFG_COUNTRY_CODE_LEN);
|
|
|
- mac_ctx->is_11d_hint = false;
|
|
|
}
|
|
|
|
|
|
qdf_mem_copy(mac_ctx->scan.countryCodeCurrent,
|
|
@@ -7883,6 +7890,8 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
|
|
|
*/
|
|
|
mac_ctx->scan.curScanType = eSIR_ACTIVE_SCAN;
|
|
|
|
|
|
+ mac_ctx->reg_hint_src = SOURCE_UNKNOWN;
|
|
|
+
|
|
|
sme_disconnect_connected_sessions(mac_ctx);
|
|
|
|
|
|
sms_log(mac_ctx, LOG1, FL(" returned"));
|