From 967af271964c7b674f483a4f84c4efc84eaec556 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Fri, 2 Dec 2016 16:32:53 -0800 Subject: [PATCH] qcacmn: Add a delay before sending WMI message Add a delay of 20ms before sending WMI message. A delay of 20msec was added to slow down sending of WMI message to give time for processing WMI in Napier FPGA platform. Change-Id: Ib64972a92e638f2fe92f669657a5ab9eb326e744 CRs-Fixed: 2087330 --- htc/htc_send.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/htc/htc_send.c b/htc/htc_send.c index 09d87f178cad..ff3dc3d0be89 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -58,6 +58,23 @@ uint32_t g_htc_credit_history_idx; uint32_t g_htc_credit_history_length; struct HTC_CREDIT_HISTORY htc_credit_history_buffer[HTC_CREDIT_HISTORY_MAX]; +#ifdef QCA_WIFI_NAPIER_EMULATION +#define HTC_EMULATION_DELAY_IN_MS 20 +/** + * htc_add_delay(): Adds a delay in before proceeding, only for emulation + * + * Return: None + */ +static inline void htc_add_emulation_delay(void) +{ + qdf_mdelay(HTC_EMULATION_DELAY_IN_MS); +} +#else +static inline void htc_add_emulation_delay(void) +{ +} +#endif + /** * htc_credit_record() - records tx que state & credit transactions * @type: type of echange can be HTC_REQUEST_CREDIT @@ -89,6 +106,7 @@ void htc_credit_record(enum htc_credit_exchange_type type, uint32_t tx_credit, g_htc_credit_history_idx++; g_htc_credit_history_length++; + htc_add_emulation_delay(); } #ifdef WMI_INTERFACE_EVENT_LOGGING