Hello Ivo, I don't develop rt2x00 and I'm not sure about my solution, so of course decision is up to you, just wanted to suggest you sth. 2011/4/18 Ivo van Doorn <ivdoorn@xxxxxxxxx>: > From: Ivo van Doorn <IvDoorn@xxxxxxxxx> > > All register reads/writes in rt2800usb were previously done with > rt2800_register_read/rt2800_register_write. These however indirectly > call rt2x00usb_register_read/rt2x00usb_register_write which adds an > additional overhead of at least one call and several move instructions > to each register access. > > Replacing the calls to rt2800_register_read/rt2800_register_write with > direct calls to rt2x00usb_register_read/rt2x00usb_register_write gets > rid of quite a number of instructions in the drivers hotpaths (IRQ > handling and txdone handling). > > For consistency replace all references to rt2800_register_read/write > with the rt2x00usb_register_read/write variants. This way you loose abstraction of writes/reads for usb vs. pci. And you still can not optimize rt2800lib code which is shared between usb and pci. Wouldn't this be better to create two pointers in struct rt2x00_dev. One for writing function and one for reading function? Am I right thinking calling functions by pointers is quite fast? Or is this still noticeably slower than using proper functions directly? -- RafaÅ -- 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