net: fec_mxc: Fix DM driver issue in recv
authorYe Li <ye.li@nxp.com>
Wed, 28 Mar 2018 12:54:11 +0000 (20:54 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 13 Apr 2018 20:47:37 +0000 (15:47 -0500)
commit07763ac9282f8d72c0f1e7d6c863a107997cbc3e
tree89fb25c9691ced06841a617bd41a80df5614c735
parent0a85f024c5e84ccaf3b908f0b1d381f5ecf89602
net: fec_mxc: Fix DM driver issue in recv

When using ethernet DM driver, the recv interface has a
change with non-DM interface, that driver needs to set
the packet pointer and provide it to upper layer to process.

In fec driver, the fecmxc_recv functions does not handle the
packet pointer parameter. This may cause crash in upper layer
processing because the packet pointer is not set.

This patch allocates a buffer for the packet pointer and free it
through free_pkt interface.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/fec_mxc.c