diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2010-09-19 00:15:42 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2010-09-19 00:15:42 +0000 |
commit | 4e8c57085beac7b18f1cfe2dfa64f72a4e7afb7c (patch) | |
tree | f88257031e7b533601065c3d9e88880420263547 /sys/dev | |
parent | 11ae5e57633d77bac7e6dbfa26e62ac0aba9296a (diff) |
Move setting of reception of broadcast packets from lii_init() into
lii_iff() to be consistent with age/alc and other drivers. No functional
change. From Brad, tested by oga@.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_lii.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 018b112239b..8d596347815 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.29 2010/08/31 17:13:44 deraadt Exp $ */ +/* $OpenBSD: if_lii.c,v 1.30 2010/09/19 00:15:41 sthen Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -710,8 +710,8 @@ lii_init(struct ifnet *ifp) val = LII_READ_4(sc, LII_MACC) & MACC_FDX; val |= MACC_RX_EN | MACC_TX_EN | MACC_MACLP_CLK_PHY | - MACC_TX_FLOW_EN | MACC_RX_FLOW_EN | - MACC_ADD_CRC | MACC_PAD | MACC_BCAST_EN; + MACC_TX_FLOW_EN | MACC_RX_FLOW_EN | MACC_ADD_CRC | + MACC_PAD; val |= 7 << MACC_PREAMBLE_LEN_SHIFT; val |= 2 << MACC_HDX_LEFT_BUF_SHIFT; @@ -1135,9 +1135,14 @@ lii_iff(struct lii_softc *sc) uint32_t crc, val; val = LII_READ_4(sc, LII_MACC); - val &= ~(MACC_ALLMULTI_EN | MACC_PROMISC_EN); + val &= ~(MACC_ALLMULTI_EN | MACC_BCAST_EN | MACC_PROMISC_EN); ifp->if_flags &= ~IFF_ALLMULTI; + /* + * Always accept broadcast frames. + */ + val |= MACC_BCAST_EN; + if (ifp->if_flags & IFF_PROMISC || ac->ac_multirangecnt > 0) { ifp->if_flags |= IFF_ALLMULTI; if (ifp->if_flags & IFF_PROMISC) |