diff options
author | Huy Nguyen <huyn@mellanox.com> | 2016-11-27 17:02:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-28 15:09:34 -0500 |
commit | 80653f73c53de8f5874e03d0d3bdd1943c2a33cf (patch) | |
tree | 59c1c580923f47d20e23b6633e7a1c8256957262 /drivers/net | |
parent | 4490001029012539937ff02778fe6180613fa949 (diff) | |
download | linux-80653f73c53de8f5874e03d0d3bdd1943c2a33cf.tar.bz2 |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 19403d6bf369..2b421121ffd5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3549,7 +3549,8 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) if (MLX5_CAP_GEN(mdev, vport_group_manager)) { netdev->netdev_ops = &mlx5e_netdev_ops_sriov; #ifdef CONFIG_MLX5_CORE_EN_DCB - netdev->dcbnl_ops = &mlx5e_dcbnl_ops; + if (MLX5_CAP_GEN(mdev, qos)) + netdev->dcbnl_ops = &mlx5e_dcbnl_ops; #endif } else { netdev->netdev_ops = &mlx5e_netdev_ops_basic; |