Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189164
b: refs/heads/master
c: a6d36d5
h: refs/heads/master
v: v3
  • Loading branch information
Ben Menchaca authored and David S. Miller committed Mar 27, 2010
1 parent a35f8d2 commit c464cfa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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: af06393bbde6e8d474622a0517cffc662676e3fe
refs/heads/master: a6d36d5689b1806a3365c909192e9f03a43a632b
5 changes: 3 additions & 2 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev)
* as many bytes as needed to align the data properly
*/
skb_reserve(skb, alignamount);
GFAR_CB(skb)->alignamount = alignamount;

return skb;
}
Expand Down Expand Up @@ -2533,13 +2534,13 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
newskb = skb;
else if (skb) {
/*
* We need to reset ->data to what it
* We need to un-reserve() the skb to what it
* was before gfar_new_skb() re-aligned
* it to an RXBUF_ALIGNMENT boundary
* before we put the skb back on the
* recycle list.
*/
skb->data = skb->head + NET_SKB_PAD;
skb_reserve(skb, -GFAR_CB(skb)->alignamount);
__skb_queue_head(&priv->rx_recycle, skb);
}
} else {
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ struct rxfcb {
u16 vlctl; /* VLAN control word */
};

struct gianfar_skb_cb {
int alignamount;
};

#define GFAR_CB(skb) ((struct gianfar_skb_cb *)((skb)->cb))

struct rmon_mib
{
u32 tr64; /* 0x.680 - Transmit and Receive 64-byte Frame Counter */
Expand Down

0 comments on commit c464cfa

Please sign in to comment.