|
@@ -12911,6 +12911,23 @@ static inline int hdd_state_query_cb(void)
|
|
|
return !!wlan_hdd_validate_context(cds_get_context(QDF_MODULE_ID_HDD));
|
|
|
}
|
|
|
|
|
|
+static int __hdd_op_protect_cb(void **out_sync, const char *func)
|
|
|
+{
|
|
|
+ struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
+
|
|
|
+ if (!hdd_ctx)
|
|
|
+ return -EAGAIN;
|
|
|
+
|
|
|
+ return __osif_psoc_sync_op_start(hdd_ctx->parent_dev,
|
|
|
+ (struct osif_psoc_sync **)out_sync,
|
|
|
+ func);
|
|
|
+}
|
|
|
+
|
|
|
+static void __hdd_op_unprotect_cb(void *sync, const char *func)
|
|
|
+{
|
|
|
+ __osif_psoc_sync_op_stop(sync, func);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* hdd_init() - Initialize Driver
|
|
|
*
|
|
@@ -12930,6 +12947,7 @@ int hdd_init(void)
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
|
+ qdf_op_callbacks_register(__hdd_op_protect_cb, __hdd_op_unprotect_cb);
|
|
|
qdf_register_module_state_query_callback(hdd_state_query_cb);
|
|
|
|
|
|
wlan_init_bug_report_lock();
|
|
@@ -12961,6 +12979,7 @@ void hdd_deinit(void)
|
|
|
#endif
|
|
|
|
|
|
wlan_destroy_bug_report_lock();
|
|
|
+ qdf_op_callbacks_register(NULL, NULL);
|
|
|
cds_deinit();
|
|
|
}
|
|
|
|