diff options
Diffstat (limited to 'sys/dev/pci/if_nfe.c')
-rw-r--r-- | sys/dev/pci/if_nfe.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index 133f0b7ed9d..e0c4e34edf4 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.86 2008/11/09 15:08:26 naddy Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.87 2008/11/28 02:44:18 brad Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr> @@ -522,8 +522,8 @@ int nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct nfe_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *)data; struct ifaddr *ifa = (struct ifaddr *)data; + struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; s = splnet(); @@ -538,12 +538,7 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) arp_ifinit(&sc->sc_arpcom, ifa); #endif break; - case SIOCSIFMTU: - if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu) - error = EINVAL; - else if (ifp->if_mtu != ifr->ifr_mtu) - ifp->if_mtu = ifr->ifr_mtu; - break; + case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { /* @@ -565,26 +560,22 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } sc->sc_if_flags = ifp->if_flags; break; - case SIOCADDMULTI: - case SIOCDELMULTI: - error = (cmd == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->sc_arpcom) : - ether_delmulti(ifr, &sc->sc_arpcom); - if (error == ENETRESET) { - if (ifp->if_flags & IFF_RUNNING) - nfe_setmulti(sc); - error = 0; - } - break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd); break; + default: error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + nfe_setmulti(sc); + error = 0; + } + splx(s); return error; } |