if_ti.c (227323) | if_ti.c (227324) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 63 unchanged lines hidden (view full) --- 72 * - Raymond Lee of Netgear, for providing a pair of Netgear 73 * GA620 Tigon 2 boards for testing 74 * - Ulf Zimmermann, for bringing the GA260 to my attention and 75 * convincing me to write this driver. 76 * - Andrew Gallatin for providing FreeBSD/Alpha support. 77 */ 78 79#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 63 unchanged lines hidden (view full) --- 72 * - Raymond Lee of Netgear, for providing a pair of Netgear 73 * GA620 Tigon 2 boards for testing 74 * - Ulf Zimmermann, for bringing the GA260 to my attention and 75 * convincing me to write this driver. 76 * - Andrew Gallatin for providing FreeBSD/Alpha support. 77 */ 78 79#include <sys/cdefs.h> |
80__FBSDID("$FreeBSD: head/sys/dev/ti/if_ti.c 227323 2011-11-07 22:53:06Z yongari $"); | 80__FBSDID("$FreeBSD: head/sys/dev/ti/if_ti.c 227324 2011-11-07 22:58:49Z yongari $"); |
81 82#include "opt_ti.h" 83 84#include <sys/param.h> 85#include <sys/systm.h> 86#include <sys/sockio.h> 87#include <sys/mbuf.h> 88#include <sys/malloc.h> --- 3302 unchanged lines hidden (view full) --- 3391 struct ti_softc *sc = ifp->if_softc; 3392 struct ifreq *ifr = (struct ifreq *) data; 3393 struct ti_cmd_desc cmd; 3394 int mask, error = 0; 3395 3396 switch (command) { 3397 case SIOCSIFMTU: 3398 TI_LOCK(sc); | 81 82#include "opt_ti.h" 83 84#include <sys/param.h> 85#include <sys/systm.h> 86#include <sys/sockio.h> 87#include <sys/mbuf.h> 88#include <sys/malloc.h> --- 3302 unchanged lines hidden (view full) --- 3391 struct ti_softc *sc = ifp->if_softc; 3392 struct ifreq *ifr = (struct ifreq *) data; 3393 struct ti_cmd_desc cmd; 3394 int mask, error = 0; 3395 3396 switch (command) { 3397 case SIOCSIFMTU: 3398 TI_LOCK(sc); |
3399 if (ifr->ifr_mtu > TI_JUMBO_MTU) | 3399 if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > TI_JUMBO_MTU) |
3400 error = EINVAL; 3401 else { 3402 ifp->if_mtu = ifr->ifr_mtu; 3403 if (ifp->if_drv_flags & IFF_DRV_RUNNING) { 3404 ifp->if_drv_flags &= ~IFF_DRV_RUNNING; 3405 ti_init_locked(sc); 3406 } 3407 } --- 483 unchanged lines hidden --- | 3400 error = EINVAL; 3401 else { 3402 ifp->if_mtu = ifr->ifr_mtu; 3403 if (ifp->if_drv_flags & IFF_DRV_RUNNING) { 3404 ifp->if_drv_flags &= ~IFF_DRV_RUNNING; 3405 ti_init_locked(sc); 3406 } 3407 } --- 483 unchanged lines hidden --- |