diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 994658d26b8e..f7da3bf2fa09 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) | |||
5537 | 5537 | ||
5538 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | 5538 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); |
5539 | 5539 | ||
5540 | if (!netif_running(dev)) | ||
5541 | return 0; | ||
5542 | |||
5540 | spin_lock_bh(&tp->lock); | 5543 | spin_lock_bh(&tp->lock); |
5541 | __tg3_set_mac_addr(tp); | 5544 | __tg3_set_mac_addr(tp); |
5542 | spin_unlock_bh(&tp->lock); | 5545 | spin_unlock_bh(&tp->lock); |
@@ -7192,6 +7195,9 @@ static void tg3_set_rx_mode(struct net_device *dev) | |||
7192 | { | 7195 | { |
7193 | struct tg3 *tp = netdev_priv(dev); | 7196 | struct tg3 *tp = netdev_priv(dev); |
7194 | 7197 | ||
7198 | if (!netif_running(dev)) | ||
7199 | return; | ||
7200 | |||
7195 | tg3_full_lock(tp, 0); | 7201 | tg3_full_lock(tp, 0); |
7196 | __tg3_set_rx_mode(dev); | 7202 | __tg3_set_rx_mode(dev); |
7197 | tg3_full_unlock(tp); | 7203 | tg3_full_unlock(tp); |