forked from Imagelibrary/rtems
2007-09-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* network_5200/network.c: Add multicast support.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2007-09-21 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* network_5200/network.c: Add multicast support.
|
||||||
|
|
||||||
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1257/bsps
|
PR 1257/bsps
|
||||||
|
|||||||
@@ -1555,6 +1555,13 @@ static void mpc5200_fec_restart(struct mpc5200_enet_struct *sc)
|
|||||||
mpc5200.ecntrl |= (FEC_ECNTRL_OE | FEC_ECNTRL_EN);
|
mpc5200.ecntrl |= (FEC_ECNTRL_OE | FEC_ECNTRL_EN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t mpc5200_fec_setMultiFilter(struct ifnet *ifp)
|
||||||
|
{
|
||||||
|
/*struct mpc5200_enet_struct *sc = ifp->if_softc; */
|
||||||
|
/* XXX anything to do? */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Driver ioctl handler
|
* Driver ioctl handler
|
||||||
@@ -1574,6 +1581,22 @@ static int mpc5200_fec_ioctl (struct ifnet *ifp, ioctl_command_t command, caddr_
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SIOCADDMULTI:
|
||||||
|
case SIOCDELMULTI: {
|
||||||
|
struct ifreq* ifr = (struct ifreq*) data;
|
||||||
|
error = (command == SIOCADDMULTI)
|
||||||
|
? ether_addmulti(ifr, &sc->arpcom)
|
||||||
|
: ether_delmulti(ifr, &sc->arpcom);
|
||||||
|
|
||||||
|
if (error == ENETRESET) {
|
||||||
|
if (ifp->if_flags & IFF_RUNNING)
|
||||||
|
error = mpc5200_fec_setMultiFilter(ifp);
|
||||||
|
else
|
||||||
|
error = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SIOCSIFFLAGS:
|
case SIOCSIFFLAGS:
|
||||||
|
|
||||||
switch(ifp->if_flags & (IFF_UP | IFF_RUNNING))
|
switch(ifp->if_flags & (IFF_UP | IFF_RUNNING))
|
||||||
@@ -1777,7 +1800,7 @@ int rtems_mpc5200_fec_driver_attach(struct rtems_bsdnet_ifconfig *config)
|
|||||||
ifp->if_ioctl = mpc5200_fec_ioctl;
|
ifp->if_ioctl = mpc5200_fec_ioctl;
|
||||||
ifp->if_start = mpc5200_fec_tx_start;
|
ifp->if_start = mpc5200_fec_tx_start;
|
||||||
ifp->if_output = ether_output;
|
ifp->if_output = ether_output;
|
||||||
ifp->if_flags = IFF_BROADCAST;
|
ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST;
|
||||||
/*ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;*/
|
/*ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;*/
|
||||||
|
|
||||||
if(ifp->if_snd.ifq_maxlen == 0)
|
if(ifp->if_snd.ifq_maxlen == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user