summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c3
-rw-r--r--core/sap/inc/sap_api.h11
-rw-r--r--core/sap/src/sap_module.c14
3 files changed, 25 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 4d88160188e5..f944e92ef468 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1355,7 +1355,8 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter)
hdd_err("ACS channel select failed");
return -EINVAL;
}
- sap_config->acs_cfg.acs_mode = true;
+ if (sap_is_auto_channel_select(WLAN_HDD_GET_SAP_CTX_PTR(adapter)))
+ sap_config->acs_cfg.acs_mode = true;
set_bit(ACS_IN_PROGRESS, &hdd_ctx->g_event_flags);
return 0;
diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h
index 522810777738..de258a55a63d 100644
--- a/core/sap/inc/sap_api.h
+++ b/core/sap/inc/sap_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -851,6 +851,15 @@ typedef struct {
#endif /* FEATURE_WLAN_CH_AVOID */
void sap_cleanup_channel_list(void *sapContext);
void sapCleanupAllChannelList(void);
+
+/**
+ * sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT
+ * @pvos_gctx: Pointer to vos global context structure
+ *
+ * Return: true on AUTO_CHANNEL_SELECT, false otherwise
+ */
+bool sap_is_auto_channel_select(void *pvos_gctx);
+
QDF_STATUS wlansap_set_wps_ie(void *p_cds_gctx, tSap_WPSIE *pWPSIe);
QDF_STATUS wlansap_update_wps_ie(void *p_cds_gctx);
QDF_STATUS wlansap_stop_Wps(void *p_cds_gctx);
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index b4572241bbe6..b5c0944c5996 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2918,6 +2918,18 @@ wlansap_set_dfs_restrict_japan_w53(tHalHandle hHal, uint8_t disable_Dfs_W53)
return status;
}
+bool sap_is_auto_channel_select(void *pvos_gctx)
+{
+ ptSapContext sapcontext = CDS_GET_SAP_CB(pvos_gctx);
+
+ if (NULL == sapcontext) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "%s: Invalid SAP pointer", __func__);
+ return 0;
+ }
+ return sapcontext->channel == AUTO_CHANNEL_SELECT;
+}
+
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
/**
* wlan_sap_set_channel_avoidance() - sets sap mcc channel avoidance ini param