Lines 1124-1134
Link Here
|
1124 |
} |
1124 |
} |
1125 |
EXPORT_SYMBOL_GPL(usbnet_disconnect); |
1125 |
EXPORT_SYMBOL_GPL(usbnet_disconnect); |
1126 |
|
1126 |
|
|
|
1127 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) |
1128 |
static const struct net_device_ops rndisLiteNetDevOps = |
1129 |
{ |
1130 |
.ndo_open = usbnet_open, |
1131 |
.ndo_stop = usbnet_stop, |
1132 |
.ndo_start_xmit = usbnet_start_xmit, |
1133 |
.ndo_get_stats = usbnet_get_stats, |
1134 |
.ndo_change_mtu = usbnet_change_mtu, |
1135 |
.ndo_tx_timeout = usbnet_tx_timeout, |
1136 |
}; |
1137 |
#endif |
1127 |
|
1138 |
|
1128 |
/*-------------------------------------------------------------------------*/ |
1139 |
/*-------------------------------------------------------------------------*/ |
1129 |
|
1140 |
|
1130 |
// precondition: never called in_interrupt |
1141 |
// precondition: never called in_interrupt |
1131 |
|
|
|
1132 |
int |
1142 |
int |
1133 |
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) |
1143 |
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) |
1134 |
{ |
1144 |
{ |
Lines 1196-1208
Link Here
|
1196 |
net->features |= NETIF_F_HIGHDMA; |
1206 |
net->features |= NETIF_F_HIGHDMA; |
1197 |
#endif |
1207 |
#endif |
1198 |
|
1208 |
|
|
|
1209 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) |
1210 |
net->netdev_ops=&rndisLiteNetDevOps; |
1211 |
#else |
1199 |
net->change_mtu = usbnet_change_mtu; |
1212 |
net->change_mtu = usbnet_change_mtu; |
1200 |
net->get_stats = usbnet_get_stats; |
1213 |
net->get_stats = usbnet_get_stats; |
1201 |
net->hard_start_xmit = usbnet_start_xmit; |
1214 |
net->hard_start_xmit = usbnet_start_xmit; |
1202 |
net->open = usbnet_open; |
1215 |
net->open = usbnet_open; |
1203 |
net->stop = usbnet_stop; |
1216 |
net->stop = usbnet_stop; |
1204 |
net->watchdog_timeo = TX_TIMEOUT_JIFFIES; |
|
|
1205 |
net->tx_timeout = usbnet_tx_timeout; |
1217 |
net->tx_timeout = usbnet_tx_timeout; |
|
|
1218 |
#endif |
1219 |
|
1220 |
net->watchdog_timeo = TX_TIMEOUT_JIFFIES; |
1206 |
net->ethtool_ops = &usbnet_ethtool_ops; |
1221 |
net->ethtool_ops = &usbnet_ethtool_ops; |
1207 |
|
1222 |
|
1208 |
// allow device-specific bind/init procedures |
1223 |
// allow device-specific bind/init procedures |