|
@@ -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
|