mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
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>
This commit is contained in:
parent
2ccdfd96be
commit
2008c8087c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43062
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue