Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102650
b: refs/heads/master
c: c73d258
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed May 22, 2008
1 parent c23f0af commit 7aa3650
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47f98c7d4bfc08e5efffd4fe22296044ab4db21e
refs/heads/master: c73d2589b784098b2bb6e986c1a7b04e9555fbd3
19 changes: 6 additions & 13 deletions trunk/drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,24 +1495,18 @@ static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
* enough. This function returns a negative value if the received
* packet is too big or if memory is exhausted.
*/
static inline int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
struct velocity_info *vptr)
static int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
struct velocity_info *vptr)
{
int ret = -1;

if (pkt_size < rx_copybreak) {
struct sk_buff *new_skb;

new_skb = dev_alloc_skb(pkt_size + 2);
new_skb = netdev_alloc_skb(vptr->dev, pkt_size + 2);
if (new_skb) {
new_skb->dev = vptr->dev;
new_skb->ip_summed = rx_skb[0]->ip_summed;

if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
skb_reserve(new_skb, 2);

skb_copy_from_linear_data(rx_skb[0], new_skb->data,
pkt_size);
skb_reserve(new_skb, 2);
skb_copy_from_linear_data(*rx_skb, new_skb->data, pkt_size);
*rx_skb = new_skb;
ret = 0;
}
Expand Down Expand Up @@ -1629,7 +1623,7 @@ static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
struct rx_desc *rd = &(vptr->rd_ring[idx]);
struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);

rd_info->skb = dev_alloc_skb(vptr->rx_buf_sz + 64);
rd_info->skb = netdev_alloc_skb(vptr->dev, vptr->rx_buf_sz + 64);
if (rd_info->skb == NULL)
return -ENOMEM;

Expand All @@ -1638,7 +1632,6 @@ static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
* 64byte alignment.
*/
skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->data & 63);
rd_info->skb->dev = vptr->dev;
rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->data, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);

/*
Expand Down

0 comments on commit 7aa3650

Please sign in to comment.