Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38cf0426 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

net: sched: change return value of ndo_setup_tc for driver supporting mqprio only



Change the return value from -EINVAL to -EOPNOTSUPP. The rest of the
drivers have it like that, so be aligned.

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7c1c8d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);
}
Loading