Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299923
b: refs/heads/master
c: 2a58094
h: refs/heads/master
i:
  299921: 92a48b3
  299919: 426d98e
v: v3
  • Loading branch information
Ingo van Lil authored and David S. Miller committed Apr 24, 2012
1 parent ae5772d commit 1262dce
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 1ab8be4a14409c55050db69271631afebac29b5a
refs/heads/master: 2a5809499e35b53a6044fd34e72b242688b7a862
4 changes: 2 additions & 2 deletions trunk/drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
u32 packet_len;
u32 padbytes = 0xffff0000;

padlen = ((skb->len + 4) % 512) ? 0 : 4;
padlen = ((skb->len + 4) & (dev->maxpacket - 1)) ? 0 : 4;

if ((!skb_cloned(skb)) &&
((headroom + tailroom) >= (4 + padlen))) {
Expand All @@ -377,7 +377,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
cpu_to_le32s(&packet_len);
skb_copy_to_linear_data(skb, &packet_len, sizeof(packet_len));

if ((skb->len % 512) == 0) {
if (padlen) {
cpu_to_le32s(&padbytes);
memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes));
skb_put(skb, sizeof(padbytes));
Expand Down

0 comments on commit 1262dce

Please sign in to comment.