summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-05-28 00:38:45 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-05-28 00:38:45 +0000
commit7bffa453e53008e5a42475a2e17aebf5f89b9702 (patch)
treed86e4c3864c70e2ec36dd6c434923dc610c36cef
parent55731d01e9562cac9d06951260101881534e114c (diff)
use if_hardmtu for MTU ioctl handler.
-rw-r--r--sys/dev/pci/if_em.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 0906ff57fc1..93c481ccb57 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.127 2006/05/28 00:04:24 jason Exp $ */
+/* $OpenBSD: if_em.c,v 1.128 2006/05/28 00:38:44 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -495,8 +495,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
break;
case SIOCSIFMTU:
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu >
- sc->hw.max_frame_size - ETHER_HDR_LEN - ETHER_CRC_LEN)
+ 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;