diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-09-18 18:41:39 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-09-18 18:41:39 +0000 |
commit | f1f8ab43b1f6c75db5669df14600c83ba4775678 (patch) | |
tree | c746590bb1edf46a9548c7a9b3f564013e46c3f9 /sys/dev/txp | |
parent | 26343eb1f57b23c6dbbaa61c0c5a38bc32757e55 (diff) | |
download | FreeBSD-src-f1f8ab43b1f6c75db5669df14600c83ba4775678.zip FreeBSD-src-f1f8ab43b1f6c75db5669df14600c83ba4775678.tar.gz |
Have the driver announce what capabilities it supports. These are
currently not under user control.
Diffstat (limited to 'sys/dev/txp')
-rw-r--r-- | sys/dev/txp/if_txp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index d9aa0b7..68f2421 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -1867,6 +1867,7 @@ txp_capabilities(sc) sc->sc_tx_capability = ext->ext_1 & OFFLOAD_MASK; sc->sc_rx_capability = ext->ext_2 & OFFLOAD_MASK; + ifp->if_capabilities = 0; if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_VLAN) { sc->sc_tx_capability |= OFFLOAD_VLAN; @@ -1885,6 +1886,7 @@ txp_capabilities(sc) if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_IPCKSUM) { sc->sc_tx_capability |= OFFLOAD_IPCKSUM; sc->sc_rx_capability |= OFFLOAD_IPCKSUM; + ifp->if_capabilities |= IFCAP_HWCSUM; ifp->if_hwassist |= CSUM_IP; } @@ -1893,9 +1895,7 @@ txp_capabilities(sc) sc->sc_tx_capability |= OFFLOAD_TCPCKSUM; #endif sc->sc_rx_capability |= OFFLOAD_TCPCKSUM; -#if 0 - ifp->if_capabilities |= CSUM_TCP; -#endif + ifp->if_capabilities |= IFCAP_HWCSUM; } if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_UDPCKSUM) { @@ -1903,10 +1903,9 @@ txp_capabilities(sc) sc->sc_tx_capability |= OFFLOAD_UDPCKSUM; #endif sc->sc_rx_capability |= OFFLOAD_UDPCKSUM; -#if 0 - ifp->if_capabilities |= CSUM_UDP; -#endif + ifp->if_capabilities |= IFCAP_HWCSUM; } + ifp->if_capenable = ifp->if_capabilities; if (txp_command(sc, TXP_CMD_OFFLOAD_WRITE, 0, sc->sc_tx_capability, sc->sc_rx_capability, NULL, NULL, NULL, 1)) |