summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-03-20 21:33:26 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 21:33:26 -0800
commite75f7c900944aa90831f6d343ca40090a68b56dd (patch)
treed5192f5c230a2e84a6a0b23eed7e802ebf6ab555 /drivers
parent0e7b13685f9a06949ea3070c97c0f0085a08cd37 (diff)
downloadop-kernel-dev-e75f7c900944aa90831f6d343ca40090a68b56dd.zip
op-kernel-dev-e75f7c900944aa90831f6d343ca40090a68b56dd.tar.gz
[TG3]: Add some missing netif_running() checks
Add missing netif_running() checks in tg3's dev->set_multicast_list() and dev->set_mac_address(). If not netif_running(), these 2 calls can simply return 0 after storing the new settings if required. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tg3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 994658d..f7da3bf 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5537,6 +5537,9 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p)
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+ if (!netif_running(dev))
+ return 0;
+
spin_lock_bh(&tp->lock);
__tg3_set_mac_addr(tp);
spin_unlock_bh(&tp->lock);
@@ -7192,6 +7195,9 @@ static void tg3_set_rx_mode(struct net_device *dev)
{
struct tg3 *tp = netdev_priv(dev);
+ if (!netif_running(dev))
+ return;
+
tg3_full_lock(tp, 0);
__tg3_set_rx_mode(dev);
tg3_full_unlock(tp);
OpenPOWER on IntegriCloud