Skip to content

Commit

Permalink
icplus: Use netif_running to determine device state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Mason authored and David S. Miller committed Sep 5, 2013
1 parent 27082ee commit dfafb73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/icplus/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ static struct net_device_stats *ipg_nic_get_stats(struct net_device *dev)
/* Check to see if the NIC has been initialized via nic_open,
* before trying to read statistic registers.
*/
if (!test_bit(__LINK_STATE_START, &dev->state))
if (!netif_running(dev))
return &sp->stats;

sp->stats.rx_packets += ipg_r32(IPG_FRAMESRCVDOK);
Expand Down

0 comments on commit dfafb73

Please sign in to comment.