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

Commit b3f92b63 authored by Doug Goldstein's avatar Doug Goldstein Committed by David S. Miller
Browse files

bonding: set sysfs device_type to 'bond'



Sets the sysfs device_type to 'bond' for udev. This allows udev rules to
be created for bond devices. This is similar to how other network
devices set their device_type.

Signed-off-by: default avatarDoug Goldstein <cardoe@cardoe.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0896341a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -4264,6 +4264,10 @@ static const struct net_device_ops bond_netdev_ops = {
	.ndo_fix_features	= bond_fix_features,
	.ndo_fix_features	= bond_fix_features,
};
};


static const struct device_type bond_type = {
	.name = "bond",
};

static void bond_destructor(struct net_device *bond_dev)
static void bond_destructor(struct net_device *bond_dev)
{
{
	struct bonding *bond = netdev_priv(bond_dev);
	struct bonding *bond = netdev_priv(bond_dev);
@@ -4294,6 +4298,8 @@ static void bond_setup(struct net_device *bond_dev)


	bond_dev->destructor = bond_destructor;
	bond_dev->destructor = bond_destructor;


	SET_NETDEV_DEVTYPE(bond_dev, &bond_type);

	/* Initialize the device options */
	/* Initialize the device options */
	bond_dev->tx_queue_len = 0;
	bond_dev->tx_queue_len = 0;
	bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
	bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;