summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_pcn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_pcn.c')
-rw-r--r--sys/dev/pci/if_pcn.c36
1 files changed, 9 insertions, 27 deletions
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c
index 58d5339d6c9..268e6f19730 100644
--- a/sys/dev/pci/if_pcn.c
+++ b/sys/dev/pci/if_pcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pcn.c,v 1.20 2008/10/02 20:21:14 brad Exp $ */
+/* $OpenBSD: if_pcn.c,v 1.21 2008/11/28 02:44:18 brad Exp $ */
/* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */
/*
@@ -1082,8 +1082,8 @@ int
pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct pcn_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
int s, error = 0;
s = splnet();
@@ -1105,13 +1105,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
case SIOCSIFFLAGS:
/*
* If interface is marked up and not running, then start it.
@@ -1125,24 +1118,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
pcn_stop(ifp, 1);
break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_arpcom) :
- ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- error = pcn_init(ifp);
- else
- error = 0;
- }
- break;
-
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -1152,6 +1127,13 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ error = pcn_init(ifp);
+ else
+ error = 0;
+ }
+
/* Try to get more packets going. */
pcn_start(ifp);