Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/drivers/net/wireless/hostap/hostap.h b/drivers/net/wireless/hostap/hostap.h
index ce8721f..71dba6c 100644
--- a/drivers/net/wireless/hostap/hostap.h
+++ b/drivers/net/wireless/hostap/hostap.h
@@ -42,6 +42,7 @@ void hostap_cleanup(local_info_t *local);
void hostap_cleanup_handler(void *data);
struct net_device * hostap_add_interface(struct local_info *local,
int type, int rtnl_locked,
+ unsigned char name_assign_type,
const char *prefix, const char *name);
void hostap_remove_interface(struct net_device *dev, int rtnl_locked,
int remove_from_list);
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 6df3ee5..3c5d1d0 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -3270,7 +3270,7 @@ static int hostap_hw_ready(struct net_device *dev)
iface = netdev_priv(dev);
local = iface->local;
local->ddev = hostap_add_interface(local, HOSTAP_INTERFACE_MAIN, 0,
- "", dev_template);
+ NET_NAME_ENUM, "", dev_template);
if (local->ddev) {
if (local->iw_mode == IW_MODE_INFRA ||
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 52919ad..77d7025 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -48,6 +48,7 @@ MODULE_LICENSE("GPL");
struct net_device * hostap_add_interface(struct local_info *local,
int type, int rtnl_locked,
+ unsigned char name_assign_type,
const char *prefix,
const char *name)
{
@@ -75,6 +76,7 @@ struct net_device * hostap_add_interface(struct local_info *local,
hostap_setup_dev(dev, local, type);
dev->destructor = free_netdev;
+ dev->name_assign_type = name_assign_type;
sprintf(dev->name, "%s%s", prefix, name);
if (!rtnl_locked)
rtnl_lock();
@@ -187,7 +189,7 @@ int prism2_wds_add(local_info_t *local, u8 *remote_addr,
}
dev = hostap_add_interface(local, HOSTAP_INTERFACE_WDS, rtnl_locked,
- local->ddev->name, "wds%d");
+ NET_NAME_USER, local->ddev->name, "wds%d");
if (dev == NULL)
return -ENOMEM;
@@ -896,8 +898,8 @@ static int hostap_enable_hostapd(local_info_t *local, int rtnl_locked)
printk(KERN_DEBUG "%s: enabling hostapd mode\n", dev->name);
local->apdev = hostap_add_interface(local, HOSTAP_INTERFACE_AP,
- rtnl_locked, local->ddev->name,
- "ap");
+ rtnl_locked, NET_NAME_USER,
+ local->ddev->name, "ap");
if (local->apdev == NULL)
return -ENOMEM;
@@ -928,8 +930,8 @@ static int hostap_enable_hostapd_sta(local_info_t *local, int rtnl_locked)
printk(KERN_DEBUG "%s: enabling hostapd STA mode\n", dev->name);
local->stadev = hostap_add_interface(local, HOSTAP_INTERFACE_STA,
- rtnl_locked, local->ddev->name,
- "sta");
+ rtnl_locked, NET_NAME_USER,
+ local->ddev->name, "sta");
if (local->stadev == NULL)
return -ENOMEM;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment