sitara_depot/components/free_rtos/ethernet/eth_ioctl.c

42 lines
1.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* eth_ioctl.c
*
* Created on: 10 мар. 2023 г.
* Author: sychev
*/
#include "free_rtos/ethernet/eth_ioctl.h"
#include <networking/enet/core/include/per/icssg.h>
int32_t eth_ioctl(Enet_Handle handle, uint32_t core_id, uint32_t cmd, Enet_IoctlPrms * param)
{
int32_t status = ENET_SOK;
/**
* Если нужны другие команды, то добавить сюда.
*/
switch(cmd)
{
case ENET_PER_IOCTL_IS_PORT_LINK_UP:
{
ENET_IOCTL(handle, core_id, ENET_PER_IOCTL_IS_PORT_LINK_UP, param, status);
}
break;
case ICSSG_PER_IOCTL_SET_PORT_STATE:
{
ENET_IOCTL(handle, core_id, ICSSG_PER_IOCTL_SET_PORT_STATE, param, status);
}
break;
case ICSSG_HOSTPORT_IOCTL_SET_MACADDR:
{
ENET_IOCTL(handle, core_id, ICSSG_HOSTPORT_IOCTL_SET_MACADDR, param, status);
}
break;
default:
status = ENET_EFAIL;
break;
}
return status;
}