From: Tom Gundersen <teg@jklm.no>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, Tom Gundersen <teg@jklm.no>,
Karsten Keil <isdn@linux-pingi.de>
Subject: [PATCH v8] net: isdn - set name assign type
Date: Thu, 17 Jul 2014 00:43:09 +0200 [thread overview]
Message-ID: <1405550594-11786-2-git-send-email-teg@jklm.no> (raw)
In-Reply-To: <1405550594-11786-1-git-send-email-teg@jklm.no>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Cc: Karsten Keil <isdn@linux-pingi.de>
---
This patch goes on top of net-next.
drivers/isdn/i4l/isdn_common.c | 4 ++--
drivers/isdn/i4l/isdn_net.c | 10 +++++-----
drivers/isdn/i4l/isdn_net.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 9b856e1..67840ca 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1364,7 +1364,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
}
ret = mutex_lock_interruptible(&dev->mtx);
if (ret) return ret;
- if ((s = isdn_net_new(s, NULL))) {
+ if ((s = isdn_net_new(s, NET_NAME_USER, NULL))) {
if (copy_to_user(argp, s, strlen(s) + 1)) {
ret = -EFAULT;
} else {
@@ -1383,7 +1383,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
return -EINVAL;
ret = mutex_lock_interruptible(&dev->mtx);
if (ret) return ret;
- if ((s = isdn_net_newslave(bname))) {
+ if ((s = isdn_net_newslave(bname, NET_NAME_USER))) {
if (copy_to_user(argp, s, strlen(s) + 1)) {
ret = -EFAULT;
} else {
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index c2ed624..d16fec0 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -2573,7 +2573,7 @@ static void _isdn_setup(struct net_device *dev)
* Allocate a new network-interface and initialize its data structures.
*/
char *
-isdn_net_new(char *name, struct net_device *master)
+isdn_net_new(char *name, unsigned char name_assign_type, struct net_device *master)
{
isdn_net_dev *netdev;
@@ -2588,8 +2588,8 @@ isdn_net_new(char *name, struct net_device *master)
printk(KERN_WARNING "isdn_net: Could not allocate net-device\n");
return NULL;
}
- netdev->dev = alloc_netdev(sizeof(isdn_net_local), name,
- NET_NAME_UNKNOWN, _isdn_setup);
+ netdev->dev = alloc_netdev(sizeof(isdn_net_local), name, name_assign_type,
+ _isdn_setup);
if (!netdev->dev) {
printk(KERN_WARNING "isdn_net: Could not allocate network device\n");
kfree(netdev);
@@ -2637,7 +2637,7 @@ isdn_net_new(char *name, struct net_device *master)
}
char *
-isdn_net_newslave(char *parm)
+isdn_net_newslave(char *parm, unsigned char name_assign_type)
{
char *p = strchr(parm, ',');
isdn_net_dev *n;
@@ -2658,7 +2658,7 @@ isdn_net_newslave(char *parm)
/* Master must not be started yet */
if (isdn_net_device_started(n))
return NULL;
- return (isdn_net_new(newname, n->dev));
+ return (isdn_net_new(newname, name_assign_type, n->dev));
}
return NULL;
}
diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h
index cca6d68..99f0c47 100644
--- a/drivers/isdn/i4l/isdn_net.h
+++ b/drivers/isdn/i4l/isdn_net.h
@@ -31,8 +31,8 @@
#define CISCO_SLARP_REPLY 1
#define CISCO_SLARP_KEEPALIVE 2
-extern char *isdn_net_new(char *, struct net_device *);
-extern char *isdn_net_newslave(char *);
+extern char *isdn_net_new(char *, unsigned char, struct net_device *);
+extern char *isdn_net_newslave(char *, unsigned char);
extern int isdn_net_rm(char *);
extern int isdn_net_rmall(void);
extern int isdn_net_stat_callback(int, isdn_ctrl *);
--
1.9.3
next prev parent reply other threads:[~2014-07-16 22:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 22:43 [PATCH v8] net: set name assign type for names assigned using a static string Tom Gundersen
2014-07-16 22:43 ` Tom Gundersen [this message]
[not found] ` <1405550594-11786-1-git-send-email-teg-B22kvLQNl6c@public.gmane.org>
2014-07-16 22:43 ` [PATCH v8] net: openvswitch - set name assign type Tom Gundersen
[not found] ` <1405550594-11786-3-git-send-email-teg-B22kvLQNl6c@public.gmane.org>
2014-07-16 23:00 ` Pravin Shelar
2014-07-16 23:16 ` Tom Gundersen
[not found] ` <CAG-2HqUY_mUDRjT6XrwX68FZvgvTVSzkbAOs-m9g3--ZhYQ5Kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-16 23:24 ` Pravin Shelar
2014-07-16 22:43 ` [PATCH v8] net: vlan " Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: nl80211 - make rdev_add_virtual_intf take name_assign_type Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: nl802154 - make add_iface take name assign type Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: ppp - set " Tom Gundersen
2014-07-17 6:56 ` [PATCH v8] net: set name assign type for names assigned using a static string David Miller
2014-07-17 7:17 ` Tom Gundersen
2014-07-17 7:26 ` Veaceslav Falico
2014-07-17 7:36 ` Tom Gundersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405550594-11786-2-git-send-email-teg@jklm.no \
--to=teg@jklm.no \
--cc=davem@davemloft.net \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).