From ccef0e945a5de71ef6a89a30b82b2398649b403a Mon Sep 17 00:00:00 2001 From: yar Date: Sun, 18 Jan 2004 10:15:48 +0000 Subject: Avoid overwriting capability bits marked earlier when setting HW checksum offload bits. Enable available capabilities properly. Reviewed by: sam --- sys/dev/gx/if_gx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/gx') diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c index 4b5955f..4c29d1e 100644 --- a/sys/dev/gx/if_gx.c +++ b/sys/dev/gx/if_gx.c @@ -350,13 +350,13 @@ gx_attach(device_t dev) ifp->if_init = gx_init; ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_maxlen = GX_TX_RING_CNT - 1; - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; + ifp->if_capabilities = IFCAP_VLAN_HWTAGGING; /* see if we can enable hardware checksumming */ - if (gx->gx_vflags & GXF_CSUM) { - ifp->if_capabilities = IFCAP_HWCSUM; - ifp->if_capenable = ifp->if_capabilities; - } + if (gx->gx_vflags & GXF_CSUM) + ifp->if_capabilities |= IFCAP_HWCSUM; + + ifp->if_capenable = ifp->if_capabilities; /* figure out transciever type */ if (gx->gx_vflags & GXF_FORCE_TBI || -- cgit v1.1