소스 검색

qcacld-3.0: Fix error handling of the vdev destroy timeout

When vdev destroy event timeout, function wait_for_completion_timeout()
will return zero. Zero means completion event timeout. But our code uses
last status to check timeout or not timeout. SME will not be clean at
this case.

So, correct code to ensure sme can be clean.

Change-Id: I4c0366a9d0f89d374f0e6aa50e0aa32f67fac03e
CRs-Fixed: 2705855
Yu Ouyang 5 년 전
부모
커밋
fe30ea50e7
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      core/hdd/src/wlan_hdd_main.c

+ 3 - 6
core/hdd/src/wlan_hdd_main.c

@@ -5037,13 +5037,10 @@ int hdd_vdev_destroy(struct hdd_adapter *adapter)
 	rc = wait_for_completion_timeout(
 			&adapter->vdev_destroy_event,
 			msecs_to_jiffies(SME_CMD_VDEV_CREATE_DELETE_TIMEOUT));
-	if (rc) {
+	if (!rc) {
+		hdd_err("timed out waiting for sme vdev delete");
 		clear_bit(SME_SESSION_OPENED, &adapter->event_flags);
-
-		if (status == QDF_STATUS_E_TIMEOUT) {
-			hdd_err("timed out waiting for sme vdev delete");
-			sme_cleanup_session(hdd_ctx->mac_handle, vdev_id);
-		}
+		sme_cleanup_session(hdd_ctx->mac_handle, vdev_id);
 	}
 
 	hdd_nofl_debug("vdev %d destroyed successfully", vdev_id);