diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2008-03-23 04:59:13 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2008-03-23 04:59:13 +0000 |
| commit | 70acaecfd0fda784ac73dbe4c55b571e0589a159 (patch) | |
| tree | 36ae3b626d107846b37d5de93edc801938334064 /sys/dev | |
| parent | 72b218d3665a5f430523881e660cfa8981ae2829 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/re/if_re.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 661328275a15..0b8757aa59e8 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -2410,6 +2410,7 @@ re_init_locked(sc) struct ifnet *ifp = sc->rl_ifp; struct mii_data *mii; u_int32_t rxcfg = 0; + uint16_t cfg; union { uint32_t align_dummy; u_char eaddr[ETHER_ADDR_LEN]; @@ -2429,9 +2430,13 @@ re_init_locked(sc) * RX checksum offload. We must configure the C+ register * before all others. */ - CSR_WRITE_2(sc, RL_CPLUS_CMD, RL_CPLUSCMD_RXENB| - RL_CPLUSCMD_TXENB|RL_CPLUSCMD_PCI_MRW| - RL_CPLUSCMD_VLANSTRIP|RL_CPLUSCMD_RXCSUM_ENB); + cfg = RL_CPLUSCMD_PCI_MRW; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + cfg |= RL_CPLUSCMD_RXCSUM_ENB; + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + cfg |= RL_CPLUSCMD_VLANSTRIP; + CSR_WRITE_2(sc, RL_CPLUS_CMD, + cfg | RL_CPLUSCMD_RXENB | RL_CPLUSCMD_TXENB); /* * Init our MAC address. Even though the chipset |
