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
pull/1180/head
Sam Grove 2015-06-12 09:20:18 +01:00
parent 81af347389
commit ea652f9aba
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ static void packet_rx(void* pvParameters) {
/* Wait for receive task to wakeup */
sys_arch_sem_wait(&k64f_enet->RxReadySem, 0);
if ((bdPtr[idx].control & kEnetRxBdEmpty) == 0) {
while ((bdPtr[idx].control & kEnetRxBdEmpty) == 0) {
k64f_enetif_input(k64f_enet->netif, idx);
idx = (idx + 1) % ENET_RX_RING_LEN;
}