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

Commit 0c509a6c authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

net: Allow devices to specify a device specific sysfs group.



This isn't beautifully abstracted, but it is simple,
simplifies uses and so far is only needed for the bonding driver.

Signed-off-by: default avatarEric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0bd8d536
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -900,8 +900,8 @@ struct net_device

	/* class/net/name entry */
	struct device		dev;
	/* space for optional statistics and wireless sysfs groups */
	const struct attribute_group *sysfs_groups[3];
	/* space for optional device, statistics, and wireless sysfs groups */
	const struct attribute_group *sysfs_groups[4];

	/* rtnetlink link ops */
	const struct rtnl_link_ops *rtnl_link_ops;
+4 −1
Original line number Diff line number Diff line
@@ -544,8 +544,11 @@ int netdev_register_kobject(struct net_device *net)
	dev_set_name(dev, "%s", net->name);

#ifdef CONFIG_SYSFS
	*groups++ = &netstat_group;
	/* Allow for a device specific group */
	if (*groups)
		groups++;

	*groups++ = &netstat_group;
#ifdef CONFIG_WIRELESS_EXT_SYSFS
	if (net->ieee80211_ptr)
		*groups++ = &wireless_group;