ifp->if_softc is managed entirely by the driver. We never set it to

NULL or change it.  We initialize it before we set if_ioctl.  It can
therefore never be NULL, and most other drivers don't bother with this
sanity check.
This commit is contained in:
Warner Losh 2009-05-13 14:43:26 +00:00
parent 0a594d9ecc
commit d47f0d75af

View File

@ -1164,14 +1164,6 @@ ed_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
struct ifreq *ifr = (struct ifreq *)data;
int error = 0;
/*
* XXX really needed?
*/
if (sc == NULL) {
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
return (ENXIO);
}
switch (command) {
case SIOCSIFFLAGS:
/*