diff --git a/libraries/net/eth/lwip-eth/arch/lpc_emac_config.h b/libraries/net/eth/lwip-eth/arch/lpc_emac_config.h index 048f08b8a9b..831b3d76d09 100644 --- a/libraries/net/eth/lwip-eth/arch/lpc_emac_config.h +++ b/libraries/net/eth/lwip-eth/arch/lpc_emac_config.h @@ -86,7 +86,7 @@ extern "C" /** \brief Defines the number of descriptors used for TX. Must * be a minimum value of 2. */ -#define LPC_NUM_BUFF_TXDESCS 3 +#define LPC_NUM_BUFF_TXDESCS (TCP_SND_QUEUELEN + 1) /** \brief Set this define to 1 to enable bounce buffers for transmit pbufs * that cannot be sent via the zero-copy method. Some chained pbufs diff --git a/libraries/net/lwip/lwip/core/tcp_out.c b/libraries/net/lwip/lwip/core/tcp_out.c index 86e0919531f..0cc48b1cdb7 100644 --- a/libraries/net/lwip/lwip/core/tcp_out.c +++ b/libraries/net/lwip/lwip/core/tcp_out.c @@ -646,6 +646,9 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) last_unsent->len += concat_p->tot_len; #if TCP_CHECKSUM_ON_COPY if (concat_chksummed) { + if (concat_chksum_swapped) { + concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum); + } tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum, &last_unsent->chksum_swapped); last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED;