net: sched: change return value of ndo_setup_tc for driver supporting mqprio only
authorJiri Pirko <jiri@mellanox.com>
Mon, 7 Aug 2017 08:15:31 +0000 (10:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 16:42:37 +0000 (09:42 -0700)
Change the return value from -EINVAL to -EOPNOTSUPP. The rest of the
drivers have it like that, so be aligned.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/sfc/falcon/tx.c
drivers/net/ethernet/sfc/tx.c
drivers/net/ethernet/ti/netcp_core.c

index bbb7bfe0be7f1189cc1984f4b68b3db9f7290e2e..37d3e5b65d94e9c344963146a021f3474da831cf 100644 (file)
@@ -1925,7 +1925,7 @@ static int xgbe_setup_tc(struct net_device *netdev, enum tc_setup_type type,
        u8 tc;
 
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc_to_netdev->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
        tc = tc_to_netdev->mqprio->num_tc;
index 257cf4be01622ecdcd0aa7df4f29b506e66f59d0..8687afc2469869185a78a529468293d5692de510 100644 (file)
@@ -4288,7 +4288,7 @@ int __bnx2x_setup_tc(struct net_device *dev, enum tc_setup_type type,
                     struct tc_to_netdev *tc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
 
index 1545b88c545deb6f287fadae1cb6f689056631f4..a78f72a530427c445a0c5369ce7e9178bb4805c9 100644 (file)
@@ -7241,7 +7241,7 @@ static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type,
                         struct tc_to_netdev *ntc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        ntc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
 
index 3827608cec29bf08b2d5e860c54c82dc5f454d68..bfb44c95a7ecd95e0aaa4266a5faa15aa92e7791 100644 (file)
@@ -350,7 +350,7 @@ static int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
        int i;
 
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
        num_tc = tc->mqprio->num_tc;
index dc64d751db24ccf17c42b0a396dbe4f059f50d0f..aa43ebda9a00aa8516be3c96fc3b995df022317c 100644 (file)
@@ -1223,7 +1223,7 @@ static int hns3_nic_setup_tc(struct net_device *dev, enum tc_setup_type type,
                             struct tc_to_netdev *tc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        return hns3_setup_tc(dev, tc->mqprio->num_tc);
 }
index 71004b8eff95f4b1efcce7478e0c383b5e36c330..70888129200ba33c938a0d6f7aa6c91ea2a7f05d 100644 (file)
@@ -1269,7 +1269,7 @@ static int __fm10k_setup_tc(struct net_device *dev, enum tc_setup_type type,
                            struct tc_to_netdev *tc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
 
index 97d8bb2e83207ab95622bdc94bd3dbe7db46d6ff..1f4633830c79e93682e4add799ef675d6fd7f537 100644 (file)
@@ -5660,7 +5660,7 @@ static int __i40e_setup_tc(struct net_device *netdev, enum tc_setup_type type,
                           struct tc_to_netdev *tc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
 
index e81083e25ba64c7cae26c336f2a2b1f96e065f26..1667e86ac05d7aa3212e74efed1391f7b50bb848 100644 (file)
@@ -134,7 +134,7 @@ static int __mlx4_en_setup_tc(struct net_device *dev, enum tc_setup_type type,
                              struct tc_to_netdev *tc)
 {
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        if (tc->mqprio->num_tc && tc->mqprio->num_tc != MLX4_EN_NUM_UP_HIGH)
                return -EINVAL;
index 447519ac3fa4b9c8c0b021291d773209d768c554..0f125e15143a144a34623e9a9354b3c959e9c86a 100644 (file)
@@ -435,7 +435,7 @@ int ef4_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
        int rc;
 
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        num_tc = ntc->mqprio->num_tc;
 
index d17af918ac50e596817eabc38ff107230efdf4ae..53ba30c3eb7b4e3cbebe0f62d0f87f4ac8fe1f57 100644 (file)
@@ -663,7 +663,7 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
        int rc;
 
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        num_tc = ntc->mqprio->num_tc;
 
index 14f91b285f0082f06c7ab8b3b356f35804218bb2..caba0abc015895a3d4f79880555efe88c81aa93e 100644 (file)
@@ -1887,7 +1887,7 @@ static int netcp_setup_tc(struct net_device *dev, enum tc_setup_type type,
        ASSERT_RTNL();
 
        if (type != TC_SETUP_MQPRIO)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
        num_tc = tc->mqprio->num_tc;