qcacmn: Process FW diag events in a separate worker thread

Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.

To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.

Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
This commit is contained in:
Bapiraju Alla
2020-11-16 15:56:57 +05:30
committad av snandini
förälder 8652562a87
incheckning b130521bd3
4 ändrade filer med 129 tillägg och 32 borttagningar

Visa fil

@@ -4506,7 +4506,7 @@ int dbglog_init(wmi_unified_t wmi_handle)
wmi_unified_register_event_handler(wmi_handle,
wmi_dbg_msg_event_id,
dbglog_parse_debug_logs,
WMA_RX_WORK_CTX);
WMI_RX_DIAG_WORK_CTX);
if (QDF_IS_STATUS_ERROR(res))
return A_ERROR;
@@ -4514,14 +4514,14 @@ int dbglog_init(wmi_unified_t wmi_handle)
res = wmi_unified_register_event_handler(wmi_handle,
wmi_diag_container_event_id,
fw_diag_data_event_handler,
WMA_RX_WORK_CTX);
WMI_RX_DIAG_WORK_CTX);
if (QDF_IS_STATUS_ERROR(res))
return A_ERROR;
/* Register handler for new FW diag Event, LOG, MSG combined */
res = wmi_unified_register_event_handler(wmi_handle, wmi_diag_event_id,
diag_fw_handler,
WMA_RX_WORK_CTX);
WMI_RX_DIAG_WORK_CTX);
if (QDF_IS_STATUS_ERROR(res))
return A_ERROR;