Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275656
b: refs/heads/master
c: ea1649d
h: refs/heads/master
v: v3
  • Loading branch information
Nico Erfurth authored and David S. Miller committed Nov 8, 2011
1 parent 050f9fd commit 0571b3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: c457338d7acd3823e765b684a62294cfda9d2f55
refs/heads/master: ea1649dea95fb270af94f75e842402c4cfbfc15f
7 changes: 4 additions & 3 deletions trunk/drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define USB_VENDOR_ID_SMSC (0x0424)
#define USB_PRODUCT_ID_LAN7500 (0x7500)
#define USB_PRODUCT_ID_LAN7505 (0x7505)
#define RXW_PADDING 2

#define check_warn(ret, fmt, args...) \
({ if (ret < 0) netdev_warn(dev->net, fmt, ##args); })
Expand Down Expand Up @@ -1088,13 +1089,13 @@ static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)

memcpy(&rx_cmd_b, skb->data, sizeof(rx_cmd_b));
le32_to_cpus(&rx_cmd_b);
skb_pull(skb, 4 + NET_IP_ALIGN);
skb_pull(skb, 4 + RXW_PADDING);

packet = skb->data;

/* get the packet length */
size = (rx_cmd_a & RX_CMD_A_LEN) - NET_IP_ALIGN;
align_count = (4 - ((size + NET_IP_ALIGN) % 4)) % 4;
size = (rx_cmd_a & RX_CMD_A_LEN) - RXW_PADDING;
align_count = (4 - ((size + RXW_PADDING) % 4)) % 4;

if (unlikely(rx_cmd_a & RX_CMD_A_RED)) {
netif_dbg(dev, rx_err, dev->net,
Expand Down

0 comments on commit 0571b3b

Please sign in to comment.