summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qualcomm
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2017-12-11 17:30:12 -0700
committerDavid S. Miller <davem@davemloft.net>2017-12-13 14:01:08 -0500
commite971a9a09da356d1fc7be1d815a3a379590d2835 (patch)
tree289c2790480eeae7b6abe6610143e0b649eee328 /drivers/net/ethernet/qualcomm
parent8de721e21e202ceff3444e5c7abe7428a912a1f5 (diff)
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 <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm')
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c3
1 files changed, 3 insertions, 0 deletions
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;