qlcnic: fix ethtool diagnostics test
authorSony Chacko <sony.chacko@qlogic.com>
Mon, 10 Jan 2011 00:15:22 +0000 (00:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jan 2011 21:34:54 +0000 (13:34 -0800)
IRQ diag test was getting executed only when both register test
and link test passed. The test should get executed if ETH_TEST_FL_OFFLINE
flag is set.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_ethtool.c

index 1e7af709d395e484a8ee80b8b9563c13f4b3066d..4c14510e2a87ef04a10b66021d9a5f4eebb0486a 100644 (file)
@@ -672,7 +672,7 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
        if (data[1])
                eth_test->flags |= ETH_TEST_FL_FAILED;
 
-       if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
+       if (eth_test->flags & ETH_TEST_FL_OFFLINE) {
                data[2] = qlcnic_irq_test(dev);
                if (data[2])
                        eth_test->flags |= ETH_TEST_FL_FAILED;