diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-01-22 15:25:04 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-01-22 15:25:04 +0000 |
commit | 61efd601cbc74e2f5f3352be300c254f87a9ebc7 (patch) | |
tree | d252ae1acee604cddbde997ecc2967a131a92fa2 /sys | |
parent | d1ac7fffdbbfd61278b16d1228293a1fd8d92231 (diff) | |
download | FreeBSD-src-61efd601cbc74e2f5f3352be300c254f87a9ebc7.zip FreeBSD-src-61efd601cbc74e2f5f3352be300c254f87a9ebc7.tar.gz |
Multicast code isn't quite correct. The RealTek wants the upper six bits
of the CRC as the multicast hash table bit, not the lower six bits. Plus
we have to flip on all bits in the table for multicast mode.
Pointed out by: Kazushi SUGYO <k-sugyou@nwsl.mesh.ad.jp>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/if_rl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 09a4a99..7ec994a 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_rl.c,v 1.20 1999/01/16 20:46:24 wpaul Exp $ + * $Id: if_rl.c,v 1.20 1999/01/16 20:46:24 wpaul Exp wpaul $ */ /* @@ -127,7 +127,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_rl.c,v 1.20 1999/01/16 20:46:24 wpaul Exp $"; + "$Id: if_rl.c,v 1.20 1999/01/16 20:46:24 wpaul Exp wpaul $"; #endif /* @@ -587,7 +587,7 @@ static void rl_phy_writereg(sc, reg, data) } /* - * Calculate CRC of a multicast group address, return the lower 6 bits. + * Calculate CRC of a multicast group address, return the upper 6 bits. */ static u_int8_t rl_calchash(addr) caddr_t addr; @@ -611,7 +611,7 @@ static u_int8_t rl_calchash(addr) } /* return the filter bit position */ - return(crc & 0x0000003F); + return(crc >> 26); } /* @@ -631,7 +631,7 @@ static void rl_setmulti(sc) rxfilt = CSR_READ_4(sc, RL_RXCFG); - if (ifp->if_flags & IFF_ALLMULTI) { + if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { rxfilt |= RL_RXCFG_RX_MULTI; CSR_WRITE_4(sc, RL_RXCFG, rxfilt); CSR_WRITE_4(sc, RL_MAR0, 0xFFFFFFFF); |