diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-09-17 19:10:57 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-09-17 19:10:57 +0000 |
commit | 8ae7dba658fe236241b10b722d132f73bb118538 (patch) | |
tree | 2314fa13c1072321f69b1f41e9cd43aecd622c13 /sys/dev/pcmcia | |
parent | e32129e4c9da5b5846eaf18ee03fce8f4bbe0952 (diff) |
implement SIOCSIFMTU, okay deraadt@
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r-- | sys/dev/pcmcia/if_wi.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c index b0fc4f31877..4f6dd0cc6ae 100644 --- a/sys/dev/pcmcia/if_wi.c +++ b/sys/dev/pcmcia/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.15 2000/06/30 01:04:28 art Exp $ */ +/* $OpenBSD: if_wi.c,v 1.16 2000/09/17 19:10:55 provos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -133,7 +133,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.15 2000/06/30 01:04:28 art Exp $"; + "$OpenBSD: if_wi.c,v 1.16 2000/09/17 19:10:55 provos Exp $"; #endif /* lint */ #ifdef foo @@ -1082,6 +1082,14 @@ wi_ioctl(ifp, command, 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) { if (ifp->if_flags & IFF_RUNNING && |