diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-12-12 16:48:37 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-13 15:57:38 -0500 |
commit | 79cf1bae384cfc51b0b0773b3591794302af6ebd (patch) | |
tree | dad3ccb989e1a023cdc69aefe6acb366ba13dbaa /drivers/net/hyperv/rndis_filter.c | |
parent | hv_netvsc: track memory allocation failures in ethtool stats (diff) | |
download | linux-dev-79cf1bae384cfc51b0b0773b3591794302af6ebd.tar.xz linux-dev-79cf1bae384cfc51b0b0773b3591794302af6ebd.zip |
hv_netvsc: simplify function args in receive status path
The caller (netvsc_receive) already has the net device pointer,
and should just pass that to functions rather than the hyperv device.
This eliminates several impossible error paths in the process.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 673492063307..901838b2bcc9 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -134,11 +134,9 @@ static void put_rndis_request(struct rndis_device *dev, kfree(req); } -static void dump_rndis_message(struct hv_device *hv_dev, +static void dump_rndis_message(struct net_device *netdev, const struct rndis_message *rndis_msg) { - struct net_device *netdev = hv_get_drvdata(hv_dev); - switch (rndis_msg->ndis_msg_type) { case RNDIS_MSG_PACKET: netdev_dbg(netdev, "RNDIS_MSG_PACKET (len %u, " @@ -397,7 +395,6 @@ static int rndis_filter_receive_data(struct net_device *ndev, int rndis_filter_receive(struct net_device *ndev, struct netvsc_device *net_dev, - struct hv_device *dev, struct vmbus_channel *channel, void *data, u32 buflen) { @@ -419,7 +416,7 @@ int rndis_filter_receive(struct net_device *ndev, } if (netif_msg_rx_status(net_device_ctx)) - dump_rndis_message(dev, rndis_msg); + dump_rndis_message(ndev, rndis_msg); switch (rndis_msg->ndis_msg_type) { case RNDIS_MSG_PACKET: @@ -434,7 +431,7 @@ int rndis_filter_receive(struct net_device *ndev, case RNDIS_MSG_INDICATE: /* notification msgs */ - netvsc_linkstatus_callback(dev, rndis_msg); + netvsc_linkstatus_callback(ndev, rndis_msg); break; default: netdev_err(ndev, |