diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/hv/NetVsc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 1610b845198f..d384c0ddf069 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c | |||
@@ -1052,7 +1052,7 @@ static void NetVscOnReceive(struct hv_device *Device, | |||
1052 | */ | 1052 | */ |
1053 | spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags); | 1053 | spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags); |
1054 | while (!list_empty(&netDevice->ReceivePacketList)) { | 1054 | while (!list_empty(&netDevice->ReceivePacketList)) { |
1055 | list_move_tail(&netDevice->ReceivePacketList, &listHead); | 1055 | list_move_tail(netDevice->ReceivePacketList.next, &listHead); |
1056 | if (++count == vmxferpagePacket->RangeCount + 1) | 1056 | if (++count == vmxferpagePacket->RangeCount + 1) |
1057 | break; | 1057 | break; |
1058 | } | 1058 | } |
@@ -1071,7 +1071,7 @@ static void NetVscOnReceive(struct hv_device *Device, | |||
1071 | /* Return it to the freelist */ | 1071 | /* Return it to the freelist */ |
1072 | spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags); | 1072 | spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags); |
1073 | for (i = count; i != 0; i--) { | 1073 | for (i = count; i != 0; i--) { |
1074 | list_move_tail(&listHead, | 1074 | list_move_tail(listHead.next, |
1075 | &netDevice->ReceivePacketList); | 1075 | &netDevice->ReceivePacketList); |
1076 | } | 1076 | } |
1077 | spin_unlock_irqrestore(&netDevice->receive_packet_list_lock, | 1077 | spin_unlock_irqrestore(&netDevice->receive_packet_list_lock, |
@@ -1085,8 +1085,7 @@ static void NetVscOnReceive(struct hv_device *Device, | |||
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | /* Remove the 1st packet to represent the xfer page packet itself */ | 1087 | /* Remove the 1st packet to represent the xfer page packet itself */ |
1088 | xferpagePacket = list_entry(&listHead, struct xferpage_packet, | 1088 | xferpagePacket = (struct xferpage_packet*)listHead.next; |
1089 | ListEntry); | ||
1090 | list_del(&xferpagePacket->ListEntry); | 1089 | list_del(&xferpagePacket->ListEntry); |
1091 | 1090 | ||
1092 | /* This is how much we can satisfy */ | 1091 | /* This is how much we can satisfy */ |
@@ -1102,8 +1101,7 @@ static void NetVscOnReceive(struct hv_device *Device, | |||
1102 | 1101 | ||
1103 | /* Each range represents 1 RNDIS pkt that contains 1 ethernet frame */ | 1102 | /* Each range represents 1 RNDIS pkt that contains 1 ethernet frame */ |
1104 | for (i = 0; i < (count - 1); i++) { | 1103 | for (i = 0; i < (count - 1); i++) { |
1105 | netvscPacket = list_entry(&listHead, struct hv_netvsc_packet, | 1104 | netvscPacket = (struct hv_netvsc_packet*)listHead.next; |
1106 | ListEntry); | ||
1107 | list_del(&netvscPacket->ListEntry); | 1105 | list_del(&netvscPacket->ListEntry); |
1108 | 1106 | ||
1109 | /* Initialize the netvsc packet */ | 1107 | /* Initialize the netvsc packet */ |