diff options
author | Lucas Stach <dev@lynxeye.de> | 2013-01-16 04:24:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-18 14:13:29 -0500 |
commit | 8b5b6f5413e97c3e8bafcdd67553d508f4f698cd (patch) | |
tree | fb90f82d9232e927f0656f3cb9cb0226e030c31c /drivers/net/usb/asix.h | |
parent | 5620df65d81292c5fb1beba8d380ef58cd98b53f (diff) | |
download | talos-op-linux-8b5b6f5413e97c3e8bafcdd67553d508f4f698cd.tar.gz talos-op-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/asix.h')
-rw-r--r-- | drivers/net/usb/asix.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h index 7afe8ac078e8..346c032aa795 100644 --- a/drivers/net/usb/asix.h +++ b/drivers/net/usb/asix.h @@ -167,6 +167,17 @@ struct asix_data { u8 res; }; +struct asix_rx_fixup_info { + struct sk_buff *ax_skb; + u32 header; + u16 size; + bool split_head; +}; + +struct asix_common_private { + struct asix_rx_fixup_info rx_fixup_info; +}; + /* ASIX specific flags */ #define FLAG_EEPROM_MAC (1UL << 0) /* init device MAC from eeprom */ @@ -179,7 +190,9 @@ int asix_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index, void asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index, u16 size, void *data); -int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb); +int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb, + struct asix_rx_fixup_info *rx); +int asix_rx_fixup_common(struct usbnet *dev, struct sk_buff *skb); struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); |