|
@@ -546,13 +546,19 @@ struct ramdump_info {
|
|
|
|
|
|
|
|
|
* if have platform driver support, reinit will be called by CNSS.
|
|
|
- * recovery flag will be cleaned by reinit function. If not support,
|
|
|
- * clean recovery flag in CLD driver.
|
|
|
+ * recovery flag will be cleaned and CRASHED indication will be sent
|
|
|
+ * to user space by reinit function. If not support, clean recovery
|
|
|
+ * flag and send CRASHED indication in CLD driver.
|
|
|
*/
|
|
|
-static inline void ol_check_clean_recovery_flag(struct device *dev)
|
|
|
+static inline void ol_check_clean_recovery_flag(struct ol_context *ol_ctx)
|
|
|
{
|
|
|
- if (!pld_have_platform_driver_support(dev))
|
|
|
+ qdf_device_t qdf_dev = ol_ctx->qdf_dev;
|
|
|
+
|
|
|
+ if (!pld_have_platform_driver_support(qdf_dev->dev)) {
|
|
|
cds_set_recovery_in_progress(false);
|
|
|
+ if (ol_ctx->fw_crashed_cb)
|
|
|
+ ol_ctx->fw_crashed_cb();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#if !defined(QCA_WIFI_3_0)
|
|
@@ -646,7 +652,7 @@ void ramdump_work_handler(void *data)
|
|
|
BMI_ERR("HifDiagReadiMem FW Dump Area Pointer failed!");
|
|
|
ol_copy_ramdump(ramdump_scn);
|
|
|
pld_device_crashed(qdf_dev->dev);
|
|
|
- ol_check_clean_recovery_flag(qdf_dev->dev);
|
|
|
+ ol_check_clean_recovery_flag(ol_ctx);
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -673,10 +679,10 @@ void ramdump_work_handler(void *data)
|
|
|
*/
|
|
|
if (cds_is_load_or_unload_in_progress())
|
|
|
cds_set_recovery_in_progress(false);
|
|
|
- else
|
|
|
+ else {
|
|
|
pld_device_crashed(qdf_dev->dev);
|
|
|
-
|
|
|
- ol_check_clean_recovery_flag(qdf_dev->dev);
|
|
|
+ ol_check_clean_recovery_flag(ol_ctx);
|
|
|
+ }
|
|
|
return;
|
|
|
|
|
|
out_fail:
|
|
@@ -687,7 +693,7 @@ out_fail:
|
|
|
else
|
|
|
pld_device_crashed(qdf_dev->dev);
|
|
|
|
|
|
- ol_check_clean_recovery_flag(qdf_dev->dev);
|
|
|
+ ol_check_clean_recovery_flag(ol_ctx);
|
|
|
}
|
|
|
|
|
|
void fw_indication_work_handler(void *data)
|
|
@@ -697,6 +703,8 @@ void fw_indication_work_handler(void *data)
|
|
|
|
|
|
pld_device_self_recovery(qdf_dev->dev,
|
|
|
PLD_REASON_DEFAULT);
|
|
|
+
|
|
|
+ ol_check_clean_recovery_flag(ol_ctx);
|
|
|
}
|
|
|
|
|
|
void ol_target_failure(void *instance, QDF_STATUS status)
|
|
@@ -1921,3 +1929,9 @@ void ol_init_ini_config(struct ol_context *ol_ctx,
|
|
|
{
|
|
|
qdf_mem_copy(&ol_ctx->cfg_info, cfg, sizeof(struct ol_config_info));
|
|
|
}
|
|
|
+
|
|
|
+void ol_set_fw_crashed_cb(struct ol_context *ol_ctx,
|
|
|
+ void (*callback_fn)(void))
|
|
|
+{
|
|
|
+ ol_ctx->fw_crashed_cb = callback_fn;
|
|
|
+}
|