Skip to content

Commit 80653f7

Browse files
Huy Nguyendavem330
authored andcommitted
net/mlx5e: Add qos capability check
Make sure firmware supports qos before exposing the DCB API. Signed-off-by: Huy Nguyen <huyn@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4490001 commit 80653f7

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3549,7 +3549,8 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
35493549
if (MLX5_CAP_GEN(mdev, vport_group_manager)) {
35503550
netdev->netdev_ops = &mlx5e_netdev_ops_sriov;
35513551
#ifdef CONFIG_MLX5_CORE_EN_DCB
3552-
netdev->dcbnl_ops = &mlx5e_dcbnl_ops;
3552+
if (MLX5_CAP_GEN(mdev, qos))
3553+
netdev->dcbnl_ops = &mlx5e_dcbnl_ops;
35533554
#endif
35543555
} else {
35553556
netdev->netdev_ops = &mlx5e_netdev_ops_basic;

0 commit comments

Comments
 (0)