From 8864bb3ac4eb4905e4ac5d1658b0b3eec4029230 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Tue, 25 May 2021 15:07:21 +0530 Subject: [PATCH] qcacld-3.0: Move cp stats to scheduler thread from kworker thread Currently, cp stats are received through kworker thread context. This causes race conditions/out of sync issues if any common data structures are handled in parallel in scheduler thread context. There is no need to receive the cp stats on kworker thread as per current design. So, move the cp stats event handling to scheduler thread to avoid any race conditions. Change-Id: Id8134003e6f7a3e0368b20c496f650e0b7025b9e CRs-Fixed: 2928876 --- components/target_if/cp_stats/src/target_if_mc_cp_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/target_if/cp_stats/src/target_if_mc_cp_stats.c b/components/target_if/cp_stats/src/target_if_mc_cp_stats.c index 212cf43db57f..78aea96ed547 100644 --- a/components/target_if/cp_stats/src/target_if_mc_cp_stats.c +++ b/components/target_if/cp_stats/src/target_if_mc_cp_stats.c @@ -1161,7 +1161,7 @@ target_if_register_big_data_event_handler(struct wmi_unified *wmi_handle) return wmi_unified_register_event_handler( wmi_handle, wmi_vdev_send_big_data_p2_eventid, target_if_mc_cp_stats_big_data_stats_event_handler, - WMI_RX_WORK_CTX); + WMI_RX_SERIALIZER_CTX); } static void @@ -1231,14 +1231,14 @@ target_if_mc_cp_stats_register_event_handler(struct wlan_objmgr_psoc *psoc) wmi_handle, wmi_update_stats_event_id, target_if_mc_cp_stats_stats_event_handler, - WMI_RX_WORK_CTX); + WMI_RX_SERIALIZER_CTX); if (ret_val) cp_stats_err("Failed to register stats event cb"); ret_val = wmi_unified_register_event_handler(wmi_handle, wmi_peer_stats_info_event_id, target_if_mc_cp_stats_peer_stats_info_event_handler, - WMI_RX_WORK_CTX); + WMI_RX_SERIALIZER_CTX); if (ret_val) cp_stats_err("Failed to register peer stats info event cb");