netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: netdev@vger.kernel.org
Cc: devel@linuxdriverproject.org,
	Haiyang Zhang <haiyangz@microsoft.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 5/5] hv_netvsc: pass struct net_device to rndis_filter_set_offload_params()
Date: Fri,  3 Jun 2016 17:51:02 +0200	[thread overview]
Message-ID: <1464969062-22132-6-git-send-email-vkuznets@redhat.com> (raw)
In-Reply-To: <1464969062-22132-1-git-send-email-vkuznets@redhat.com>

The only caller rndis_filter_device_add() has 'struct net_device' pointer
already.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 drivers/net/hyperv/rndis_filter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index f1692bc..979fa44 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -620,10 +620,9 @@ cleanup:
 }
 
 static int
-rndis_filter_set_offload_params(struct hv_device *hdev,
+rndis_filter_set_offload_params(struct net_device *ndev,
 				struct ndis_offload_params *req_offloads)
 {
-	struct net_device *ndev = hv_get_drvdata(hdev);
 	struct netvsc_device *nvdev = net_device_to_netvsc_device(ndev);
 	struct rndis_device *rdev = nvdev->extension;
 	struct rndis_request *request;
@@ -1083,7 +1082,7 @@ int rndis_filter_device_add(struct hv_device *dev,
 	offloads.lso_v2_ipv4 = NDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED;
 
 
-	ret = rndis_filter_set_offload_params(dev, &offloads);
+	ret = rndis_filter_set_offload_params(net, &offloads);
 	if (ret)
 		goto err_dev_remv;
 
-- 
2.5.5

  parent reply	other threads:[~2016-06-03 15:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 15:50 [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess Vitaly Kuznetsov
2016-06-03 15:50 ` [PATCH net-next v2 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback() Vitaly Kuznetsov
2016-06-03 15:50 ` [PATCH net-next v2 2/5] hv_netvsc: introduce {net, hv}_device_to_netvsc_device() helpers Vitaly Kuznetsov
2016-06-03 15:51 ` [PATCH net-next v2 3/5] hv_netvsc: pass struct netvsc_device to rndis_filter_{open, close}() Vitaly Kuznetsov
2016-06-03 15:51 ` [PATCH net-next v2 4/5] hv_netvsc: pass struct net_device to rndis_filter_set_device_mac() Vitaly Kuznetsov
2016-06-03 15:51 ` Vitaly Kuznetsov [this message]
2016-06-06  3:17 ` [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess David Miller

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=1464969062-22132-6-git-send-email-vkuznets@redhat.com \
    --to=vkuznets@redhat.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).