drivers: eth_mcux: Avoid using deprecated SDK function
The SDK function ENET_SetCallback is deprecated and has been removed in the latest SDK. Update the driver to set the callback during Init by using the callback config param. Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
parent
2ea2d37d60
commit
24f2dd059e
1 changed files with 2 additions and 1 deletions
|
@ -1042,6 +1042,8 @@ static void eth_mcux_init(const struct device *dev)
|
|||
enet_config.interrupt |= kENET_MiiInterrupt;
|
||||
#endif
|
||||
enet_config.miiMode = kENET_RmiiMode;
|
||||
enet_config.callback = eth_callback;
|
||||
enet_config.userData = context;
|
||||
|
||||
if (IS_ENABLED(CONFIG_ETH_MCUX_PROMISCUOUS_MODE)) {
|
||||
enet_config.macSpecialConfig |= kENET_ControlPromiscuousEnable;
|
||||
|
@ -1098,7 +1100,6 @@ static void eth_mcux_init(const struct device *dev)
|
|||
/* Enable reclaim of tx descriptors that will have the tx timestamp */
|
||||
ENET_SetTxReclaim(&context->enet_handle, true, 0);
|
||||
#endif
|
||||
ENET_SetCallback(&context->enet_handle, eth_callback, context);
|
||||
|
||||
eth_mcux_phy_start(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue