Last known user of this deprecated feature was Fedora, until 2012. See also 38c1a01cf10c ("wireless: add back sysfs directory"). This was 14yrs ago, let's remove the feature. Link: https://github.com/fedora-sysv/initscripts/commit/4e96fcecee7ab70295a5f2c52748cd57cbab60bb Signed-off-by: Heiner Kallweit --- include/linux/netdevice.h | 2 +- net/core/net-sysfs.c | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 435be7880d7..ac943798abc 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2484,7 +2484,7 @@ struct net_device { struct dm_hw_stat_delta __rcu *dm_private; #endif struct device dev; - const struct attribute_group *sysfs_groups[5]; + const struct attribute_group *sysfs_groups[4]; const struct attribute_group *sysfs_rx_queue_group; const struct rtnl_link_ops *rtnl_link_ops; diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 5c0402389c6..cb8c82d1a4d 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -910,28 +910,6 @@ static const struct attribute_group netstat_group = { .attrs = netstat_attrs, }; -static struct attribute *wireless_attrs[] = { - NULL -}; - -static const struct attribute_group wireless_group = { - .name = "wireless", - .attrs = wireless_attrs, -}; - -static bool wireless_group_needed(struct net_device *ndev) -{ -#if IS_ENABLED(CONFIG_CFG80211) - if (ndev->ieee80211_ptr) - return true; -#endif -#if IS_ENABLED(CONFIG_WIRELESS_EXT) - if (ndev->wireless_handlers) - return true; -#endif - return false; -} - #else /* CONFIG_SYSFS */ #define net_class_groups NULL #endif /* CONFIG_SYSFS */ @@ -2370,9 +2348,6 @@ int netdev_register_kobject(struct net_device *ndev) *groups++ = &netstat_group; *groups++ = &netdev_phys_group; - - if (wireless_group_needed(ndev)) - *groups++ = &wireless_group; #endif /* CONFIG_SYSFS */ /* Hold back the KOBJ_ADD uevent until the device is listed. */ -- 2.56.0