summaryrefslogtreecommitdiff
path: root/drivers/net/macvtap_main.c
diff options
context:
space:
mode:
authorSainath Grandhi <sainath.grandhi@intel.com>2017-02-10 16:03:50 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-11 20:59:41 -0500
commitd9f1f61c0801a73ff36d416a7ede54229b231e1d (patch)
tree2f9970b37ac99da534f7ca58b6b67ee880ead3cd /drivers/net/macvtap_main.c
parent6fe3faf86757eb7f078ff06b23b206f17dc4fb36 (diff)
downloadlwn-d9f1f61c0801a73ff36d416a7ede54229b231e1d.tar.gz
lwn-d9f1f61c0801a73ff36d416a7ede54229b231e1d.zip
tap: Extending tap device create/destroy APIs
Extending tap APIs get/free_minor and create/destroy_cdev to handle more than one type of virtual interface. Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvtap_main.c')
-rw-r--r--drivers/net/macvtap_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/macvtap_main.c b/drivers/net/macvtap_main.c
index 0238df62bf45..a4bfc10b61dd 100644
--- a/drivers/net/macvtap_main.c
+++ b/drivers/net/macvtap_main.c
@@ -163,7 +163,7 @@ static int macvtap_device_event(struct notifier_block *unused,
* been registered but before register_netdevice has
* finished running.
*/
- err = tap_get_minor(&vlantap->tap);
+ err = tap_get_minor(macvtap_major, &vlantap->tap);
if (err)
return notifier_from_errno(err);
@@ -171,7 +171,7 @@ static int macvtap_device_event(struct notifier_block *unused,
classdev = device_create(&macvtap_class, &dev->dev, devt,
dev, tap_name);
if (IS_ERR(classdev)) {
- tap_free_minor(&vlantap->tap);
+ tap_free_minor(macvtap_major, &vlantap->tap);
return notifier_from_errno(PTR_ERR(classdev));
}
err = sysfs_create_link(&dev->dev.kobj, &classdev->kobj,
@@ -186,7 +186,7 @@ static int macvtap_device_event(struct notifier_block *unused,
sysfs_remove_link(&dev->dev.kobj, tap_name);
devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor);
device_destroy(&macvtap_class, devt);
- tap_free_minor(&vlantap->tap);
+ tap_free_minor(macvtap_major, &vlantap->tap);
break;
case NETDEV_CHANGE_TX_QUEUE_LEN:
if (tap_queue_resize(&vlantap->tap))