This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
patch to fix mcast address reception
- From: Ken Cox <jkc at redhat dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 26 Jul 2002 07:29:43 -0500 (CDT)
- Subject: patch to fix mcast address reception
- Reply-to: Ken Cox <jkc at redhat dot com>
While initializing and configuring the network stack, the enet chip is
reset several times. This causes it to lose its multicast addresses.
This patch will reconfigure the mcast addresses if any are present in
the interface struct.
--- io/eth/current/src/net/eth_drv.c.orig Mon Jul 8 11:01:27 2002
+++ io/eth/current/src/net/eth_drv.c Thu Jul 25 12:48:16 2002
@@ -410,8 +410,15 @@
eth_drv_start(struct eth_drv_sc *sc)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+ int s;
// Perform any hardware initialization
(sc->funs->start)(sc, (unsigned char *)&sc->sc_arpcom.ac_enaddr, 0);
+ // resend multicast addresses if present
+ if(ifp->if_multiaddrs.lh_first && ifp->if_ioctl) {
+ s = splimp();
+ ifp->if_ioctl(ifp, SIOCADDMULTI, 0);
+ splx(s);
+ }
// Set 'running' flag, and clear output active flag.
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
--
Ken Cox
Communications Software Consultant
Red Hat, Inc.
4900 Corporate Dr.
Suite L
Huntsville, AL. 35805
(256) 217-0142
(256) 837-0057 (fax)