Measure the receive buffer size in ATM cells (53 bytes).

 speedtouch.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c     Wed Feb  5 16:18:30 2003
+++ b/drivers/usb/misc/speedtouch.c     Wed Feb  5 16:18:30 2003
@@ -90,7 +90,7 @@
 
 #define UDSL_NUMBER_RCV_URBS           1
 #define UDSL_NUMBER_SND_URBS           1
-#define UDSL_RCV_BUFFER_SIZE           64*53
+#define UDSL_RCV_BUFFER_SIZE           (1*64) /* ATM cells */
 /* max should be (1500 IP mtu + 2 ppp bytes + 32 * 5 cellheader overhead) for
  * PPPoA and (1500 + 14 + 32*5 cellheader overhead) for PPPoE */
 #define UDSL_MAX_AAL5_MRU              2048
@@ -312,7 +312,7 @@
                                           instance->usb_dev,
                                           usb_rcvbulkpipe (instance->usb_dev, 
UDSL_ENDPOINT_DATA_IN),
                                           (unsigned char *) rcv->skb->data,
-                                          UDSL_RCV_BUFFER_SIZE,
+                                          UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE,
                                           udsl_complete_receive,
                                           rcv);
                        if (!usb_submit_urb (urb, GFP_ATOMIC))
@@ -355,7 +355,7 @@
                                   instance->usb_dev,
                                   usb_rcvbulkpipe (instance->usb_dev, 
UDSL_ENDPOINT_DATA_IN),
                                   (unsigned char *) rcv->skb->data,
-                                  UDSL_RCV_BUFFER_SIZE,
+                                  UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE,
                                   udsl_complete_receive,
                                   rcv);
 
@@ -809,7 +809,7 @@
        for (i = 0; i < UDSL_NUMBER_RCV_URBS; i++) {
                struct udsl_receiver *rcv = &(instance->all_receivers[i]);
 
-               if (!(rcv->skb = dev_alloc_skb (UDSL_RCV_BUFFER_SIZE))) {
+               if (!(rcv->skb = dev_alloc_skb (UDSL_RCV_BUFFER_SIZE * 
+ATM_CELL_SIZE))) {
                        PDEBUG ("No memory for skb %d!\n", i);
                        err = -ENOMEM;
                        goto fail_urbs;
@@ -825,7 +825,7 @@
 
                list_add (&rcv->list, &instance->spare_receivers);
 
-               PDEBUG ("skb->truesize = %d (asked for %d)\n", rcv->skb->truesize, 
UDSL_RCV_BUFFER_SIZE);
+               PDEBUG ("skb->truesize = %d (asked for %d)\n", rcv->skb->truesize, 
+UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE);
        }
 
        for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) {




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to