net/mlx4_core: Allocate default counter per port
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlx4 / en_resources.c
index 97bcb91..e482fa1 100644 (file)
@@ -66,7 +66,7 @@ void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
                context->pri_path.sched_queue |= user_prio << 3;
                context->pri_path.feup = MLX4_FEUP_FORCE_ETH_UP;
        }
-       context->pri_path.counter_index = MLX4_SINK_COUNTER_INDEX(mdev->dev);
+       context->pri_path.counter_index = priv->counter_index;
        context->cqn_send = cpu_to_be32(cqn);
        context->cqn_recv = cpu_to_be32(cqn);
        context->db_rec_addr = cpu_to_be64(priv->res.db.dma << 2);