Skip to content

Commit

Permalink
[PATCH] sky2: incorrect length on receive packets
Browse files Browse the repository at this point in the history
The previous change to do fragmented receive (post 2.6.18) introduced a bug
where packets are passed up with size set to the size of the receive buffer
not the actual received data.  IP silently trims this so it didn't show up
right away.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Oct 5, 2006
1 parent d223a60 commit 489b10c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE);
re->skb->ip_summed = CHECKSUM_NONE;
__skb_put(skb, length);
skb_put(skb, length);
}
return skb;
}
Expand Down Expand Up @@ -1970,7 +1970,7 @@ static struct sk_buff *receive_new(struct sky2_port *sky2,
if (skb_shinfo(skb)->nr_frags)
skb_put_frags(skb, hdr_space, length);
else
skb_put(skb, hdr_space);
skb_put(skb, length);
return skb;
}

Expand Down

0 comments on commit 489b10c

Please sign in to comment.