summaryrefslogtreecommitdiffstats
path: root/sys/dev/gx
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-01-18 10:15:48 +0000
committeryar <yar@FreeBSD.org>2004-01-18 10:15:48 +0000
commitccef0e945a5de71ef6a89a30b82b2398649b403a (patch)
tree4374a841608bc94ea31c4179cf7450f9520fdd8d /sys/dev/gx
parent1ec4f4a6cbcc916ea536b18e911fd2910ceaa52d (diff)
downloadFreeBSD-src-ccef0e945a5de71ef6a89a30b82b2398649b403a.zip
FreeBSD-src-ccef0e945a5de71ef6a89a30b82b2398649b403a.tar.gz
Avoid overwriting capability bits marked earlier
when setting HW checksum offload bits. Enable available capabilities properly. Reviewed by: sam
Diffstat (limited to 'sys/dev/gx')
-rw-r--r--sys/dev/gx/if_gx.c10
1 files changed, 5 insertions, 5 deletions
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 ||
OpenPOWER on IntegriCloud