From 6c879d4c767860aba06d4350eb1fbefac9d8b4b5 Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Fri, 22 Feb 2019 11:17:07 +0530 Subject: [PATCH] qcacmn: Add direct rx buffer changes for CFR requirements CFR needs to correlate data received from direct dma ring and WMI event for tx completion. These two events can come in any order. To facilitate correlation CFR module has to hold on to the buffer until both events are received and then replenish buffer back to direct dma ring. To facilitate this requirement direct rx buf module is modified to change callback return to bool to indicate whether buffer can be replenished immediatley or not. Also add API to indiciate buffer release/replenish later. Change-Id: I40d3fdff82fd2828ada14b584da33a66052c6773 CRs-Fixed: 2403398 --- spectral/dispatcher/inc/wlan_spectral_utils_api.h | 6 +++--- spectral/dispatcher/src/wlan_spectral_utils_api.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spectral/dispatcher/inc/wlan_spectral_utils_api.h b/spectral/dispatcher/inc/wlan_spectral_utils_api.h index a6734267a28f..9453dcc2f799 100644 --- a/spectral/dispatcher/inc/wlan_spectral_utils_api.h +++ b/spectral/dispatcher/inc/wlan_spectral_utils_api.h @@ -185,9 +185,9 @@ QDF_STATUS spectral_unregister_dbr(struct wlan_objmgr_pdev *pdev); * * API to handle spectral dbr event * - * Return: status + * Return: true to release buf */ -int spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev, - struct direct_buf_rx_data *payload); +bool spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev, + struct direct_buf_rx_data *payload); #endif #endif /* _WLAN_SPECTRAL_UTILS_API_H_*/ diff --git a/spectral/dispatcher/src/wlan_spectral_utils_api.c b/spectral/dispatcher/src/wlan_spectral_utils_api.c index 71db87b1ced6..18b7c8201806 100644 --- a/spectral/dispatcher/src/wlan_spectral_utils_api.c +++ b/spectral/dispatcher/src/wlan_spectral_utils_api.c @@ -208,8 +208,8 @@ wlan_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev, qdf_export_symbol(wlan_register_wmi_spectral_cmd_ops); #ifdef DIRECT_BUF_RX_ENABLE -int spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev, - struct direct_buf_rx_data *payload) +bool spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev, + struct direct_buf_rx_data *payload) { struct spectral_context *sc; @@ -223,7 +223,9 @@ int spectral_dbr_event_handler(struct wlan_objmgr_pdev *pdev, return -EINVAL; } - return sc->sptrlc_process_spectral_report(pdev, payload); + sc->sptrlc_process_spectral_report(pdev, payload); + + return true; } #endif