summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-08-14 02:22:14 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-08-14 02:22:14 +0000
commit28e5a7d41f1bb84fdf40d387fd18095b5a7b902c (patch)
tree225d3b5a7dd1fcb4322fc0131552a6b444059f36 /sys
parent23da93f2864755b691556459c1da485aa6b0825f (diff)
Use if_hardmtu and simplify the MTU ioctl handler. no-op change.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ixgb.c8
1 files changed, 3 insertions, 5 deletions
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 <dev/pci/if_ixgb.h>
@@ -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)");