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

Commit b0ddfe2b authored by Serhey Popovych's avatar Serhey Popovych Committed by Jeff Kirsher
Browse files

intel: correct return from set features callback



According to comments in <linux/netdevice.h> we should return either >0
or -errno from ->ndo_set_features() if changing dev->features by itself.

Return 1 in such places to notify netdev_update_features() about applied
changes in dev->features.

Signed-off-by: default avatarSerhey Popovych <serhe.popovych@gmail.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 310974fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2797,7 +2797,7 @@ static int e100_set_features(struct net_device *netdev,

	netdev->features = features;
	e100_exec_cb(nic, NULL, e100_configure);
	return 0;
	return 1;
}

static const struct net_device_ops e100_netdev_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -820,7 +820,7 @@ static int e1000_set_features(struct net_device *netdev,
	else
		e1000_reset(adapter);

	return 0;
	return 1;
}

static const struct net_device_ops e1000_netdev_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -7003,7 +7003,7 @@ static int e1000_set_features(struct net_device *netdev,
	else
		e1000e_reset(adapter);

	return 0;
	return 1;
}

static const struct net_device_ops e1000e_netdev_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -2480,7 +2480,7 @@ static int igb_set_features(struct net_device *netdev,
	else
		igb_reset(adapter);

	return 0;
	return 1;
}

static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
+1 −1
Original line number Diff line number Diff line
@@ -9796,7 +9796,7 @@ static int ixgbe_set_features(struct net_device *netdev,
			    NETIF_F_HW_VLAN_CTAG_FILTER))
		ixgbe_set_rx_mode(netdev);

	return 0;
	return 1;
}

/**