From 28e5a7d41f1bb84fdf40d387fd18095b5a7b902c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 14 Aug 2006 02:22:14 +0000 Subject: Use if_hardmtu and simplify the MTU ioctl handler. no-op change. --- sys/dev/pci/if_ixgb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 41c2aecae7d..b6666e97e75 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.27 2006/08/09 05:22:17 brad Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.28 2006/08/14 02:22:13 brad Exp $ */ #include @@ -368,12 +368,10 @@ ixgb_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 > IXGB_MAX_JUMBO_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) { + else if (ifp->if_mtu != ifr->ifr_mtu) ifp->if_mtu = ifr->ifr_mtu; - } break; case SIOCSIFFLAGS: IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFFLAGS (Set Interface Flags)"); -- cgit v1.2.3