qcacld-3.0: Bypass hif_completion_thread in fw event
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.
Change-Id: I73b8518d87645d827814cd1345eb68370de30d1f
CRs-Fixed: 941358
diff --git a/core/hif/src/hif_main.c b/core/hif/src/hif_main.c
index 7dbc369..ea96078 100644
--- a/core/hif/src/hif_main.c
+++ b/core/hif/src/hif_main.c
@@ -194,6 +194,19 @@
return awake && forced_awake;
}
+
+static inline void hif_fw_event_handler(struct HIF_CE_state *hif_state)
+{
+ struct hif_msg_callbacks *msg_callbacks =
+ &hif_state->msg_callbacks_current;
+
+ if (!msg_callbacks->fwEventHandler)
+ return;
+
+ msg_callbacks->fwEventHandler(msg_callbacks->Context,
+ CDF_STATUS_E_FAILURE);
+}
+
/**
* hif_fw_interrupt_handler(): FW interrupt handler
*
@@ -224,9 +237,7 @@
A_TARGET_ACCESS_END_RET(scn);
if (hif_state->started) {
- /* Alert the Host-side service thread */
- atomic_set(&hif_state->fw_event_pending, 1);
- hif_completion_thread(hif_state);
+ hif_fw_event_handler(hif_state);
} else {
/*
* Probable Target failure before we're prepared