22 #include <linux/ethtool.h>
23 #include <linux/mii.h>
27 #include <linux/if_ether.h>
28 #include <linux/if_arp.h>
30 #include <linux/module.h>
116 int packet_len,
count;
134 dev->
net->stats.rx_length_errors++;
140 }
else if (skb->
len < 4) {
142 dev->
net->stats.rx_length_errors++;
153 if (buf->
len <
sizeof(*frame) ||
163 "for packet assembly failed.\n",
165 dev->
net->stats.rx_errors++;
176 if (buf->
len <
sizeof(*packet)) {
183 if (packet_len > buf->
len) {
185 "Bad packet length stored in header\n");
194 ethhdr = (
struct ethhdr *) skb->
data;
199 &buf->
data[
sizeof(*ethhdr) + 0x8],
202 &buf->
data[
sizeof(*ethhdr) + 0x12],
213 if ((buf->
data[
sizeof(*ethhdr)] & 0xf0) == 0x60)
226 skb_pull(buf, (packet_len + 3) & ~3);
245 dev->
net->stats.rx_errors++;
256 int orig_len = skb->
len -
sizeof(
struct ethhdr);
263 if (skb->
len <
sizeof(
struct ethhdr))
267 if (!skb_cloned(skb)) {
268 int headroom = skb_headroom(skb);
269 int tailroom = skb_tailroom(skb);
271 if (tailroom >= full_len - skb->
len -
sizeof(*frame) &&
272 headroom >=
sizeof(*frame))
276 if (headroom + tailroom + skb->
len >= full_len) {
280 skb_set_tail_pointer(skb, skb->
len);
309 memset(frame, 0,
sizeof(*frame));
314 if (skb->
len < full_len)
321 .description =
"LG VL600 modem",
324 .unbind = vl600_unbind,
326 .rx_fixup = vl600_rx_fixup,
327 .tx_fixup = vl600_tx_fixup,
334 .driver_info = (
unsigned long) &vl600_info,
340 static struct usb_driver lg_vl600_driver = {
342 .id_table = products,
347 .disable_hub_initiated_lpm = 1,