Re: [RFC bluetooth-next] cfg802154: pass name_assign_type to rdev_add_virtual_intf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux