Revision e685b4eb hw/e1000.c
b/hw/e1000.c | ||
---|---|---|
384 | 384 |
} else // UDP |
385 | 385 |
cpu_to_be16wu((uint16_t *)(tp->data+css+4), len); |
386 | 386 |
if (tp->sum_needed & E1000_TXD_POPTS_TXSM) { |
387 |
unsigned int phsum; |
|
387 | 388 |
// add pseudo-header length before checksum calculation |
388 | 389 |
sp = (uint16_t *)(tp->data + tp->tucso); |
389 |
cpu_to_be16wu(sp, be16_to_cpup(sp) + len); |
|
390 |
phsum = be16_to_cpup(sp) + len; |
|
391 |
phsum = (phsum >> 16) + (phsum & 0xffff); |
|
392 |
cpu_to_be16wu(sp, phsum); |
|
390 | 393 |
} |
391 | 394 |
tp->tso_frames++; |
392 | 395 |
} |
Also available in: Unified diff