Parcourir la source

qcacld-3.0: Fix build error for PLs which use 4.14 kernel

Add code to fix build error for PLs which use
4.14 kernel.

Change-Id: I1db1fd13a3d8345abfaee286f109d0699f3559c6
Mohammed Siddiq il y a 5 ans
Parent
commit
976e7d13d8
1 fichiers modifiés avec 38 ajouts et 7 suppressions
  1. 38 7
      core/pld/src/pld_snoc.c

+ 38 - 7
core/pld/src/pld_snoc.c

@@ -251,13 +251,6 @@ static int pld_update_hang_evt_data(struct icnss_uevent_hang_data *evt_data,
 	data->hang_data.hang_event_data_len = evt_data->hang_event_data_len;
 	return 0;
 }
-#else
-static int pld_update_hang_evt_data(struct icnss_uevent_hang_data *evt_data,
-				    struct pld_uevent_data *data)
-{
-	return 0;
-}
-#endif
 
 static int pld_snoc_uevent(struct device *dev,
 			   struct icnss_uevent_data *uevent)
@@ -303,6 +296,44 @@ static int pld_snoc_uevent(struct device *dev,
 out:
 	return 0;
 }
+#else
+static int pld_snoc_uevent(struct device *dev,
+			   struct icnss_uevent_data *uevent)
+{
+	struct pld_context *pld_context;
+	struct icnss_uevent_fw_down_data *fw_down_data = NULL;
+	struct pld_uevent_data data = {0};
+
+	pld_context = pld_get_global_context();
+	if (!pld_context)
+		return -EINVAL;
+
+	if (!pld_context->ops->uevent)
+		goto out;
+
+	if (!uevent)
+		return -EINVAL;
+
+	switch (uevent->uevent) {
+	case ICNSS_UEVENT_FW_CRASHED:
+		data.uevent = PLD_FW_CRASHED;
+		break;
+	case ICNSS_UEVENT_FW_DOWN:
+		if (!uevent->data)
+			return -EINVAL;
+		fw_down_data = (struct icnss_uevent_fw_down_data *)uevent->data;
+		data.uevent = PLD_FW_DOWN;
+		data.fw_down.crashed = fw_down_data->crashed;
+		break;
+	default:
+		goto out;
+	}
+
+	pld_context->ops->uevent(dev, &data);
+out:
+	return 0;
+}
+#endif
 
 #ifdef MULTI_IF_NAME
 #define PLD_SNOC_OPS_NAME "pld_snoc_" MULTI_IF_NAME