All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subject: [PATCH net-next v2 3/6] net: qualcomm: rmnet: Allow only one rmnet dev per muxid per real dev
Date: Sat,  9 Dec 2017 13:58:27 -0700	[thread overview]
Message-ID: <1512853110-4893-4-git-send-email-subashab@codeaurora.org> (raw)
In-Reply-To: <1512853110-4893-1-git-send-email-subashab@codeaurora.org>

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>
---
 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 9caa5e3..5bb29f4 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;
-- 
1.9.1

  parent reply	other threads:[~2017-12-09 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 20:58 [PATCH net-next v2 0/6] net: qualcomm: rmnet: Configuration options Subash Abhinov Kasiviswanathan
2017-12-09 20:58 ` [PATCH net-next v2 1/6] net: qualcomm: rmnet: Remove the rmnet_map_results enum Subash Abhinov Kasiviswanathan
2017-12-09 20:58 ` [PATCH net-next v2 2/6] net: qualcomm: rmnet: Remove the some redundant macros Subash Abhinov Kasiviswanathan
2017-12-09 20:58 ` Subash Abhinov Kasiviswanathan [this message]
2017-12-09 20:58 ` [PATCH net-next v2 4/6] net: qualcomm: rmnet: Process packets over ethernet Subash Abhinov Kasiviswanathan
2017-12-09 20:58 ` [PATCH net-next v2 5/6] net: qualcomm: rmnet: Allow to configure flags for new devices Subash Abhinov Kasiviswanathan
2017-12-11 17:18   ` David Miller
2017-12-11 19:54   ` Dan Williams
2017-12-09 20:58 ` [PATCH net-next v2 6/6] net: qualcomm: rmnet: Allow to configure flags for existing devices Subash Abhinov Kasiviswanathan

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=1512853110-4893-4-git-send-email-subashab@codeaurora.org \
    --to=subashab@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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.