summaryrefslogtreecommitdiff
path: root/sys/arch/socppc/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-11-28 02:44:19 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-11-28 02:44:19 +0000
commit7da313a2f65e39b86488c21555c356ca3a9100e5 (patch)
tree391b806058ca43cb3ba624dce63764bce2b9b2b1 /sys/arch/socppc/dev
parent37778efb0de37bd00e9269e32ac772f743cce430 (diff)
Eliminate the redundant bits of code for MTU and multicast handling
from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
Diffstat (limited to 'sys/arch/socppc/dev')
-rw-r--r--sys/arch/socppc/dev/if_tsec.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c
index 6ac28f5fd99..67ec14712b9 100644
--- a/sys/arch/socppc/dev/if_tsec.c
+++ b/sys/arch/socppc/dev/if_tsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tsec.c,v 1.13 2008/10/15 19:12:19 blambert Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.14 2008/11/28 02:44:17 brad Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -480,26 +480,6 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
}
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 SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_ac) :
- ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- tsec_iff(sc);
- error = 0;
- }
- break;
-
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -510,6 +490,12 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
break;
}
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ tsec_iff(sc);
+ error = 0;
+ }
+
splx(s);
return (error);
}