]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit388ab45cbb06f7b02602d6f856f4ca82854f8c63
tree1c55bba33cb2a24586f7312362d427ee7d71b304
parent781cc9c7187c95013cb4e7baf0767e4eda8bd924
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