net/ice/base: add hook to send AdminQ command
[dpdk.git] / drivers / net / bnxt / bnxt_stats.c
index 65f90e0..4668629 100644 (file)
@@ -389,8 +389,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
        if (rc)
                return rc;
 
-       memset(bnxt_stats, 0, sizeof(*bnxt_stats));
-       if (!(bp->flags & BNXT_FLAG_INIT_DONE))
+       if (!eth_dev->data->dev_started)
                return -EIO;
 
        num_q_stats = RTE_MIN(bp->rx_cp_nr_rings,
@@ -435,7 +434,7 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
        if (ret)
                return ret;
 
-       if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
+       if (!eth_dev->data->dev_started) {
                PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
                return -EINVAL;
        }