bnx2x: Remove open coded carrier check
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 16 May 2017 12:20:56 +0000 (15:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 May 2017 19:48:57 +0000 (15:48 -0400)
There is inline function to test if carrier present,
so it makes open-coded solution redundant.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index a851f95c307a3331a889972bc3c60273219f8a7b..7414ffd70c90d71af5d05b98bfd7cda65213e98e 100644 (file)
@@ -10303,7 +10303,7 @@ sp_rtnl_not_reset:
        }
        if (test_and_clear_bit(BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN,
                               &bp->sp_rtnl_state)){
-               if (!test_bit(__LINK_STATE_NOCARRIER, &bp->dev->state)) {
+               if (netif_carrier_ok(bp->dev)) {
                        bnx2x_tx_disable(bp);
                        BNX2X_ERR("PF indicated channel is not servicable anymore. This means this VF device is no longer operational\n");
                }