diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
commit | c43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch) | |
tree | 3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /drivers/net/usb | |
parent | 1a8dd307cc0a2119be4e578c517795464e6dabba (diff) | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) |
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes. As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.
Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/usb/cdc_eem.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 25 | ||||
-rw-r--r-- | drivers/net/usb/cdc_subset.c | 7 | ||||
-rw-r--r-- | drivers/net/usb/dm9601.c | 10 | ||||
-rw-r--r-- | drivers/net/usb/net1080.c | 12 | ||||
-rw-r--r-- | drivers/net/usb/pegasus.c | 29 | ||||
-rw-r--r-- | drivers/net/usb/rndis_host.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 10 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 30 |
10 files changed, 82 insertions, 49 deletions
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 3717569828bf..a906d3998131 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -169,10 +169,12 @@ config USB_NET_CDCETHER | |||
169 | The Linux-USB CDC Ethernet Gadget driver is an open implementation. | 169 | The Linux-USB CDC Ethernet Gadget driver is an open implementation. |
170 | This driver should work with at least the following devices: | 170 | This driver should work with at least the following devices: |
171 | 171 | ||
172 | * Dell Wireless 5530 HSPA | ||
172 | * Ericsson PipeRider (all variants) | 173 | * Ericsson PipeRider (all variants) |
174 | * Ericsson Mobile Broadband Module (all variants) | ||
173 | * Motorola (DM100 and SB4100) | 175 | * Motorola (DM100 and SB4100) |
174 | * Broadcom Cable Modem (reference design) | 176 | * Broadcom Cable Modem (reference design) |
175 | * Toshiba PCX1100U | 177 | * Toshiba (PCX1100U and F3507g) |
176 | * ... | 178 | * ... |
177 | 179 | ||
178 | This driver creates an interface named "ethX", where X depends on | 180 | This driver creates an interface named "ethX", where X depends on |
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 80e01778dd3b..cd35d50e46d4 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -319,7 +319,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
319 | return crc == crc2; | 319 | return crc == crc2; |
320 | 320 | ||
321 | if (unlikely(crc != crc2)) { | 321 | if (unlikely(crc != crc2)) { |
322 | dev->stats.rx_errors++; | 322 | dev->net->stats.rx_errors++; |
323 | dev_kfree_skb_any(skb2); | 323 | dev_kfree_skb_any(skb2); |
324 | } else | 324 | } else |
325 | usbnet_skb_return(dev, skb2); | 325 | usbnet_skb_return(dev, skb2); |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 01fd528306ec..4a6aff579403 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -533,6 +533,31 @@ static const struct usb_device_id products [] = { | |||
533 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1900, USB_CLASS_COMM, | 533 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1900, USB_CLASS_COMM, |
534 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 534 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
535 | .driver_info = (unsigned long) &cdc_info, | 535 | .driver_info = (unsigned long) &cdc_info, |
536 | }, { | ||
537 | /* Ericsson F3507g ver. 2 */ | ||
538 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1902, USB_CLASS_COMM, | ||
539 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
540 | .driver_info = (unsigned long) &cdc_info, | ||
541 | }, { | ||
542 | /* Ericsson F3607gw */ | ||
543 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1904, USB_CLASS_COMM, | ||
544 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
545 | .driver_info = (unsigned long) &cdc_info, | ||
546 | }, { | ||
547 | /* Ericsson F3307 */ | ||
548 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1906, USB_CLASS_COMM, | ||
549 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
550 | .driver_info = (unsigned long) &cdc_info, | ||
551 | }, { | ||
552 | /* Toshiba F3507g */ | ||
553 | USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, | ||
554 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
555 | .driver_info = (unsigned long) &cdc_info, | ||
556 | }, { | ||
557 | /* Dell F3507g */ | ||
558 | USB_DEVICE_AND_INTERFACE_INFO(0x413c, 0x8147, USB_CLASS_COMM, | ||
559 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | ||
560 | .driver_info = (unsigned long) &cdc_info, | ||
536 | }, | 561 | }, |
537 | { }, // END | 562 | { }, // END |
538 | }; | 563 | }; |
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index c66b9c324f54..ca39ace0b0eb 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
@@ -307,9 +307,10 @@ static const struct usb_device_id products [] = { | |||
307 | USB_DEVICE (0x1286, 0x8001), // "blob" bootloader | 307 | USB_DEVICE (0x1286, 0x8001), // "blob" bootloader |
308 | .driver_info = (unsigned long) &blob_info, | 308 | .driver_info = (unsigned long) &blob_info, |
309 | }, { | 309 | }, { |
310 | // Linux Ethernet/RNDIS gadget on pxa210/25x/26x, second config | 310 | // Linux Ethernet/RNDIS gadget, mostly on PXA, second config |
311 | // e.g. Gumstix, current OpenZaurus, ... | 311 | // e.g. Gumstix, current OpenZaurus, ... or anything else |
312 | USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), | 312 | // that just enables this gadget option. |
313 | USB_DEVICE (0x0525, 0xa4a2), | ||
313 | .driver_info = (unsigned long) &linuxdev_info, | 314 | .driver_info = (unsigned long) &linuxdev_info, |
314 | }, | 315 | }, |
315 | #endif | 316 | #endif |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 7ae82446b93a..1d3730d6690f 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -513,11 +513,11 @@ static int dm9601_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
513 | len = (skb->data[1] | (skb->data[2] << 8)) - 4; | 513 | len = (skb->data[1] | (skb->data[2] << 8)) - 4; |
514 | 514 | ||
515 | if (unlikely(status & 0xbf)) { | 515 | if (unlikely(status & 0xbf)) { |
516 | if (status & 0x01) dev->stats.rx_fifo_errors++; | 516 | if (status & 0x01) dev->net->stats.rx_fifo_errors++; |
517 | if (status & 0x02) dev->stats.rx_crc_errors++; | 517 | if (status & 0x02) dev->net->stats.rx_crc_errors++; |
518 | if (status & 0x04) dev->stats.rx_frame_errors++; | 518 | if (status & 0x04) dev->net->stats.rx_frame_errors++; |
519 | if (status & 0x20) dev->stats.rx_missed_errors++; | 519 | if (status & 0x20) dev->net->stats.rx_missed_errors++; |
520 | if (status & 0x90) dev->stats.rx_length_errors++; | 520 | if (status & 0x90) dev->net->stats.rx_length_errors++; |
521 | return 0; | 521 | return 0; |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c index 034e8a73ca6b..aeb1ab03a9ee 100644 --- a/drivers/net/usb/net1080.c +++ b/drivers/net/usb/net1080.c | |||
@@ -433,7 +433,7 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
433 | dbg("rx framesize %d range %d..%d mtu %d", skb->len, | 433 | dbg("rx framesize %d range %d..%d mtu %d", skb->len, |
434 | net->hard_header_len, dev->hard_mtu, net->mtu); | 434 | net->hard_header_len, dev->hard_mtu, net->mtu); |
435 | #endif | 435 | #endif |
436 | dev->stats.rx_frame_errors++; | 436 | dev->net->stats.rx_frame_errors++; |
437 | nc_ensure_sync(dev); | 437 | nc_ensure_sync(dev); |
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
@@ -442,12 +442,12 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
442 | hdr_len = le16_to_cpup(&header->hdr_len); | 442 | hdr_len = le16_to_cpup(&header->hdr_len); |
443 | packet_len = le16_to_cpup(&header->packet_len); | 443 | packet_len = le16_to_cpup(&header->packet_len); |
444 | if (FRAMED_SIZE(packet_len) > NC_MAX_PACKET) { | 444 | if (FRAMED_SIZE(packet_len) > NC_MAX_PACKET) { |
445 | dev->stats.rx_frame_errors++; | 445 | dev->net->stats.rx_frame_errors++; |
446 | dbg("packet too big, %d", packet_len); | 446 | dbg("packet too big, %d", packet_len); |
447 | nc_ensure_sync(dev); | 447 | nc_ensure_sync(dev); |
448 | return 0; | 448 | return 0; |
449 | } else if (hdr_len < MIN_HEADER) { | 449 | } else if (hdr_len < MIN_HEADER) { |
450 | dev->stats.rx_frame_errors++; | 450 | dev->net->stats.rx_frame_errors++; |
451 | dbg("header too short, %d", hdr_len); | 451 | dbg("header too short, %d", hdr_len); |
452 | nc_ensure_sync(dev); | 452 | nc_ensure_sync(dev); |
453 | return 0; | 453 | return 0; |
@@ -465,21 +465,21 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
465 | 465 | ||
466 | if ((packet_len & 0x01) == 0) { | 466 | if ((packet_len & 0x01) == 0) { |
467 | if (skb->data [packet_len] != PAD_BYTE) { | 467 | if (skb->data [packet_len] != PAD_BYTE) { |
468 | dev->stats.rx_frame_errors++; | 468 | dev->net->stats.rx_frame_errors++; |
469 | dbg("bad pad"); | 469 | dbg("bad pad"); |
470 | return 0; | 470 | return 0; |
471 | } | 471 | } |
472 | skb_trim(skb, skb->len - 1); | 472 | skb_trim(skb, skb->len - 1); |
473 | } | 473 | } |
474 | if (skb->len != packet_len) { | 474 | if (skb->len != packet_len) { |
475 | dev->stats.rx_frame_errors++; | 475 | dev->net->stats.rx_frame_errors++; |
476 | dbg("bad packet len %d (expected %d)", | 476 | dbg("bad packet len %d (expected %d)", |
477 | skb->len, packet_len); | 477 | skb->len, packet_len); |
478 | nc_ensure_sync(dev); | 478 | nc_ensure_sync(dev); |
479 | return 0; | 479 | return 0; |
480 | } | 480 | } |
481 | if (header->packet_id != get_unaligned(&trailer->packet_id)) { | 481 | if (header->packet_id != get_unaligned(&trailer->packet_id)) { |
482 | dev->stats.rx_fifo_errors++; | 482 | dev->net->stats.rx_fifo_errors++; |
483 | dbg("(2+ dropped) rx packet_id mismatch 0x%x 0x%x", | 483 | dbg("(2+ dropped) rx packet_id mismatch 0x%x 0x%x", |
484 | le16_to_cpu(header->packet_id), | 484 | le16_to_cpu(header->packet_id), |
485 | le16_to_cpu(trailer->packet_id)); | 485 | le16_to_cpu(trailer->packet_id)); |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 2138535f2339..73acbd244aa1 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -297,7 +297,7 @@ static int update_eth_regs_async(pegasus_t * pegasus) | |||
297 | 297 | ||
298 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; | 298 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; |
299 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS; | 299 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS; |
300 | pegasus->dr.wValue = 0; | 300 | pegasus->dr.wValue = cpu_to_le16(0); |
301 | pegasus->dr.wIndex = cpu_to_le16(EthCtrl0); | 301 | pegasus->dr.wIndex = cpu_to_le16(EthCtrl0); |
302 | pegasus->dr.wLength = cpu_to_le16(3); | 302 | pegasus->dr.wLength = cpu_to_le16(3); |
303 | pegasus->ctrl_urb->transfer_buffer_length = 3; | 303 | pegasus->ctrl_urb->transfer_buffer_length = 3; |
@@ -446,11 +446,12 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data) | |||
446 | int i; | 446 | int i; |
447 | __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE }; | 447 | __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE }; |
448 | int ret; | 448 | int ret; |
449 | __le16 le_data = cpu_to_le16(data); | ||
449 | 450 | ||
450 | set_registers(pegasus, EpromOffset, 4, d); | 451 | set_registers(pegasus, EpromOffset, 4, d); |
451 | enable_eprom_write(pegasus); | 452 | enable_eprom_write(pegasus); |
452 | set_register(pegasus, EpromOffset, index); | 453 | set_register(pegasus, EpromOffset, index); |
453 | set_registers(pegasus, EpromData, 2, &data); | 454 | set_registers(pegasus, EpromData, 2, &le_data); |
454 | set_register(pegasus, EpromCtrl, EPROM_WRITE); | 455 | set_register(pegasus, EpromCtrl, EPROM_WRITE); |
455 | 456 | ||
456 | for (i = 0; i < REG_TIMEOUT; i++) { | 457 | for (i = 0; i < REG_TIMEOUT; i++) { |
@@ -923,29 +924,32 @@ static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev) | |||
923 | 924 | ||
924 | static inline void disable_net_traffic(pegasus_t * pegasus) | 925 | static inline void disable_net_traffic(pegasus_t * pegasus) |
925 | { | 926 | { |
926 | int tmp = 0; | 927 | __le16 tmp = cpu_to_le16(0); |
927 | 928 | ||
928 | set_registers(pegasus, EthCtrl0, 2, &tmp); | 929 | set_registers(pegasus, EthCtrl0, sizeof(tmp), &tmp); |
929 | } | 930 | } |
930 | 931 | ||
931 | static inline void get_interrupt_interval(pegasus_t * pegasus) | 932 | static inline void get_interrupt_interval(pegasus_t * pegasus) |
932 | { | 933 | { |
933 | __u8 data[2]; | 934 | u16 data; |
935 | u8 interval; | ||
934 | 936 | ||
935 | read_eprom_word(pegasus, 4, (__u16 *) data); | 937 | read_eprom_word(pegasus, 4, &data); |
938 | interval = data >> 8; | ||
936 | if (pegasus->usb->speed != USB_SPEED_HIGH) { | 939 | if (pegasus->usb->speed != USB_SPEED_HIGH) { |
937 | if (data[1] < 0x80) { | 940 | if (interval < 0x80) { |
938 | if (netif_msg_timer(pegasus)) | 941 | if (netif_msg_timer(pegasus)) |
939 | dev_info(&pegasus->intf->dev, "intr interval " | 942 | dev_info(&pegasus->intf->dev, "intr interval " |
940 | "changed from %ums to %ums\n", | 943 | "changed from %ums to %ums\n", |
941 | data[1], 0x80); | 944 | interval, 0x80); |
942 | data[1] = 0x80; | 945 | interval = 0x80; |
946 | data = (data & 0x00FF) | ((u16)interval << 8); | ||
943 | #ifdef PEGASUS_WRITE_EEPROM | 947 | #ifdef PEGASUS_WRITE_EEPROM |
944 | write_eprom_word(pegasus, 4, *(__u16 *) data); | 948 | write_eprom_word(pegasus, 4, data); |
945 | #endif | 949 | #endif |
946 | } | 950 | } |
947 | } | 951 | } |
948 | pegasus->intr_interval = data[1]; | 952 | pegasus->intr_interval = interval; |
949 | } | 953 | } |
950 | 954 | ||
951 | static void set_carrier(struct net_device *net) | 955 | static void set_carrier(struct net_device *net) |
@@ -1299,7 +1303,8 @@ static int pegasus_blacklisted(struct usb_device *udev) | |||
1299 | /* Special quirk to keep the driver from handling the Belkin Bluetooth | 1303 | /* Special quirk to keep the driver from handling the Belkin Bluetooth |
1300 | * dongle which happens to have the same ID. | 1304 | * dongle which happens to have the same ID. |
1301 | */ | 1305 | */ |
1302 | if ((udd->idVendor == VENDOR_BELKIN && udd->idProduct == 0x0121) && | 1306 | if ((udd->idVendor == cpu_to_le16(VENDOR_BELKIN)) && |
1307 | (udd->idProduct == cpu_to_le16(0x0121)) && | ||
1303 | (udd->bDeviceClass == USB_CLASS_WIRELESS_CONTROLLER) && | 1308 | (udd->bDeviceClass == USB_CLASS_WIRELESS_CONTROLLER) && |
1304 | (udd->bDeviceProtocol == 1)) | 1309 | (udd->bDeviceProtocol == 1)) |
1305 | return 1; | 1310 | return 1; |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 1bf243ef950e..2232232b7989 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -487,7 +487,7 @@ int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
487 | if (unlikely(hdr->msg_type != RNDIS_MSG_PACKET | 487 | if (unlikely(hdr->msg_type != RNDIS_MSG_PACKET |
488 | || skb->len < msg_len | 488 | || skb->len < msg_len |
489 | || (data_offset + data_len + 8) > msg_len)) { | 489 | || (data_offset + data_len + 8) > msg_len)) { |
490 | dev->stats.rx_frame_errors++; | 490 | dev->net->stats.rx_frame_errors++; |
491 | devdbg(dev, "bad rndis message %d/%d/%d/%d, len %d", | 491 | devdbg(dev, "bad rndis message %d/%d/%d/%d, len %d", |
492 | le32_to_cpu(hdr->msg_type), | 492 | le32_to_cpu(hdr->msg_type), |
493 | msg_len, data_offset, data_len, skb->len); | 493 | msg_len, data_offset, data_len, skb->len); |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 89a91f8c22de..fe045896406b 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -1108,18 +1108,18 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
1108 | if (unlikely(header & RX_STS_ES_)) { | 1108 | if (unlikely(header & RX_STS_ES_)) { |
1109 | if (netif_msg_rx_err(dev)) | 1109 | if (netif_msg_rx_err(dev)) |
1110 | devdbg(dev, "Error header=0x%08x", header); | 1110 | devdbg(dev, "Error header=0x%08x", header); |
1111 | dev->stats.rx_errors++; | 1111 | dev->net->stats.rx_errors++; |
1112 | dev->stats.rx_dropped++; | 1112 | dev->net->stats.rx_dropped++; |
1113 | 1113 | ||
1114 | if (header & RX_STS_CRC_) { | 1114 | if (header & RX_STS_CRC_) { |
1115 | dev->stats.rx_crc_errors++; | 1115 | dev->net->stats.rx_crc_errors++; |
1116 | } else { | 1116 | } else { |
1117 | if (header & (RX_STS_TL_ | RX_STS_RF_)) | 1117 | if (header & (RX_STS_TL_ | RX_STS_RF_)) |
1118 | dev->stats.rx_frame_errors++; | 1118 | dev->net->stats.rx_frame_errors++; |
1119 | 1119 | ||
1120 | if ((header & RX_STS_LE_) && | 1120 | if ((header & RX_STS_LE_) && |
1121 | (!(header & RX_STS_FT_))) | 1121 | (!(header & RX_STS_FT_))) |
1122 | dev->stats.rx_length_errors++; | 1122 | dev->net->stats.rx_length_errors++; |
1123 | } | 1123 | } |
1124 | } else { | 1124 | } else { |
1125 | /* ETH_FRAME_LEN + 4(CRC) + 2(COE) + 4(Vlan) */ | 1125 | /* ETH_FRAME_LEN + 4(CRC) + 2(COE) + 4(Vlan) */ |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 22c0585a0319..edfd9e10ceba 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -234,8 +234,8 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) | |||
234 | int status; | 234 | int status; |
235 | 235 | ||
236 | skb->protocol = eth_type_trans (skb, dev->net); | 236 | skb->protocol = eth_type_trans (skb, dev->net); |
237 | dev->stats.rx_packets++; | 237 | dev->net->stats.rx_packets++; |
238 | dev->stats.rx_bytes += skb->len; | 238 | dev->net->stats.rx_bytes += skb->len; |
239 | 239 | ||
240 | if (netif_msg_rx_status (dev)) | 240 | if (netif_msg_rx_status (dev)) |
241 | devdbg (dev, "< rx, len %zu, type 0x%x", | 241 | devdbg (dev, "< rx, len %zu, type 0x%x", |
@@ -397,7 +397,7 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) | |||
397 | if (netif_msg_rx_err (dev)) | 397 | if (netif_msg_rx_err (dev)) |
398 | devdbg (dev, "drop"); | 398 | devdbg (dev, "drop"); |
399 | error: | 399 | error: |
400 | dev->stats.rx_errors++; | 400 | dev->net->stats.rx_errors++; |
401 | skb_queue_tail (&dev->done, skb); | 401 | skb_queue_tail (&dev->done, skb); |
402 | } | 402 | } |
403 | } | 403 | } |
@@ -420,8 +420,8 @@ static void rx_complete (struct urb *urb) | |||
420 | case 0: | 420 | case 0: |
421 | if (skb->len < dev->net->hard_header_len) { | 421 | if (skb->len < dev->net->hard_header_len) { |
422 | entry->state = rx_cleanup; | 422 | entry->state = rx_cleanup; |
423 | dev->stats.rx_errors++; | 423 | dev->net->stats.rx_errors++; |
424 | dev->stats.rx_length_errors++; | 424 | dev->net->stats.rx_length_errors++; |
425 | if (netif_msg_rx_err (dev)) | 425 | if (netif_msg_rx_err (dev)) |
426 | devdbg (dev, "rx length %d", skb->len); | 426 | devdbg (dev, "rx length %d", skb->len); |
427 | } | 427 | } |
@@ -433,7 +433,7 @@ static void rx_complete (struct urb *urb) | |||
433 | * storm, recovering as needed. | 433 | * storm, recovering as needed. |
434 | */ | 434 | */ |
435 | case -EPIPE: | 435 | case -EPIPE: |
436 | dev->stats.rx_errors++; | 436 | dev->net->stats.rx_errors++; |
437 | usbnet_defer_kevent (dev, EVENT_RX_HALT); | 437 | usbnet_defer_kevent (dev, EVENT_RX_HALT); |
438 | // FALLTHROUGH | 438 | // FALLTHROUGH |
439 | 439 | ||
@@ -451,7 +451,7 @@ static void rx_complete (struct urb *urb) | |||
451 | case -EPROTO: | 451 | case -EPROTO: |
452 | case -ETIME: | 452 | case -ETIME: |
453 | case -EILSEQ: | 453 | case -EILSEQ: |
454 | dev->stats.rx_errors++; | 454 | dev->net->stats.rx_errors++; |
455 | if (!timer_pending (&dev->delay)) { | 455 | if (!timer_pending (&dev->delay)) { |
456 | mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); | 456 | mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); |
457 | if (netif_msg_link (dev)) | 457 | if (netif_msg_link (dev)) |
@@ -465,12 +465,12 @@ block: | |||
465 | 465 | ||
466 | /* data overrun ... flush fifo? */ | 466 | /* data overrun ... flush fifo? */ |
467 | case -EOVERFLOW: | 467 | case -EOVERFLOW: |
468 | dev->stats.rx_over_errors++; | 468 | dev->net->stats.rx_over_errors++; |
469 | // FALLTHROUGH | 469 | // FALLTHROUGH |
470 | 470 | ||
471 | default: | 471 | default: |
472 | entry->state = rx_cleanup; | 472 | entry->state = rx_cleanup; |
473 | dev->stats.rx_errors++; | 473 | dev->net->stats.rx_errors++; |
474 | if (netif_msg_rx_err (dev)) | 474 | if (netif_msg_rx_err (dev)) |
475 | devdbg (dev, "rx status %d", urb_status); | 475 | devdbg (dev, "rx status %d", urb_status); |
476 | break; | 476 | break; |
@@ -583,8 +583,8 @@ int usbnet_stop (struct net_device *net) | |||
583 | 583 | ||
584 | if (netif_msg_ifdown (dev)) | 584 | if (netif_msg_ifdown (dev)) |
585 | devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld", | 585 | devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld", |
586 | dev->stats.rx_packets, dev->stats.tx_packets, | 586 | net->stats.rx_packets, net->stats.tx_packets, |
587 | dev->stats.rx_errors, dev->stats.tx_errors | 587 | net->stats.rx_errors, net->stats.tx_errors |
588 | ); | 588 | ); |
589 | 589 | ||
590 | // ensure there are no more active urbs | 590 | // ensure there are no more active urbs |
@@ -891,10 +891,10 @@ static void tx_complete (struct urb *urb) | |||
891 | struct usbnet *dev = entry->dev; | 891 | struct usbnet *dev = entry->dev; |
892 | 892 | ||
893 | if (urb->status == 0) { | 893 | if (urb->status == 0) { |
894 | dev->stats.tx_packets++; | 894 | dev->net->stats.tx_packets++; |
895 | dev->stats.tx_bytes += entry->length; | 895 | dev->net->stats.tx_bytes += entry->length; |
896 | } else { | 896 | } else { |
897 | dev->stats.tx_errors++; | 897 | dev->net->stats.tx_errors++; |
898 | 898 | ||
899 | switch (urb->status) { | 899 | switch (urb->status) { |
900 | case -EPIPE: | 900 | case -EPIPE: |
@@ -1020,7 +1020,7 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) | |||
1020 | devdbg (dev, "drop, code %d", retval); | 1020 | devdbg (dev, "drop, code %d", retval); |
1021 | drop: | 1021 | drop: |
1022 | retval = NET_XMIT_SUCCESS; | 1022 | retval = NET_XMIT_SUCCESS; |
1023 | dev->stats.tx_dropped++; | 1023 | dev->net->stats.tx_dropped++; |
1024 | if (skb) | 1024 | if (skb) |
1025 | dev_kfree_skb_any (skb); | 1025 | dev_kfree_skb_any (skb); |
1026 | usb_free_urb (urb); | 1026 | usb_free_urb (urb); |