Prechádzať zdrojové kódy

qcacld-3.0: Move second DFS AP to CAC wait

If the first DFS AP is in CAC progress and second
AP starts on DFS chan, move the second AP to CAC
wait state as well.
Otherwise, when CAC end, the second AP will always
stay in "WLAN_VDEV_S_START" state and can not
handle CAC end event.

Change-Id: I440ce3339dd2afb62bdb574f2f785d733a980933
CRs-Fixed: 2426714
Liangwei Dong 6 rokov pred
rodič
commit
bf6e36876e
1 zmenil súbory, kde vykonal 26 pridanie a 24 odobranie
  1. 26 24
      core/sap/src/sap_fsm.c

+ 26 - 24
core/sap/src/sap_fsm.c

@@ -2270,6 +2270,30 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 	return qdf_status;
 }
 
+#ifdef CONFIG_VDEV_SM
+/**
+ * sap_move_to_cac_wait_state() - move to cac wait state
+ * @sap_ctx: SAP context
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
+{
+	QDF_STATUS status;
+
+	status =
+	     wlan_vdev_mlme_sm_deliver_evt(sap_ctx->vdev,
+					   WLAN_VDEV_SM_EV_DFS_CAC_WAIT,
+					   0, NULL);
+	return status;
+}
+#else
+static inline QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 /**
  * sap_fsm_cac_start() - start cac wait timer
  * @sap_ctx: SAP context
@@ -2292,6 +2316,8 @@ static QDF_STATUS sap_fsm_cac_start(struct sap_context *sap_ctx,
 			  FL("sapdfs: starting dfs cac timer on sapctx[%pK]"),
 			  sap_ctx);
 		sap_start_dfs_cac_timer(sap_ctx);
+	} else {
+		sap_move_to_cac_wait_state(sap_ctx);
 	}
 
 	return sap_cac_start_notify(mac_handle);
@@ -3752,30 +3778,6 @@ static int sap_stop_dfs_cac_timer(struct sap_context *sap_ctx)
 	return 0;
 }
 
-#ifdef CONFIG_VDEV_SM
-/**
- * sap_move_to_cac_wait_state() - move to cac wait state
- * @sap_ctx: SAP context
- *
- * Return: QDF_STATUS
- */
-static QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
-{
-	QDF_STATUS status;
-
-	status =
-	     wlan_vdev_mlme_sm_deliver_evt(sap_ctx->vdev,
-					   WLAN_VDEV_SM_EV_DFS_CAC_WAIT,
-					   0, NULL);
-	return status;
-}
-#else
-static inline QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
-
 /*
  * Function to start the DFS CAC Timer
  * when SAP is started on a DFS channel