Skip to content

Commit

Permalink
Set TX_QUEUE_SIZE to not check inflight counter
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 27, 2023
1 parent cc2da1f commit 433dc52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esp-wifi/src/wifi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 433dc52

Please sign in to comment.