On Wednesday 04 May 2011 18:52:58 Andrew V. Stepanov wrote: > I think it is possible to align SKB frames in carl9170.ko driver. > > rt2800usb do such think in next way: > > void rt2x00queue_align_frame(struct sk_buff *skb) > { > »···unsigned int frame_length = skb->len; > »···unsigned int align = ALIGN_SIZE(skb, 0); > > »···if (!align) > »···»···return; > > »···skb_push(skb, align); > »···memmove(skb->data, skb->data + align, frame_length); > »···skb_trim(skb, frame_length); > } > > What do you think about this? No that's wrong, here's the comment from rt2x00queue.c "When DMA allocation is required we should guarantee to the driver that the DMA is aligned to a 4-byte boundary. However some drivers require L2 padding to pad the payload rather then the header. This could be a requirement for PCI and USB devices, while header alignment only is valid for PCI devices." Do you see the difference there; header alignment is only needed for PCI whereas rt2800usb hw/fw allows just the L2 data to be padded and sadly AR9170 hw does not have this feature. Also, someone <https://patchwork.kernel.org/patch/98997/> added bounce buffers to musb some time ago, so why not use this approach instead? The advantage is that you won't need to modify any other drivers when you will (inevitable) replace the device with a better one, right? Regards, Chr -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html