Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci kern/50456: Freddy DISSAUX: Fix packets lost wit...
details: https://anonhg.NetBSD.org/src/rev/70feee6c2517
branches: trunk
changeset: 341823:70feee6c2517
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 24 20:13:12 2015 +0000
description:
kern/50456: Freddy DISSAUX: Fix packets lost with tcpdump.
diffstat:
sys/dev/pci/if_alc.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diffs (46 lines):
diff -r be3a331d0320 -r 70feee6c2517 sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c Tue Nov 24 18:17:37 2015 +0000
+++ b/sys/dev/pci/if_alc.c Tue Nov 24 20:13:12 2015 +0000
@@ -2034,11 +2034,42 @@
alc_ioctl(struct ifnet *ifp, u_long cmd, void *data)
{
struct alc_softc *sc = ifp->if_softc;
+ struct mii_data *mii = &sc->sc_miibus;
+ struct ifreq *ifr = (struct ifreq *)data;
int s, error = 0;
s = splnet();
error = ether_ioctl(ifp, cmd, data);
+ switch (cmd) {
+ case SIOCSIFADDR:
+ ifp->if_flags |= IFF_UP;
+ if (!(ifp->if_flags & IFF_RUNNING))
+ alc_init(ifp);
+ break;
+
+ case SIOCSIFFLAGS:
+ if (ifp->if_flags & IFF_UP) {
+ if (ifp->if_flags & IFF_RUNNING)
+ error = ENETRESET;
+ else
+ alc_init(ifp);
+ } else {
+ if (ifp->if_flags & IFF_RUNNING)
+ alc_stop(ifp, 0);
+ }
+ break;
+
+ case SIOCSIFMEDIA:
+ case SIOCGIFMEDIA:
+ error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
+ break;
+
+ default:
+ error = ether_ioctl(ifp, cmd, data);
+ break;
+ }
+
if (error == ENETRESET) {
if (ifp->if_flags & IFF_RUNNING)
alc_iff(sc);
Home |
Main Index |
Thread Index |
Old Index