24 #include <linux/module.h>
26 #include <linux/netdevice.h>
28 #include <linux/ethtool.h>
30 #include <linux/mii.h>
56 #define GENELINK_CONNECT_WRITE 0xF0
58 #define GENELINK_INTERRUPT_PIPE 0x03
60 #define INTERRUPT_BUFSIZE 0x08
62 #define GENELINK_INTERRUPT_INTERVAL 0x10
64 #define GL_MAX_TRANSMIT_PACKETS 32
66 #define GL_MAX_PACKET_LEN 1514
68 #define GL_RCV_BUF_SIZE \
69 (((GL_MAX_PACKET_LEN + 4) * GL_MAX_TRANSMIT_PACKETS) + 4)
95 "genelink: invalid received packet count %u\n",
151 int headroom = skb_headroom(skb);
152 int tailroom = skb_tailroom(skb);
157 padlen = ((skb->
len + (4 + 4*1)) % 64) ? 0 : 1;
159 if ((!skb_cloned(skb))
160 && ((headroom + tailroom) >= (padlen + (4 + 4*1)))) {
161 if ((headroom < (4 + 4*1)) || (tailroom < padlen)) {
164 skb_set_tail_pointer(skb, skb->
len);
177 packet_len = packet_count + 1;
192 dev->
net->hard_header_len += 4;
199 .description =
"Genesys GeneLink",
201 .bind = genelink_bind,
202 .rx_fixup = genelink_rx_fixup,
203 .tx_fixup = genelink_tx_fixup,
208 .check_connect =genelink_check_connect,
215 USB_DEVICE(0x05e3, 0x0502),
216 .driver_info = (
unsigned long) &genelink_info,
225 static struct usb_driver gl620a_driver = {
227 .id_table = products,
232 .disable_hub_initiated_lpm = 1,