Selaa lähdekoodia

qcacld-3.0: Skip DFS NOL check for 6GHz SAP

6GHz channels doesn't need DFS NOL functionality.
Skip DFS NOL check for 6GHz SAP.

Change-Id: Ibdebba0d175e7752c0f6feae2b9412ef3b11b191
CRs-Fixed: 2550593
Liangwei Dong 5 vuotta sitten
vanhempi
sitoutus
3179b537af
1 muutettua tiedostoa jossa 39 lisäystä ja 12 poistoa
  1. 39 12
      core/sap/src/sap_fsm.c

+ 39 - 12
core/sap/src/sap_fsm.c

@@ -2106,23 +2106,18 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
 }
 
 /**
- * sap_goto_starting() - Trigger softap start
+ * sap_validate_dfs_nol() - Validate SAP channel with NOL list
  * @sap_ctx: SAP context
- * @sap_event: SAP event buffer
- * @mac_ctx: global MAC context
- * @mac_handle: Opaque handle to the global MAC context
+ * @sap_ctx: MAC context
  *
- * This function triggers start of softap. Before starting, it can select
- * new channel if given channel has leakage or if given channel in DFS_NOL.
+ * Function will be called to validate SAP channel and bonded sub channels
+ * included in DFS NOL or not.
  *
- * Return: QDF_STATUS
+ * Return: QDF_STATUS_SUCCESS for NOT in NOL
  */
-static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
-				    struct sap_sm_event *sap_event,
-				    struct mac_context *mac_ctx,
-				    mac_handle_t mac_handle)
+static QDF_STATUS sap_validate_dfs_nol(struct sap_context *sap_ctx,
+				       struct mac_context *mac_ctx)
 {
-	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
 	bool b_leak_chan = false;
 	uint8_t temp_chan;
 	uint8_t sap_chan;
@@ -2171,6 +2166,38 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 						     &sap_ctx->ch_params);
 	}
 
+	return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * sap_goto_starting() - Trigger softap start
+ * @sap_ctx: SAP context
+ * @sap_event: SAP event buffer
+ * @mac_ctx: global MAC context
+ * @mac_handle: Opaque handle to the global MAC context
+ *
+ * This function triggers start of softap. Before starting, it can select
+ * new channel if given channel has leakage or if given channel in DFS_NOL.
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
+				    struct sap_sm_event *sap_event,
+				    struct mac_context *mac_ctx,
+				    mac_handle_t mac_handle)
+{
+	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
+
+	/*
+	 * check if channel is in DFS_NOL or if the channel
+	 * has leakage to the channels in NOL.
+	 */
+	if (!WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ctx->chan_freq)) {
+		qdf_status = sap_validate_dfs_nol(sap_ctx, mac_ctx);
+		if (!QDF_IS_STATUS_SUCCESS(qdf_status))
+			return qdf_status;
+	}
+
 	/*
 	 * when AP2 is started while AP1 is performing ACS, we may not
 	 * have the AP1 channel yet.So here after the completion of AP2