Vivek Kumar Bhagat [off-list ref] writes:
Dear Bjorn,
quoted
quoted
This is wrong. There are usbnet minidrivers depending on info->tx_fixup
being called with a NULL skb.
Also, if dev_hard_start_xmit() ensures that skb can not be NULL in usbnet_start_xmit()
then we should remove below check.
if (skb) <--- This check is confusing which says skb can be NULL.
skb_tx_timestamp(skb);
No, that test is there because of the ugly hack in cdc_ncm. It doesn't
go through dev_hard_start_xmit(), but calls usbnet_start_xmit() directly
with a NULL skb as a signal to itself. Yes, I told you it was ugly ;)
I do agree that it would be nice to make this go away. But until that
happens usbnet_start_xmit() has to deal with NULL skbs, forwarding them
to the tx_fixup hook.
Bjørn