mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
net: switch kaweth driver to netdevops
This converts the kaweth ethernet USB driver to netdevops. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
283a21d3e1
commit
321ea8b2d3
1 changed files with 12 additions and 11 deletions
|
@ -251,7 +251,6 @@ struct kaweth_device
|
||||||
struct net_device_stats stats;
|
struct net_device_stats stats;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
* kaweth_control
|
* kaweth_control
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
@ -975,6 +974,17 @@ static int kaweth_resume(struct usb_interface *intf)
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
* kaweth_probe
|
* kaweth_probe
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
static const struct net_device_ops kaweth_netdev_ops = {
|
||||||
|
.ndo_open = kaweth_open,
|
||||||
|
.ndo_stop = kaweth_close,
|
||||||
|
.ndo_start_xmit = kaweth_start_xmit,
|
||||||
|
.ndo_tx_timeout = kaweth_tx_timeout,
|
||||||
|
.ndo_set_multicast_list = kaweth_set_rx_mode,
|
||||||
|
.ndo_get_stats = kaweth_netdev_stats,
|
||||||
|
};
|
||||||
|
|
||||||
static int kaweth_probe(
|
static int kaweth_probe(
|
||||||
struct usb_interface *intf,
|
struct usb_interface *intf,
|
||||||
const struct usb_device_id *id /* from id_table */
|
const struct usb_device_id *id /* from id_table */
|
||||||
|
@ -1147,22 +1157,13 @@ err_fw:
|
||||||
memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr,
|
memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr,
|
||||||
sizeof(kaweth->configuration.hw_addr));
|
sizeof(kaweth->configuration.hw_addr));
|
||||||
|
|
||||||
netdev->open = kaweth_open;
|
netdev->netdev_ops = &kaweth_netdev_ops;
|
||||||
netdev->stop = kaweth_close;
|
|
||||||
|
|
||||||
netdev->watchdog_timeo = KAWETH_TX_TIMEOUT;
|
netdev->watchdog_timeo = KAWETH_TX_TIMEOUT;
|
||||||
netdev->tx_timeout = kaweth_tx_timeout;
|
|
||||||
|
|
||||||
netdev->hard_start_xmit = kaweth_start_xmit;
|
|
||||||
netdev->set_multicast_list = kaweth_set_rx_mode;
|
|
||||||
netdev->get_stats = kaweth_netdev_stats;
|
|
||||||
netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size);
|
netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size);
|
||||||
SET_ETHTOOL_OPS(netdev, &ops);
|
SET_ETHTOOL_OPS(netdev, &ops);
|
||||||
|
|
||||||
/* kaweth is zeroed as part of alloc_netdev */
|
/* kaweth is zeroed as part of alloc_netdev */
|
||||||
|
|
||||||
INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl);
|
INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl);
|
||||||
|
|
||||||
usb_set_intfdata(intf, kaweth);
|
usb_set_intfdata(intf, kaweth);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in a new issue