|
@@ -219,8 +219,9 @@ bool hif_ce_service_should_yield(struct hif_softc *scn,
|
|
|
{
|
|
|
bool yield, time_limit_reached, rxpkt_thresh_reached = 0;
|
|
|
|
|
|
- time_limit_reached = qdf_system_time_after_eq(qdf_system_ticks(),
|
|
|
- ce_state->ce_service_yield_time);
|
|
|
+ time_limit_reached =
|
|
|
+ sched_clock() > ce_state->ce_service_yield_time ? 1 : 0;
|
|
|
+
|
|
|
if (!time_limit_reached)
|
|
|
rxpkt_thresh_reached = hif_max_num_receives_reached
|
|
|
(scn, ce_state->receive_count);
|
|
@@ -1839,7 +1840,6 @@ more_data:
|
|
|
FAST_RX_SOFTWARE_INDEX_UPDATE,
|
|
|
NULL, NULL, sw_index);
|
|
|
dest_ring->sw_index = sw_index;
|
|
|
-
|
|
|
ce_fastpath_rx_handle(ce_state, cmpl_msdus,
|
|
|
MSG_FLUSH_NUM, ctrl_addr);
|
|
|
|
|
@@ -1910,7 +1910,11 @@ static void ce_per_engine_service_fast(struct hif_softc *scn, int ce_id)
|
|
|
}
|
|
|
#endif /* WLAN_FEATURE_FASTPATH */
|
|
|
|
|
|
-#define CE_PER_ENGINE_SERVICE_MAX_TIME_JIFFIES 2
|
|
|
+/* Maximum amount of time in nano seconds before which the CE per engine service
|
|
|
+ * should yield. ~1 jiffie.
|
|
|
+ */
|
|
|
+#define CE_PER_ENGINE_SERVICE_MAX_YIELD_TIME_NS (10 * 1000 * 1000)
|
|
|
+
|
|
|
/*
|
|
|
* Guts of interrupt handler for per-engine interrupts on a particular CE.
|
|
|
*
|
|
@@ -1947,8 +1951,9 @@ int ce_per_engine_service(struct hif_softc *scn, unsigned int CE_id)
|
|
|
/* Clear force_break flag and re-initialize receive_count to 0 */
|
|
|
CE_state->receive_count = 0;
|
|
|
CE_state->force_break = 0;
|
|
|
- CE_state->ce_service_yield_time = qdf_system_ticks() +
|
|
|
- CE_PER_ENGINE_SERVICE_MAX_TIME_JIFFIES;
|
|
|
+ CE_state->ce_service_yield_time =
|
|
|
+ sched_clock() +
|
|
|
+ (unsigned long long)CE_PER_ENGINE_SERVICE_MAX_YIELD_TIME_NS;
|
|
|
|
|
|
|
|
|
qdf_spin_lock(&CE_state->ce_index_lock);
|