In usbnet.c driver, there is function pointer called .ndo_start_xmit which gets called whenever there is a packet to be transmitted from the upper layers. Can it be called twice for the same packet and in what cases ??
If the USB endpoint buffers are full, then the tx_complete will call netif_stop_queue to diable queuing of packets into the queue from where .ndo_start_xmit fetches the packet to be transmitted to the USB subsystem. So when the the USB endpoints buffer space is available after the short period , then again netif_wake_queue gets called that enables queueing of packets again in the queue so that the urbs(packets) are passed to the USB subsystem.
Is my understanding correct ?.
-Sumeet