summaryrefslogtreecommitdiffstats
path: root/drivers/net/via-velocity.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-15 16:34:00 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-15 16:34:00 -0800
commitadea27f4ba29200c989194a3f6214b652d009e83 (patch)
treea4699ba7557e731570d724e09bf6e05d3e83570c /drivers/net/via-velocity.c
parent40787d0099676c9923e31fbdb90422d5c97cdcd5 (diff)
parent7799652557d966e49512479f4d3b9079bbc01fff (diff)
downloadop-kernel-dev-adea27f4ba29200c989194a3f6214b652d009e83.zip
op-kernel-dev-adea27f4ba29200c989194a3f6214b652d009e83.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage() [SUNHME]: VLAN support for sunhme [CHELSIO]: Fix skb->dev setting. [NETFILTER]: fix compat_nf_sockopt typo [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue [VIA_VELOCITY]: Don't oops on MTU change. iwl4965: fix not correctly dealing with hotunplug rt2x00: Fix chipset revision validation iwl3945: place CCK rates in front of OFDM for supported rates mac80211: Fix queuing of scan containing a SSID
Diffstat (limited to 'drivers/net/via-velocity.c')
-rw-r--r--drivers/net/via-velocity.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 5c4a92d..450e29d 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1963,6 +1963,11 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu)
return -EINVAL;
}
+ if (!netif_running(dev)) {
+ dev->mtu = new_mtu;
+ return 0;
+ }
+
if (new_mtu != oldmtu) {
spin_lock_irqsave(&vptr->lock, flags);
OpenPOWER on IntegriCloud