MLK-16369 eth: fec: Fix DM driver issue in recv
authorYe Li <ye.li@nxp.com>
Tue, 5 Sep 2017 06:45:21 +0000 (01:45 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:16 +0000 (02:37 +0800)
commit058a6b2573b0bc18661469e0268bd57f16cbbc5f
treefe73634f52154c59e0899a55b255311a017e43a0
parent10c55182c18ef126558c2a87620cd3e8b63cd4d7
MLK-16369 eth: fec: 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>
drivers/net/fec_mxc.c