diff options
author | Lucas Stach <dev@lynxeye.de> | 2013-01-16 05:24:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-18 20:13:29 +0100 |
commit | 8b5b6f5413e97c3e8bafcdd67553d508f4f698cd (patch) | |
tree | fb90f82d9232e927f0656f3cb9cb0226e030c31c /drivers/net/usb/ax88172a.c | |
parent | net: asix: init ASIX AX88772B MAC from EEPROM (diff) | |
download | linux-8b5b6f5413e97c3e8bafcdd67553d508f4f698cd.tar.xz linux-8b5b6f5413e97c3e8bafcdd67553d508f4f698cd.zip |
net: asix: handle packets crossing URB boundaries
ASIX AX88772B started to pack data even more tightly. Packets and the ASIX packet
header may now cross URB boundaries. To handle this we have to introduce
some state between individual calls to asix_rx_fixup().
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/ax88172a.c')
-rw-r--r-- | drivers/net/usb/ax88172a.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c index fdbab72926bd..76ee5410d69e 100644 --- a/drivers/net/usb/ax88172a.c +++ b/drivers/net/usb/ax88172a.c @@ -35,6 +35,7 @@ struct ax88172a_private { u16 phy_addr; u16 oldmode; int use_embdphy; + struct asix_rx_fixup_info rx_fixup_info; }; /* MDIO read and write wrappers for phylib */ @@ -400,6 +401,14 @@ out: } +static int ax88172a_rx_fixup(struct usbnet *dev, struct sk_buff *skb) +{ + struct ax88172a_private *dp = dev->driver_priv; + struct asix_rx_fixup_info *rx = &dp->rx_fixup_info; + + return asix_rx_fixup_internal(dev, skb, rx); +} + const struct driver_info ax88172a_info = { .description = "ASIX AX88172A USB 2.0 Ethernet", .bind = ax88172a_bind, @@ -409,6 +418,6 @@ const struct driver_info ax88172a_info = { .status = ax88172a_status, .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET, - .rx_fixup = asix_rx_fixup, + .rx_fixup = ax88172a_rx_fixup, .tx_fixup = asix_tx_fixup, }; |