Skip to content

Commit ea652f9

Browse files
committed
Update k64f_emac.c
process all available packets at once. Because the interrupt handler is triggered at an interval and multiple packets could have been received during that interval. Fix from private fork by Liyou Zhou
1 parent 81af347 commit ea652f9

File tree

1 file changed

+1
-1
lines changed
  • libraries/net/eth/lwip-eth/arch/TARGET_Freescale

1 file changed

+1
-1
lines changed

libraries/net/eth/lwip-eth/arch/TARGET_Freescale/k64f_emac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ static void packet_rx(void* pvParameters) {
540540
/* Wait for receive task to wakeup */
541541
sys_arch_sem_wait(&k64f_enet->RxReadySem, 0);
542542

543-
if ((bdPtr[idx].control & kEnetRxBdEmpty) == 0) {
543+
while ((bdPtr[idx].control & kEnetRxBdEmpty) == 0) {
544544
k64f_enetif_input(k64f_enet->netif, idx);
545545
idx = (idx + 1) % ENET_RX_RING_LEN;
546546
}

0 commit comments

Comments
 (0)