summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-01-08 05:38:54 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-01-08 05:38:54 +0000
commita334044a5f0ad28753b9622a3e5b7a4707875aae (patch)
treed9519a718209277ed014a6d6c861b1c46340ee46 /sys/dev
parentff6aa95a56a8de0c2342fb3724a7e4eddbad88d8 (diff)
SIOCSIFMTU support; patches by Claudio Castiglia <ccastig@softhome.net>
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/dp8390.c10
-rw-r--r--sys/dev/ic/rtl81x9.c9
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c
index 066528277d9..4f369894d55 100644
--- a/sys/dev/ic/dp8390.c
+++ b/sys/dev/ic/dp8390.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dp8390.c,v 1.19 2001/09/20 17:02:31 mpech Exp $ */
+/* $OpenBSD: dp8390.c,v 1.20 2002/01/08 05:38:53 fgsch Exp $ */
/* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */
/*
@@ -849,6 +849,14 @@ dp8390_ioctl(ifp, cmd, 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 ((ifp->if_flags & IFF_UP) == 0 &&
(ifp->if_flags & IFF_RUNNING) != 0) {
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index 8fbe3b4496b..265cb6523c4 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.11 2001/11/06 19:53:18 miod Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.12 2002/01/08 05:38:53 fgsch Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1092,6 +1092,13 @@ int rl_ioctl(ifp, command, data)
break;
}
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 (ifp->if_flags & IFF_UP) {
rl_init(sc);