Commit 0e46ff33 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by Greg Kroah-Hartman

Staging: epl: convert to netdev_ops

Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3a323682
...@@ -284,6 +284,17 @@ static tEplKernel VEthRecvFrame(tEplFrameInfo * pFrameInfo_p) ...@@ -284,6 +284,17 @@ static tEplKernel VEthRecvFrame(tEplFrameInfo * pFrameInfo_p)
return Ret; return Ret;
} }
static const struct net_device_ops epl_netdev_ops = {
.ndo_open = VEthOpen,
.ndo_stop = VEthClose,
.ndo_get_stats = VEthGetStats,
.ndo_start_xmit = VEthXmit,
.ndo_tx_timeout = VEthTimeout,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
...@@ -299,11 +310,7 @@ tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) ...@@ -299,11 +310,7 @@ tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p)
goto Exit; goto Exit;
} }
pVEthNetDevice_g->open = VEthOpen; pVEthNetDevice_g->netdev_ops = &epl_netdev_ops;
pVEthNetDevice_g->stop = VEthClose;
pVEthNetDevice_g->get_stats = VEthGetStats;
pVEthNetDevice_g->hard_start_xmit = VEthXmit;
pVEthNetDevice_g->tx_timeout = VEthTimeout;
pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT; pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT;
pVEthNetDevice_g->destructor = free_netdev; pVEthNetDevice_g->destructor = free_netdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment