USB modem data accumulation


I make an application for streaming over USB modem U308 on Linux Ubuntu 2.6.34sb2 over UDP.
And I’m trying to find a method to control how many bytes/packets are stuck on USB modem.

In sierra.c:
469 static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count)
498 portdata->outstanding_urbs++;
outstanding_urbs seems to control amount of packets that are being sent by USB modem.

it’s decremented in
441 static void sierra_outdat_callback(struct urb *urb)
460 --portdata->outstanding_urbs;

But unfortunately line 460 doesn’t mean that packet was really sent.
Is there any way to control real amount of data being sent by USB Modem?