net: mscc: fix the frame extraction into the skb
authorAntoine Tenart <antoine.tenart@bootlin.com>
Thu, 20 Sep 2018 10:08:54 +0000 (12:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Sep 2018 16:07:50 +0000 (09:07 -0700)
commit652ef42c134da1bbb03bd4c9b4291dfaf8d7febb
tree66ace22a719b17ce6d287e311d107e7621987b97
parent10bc6a6042c900934a097988b5d50e3cf3f91781
net: mscc: fix the frame extraction into the skb

When extracting frames from the Ocelot switch, the frame check sequence
(FCS) is present at the end of the data extracted. The FCS was put into
the sk buffer which introduced some issues (as length related ones), as
the FCS shouldn't be part of an Rx sk buffer.

This patch fixes the Ocelot switch extraction behaviour by discarding
the FCS.

Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_board.c