summaryrefslogtreecommitdiffstats
path: root/drivers/net/au1000_eth.c
diff options
context:
space:
mode:
author <tgraf@suug.ch>2005-05-12 19:45:25 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-12 19:45:25 -0400
commit7d17c1d606f6e89778f05554ddea43791d5c92a0 (patch)
treea81b20746b27d8fb0211b9a3cb4a20a4a0d3df08 /drivers/net/au1000_eth.c
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
downloadop-kernel-dev-7d17c1d606f6e89778f05554ddea43791d5c92a0.zip
op-kernel-dev-7d17c1d606f6e89778f05554ddea43791d5c92a0.tar.gz
[netdrvrs] Use netif_carrier_* instead of IFF_RUNNING
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r--drivers/net/au1000_eth.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 5a2efd3..c82b9cd 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -1681,10 +1681,6 @@ static int au1000_init(struct net_device *dev)
control |= MAC_FULL_DUPLEX;
}
- /* fix for startup without cable */
- if (!link)
- dev->flags &= ~IFF_RUNNING;
-
aup->mac->control = control;
aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
au_sync();
@@ -1709,16 +1705,14 @@ static void au1000_timer(unsigned long data)
if_port = dev->if_port;
if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) {
if (link) {
- if (!(dev->flags & IFF_RUNNING)) {
+ if (!netif_carrier_ok(dev)) {
netif_carrier_on(dev);
- dev->flags |= IFF_RUNNING;
printk(KERN_INFO "%s: link up\n", dev->name);
}
}
else {
- if (dev->flags & IFF_RUNNING) {
+ if (netif_carrier_ok(dev)) {
netif_carrier_off(dev);
- dev->flags &= ~IFF_RUNNING;
dev->if_port = 0;
printk(KERN_INFO "%s: link down\n", dev->name);
}
OpenPOWER on IntegriCloud