Bladeren bron

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
Alok Kumar 8 jaren geleden
bovenliggende
commit
967af27196
1 gewijzigde bestanden met toevoegingen van 18 en 0 verwijderingen
  1. 18 0
      htc/htc_send.c

+ 18 - 0
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