|
@@ -157,39 +157,42 @@ void qdf_register_recovering_state_query_callback(
|
|
|
bool qdf_is_recovering(void);
|
|
|
|
|
|
/**
|
|
|
- * qdf_psoc_start_callback() - callback for starting the psoc operation
|
|
|
- *
|
|
|
- * Return: true if driver psoc operation can be started else false
|
|
|
+ * struct qdf_op_sync - opaque operation synchronization context handle
|
|
|
*/
|
|
|
-typedef QDF_STATUS (*qdf_psoc_start_callback)(void);
|
|
|
+struct qdf_op_sync;
|
|
|
|
|
|
-/**
|
|
|
- * qdf_psoc_stop_callback - callback for stopping the psoc operation
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-typedef void (*qdf_psoc_stop_callback)(void);
|
|
|
+typedef int (*qdf_op_protect_cb)(void **out_sync, const char *func);
|
|
|
+typedef void (*qdf_op_unprotect_cb)(void *sync, const char *func);
|
|
|
|
|
|
/**
|
|
|
- * qdf_psoc_op_start() - start DSC psoc operation
|
|
|
+ * qdf_op_protect() - attempt to protect a driver operation
|
|
|
+ * @out_sync: output parameter for the synchronization context, populated on
|
|
|
+ * success
|
|
|
*
|
|
|
- * Return: Success for starting psoc operation or failure
|
|
|
+ * Return: Errno
|
|
|
*/
|
|
|
-QDF_STATUS qdf_psoc_op_start(void);
|
|
|
+#define qdf_op_protect(out_sync) __qdf_op_protect(out_sync, __func__)
|
|
|
+
|
|
|
+qdf_must_check int
|
|
|
+__qdf_op_protect(struct qdf_op_sync **out_sync, const char *func);
|
|
|
|
|
|
/**
|
|
|
- * qdf_psoc_op_stop() - stop DSC psoc operation
|
|
|
- * @context: Context information
|
|
|
+ * qdf_op_unprotect() - release driver operation protection
|
|
|
+ * @sync: synchronization context returned from qdf_op_protect()
|
|
|
*
|
|
|
* Return: None
|
|
|
*/
|
|
|
-void qdf_psoc_op_stop(void);
|
|
|
+#define qdf_op_unprotect(sync) __qdf_op_unprotect(sync, __func__)
|
|
|
+
|
|
|
+void __qdf_op_unprotect(struct qdf_op_sync *sync, const char *func);
|
|
|
|
|
|
/**
|
|
|
- * qdf_register_dsc_psoc_callbacks() - register dsc psoc start/stop callbacks
|
|
|
+ * qdf_op_callbacks_register() - register driver operation protection callbacks
|
|
|
*
|
|
|
* Return: None
|
|
|
*/
|
|
|
-void qdf_register_dsc_psoc_callbacks(qdf_psoc_start_callback protect,
|
|
|
- qdf_psoc_stop_callback unprotect);
|
|
|
+void qdf_op_callbacks_register(qdf_op_protect_cb on_protect,
|
|
|
+ qdf_op_unprotect_cb on_unprotect);
|
|
|
+
|
|
|
#endif /*_QDF_PLATFORM_H*/
|
|
|
+
|