Просмотр исходного кода

qcacld-3.0: Fix 5G DFS SAP failed to open

If STA is active on 5G DFS channel, SAP CAC duration will
be set to zero during starting. This causes the FW indicates
CAC completion event very shortly after vdev start request.
That is before SAP fsm processes BSS start success event.
SAP fsm is still in SAP_STARTING state. In this state,
the sap_cac_end_notify will only indicate the CAC end event
to hostapd. hostapd will be pending on CAC start event from
driver.
Fix by skip the CAC end event if CAC duration time is zero,
then the sap fsm will indicate CAC start/end event when
BSS start event comes up later.

Change-Id: Ib4c2ada8754bd08c0567ce9009ebec2349098b75
CRs-Fixed: 3138466
Liangwei Dong 3 лет назад
Родитель
Сommit
0660132171
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      core/sap/src/sap_fsm.c

+ 8 - 1
core/sap/src/sap_fsm.c

@@ -59,6 +59,7 @@
 #include "wlan_policy_mgr_ucfg.h"
 #include "cfg_ucfg_api.h"
 #include "wlan_mlme_vdev_mgr_interface.h"
+#include "wlan_vdev_mgr_utils_api.h"
 
 /*----------------------------------------------------------------------------
  * Preprocessor Definitions and Constants
@@ -3380,7 +3381,13 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
 	} else if (msg == eSAP_DFS_CHANNEL_CAC_RADAR_FOUND) {
 		qdf_status = sap_fsm_handle_radar_during_cac(sap_ctx, mac_ctx);
 	} else if (msg == eSAP_DFS_CHANNEL_CAC_END) {
-		qdf_status = sap_cac_end_notify(mac_handle, roam_info);
+		if (sap_ctx->vdev &&
+		    wlan_util_vdev_mgr_get_cac_timeout_for_vdev(sap_ctx->vdev)) {
+			qdf_status = sap_cac_end_notify(mac_handle, roam_info);
+		} else {
+			sap_debug("cac duration is zero");
+			qdf_status = QDF_STATUS_SUCCESS;
+		}
 	} else {
 		sap_err("in state %s, invalid event msg %d", "SAP_STARTING",
 			 msg);