patch-2.4.21 linux-2.4.21/drivers/usb/kaweth.c
Next file: linux-2.4.21/drivers/usb/kbtab.c
Previous file: linux-2.4.21/drivers/usb/ibmcam.c
Back to the patch index
Back to the overall index
- Lines: 89
- Date:
2003-06-13 07:51:36.000000000 -0700
- Orig file:
linux-2.4.20/drivers/usb/kaweth.c
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/usb/kaweth.c linux-2.4.21/drivers/usb/kaweth.c
@@ -74,7 +74,7 @@
#include "kawethfw.h"
-#define KAWETH_MTU 1514
+#define KAWETH_MTU 1500
#define KAWETH_BUF_SIZE 1664
#define KAWETH_TX_TIMEOUT (5 * HZ)
#define KAWETH_SCRATCH_SIZE 32
@@ -131,6 +131,7 @@
{ USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */
{ USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
{ USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */
+ { USB_DEVICE(0x0506, 0x11f8) }, /* 3Com 3C460 */
{ USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */
{ USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */
{ USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
@@ -142,6 +143,7 @@
{ USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */
{ USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */
{ USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */
+ { USB_DEVICE(0x0785, 0x0002) }, /* NTT-TE MN128 USB-Ethernet Adapter */
{ USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */
{ USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */
{ USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */
@@ -691,7 +693,7 @@
kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
netif_wake_queue(kaweth->net);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
}
/****************************************************************
@@ -700,7 +702,7 @@
static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
{
struct kaweth_device *kaweth = net->priv;
- char *private_header;
+ u16 *private_header;
int res;
@@ -709,7 +711,7 @@
if (kaweth->removed) {
/* our device is undergoing disconnection - we bail out */
spin_unlock(&kaweth->device_lock);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
return 0;
}
@@ -721,7 +723,7 @@
/* no such luck - we make our own */
struct sk_buff *copied_skb;
copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
- dev_kfree_skb_any(skb);
+ dev_kfree_skb_irq(skb);
skb = copied_skb;
if (!copied_skb) {
kaweth->stats.tx_errors++;
@@ -732,7 +734,7 @@
}
private_header = __skb_push(skb, 2);
- *private_header = cpu_to_le16(skb->len);
+ *private_header = cpu_to_le16(skb->len-2);
kaweth->tx_skb = skb;
FILL_BULK_URB(kaweth->tx_urb,
@@ -751,7 +753,7 @@
kaweth->stats.tx_errors++;
netif_start_queue(net);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
}
else
{
@@ -1034,7 +1036,8 @@
kaweth->net->hard_start_xmit = kaweth_start_xmit;
kaweth->net->set_multicast_list = kaweth_set_rx_mode;
kaweth->net->get_stats = kaweth_netdev_stats;
- kaweth->net->mtu = le16_to_cpu(kaweth->configuration.segment_size);
+ kaweth->net->mtu = le16_to_cpu(kaweth->configuration.segment_size < KAWETH_MTU ?
+ kaweth->configuration.segment_size : KAWETH_MTU);
memset(&kaweth->stats, 0, sizeof(kaweth->stats));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)