linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Provide netdev naming-policy via sysfs
@ 2014-03-16 17:21 David Herrmann
  2014-03-16 17:21 ` [PATCH v2 1/4] net: add name_assign_type netdev attribute David Herrmann
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Herrmann @ 2014-03-16 17:21 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Tom Gundersen, Johannes berg, linux-kernel,
	linux-wireless, David Herrmann

Hi

This is v2 of the netdev naming-policy series. You can find v1 here:
  http://thread.gmane.org/gmane.linux.kernel/1657015
Changes in v2:
  - fix mac80211 core to set NET_NAME_ENUM for wlan%d kernel-provided names
  - acked-by udev developers


This series implements a new sysfs attribute for netdevs called
"name_assign_type". It provides an integer that describes where an interface
name comes from. See Patch #1 for a description of this attribute. It is
modelled after the existing "addr_assign_type" attribute.

The main use-case is to allow udev to skip applying reliable ifnames to virtual
devices. For instance, if wifi-P2P devices are created, wpas already provides a
suitable naming-policy and udev shouldn't touch these devices. Same is true for
other virtual devices.
The idea is that if a device-name was provided by user-space, we should always
prefer fixing this naming-policy instead of making udev rename the device. For
kernel provided names that's hardly possible, though. Providing the
naming-policy source via sysfs is thus a simple way to see whether renames are
needed.

Additionally, this field allows to detect whether a netdev has been manually
renamed, which is quite useful for debugging and during crash-recovery.
Furthermore, it fixes real udev bugs if a netdev is already renamed in the
initrd and udev only runs in the real root. Detecting renames avoids overwriting
custom user provided names.

Thanks
David

David Herrmann (4):
  net: add name_assign_type netdev attribute
  mac80211: set NET_NAME_USER for user-space created ifs
  ath6kl: set NET_NAME_USER for P2P ifs
  brcmfmac: set NET_NAME_USER for P2P ifs

 drivers/net/wireless/ath/ath6kl/cfg80211.c    | 5 ++++-
 drivers/net/wireless/ath/ath6kl/cfg80211.h    | 1 +
 drivers/net/wireless/ath/ath6kl/core.c        | 4 ++--
 drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 +
 include/linux/netdevice.h                     | 6 ++++++
 net/core/dev.c                                | 7 +++++++
 net/core/net-sysfs.c                          | 2 ++
 net/core/rtnetlink.c                          | 2 ++
 net/mac80211/cfg.c                            | 2 +-
 net/mac80211/ieee80211_i.h                    | 1 +
 net/mac80211/iface.c                          | 2 ++
 net/mac80211/main.c                           | 2 +-
 12 files changed, 30 insertions(+), 5 deletions(-)

-- 
1.9.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-03-17 19:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-16 17:21 [PATCH v2 0/4] Provide netdev naming-policy via sysfs David Herrmann
2014-03-16 17:21 ` [PATCH v2 1/4] net: add name_assign_type netdev attribute David Herrmann
2014-03-16 19:17   ` Ben Hutchings
2014-03-16 21:53     ` David Herrmann
2014-03-17 17:03   ` [PATCH v3 " David Herrmann
2014-03-17 17:12     ` David Laight
2014-03-17 18:01   ` [PATCH v4 " David Herrmann
2014-03-17 19:28     ` David Miller
2014-03-16 17:21 ` [PATCH v2 2/4] mac80211: set NET_NAME_USER for user-space created ifs David Herrmann
2014-03-16 17:21 ` [PATCH v2 3/4] ath6kl: set NET_NAME_USER for P2P ifs David Herrmann
2014-03-16 17:21 ` [PATCH v2 4/4] brcmfmac: " David Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).