Removed a dead while block from the PCnet code.

This commit is contained in:
OBattler
2020-01-14 20:04:47 +01:00
parent 93111b3a24
commit 2d46b87088

View File

@@ -1263,22 +1263,18 @@ pcnetReceiveNoSync(void *priv, uint8_t *buf, int size)
/* In loopback mode, Runt Packed Accept is always enabled internally; /* In loopback mode, Runt Packed Accept is always enabled internally;
* don't do any padding because guest may be looping back very short packets. * don't do any padding because guest may be looping back very short packets.
*/ */
if (!CSR_LOOP(dev)) uint32_t fcs = UINT32_MAX;
while (size < 60) uint8_t *p = src;
src[size++] = 0;
uint32_t fcs = UINT32_MAX; while (p != &src[size])
uint8_t *p = src; CRC(fcs, *p++);
while (p != &src[size]) /* FCS at the end of the packet */
CRC(fcs, *p++); ((uint32_t *)&src[size])[0] = htonl(fcs);
size += 4;
}
/* FCS at the end of the packet */ cbPacket = size;
((uint32_t *)&src[size])[0] = htonl(fcs);
size += 4;
}
cbPacket = size;
pcnetRmdLoad(dev, &rmd, PHYSADDR(dev, crda), 0); pcnetRmdLoad(dev, &rmd, PHYSADDR(dev, crda), 0);
/* if (!CSR_LAPPEN(dev)) */ /* if (!CSR_LAPPEN(dev)) */