瀏覽代碼

qcacld-3.0: Properly handle uevent for PCIe devices

When uevent is introduced for integrated devices, it breaks
the PLD handling for PCIe devices. Hence correct it by using
proper enum.

Change-Id: Iacb5037932065f1822c1408d74f8aa3824ff0e71
CRs-fixed: 2114385
Yue Ma 7 年之前
父節點
當前提交
096189d513
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      core/pld/src/pld_pcie.c

+ 8 - 1
core/pld/src/pld_pcie.c

@@ -199,11 +199,18 @@ static void pld_pcie_uevent(struct pci_dev *pdev, uint32_t status)
 	if (!pld_context)
 	if (!pld_context)
 		return;
 		return;
 
 
-	data.uevent = status;
+	switch (status) {
+	case CNSS_RECOVERY:
+		data.uevent = PLD_RECOVERY;
+		break;
+	default:
+		goto out;
+	}
 
 
 	if (pld_context->ops->uevent)
 	if (pld_context->ops->uevent)
 		pld_context->ops->uevent(&pdev->dev, &data);
 		pld_context->ops->uevent(&pdev->dev, &data);
 
 
+out:
 	return;
 	return;
 }
 }