Commit 3be9b5fd authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller

hv_netvsc: Clean up extra parameter from rndis_filter_receive_data()

The variables, msg and data, have the same value. This patch removes
the extra one.
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49b44aa2
...@@ -365,14 +365,15 @@ static inline void *rndis_get_ppi(struct rndis_packet *rpkt, u32 type) ...@@ -365,14 +365,15 @@ static inline void *rndis_get_ppi(struct rndis_packet *rpkt, u32 type)
static int rndis_filter_receive_data(struct net_device *ndev, static int rndis_filter_receive_data(struct net_device *ndev,
struct netvsc_device *nvdev, struct netvsc_device *nvdev,
struct rndis_message *msg,
struct vmbus_channel *channel, struct vmbus_channel *channel,
void *data, u32 data_buflen) struct rndis_message *msg,
u32 data_buflen)
{ {
struct rndis_packet *rndis_pkt = &msg->msg.pkt; struct rndis_packet *rndis_pkt = &msg->msg.pkt;
const struct ndis_tcp_ip_checksum_info *csum_info; const struct ndis_tcp_ip_checksum_info *csum_info;
const struct ndis_pkt_8021q_info *vlan; const struct ndis_pkt_8021q_info *vlan;
u32 data_offset; u32 data_offset;
void *data;
/* Remove the rndis header and pass it back up the stack */ /* Remove the rndis header and pass it back up the stack */
data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset; data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset;
...@@ -393,14 +394,15 @@ static int rndis_filter_receive_data(struct net_device *ndev, ...@@ -393,14 +394,15 @@ static int rndis_filter_receive_data(struct net_device *ndev,
vlan = rndis_get_ppi(rndis_pkt, IEEE_8021Q_INFO); vlan = rndis_get_ppi(rndis_pkt, IEEE_8021Q_INFO);
csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO);
data = (void *)msg + data_offset;
/* /*
* Remove the rndis trailer padding from rndis packet message * Remove the rndis trailer padding from rndis packet message
* rndis_pkt->data_len tell us the real data length, we only copy * rndis_pkt->data_len tell us the real data length, we only copy
* the data packet to the stack, without the rndis trailer padding * the data packet to the stack, without the rndis trailer padding
*/ */
data = (void *)((unsigned long)data + data_offset);
csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO);
return netvsc_recv_callback(ndev, nvdev, channel, return netvsc_recv_callback(ndev, nvdev, channel,
data, rndis_pkt->data_len, data, rndis_pkt->data_len,
csum_info, vlan); csum_info, vlan);
...@@ -419,8 +421,8 @@ int rndis_filter_receive(struct net_device *ndev, ...@@ -419,8 +421,8 @@ int rndis_filter_receive(struct net_device *ndev,
switch (rndis_msg->ndis_msg_type) { switch (rndis_msg->ndis_msg_type) {
case RNDIS_MSG_PACKET: case RNDIS_MSG_PACKET:
return rndis_filter_receive_data(ndev, net_dev, rndis_msg, return rndis_filter_receive_data(ndev, net_dev, channel,
channel, data, buflen); rndis_msg, buflen);
case RNDIS_MSG_INIT_C: case RNDIS_MSG_INIT_C:
case RNDIS_MSG_QUERY_C: case RNDIS_MSG_QUERY_C:
case RNDIS_MSG_SET_C: case RNDIS_MSG_SET_C:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment