* [PATCH 2/10] Staging: epl: convert to netdev_ops
@ 2009-03-29 15:24 Alexander Beregalov
2009-03-29 20:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Beregalov @ 2009-03-29 15:24 UTC (permalink / raw)
To: gregkh, linux-kernel, netdev
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/staging/epl/VirtualEthernetLinux.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/epl/VirtualEthernetLinux.c b/drivers/staging/epl/VirtualEthernetLinux.c
index 21206c4..077724a 100644
--- a/drivers/staging/epl/VirtualEthernetLinux.c
+++ b/drivers/staging/epl/VirtualEthernetLinux.c
@@ -284,6 +284,17 @@ static tEplKernel VEthRecvFrame(tEplFrameInfo * pFrameInfo_p)
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 Ret = kEplSuccessful;
@@ -299,11 +310,7 @@ tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p)
goto Exit;
}
- pVEthNetDevice_g->open = VEthOpen;
- pVEthNetDevice_g->stop = VEthClose;
- pVEthNetDevice_g->get_stats = VEthGetStats;
- pVEthNetDevice_g->hard_start_xmit = VEthXmit;
- pVEthNetDevice_g->tx_timeout = VEthTimeout;
+ pVEthNetDevice_g->netdev_ops = &epl_netdev_ops;
pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT;
pVEthNetDevice_g->destructor = free_netdev;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/10] Staging: epl: convert to netdev_ops
2009-03-29 15:24 [PATCH 2/10] Staging: epl: convert to netdev_ops Alexander Beregalov
@ 2009-03-29 20:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-03-29 20:49 UTC (permalink / raw)
To: a.beregalov; +Cc: gregkh, linux-kernel, netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Sun, 29 Mar 2009 19:24:32 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-29 20:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 15:24 [PATCH 2/10] Staging: epl: convert to netdev_ops Alexander Beregalov
2009-03-29 20:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox