summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-05-21 20:34:04 +0000
committeryar <yar@FreeBSD.org>2004-05-21 20:34:04 +0000
commit0d857d9bf6eff24311b6958f0727c21593f46973 (patch)
tree371a8180341e7f3ac91ea1d76bfe5b5f12f3c8b7 /sys/dev/fxp
parent00e1e7a0663c29f34ac91a5312379002cd4df17d (diff)
downloadFreeBSD-src-0d857d9bf6eff24311b6958f0727c21593f46973.zip
FreeBSD-src-0d857d9bf6eff24311b6958f0727c21593f46973.tar.gz
Cosmetic:
Set capability bits in a consistent way. Add a comment on why the VLAN_MTU stuff comes after ether_ifattach().
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index d0b6467..b5c7725 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -797,11 +797,13 @@ fxp_attach(device_t dev)
ifp->if_start = fxp_start;
ifp->if_watchdog = fxp_watchdog;
+ ifp->if_capabilities = ifp->if_capenable = 0;
+
/* Enable checksum offload for 82550 or better chips */
if (sc->flags & FXP_FLAG_EXT_RFA) {
ifp->if_hwassist = FXP_CSUM_FEATURES;
- ifp->if_capabilities = IFCAP_HWCSUM;
- ifp->if_capenable = ifp->if_capabilities;
+ ifp->if_capabilities |= IFCAP_HWCSUM;
+ ifp->if_capenable |= IFCAP_HWCSUM;
}
#ifdef DEVICE_POLLING
@@ -817,6 +819,8 @@ fxp_attach(device_t dev)
/*
* Tell the upper layer(s) we support long frames.
+ * Must appear after the call to ether_ifattach() because
+ * ether_ifattach() sets ifi_hdrlen to the default value.
*/
ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
ifp->if_capabilities |= IFCAP_VLAN_MTU;
OpenPOWER on IntegriCloud