summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2019-04-24 23:57:55 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-04-24 23:57:55 -0700
commit772bb3d029e9ffecdc91f5950ba2ab65ac0ffc0b (patch)
treeb20e21fb48ab9542f358613b0c8e6be6b4aa46a0
parent91fa1989060fac657ed782bfd168ba09f039fb7a (diff)
parent317a6bd0d3551be90cc06abdbaf1f92e9b98ccf8 (diff)
Merge "qcacld-2.0: Clear up DFS rules for multiple interfaces" into wlan-cld2.driver.lnx.1.0
-rw-r--r--CORE/SAP/src/sapFsm.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 254f5a1b7b7c..08a49ef178f9 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2357,20 +2357,32 @@ static VOS_STATUS sap_check_mcc_valid(
/*
* 3. Don't support MCC on DFS channel.
*/
- if (chan_cnt > 0) {
- for (j = 0; j < chan_cnt; j++) {
- if (channels[j] != 0
- && vos_nv_getChannelEnabledState(channels[j])
- == NV_CHANNEL_DFS) {
- VOS_TRACE( VOS_MODULE_ID_SAP,
- VOS_TRACE_LEVEL_ERROR,
- "%s: dfs not support in MCC dfs chan %d"
- "(chan %d band %d)",
- __func__, channels[j], chan, band);
+ for (i = 0; i < session_count; i++) {
+ info = &sessions[i];
+ if (info->och != 0 &&
+ vos_nv_getChannelEnabledState(info->och) ==
+ NV_CHANNEL_DFS) {
+ if ((info->con_mode == VOS_STA_SAP_MODE ||
+ info->con_mode == VOS_P2P_GO_MODE) &&
+ info->och != chan) {
+ VOS_TRACE(VOS_MODULE_ID_SAP,
+ VOS_TRACE_LEVEL_ERROR,
+ "SAP+SAP MCC DFS not support");
+ return VOS_STATUS_E_FAILURE;
+ }
+ if ((info->con_mode == VOS_STA_MODE ||
+ info->con_mode == VOS_P2P_CLIENT_MODE) &&
+ vos_nv_getChannelEnabledState(chan) ==
+ NV_CHANNEL_DFS
+ ) {
+ VOS_TRACE(VOS_MODULE_ID_SAP,
+ VOS_TRACE_LEVEL_ERROR,
+ "STA+SAP SAP can't start in DFS ch");
return VOS_STATUS_E_FAILURE;
}
}
}
+
return VOS_STATUS_SUCCESS;
}