From 433dc52104bbafd3333333c6a7efed21ce4107f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 26 Oct 2023 21:54:23 +0200 Subject: [PATCH] Set TX_QUEUE_SIZE to not check inflight counter --- esp-wifi/src/wifi/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esp-wifi/src/wifi/mod.rs b/esp-wifi/src/wifi/mod.rs index 7622b194..bf684cff 100644 --- a/esp-wifi/src/wifi/mod.rs +++ b/esp-wifi/src/wifi/mod.rs @@ -1081,7 +1081,8 @@ where } fn esp_wifi_can_send(cs: critical_section::CriticalSection) -> bool { - WIFI_TX_INFLIGHT.load(Ordering::SeqCst) < TX_QUEUE_SIZE + // TX_QUEUE_SIZE = 0 means no limit on TX queue + (TX_QUEUE_SIZE == 0 || WIFI_TX_INFLIGHT.load(Ordering::SeqCst) < TX_QUEUE_SIZE) && crate::HEAP.borrow_ref(cs).free() > 2 * DATA_FRAME_SIZE }