summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-03-18 11:13:39 +0100
committerJohannes Berg <johannes.berg@intel.com>2015-03-30 10:36:17 +0200
commit6bab2e19c5ffd1f21b28c2cabb3801a37b77ae69 (patch)
tree6e2f45a9254d9def4beecc02c2e14b2fc78d3be5 /net/mac80211/iface.c
parent6a8b4adb47aea322e376cd1be62781c50dc1a9b5 (diff)
downloadlinux-6bab2e19c5ffd1f21b28c2cabb3801a37b77ae69.tar.bz2
cfg80211: pass name_assign_type to rdev_add_virtual_intf()
This will expose in /sys whether the ifname of a device is set by userspace or generated by the kernel. The latter kind (wlanX, etc) is not deterministic, so userspace needs to rename these devices to names that are guaranteed to stay the same between reboots. The former, however should never be renamed, so userspace needs to be able to reliably tell the difference. Similar functionality was introduced for the rtnetlink core in commit 5517750f058e ("net: rtnetlink - make create_link take name_assign_type") Signed-off-by: Tom Gundersen <teg@jklm.no> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: Brett Rudley <brudley@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com> Cc: Hante Meuleman <meuleman@broadcom.com> Cc: Johannes Berg <johannes@sipsolutions.net> [reformat changelog to fit 72 cols] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 9689d3b1133b..a0cd97fd0c49 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1648,6 +1648,7 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
}
int ieee80211_if_add(struct ieee80211_local *local, const char *name,
+ unsigned char name_assign_type,
struct wireless_dev **new_wdev, enum nl80211_iftype type,
struct vif_params *params)
{
@@ -1676,7 +1677,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
txqs = IEEE80211_NUM_ACS;
ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size,
- name, NET_NAME_UNKNOWN,
+ name, name_assign_type,
ieee80211_if_setup, txqs, 1);
if (!ndev)
return -ENOMEM;