aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2005-11-08 17:36:20 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-09 01:02:41 -0500
commitb9dcbb40f40d60c7e33a2b7ea858fcd27c35cc00 (patch)
treee044be0f5fe46fee4990f819fd30a7dc89e3694a /drivers/net
parente3305626e0985faa8796f1f4e5a99c1f40bfa70e (diff)
[PATCH] b44: replace B44_FLAG_INIT_COMPLETE with netif_running()
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/b44.c6
-rw-r--r--drivers/net/b44.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index ecc2e32c38c1..f1675dcf4d5c 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1392,7 +1392,6 @@ static int b44_open(struct net_device *dev)
1392 1392
1393 b44_init_rings(bp); 1393 b44_init_rings(bp);
1394 b44_init_hw(bp); 1394 b44_init_hw(bp);
1395 bp->flags |= B44_FLAG_INIT_COMPLETE;
1396 1395
1397 netif_carrier_off(dev); 1396 netif_carrier_off(dev);
1398 b44_check_phy(bp); 1397 b44_check_phy(bp);
@@ -1456,7 +1455,6 @@ static int b44_close(struct net_device *dev)
1456#endif 1455#endif
1457 b44_halt(bp); 1456 b44_halt(bp);
1458 b44_free_rings(bp); 1457 b44_free_rings(bp);
1459 bp->flags &= ~B44_FLAG_INIT_COMPLETE;
1460 netif_carrier_off(bp->dev); 1458 netif_carrier_off(bp->dev);
1461 1459
1462 spin_unlock_irq(&bp->lock); 1460 spin_unlock_irq(&bp->lock);
@@ -1608,7 +1606,7 @@ static int b44_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1608{ 1606{
1609 struct b44 *bp = netdev_priv(dev); 1607 struct b44 *bp = netdev_priv(dev);
1610 1608
1611 if (!(bp->flags & B44_FLAG_INIT_COMPLETE)) 1609 if (!netif_running(dev))
1612 return -EAGAIN; 1610 return -EAGAIN;
1613 cmd->supported = (SUPPORTED_Autoneg); 1611 cmd->supported = (SUPPORTED_Autoneg);
1614 cmd->supported |= (SUPPORTED_100baseT_Half | 1612 cmd->supported |= (SUPPORTED_100baseT_Half |
@@ -1646,7 +1644,7 @@ static int b44_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1646{ 1644{
1647 struct b44 *bp = netdev_priv(dev); 1645 struct b44 *bp = netdev_priv(dev);
1648 1646
1649 if (!(bp->flags & B44_FLAG_INIT_COMPLETE)) 1647 if (!netif_running(dev))
1650 return -EAGAIN; 1648 return -EAGAIN;
1651 1649
1652 /* We do not support gigabit. */ 1650 /* We do not support gigabit. */
diff --git a/drivers/net/b44.h b/drivers/net/b44.h
index 7afeaf608232..b178662978f3 100644
--- a/drivers/net/b44.h
+++ b/drivers/net/b44.h
@@ -420,7 +420,6 @@ struct b44 {
420 420
421 u32 dma_offset; 421 u32 dma_offset;
422 u32 flags; 422 u32 flags;
423#define B44_FLAG_INIT_COMPLETE 0x00000001
424#define B44_FLAG_BUGGY_TXPTR 0x00000002 423#define B44_FLAG_BUGGY_TXPTR 0x00000002
425#define B44_FLAG_REORDER_BUG 0x00000004 424#define B44_FLAG_REORDER_BUG 0x00000004
426#define B44_FLAG_PAUSE_AUTO 0x00008000 425#define B44_FLAG_PAUSE_AUTO 0x00008000