usbnet: smsc95xx: simplify tx_fixup code
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 14 Nov 2018 11:50:20 +0000 (11:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Nov 2018 04:16:19 +0000 (20:16 -0800)
commit0c8b26556c6f6abf84bca67ce2c2e010953bba81
tree1c55bba33cb2a24586f7312362d427ee7d71b304
parent810eeb1f41a9a272eedc94ca18c072e75678ede4
usbnet: smsc95xx: simplify tx_fixup code

The smsc95xx_tx_fixup is doing multiple calls to skb_push() to
put an 8-byte command header onto the packet. It would be easier
to do one skb_push() and then copy the data in once the push is
done.

We also make the code smaller by using proper unaligned puts for
the header. This merges in the CPU to LE32 conversion as well and
makes the whole sequence easier to understand hopefully.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c