From e971a9a09da356d1fc7be1d815a3a379590d2835 Mon Sep 17 00:00:00 2001 From: Subash Abhinov Kasiviswanathan Date: Mon, 11 Dec 2017 17:30:12 -0700 Subject: [PATCH] net: qualcomm: rmnet: Allow only one rmnet dev per muxid per real dev Upon de-multiplexing data from one real dev, the packets can be sent to an unique rmnet device for a given mux id. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller --- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c index 9caa5e387450..5bb29f44d114 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c @@ -185,6 +185,9 @@ int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev, if (ep->egress_dev) return -EINVAL; + if (rmnet_get_endpoint(port, id)) + return -EBUSY; + rc = register_netdevice(rmnet_dev); if (!rc) { ep->egress_dev = rmnet_dev; -- GitLab