From: Varka Bhadram <varkabhadram@gmail.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan@vger.kernel.org, Varka Bhadram <varkab@cdac.in>
Subject: Re: [RFC bluetooth-next] cfg802154: pass name_assign_type to rdev_add_virtual_intf()
Date: Tue, 28 Apr 2015 14:00:09 +0530 [thread overview]
Message-ID: <553F4511.2060007@gmail.com> (raw)
In-Reply-To: <20150428082922.GB700@omega>
On 04/28/2015 01:59 PM, Alexander Aring wrote:
> On Tue, Apr 28, 2015 at 01:49:46PM +0530, Varka Bhadram wrote:
>> What about the following change..?
>>
>> diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
>> index ac3462a..248490c 100644
>> --- a/net/ieee802154/nl-phy.c
>> +++ b/net/ieee802154/nl-phy.c
>> @@ -175,6 +175,7 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
>> int rc = -ENOBUFS;
>> struct net_device *dev;
>> int type = __IEEE802154_DEV_INVALID;
>> + unsigned char name_assign_type;
>>
>> pr_debug("%s\n", __func__);
>>
>> @@ -190,8 +191,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
>> if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1]
>> != '\0')
>> return -EINVAL; /* phy name should be null-terminated */
>> + name_assign_type = NET_NAME_USER;
>> } else {
>> devname = "wpan%d";
>> + name_assign_type = NET_NAME_ENUM;
>> }
>>
>> if (strlen(devname) >= IFNAMSIZ)
>> @@ -221,7 +224,7 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
>> }
>>
>> dev = rdev_add_virtual_intf_deprecated(wpan_phy_to_rdev(phy), devname,
>> - NET_NAME_ENUM,
>> + name_assign_type,
>> type);
>> if (IS_ERR(dev)) {
>> rc = PTR_ERR(dev);
> yes that is what I meant.
>
> - Alex
Thanks.. I will send the updated patch.
--
Varka Bhadram
prev parent reply other threads:[~2015-04-28 8:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 8:37 [RFC bluetooth-next] cfg802154: pass name_assign_type to rdev_add_virtual_intf() Varka Bhadram
2015-04-28 3:32 ` Varka Bhadram
2015-04-28 7:37 ` Alexander Aring
2015-04-28 8:19 ` Varka Bhadram
2015-04-28 8:29 ` Alexander Aring
2015-04-28 8:30 ` Varka Bhadram [this message]
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=553F4511.2060007@gmail.com \
--to=varkabhadram@gmail.com \
--cc=alex.aring@gmail.com \
--cc=linux-wpan@vger.kernel.org \
--cc=varkab@cdac.in \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.