diff options
| author | Jon Mason <jdmason@kudzu.us> | 2013-09-04 14:26:01 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-09-05 14:27:32 -0400 |
| commit | dfafb73f355940989507c56b9282773132e86a9f (patch) | |
| tree | 955540319fa2b50a809103a84523aaf855e77128 /drivers/net/ethernet/icplus | |
| parent | 27082ee1b92f4d41e78b85fe40f6ab39673fba00 (diff) | |
icplus: Use netif_running to determine device state
Remove the __LINK_STATE_START check to verify the device is running, in
favor of netif_running(). netif_running() performs the same check of
__LINK_STATE_START, so the code should behave the same.
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/icplus')
| -rw-r--r-- | drivers/net/ethernet/icplus/ipg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/icplus/ipg.c b/drivers/net/ethernet/icplus/ipg.c index 1fde90b96685..bdf5023724e7 100644 --- a/drivers/net/ethernet/icplus/ipg.c +++ b/drivers/net/ethernet/icplus/ipg.c | |||
| @@ -1004,7 +1004,7 @@ static struct net_device_stats *ipg_nic_get_stats(struct net_device *dev) | |||
| 1004 | /* Check to see if the NIC has been initialized via nic_open, | 1004 | /* Check to see if the NIC has been initialized via nic_open, |
| 1005 | * before trying to read statistic registers. | 1005 | * before trying to read statistic registers. |
| 1006 | */ | 1006 | */ |
| 1007 | if (!test_bit(__LINK_STATE_START, &dev->state)) | 1007 | if (!netif_running(dev)) |
| 1008 | return &sp->stats; | 1008 | return &sp->stats; |
| 1009 | 1009 | ||
| 1010 | sp->stats.rx_packets += ipg_r32(IPG_FRAMESRCVDOK); | 1010 | sp->stats.rx_packets += ipg_r32(IPG_FRAMESRCVDOK); |
