Skip to content

Commit

Permalink
teensy41: Only check for RX available if counter==0, in driver_proc_i…
Browse files Browse the repository at this point in the history
…nput()
  • Loading branch information
ssilverman committed Aug 9, 2024
1 parent fa933f3 commit 4ae5d3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/drivers/driver_teensy41.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,11 +983,11 @@ struct pbuf *driver_proc_input(struct netif *netif, int counter) {
s_checkLinkStatusState = check_link_status(netif, s_checkLinkStatusState);
}

if (atomic_flag_test_and_set(&s_rxNotAvail)) {
return NULL;
}

if (counter >= RX_SIZE * 2) {
if (counter == 0) {
if (atomic_flag_test_and_set(&s_rxNotAvail)) {
return NULL;
}
} else if (counter >= RX_SIZE * 2) {
return NULL;
}

Expand Down

0 comments on commit 4ae5d3e

Please sign in to comment.