summaryrefslogtreecommitdiff
path: root/drivers/net/usb/ax88172a.c
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2013-01-16 04:24:07 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-01-18 19:13:29 (GMT)
commit8b5b6f5413e97c3e8bafcdd67553d508f4f698cd (patch)
treefb90f82d9232e927f0656f3cb9cb0226e030c31c /drivers/net/usb/ax88172a.c
parent5620df65d81292c5fb1beba8d380ef58cd98b53f (diff)
downloadlinux-fsl-qoriq-8b5b6f5413e97c3e8bafcdd67553d508f4f698cd.tar.xz
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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c
index fdbab72..76ee541 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,
};