|
@@ -9276,6 +9276,19 @@ void hdd_psoc_idle_timer_stop(struct hdd_context *hdd_ctx)
|
|
|
hdd_debug("Stopped psoc idle timer");
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * enum hdd_block_shutdown - Control if driver allows modem shutdown
|
|
|
+ * @HDD_UNBLOCK_MODEM_SHUTDOWN: Unblock shutdown
|
|
|
+ * @HDD_BLOCK_MODEM_SHUTDOWN: Block shutdown
|
|
|
+ *
|
|
|
+ * On calling pld_block_shutdown API with the given values, modem
|
|
|
+ * graceful shutdown is blocked/unblocked.
|
|
|
+ */
|
|
|
+enum hdd_block_shutdown {
|
|
|
+ HDD_UNBLOCK_MODEM_SHUTDOWN,
|
|
|
+ HDD_BLOCK_MODEM_SHUTDOWN,
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
* hdd_psoc_idle_shutdown() - perform an idle shutdown on the given psoc
|
|
|
* @hdd_ctx: the hdd context which should be shutdown
|
|
@@ -9299,6 +9312,8 @@ static void hdd_psoc_idle_shutdown(struct hdd_context *hdd_ctx)
|
|
|
hdd_info("psoc busy, abort idle shutdown; errno:%d", errno);
|
|
|
goto exit;
|
|
|
}
|
|
|
+ /* Block the modem graceful shutdown till stop modules is completed */
|
|
|
+ pld_block_shutdown(hdd_ctx->parent_dev, HDD_BLOCK_MODEM_SHUTDOWN);
|
|
|
|
|
|
osif_psoc_sync_wait_for_ops(psoc_sync);
|
|
|
|
|
@@ -9306,6 +9321,8 @@ static void hdd_psoc_idle_shutdown(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
osif_psoc_sync_trans_stop(psoc_sync);
|
|
|
|
|
|
+ pld_block_shutdown(hdd_ctx->parent_dev, HDD_UNBLOCK_MODEM_SHUTDOWN);
|
|
|
+
|
|
|
exit:
|
|
|
hdd_exit();
|
|
|
}
|