rx_process for isoc

Stanislaw Gruszka stf_xl at wp.pl
Fri Nov 18 10:21:28 EST 2005


Hi all, hi Duncan

I wonder what for you make so complicated usbatm_rx_process 
for isoc frames. For me any benefit for such code is calling 
usbatm_extract_cells only one when all frames have 
actual_length == packet_size. Is that correct?
Why something like this is not enough?

if (usb_pipeisoc(urb->pipe)) {
	int i;

	for (i = 0; i < urb->number_of_packets; i++) {
		if (!urb->iso_frame_desc[i].status) {
			unsigned int len = urb->iso_frame_desc[i].actual_length;
			u8 *buf = urb->transfer_buffer + urb->iso_frame_desc[i].offset;

			usbatm_extract_cells(instance, buf, len);
		} else {
			atm_rldbg(instance, "%s: status %d in frame %d!\n", __func__, urb->isoc_frame_desc[i].status, i);
			instance->buf_usage = 0;
		}
	}
} else


__
Regards
Staszek Gruszka






More information about the Usbatm mailing list