diff options
Diffstat (limited to 'drivers/net/usb/kaweth.c')
-rw-r--r-- | drivers/net/usb/kaweth.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 2ee034f70d1c..7cb10a0a5316 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -251,7 +251,6 @@ struct kaweth_device | |||
251 | struct net_device_stats stats; | 251 | struct net_device_stats stats; |
252 | }; | 252 | }; |
253 | 253 | ||
254 | |||
255 | /**************************************************************** | 254 | /**************************************************************** |
256 | * kaweth_control | 255 | * kaweth_control |
257 | ****************************************************************/ | 256 | ****************************************************************/ |
@@ -283,9 +282,9 @@ static int kaweth_control(struct kaweth_device *kaweth, | |||
283 | 282 | ||
284 | dr->bRequestType= requesttype; | 283 | dr->bRequestType= requesttype; |
285 | dr->bRequest = request; | 284 | dr->bRequest = request; |
286 | dr->wValue = cpu_to_le16p(&value); | 285 | dr->wValue = cpu_to_le16(value); |
287 | dr->wIndex = cpu_to_le16p(&index); | 286 | dr->wIndex = cpu_to_le16(index); |
288 | dr->wLength = cpu_to_le16p(&size); | 287 | dr->wLength = cpu_to_le16(size); |
289 | 288 | ||
290 | return kaweth_internal_control_msg(kaweth->dev, | 289 | return kaweth_internal_control_msg(kaweth->dev, |
291 | pipe, | 290 | pipe, |
@@ -975,6 +974,17 @@ static int kaweth_resume(struct usb_interface *intf) | |||
975 | /**************************************************************** | 974 | /**************************************************************** |
976 | * kaweth_probe | 975 | * kaweth_probe |
977 | ****************************************************************/ | 976 | ****************************************************************/ |
977 | |||
978 | |||
979 | static const struct net_device_ops kaweth_netdev_ops = { | ||
980 | .ndo_open = kaweth_open, | ||
981 | .ndo_stop = kaweth_close, | ||
982 | .ndo_start_xmit = kaweth_start_xmit, | ||
983 | .ndo_tx_timeout = kaweth_tx_timeout, | ||
984 | .ndo_set_multicast_list = kaweth_set_rx_mode, | ||
985 | .ndo_get_stats = kaweth_netdev_stats, | ||
986 | }; | ||
987 | |||
978 | static int kaweth_probe( | 988 | static int kaweth_probe( |
979 | struct usb_interface *intf, | 989 | struct usb_interface *intf, |
980 | const struct usb_device_id *id /* from id_table */ | 990 | const struct usb_device_id *id /* from id_table */ |
@@ -1147,22 +1157,13 @@ err_fw: | |||
1147 | memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr, | 1157 | memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr, |
1148 | sizeof(kaweth->configuration.hw_addr)); | 1158 | sizeof(kaweth->configuration.hw_addr)); |
1149 | 1159 | ||
1150 | netdev->open = kaweth_open; | 1160 | netdev->netdev_ops = &kaweth_netdev_ops; |
1151 | netdev->stop = kaweth_close; | ||
1152 | |||
1153 | netdev->watchdog_timeo = KAWETH_TX_TIMEOUT; | 1161 | netdev->watchdog_timeo = KAWETH_TX_TIMEOUT; |
1154 | netdev->tx_timeout = kaweth_tx_timeout; | ||
1155 | |||
1156 | netdev->hard_start_xmit = kaweth_start_xmit; | ||
1157 | netdev->set_multicast_list = kaweth_set_rx_mode; | ||
1158 | netdev->get_stats = kaweth_netdev_stats; | ||
1159 | netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size); | 1162 | netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size); |
1160 | SET_ETHTOOL_OPS(netdev, &ops); | 1163 | SET_ETHTOOL_OPS(netdev, &ops); |
1161 | 1164 | ||
1162 | /* kaweth is zeroed as part of alloc_netdev */ | 1165 | /* kaweth is zeroed as part of alloc_netdev */ |
1163 | |||
1164 | INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); | 1166 | INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl); |
1165 | |||
1166 | usb_set_intfdata(intf, kaweth); | 1167 | usb_set_intfdata(intf, kaweth); |
1167 | 1168 | ||
1168 | #if 0 | 1169 | #if 0 |