Lines Matching refs:net
168 tmp = hex2bin(dev->net->dev_addr, buf, 6); in usbnet_get_ethernet_addr()
194 netif_dbg(dev, ifdown, dev->net, in intr_complete()
202 netdev_dbg(dev->net, "intr status %d\n", status); in intr_complete()
208 netif_err(dev, timer, dev->net, in intr_complete()
328 skb->protocol = eth_type_trans (skb, dev->net); in usbnet_skb_return()
330 dev->net->stats.rx_packets++; in usbnet_skb_return()
331 dev->net->stats.rx_bytes += skb->len; in usbnet_skb_return()
333 netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", in usbnet_skb_return()
342 netif_dbg(dev, rx_err, dev->net, in usbnet_skb_return()
380 int usbnet_change_mtu (struct net_device *net, int new_mtu) in usbnet_change_mtu() argument
382 struct usbnet *dev = netdev_priv(net); in usbnet_change_mtu()
383 int ll_mtu = new_mtu + net->hard_header_len; in usbnet_change_mtu()
392 net->mtu = new_mtu; in usbnet_change_mtu()
394 dev->hard_mtu = net->mtu + net->hard_header_len; in usbnet_change_mtu()
463 netdev_err(dev->net, "kevent %d may have been dropped\n", work); in usbnet_defer_kevent()
465 netdev_dbg(dev->net, "kevent %d scheduled\n", work); in usbnet_defer_kevent()
489 skb = __netdev_alloc_skb(dev->net, size, flags); in rx_submit()
491 skb = __netdev_alloc_skb_ip_align(dev->net, size, flags); in rx_submit()
493 netif_dbg(dev, rx_err, dev->net, "no rx skb\n"); in rx_submit()
509 if (netif_running (dev->net) && in rx_submit()
510 netif_device_present (dev->net) && in rx_submit()
521 netif_dbg(dev, ifdown, dev->net, "device gone\n"); in rx_submit()
522 netif_device_detach (dev->net); in rx_submit()
528 netif_dbg(dev, rx_err, dev->net, in rx_submit()
536 netif_dbg(dev, ifdown, dev->net, "rx: stopped\n"); in rx_submit()
556 dev->net->stats.rx_errors++; in rx_process()
566 dev->net->stats.rx_errors++; in rx_process()
567 dev->net->stats.rx_length_errors++; in rx_process()
568 netif_dbg(dev, rx_err, dev->net, "rx length %d\n", skb->len); in rx_process()
603 dev->net->stats.rx_errors++; in rx_complete()
610 netif_dbg(dev, ifdown, dev->net, in rx_complete()
621 dev->net->stats.rx_errors++; in rx_complete()
624 netif_dbg(dev, link, dev->net, in rx_complete()
635 dev->net->stats.rx_over_errors++; in rx_complete()
640 dev->net->stats.rx_errors++; in rx_complete()
641 netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status); in rx_complete()
659 if (netif_running (dev->net) && in rx_complete()
668 netif_dbg(dev, rx_err, dev->net, "no read resubmitted\n"); in rx_complete()
676 netif_dbg(dev, rx_status, dev->net, "paused rx queue enabled\n"); in usbnet_pause_rx()
694 netif_dbg(dev, rx_status, dev->net, in usbnet_resume_rx()
744 netdev_dbg(dev->net, "unlink urb err, %d\n", retval); in unlink_urbs()
759 if (netif_running(dev->net)) { in usbnet_unlink_rx_urbs()
798 netif_dbg(dev, ifdown, dev->net, in usbnet_terminate_urbs()
804 int usbnet_stop (struct net_device *net) in usbnet_stop() argument
806 struct usbnet *dev = netdev_priv(net); in usbnet_stop()
811 netif_stop_queue (net); in usbnet_stop()
813 netif_info(dev, ifdown, dev->net, in usbnet_stop()
815 net->stats.rx_packets, net->stats.tx_packets, in usbnet_stop()
816 net->stats.rx_errors, net->stats.tx_errors); in usbnet_stop()
825 netif_info(dev, ifdown, dev->net, in usbnet_stop()
866 int usbnet_open (struct net_device *net) in usbnet_open() argument
868 struct usbnet *dev = netdev_priv(net); in usbnet_open()
873 netif_info(dev, ifup, dev->net, in usbnet_open()
884 netif_info(dev, ifup, dev->net, in usbnet_open()
898 netif_dbg(dev, ifup, dev->net, "can't open; %d\n", retval); in usbnet_open()
906 netif_err(dev, ifup, dev->net, in usbnet_open()
913 netif_start_queue (net); in usbnet_open()
914 netif_info(dev, ifup, dev->net, in usbnet_open()
917 dev->net->mtu, in usbnet_open()
955 int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd) in usbnet_get_settings() argument
957 struct usbnet *dev = netdev_priv(net); in usbnet_get_settings()
966 int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd) in usbnet_set_settings() argument
968 struct usbnet *dev = netdev_priv(net); in usbnet_set_settings()
988 u32 usbnet_get_link (struct net_device *net) in usbnet_get_link() argument
990 struct usbnet *dev = netdev_priv(net); in usbnet_get_link()
1001 return ethtool_op_get_link(net); in usbnet_get_link()
1005 int usbnet_nway_reset(struct net_device *net) in usbnet_nway_reset() argument
1007 struct usbnet *dev = netdev_priv(net); in usbnet_nway_reset()
1016 void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) in usbnet_get_drvinfo() argument
1018 struct usbnet *dev = netdev_priv(net); in usbnet_get_drvinfo()
1028 u32 usbnet_get_msglevel (struct net_device *net) in usbnet_get_msglevel() argument
1030 struct usbnet *dev = netdev_priv(net); in usbnet_get_msglevel()
1036 void usbnet_set_msglevel (struct net_device *net, u32 level) in usbnet_set_msglevel() argument
1038 struct usbnet *dev = netdev_priv(net); in usbnet_set_msglevel()
1063 if (!netif_carrier_ok(dev->net)) { in __handle_link_change()
1082 static void usbnet_set_rx_mode(struct net_device *net) in usbnet_set_rx_mode() argument
1084 struct usbnet *dev = netdev_priv(net); in usbnet_set_rx_mode()
1122 netdev_err(dev->net, "can't clear tx halt, status %d\n", in usbnet_deferred_kevent()
1127 netif_wake_queue (dev->net); in usbnet_deferred_kevent()
1142 netdev_err(dev->net, "can't clear rx halt, status %d\n", in usbnet_deferred_kevent()
1155 if (netif_running (dev->net)) in usbnet_deferred_kevent()
1186 netdev_info(dev->net, "link reset failed (%d) usbnet usb-%s-%s, %s\n", in usbnet_deferred_kevent()
1207 netdev_dbg(dev->net, "kevent done, flags = 0x%lx\n", dev->flags); in usbnet_deferred_kevent()
1219 dev->net->stats.tx_packets += entry->packets; in tx_complete()
1220 dev->net->stats.tx_bytes += entry->length; in tx_complete()
1222 dev->net->stats.tx_errors++; in tx_complete()
1244 netif_dbg(dev, link, dev->net, in tx_complete()
1247 netif_stop_queue (dev->net); in tx_complete()
1250 netif_dbg(dev, tx_err, dev->net, in tx_complete()
1262 void usbnet_tx_timeout (struct net_device *net) in usbnet_tx_timeout() argument
1264 struct usbnet *dev = netdev_priv(net); in usbnet_tx_timeout()
1313 struct net_device *net) in usbnet_start_xmit() argument
1315 struct usbnet *dev = netdev_priv(net); in usbnet_start_xmit()
1334 netif_dbg(dev, tx_err, dev->net, "can't tx_fixup skb\n"); in usbnet_start_xmit()
1340 netif_dbg(dev, tx_err, dev->net, "no urb\n"); in usbnet_start_xmit()
1404 netif_stop_queue(net); in usbnet_start_xmit()
1407 netdev_dbg(dev->net, "Delaying transmission for resumption\n"); in usbnet_start_xmit()
1414 netif_stop_queue (net); in usbnet_start_xmit()
1420 netif_dbg(dev, tx_err, dev->net, in usbnet_start_xmit()
1424 netif_trans_update(net); in usbnet_start_xmit()
1427 netif_stop_queue (net); in usbnet_start_xmit()
1432 netif_dbg(dev, tx_err, dev->net, "drop, code %d\n", retval); in usbnet_start_xmit()
1434 dev->net->stats.tx_dropped++; in usbnet_start_xmit()
1443 netif_dbg(dev, tx_queued, dev->net, in usbnet_start_xmit()
1498 netdev_dbg(dev->net, "bogus skb state %d\n", entry->state); in usbnet_bh()
1513 } else if (netif_running (dev->net) && in usbnet_bh()
1514 netif_device_present (dev->net) && in usbnet_bh()
1515 netif_carrier_ok(dev->net) && in usbnet_bh()
1525 netif_dbg(dev, link, dev->net, in usbnet_bh()
1532 netif_wake_queue (dev->net); in usbnet_bh()
1549 struct net_device *net; in usbnet_disconnect() local
1558 netif_info(dev, probe, dev->net, "unregister '%s' usb-%s-%s, %s\n", in usbnet_disconnect()
1563 net = dev->net; in usbnet_disconnect()
1564 unregister_netdev (net); in usbnet_disconnect()
1577 free_netdev(net); in usbnet_disconnect()
1608 struct net_device *net; in usbnet_probe() local
1637 net = alloc_etherdev(sizeof(*dev)); in usbnet_probe()
1638 if (!net) in usbnet_probe()
1642 SET_NETDEV_DEV(net, &udev->dev); in usbnet_probe()
1644 dev = netdev_priv(net); in usbnet_probe()
1667 dev->net = net; in usbnet_probe()
1668 strcpy (net->name, "usb%d"); in usbnet_probe()
1669 memcpy (net->dev_addr, node_id, sizeof node_id); in usbnet_probe()
1674 dev->hard_mtu = net->mtu + net->hard_header_len; in usbnet_probe()
1676 net->netdev_ops = &usbnet_netdev_ops; in usbnet_probe()
1677 net->watchdog_timeo = TX_TIMEOUT_JIFFIES; in usbnet_probe()
1678 net->ethtool_ops = &usbnet_ethtool_ops; in usbnet_probe()
1692 (net->dev_addr [0] & 0x02) == 0)) in usbnet_probe()
1693 strcpy (net->name, "eth%d"); in usbnet_probe()
1696 strcpy(net->name, "wlan%d"); in usbnet_probe()
1699 strcpy(net->name, "wwan%d"); in usbnet_probe()
1703 net->flags |= IFF_NOARP; in usbnet_probe()
1706 if (net->mtu > (dev->hard_mtu - net->hard_header_len)) in usbnet_probe()
1707 net->mtu = dev->hard_mtu - net->hard_header_len; in usbnet_probe()
1731 if (ether_addr_equal(net->dev_addr, node_id)) in usbnet_probe()
1732 net->addr_assign_type = NET_ADDR_RANDOM; in usbnet_probe()
1735 SET_NETDEV_DEVTYPE(net, &wlan_type); in usbnet_probe()
1737 SET_NETDEV_DEVTYPE(net, &wwan_type); in usbnet_probe()
1751 status = register_netdev (net); in usbnet_probe()
1754 netif_info(dev, probe, dev->net, in usbnet_probe()
1759 net->dev_addr); in usbnet_probe()
1764 netif_device_attach (net); in usbnet_probe()
1786 free_netdev(net); in usbnet_probe()
1818 netif_device_detach (dev->net); in usbnet_suspend()
1826 netif_device_attach (dev->net); in usbnet_suspend()
1854 netif_trans_update(dev->net); in usbnet_resume()
1867 if (netif_device_present(dev->net) && in usbnet_resume()
1873 netif_tx_wake_all_queues(dev->net); in usbnet_resume()
1913 netif_carrier_on(dev->net); in usbnet_link_change()
1915 netif_carrier_off(dev->net); in usbnet_link_change()
1931 netdev_dbg(dev->net, "usbnet_read_cmd cmd=0x%02x reqtype=%02x" in __usbnet_read_cmd()
1958 netdev_dbg(dev->net, "usbnet_write_cmd cmd=0x%02x reqtype=%02x" in __usbnet_write_cmd()
2063 netdev_dbg(dev->net, "usbnet_write_cmd cmd=0x%02x reqtype=%02x" in usbnet_write_cmd_async()
2074 netdev_err(dev->net, "Error allocating buffer" in usbnet_write_cmd_async()
2098 netdev_err(dev->net, "Error submitting the control" in usbnet_write_cmd_async()