Procházet zdrojové kódy

qcacld-3.0: Do not set ACS flag if no ACS to be done

qcacld-2.0 to qcacld-3.0 propagation

wlan_hdd_cfg80211_change_iface will abort if ACS_IN_PROGRESS
is set, which causes iface type mismatch between hostapd and
driver.

When force SCC if same band is enabled, driver will not do ACS
for the second AP. So do not set ACS_IN_PROGRESS if no ACS to
be done.

Change-Id: I2c975c89dc1cf0d11980ad11c8d0d256c680594d
CRs-Fixed: 1105386
bings před 8 roky
rodič
revize
394afddedf

+ 2 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1382,7 +1382,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;

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

+ 13 - 1
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.
  *
@@ -2920,6 +2920,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