Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip

we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
This commit is contained in:
wpaul 2001-06-15 18:43:19 +00:00
parent 67653866aa
commit d524f96864

View File

@ -1546,16 +1546,16 @@ static int nge_encap(sc, m_head, txidx)
if (m != NULL)
return(ENOBUFS);
sc->nge_ldata->nge_tx_list[cur].nge_extsts = 0;
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts = 0;
if (m_head->m_pkthdr.csum_flags) {
if (m_head->m_pkthdr.csum_flags & CSUM_IP)
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
NGE_TXEXTSTS_IPCSUM;
if (m_head->m_pkthdr.csum_flags & CSUM_TCP)
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
NGE_TXEXTSTS_TCPCSUM;
if (m_head->m_pkthdr.csum_flags & CSUM_UDP)
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
NGE_TXEXTSTS_UDPCSUM;
}