From f1f8ab43b1f6c75db5669df14600c83ba4775678 Mon Sep 17 00:00:00 2001 From: jlemon Date: Tue, 18 Sep 2001 18:41:39 +0000 Subject: Have the driver announce what capabilities it supports. These are currently not under user control. --- sys/dev/txp/if_txp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sys/dev/txp') 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)) -- cgit v1.1