ipheth.c (a61944c251c3e68c4bbf6eb96ff61c7b286351c5) | ipheth.c (8ef207d63f8ecc0eae41cded066dd0e0ee170edf) |
---|---|
1/* 2 * ipheth.c - Apple iPhone USB Ethernet driver 3 * 4 * Copyright (c) 2009 Diego Giagio <diego@giagio.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 395 unchanged lines hidden (view full) --- 404{ 405 struct ipheth_device *dev = netdev_priv(net); 406 407 err("%s: TX timeout", __func__); 408 dev->net->stats.tx_errors++; 409 usb_unlink_urb(dev->tx_urb); 410} 411 | 1/* 2 * ipheth.c - Apple iPhone USB Ethernet driver 3 * 4 * Copyright (c) 2009 Diego Giagio <diego@giagio.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 395 unchanged lines hidden (view full) --- 404{ 405 struct ipheth_device *dev = netdev_priv(net); 406 407 err("%s: TX timeout", __func__); 408 dev->net->stats.tx_errors++; 409 usb_unlink_urb(dev->tx_urb); 410} 411 |
412static struct net_device_stats *ipheth_stats(struct net_device *net) 413{ 414 struct ipheth_device *dev = netdev_priv(net); 415 return &dev->net->stats; 416} 417 | |
418static u32 ipheth_ethtool_op_get_link(struct net_device *net) 419{ 420 struct ipheth_device *dev = netdev_priv(net); 421 return netif_carrier_ok(dev->net); 422} 423 424static struct ethtool_ops ops = { 425 .get_link = ipheth_ethtool_op_get_link 426}; 427 428static const struct net_device_ops ipheth_netdev_ops = { | 412static u32 ipheth_ethtool_op_get_link(struct net_device *net) 413{ 414 struct ipheth_device *dev = netdev_priv(net); 415 return netif_carrier_ok(dev->net); 416} 417 418static struct ethtool_ops ops = { 419 .get_link = ipheth_ethtool_op_get_link 420}; 421 422static const struct net_device_ops ipheth_netdev_ops = { |
429 .ndo_open = &ipheth_open, 430 .ndo_stop = &ipheth_close, 431 .ndo_start_xmit = &ipheth_tx, 432 .ndo_tx_timeout = &ipheth_tx_timeout, 433 .ndo_get_stats = &ipheth_stats, | 423 .ndo_open = ipheth_open, 424 .ndo_stop = ipheth_close, 425 .ndo_start_xmit = ipheth_tx, 426 .ndo_tx_timeout = ipheth_tx_timeout, |
434}; 435 436static int ipheth_probe(struct usb_interface *intf, 437 const struct usb_device_id *id) 438{ 439 struct usb_device *udev = interface_to_usbdev(intf); 440 struct usb_host_interface *hintf; 441 struct usb_endpoint_descriptor *endp; --- 129 unchanged lines hidden --- | 427}; 428 429static int ipheth_probe(struct usb_interface *intf, 430 const struct usb_device_id *id) 431{ 432 struct usb_device *udev = interface_to_usbdev(intf); 433 struct usb_host_interface *hintf; 434 struct usb_endpoint_descriptor *endp; --- 129 unchanged lines hidden --- |