diff options
Diffstat (limited to 'sys/dev/pci/if_wb.c')
-rw-r--r-- | sys/dev/pci/if_wb.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 22229c29d42..a41a7c982dc 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.42 2008/11/25 11:01:35 claudio Exp $ */ +/* $OpenBSD: if_wb.c,v 1.43 2008/11/28 02:44:18 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1572,8 +1572,8 @@ int wb_ioctl(ifp, command, data) caddr_t data; { struct wb_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(); @@ -1592,6 +1592,7 @@ int wb_ioctl(ifp, command, data) wb_init(sc); } break; + case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { wb_init(sc); @@ -1601,30 +1602,22 @@ int wb_ioctl(ifp, command, data) } error = 0; break; - case SIOCADDMULTI: - case SIOCDELMULTI: - error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); - - if (error == ENETRESET) { - /* - * Multicast list has changed; set the hardware - * filter accordingly. - */ - if (ifp->if_flags & IFF_RUNNING) - wb_setmulti(sc); - error = 0; - } - break; + case SIOCGIFMEDIA: case SIOCSIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command); break; + default: error = ether_ioctl(ifp, &sc->arpcom, command, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + wb_setmulti(sc); + error = 0; + } + splx(s); return(error); } |