diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-03-29 11:24:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 14:06:24 -0400 |
commit | 0e46ff33d4a698bf0b69fec0eab076d65709e357 (patch) | |
tree | 85ac696b796fbde8f51da398ce34794b28d91ff1 /drivers | |
parent | 3a3236827372a1d3ddfb2ea8abf84ba89e856b44 (diff) |
Staging: epl: convert to netdev_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 21206c4d22ff..077724a556cc 100644 --- a/drivers/staging/epl/VirtualEthernetLinux.c +++ b/drivers/staging/epl/VirtualEthernetLinux.c | |||
@@ -284,6 +284,17 @@ static tEplKernel VEthRecvFrame(tEplFrameInfo * pFrameInfo_p) | |||
284 | return Ret; | 284 | return Ret; |
285 | } | 285 | } |
286 | 286 | ||
287 | static const struct net_device_ops epl_netdev_ops = { | ||
288 | .ndo_open = VEthOpen, | ||
289 | .ndo_stop = VEthClose, | ||
290 | .ndo_get_stats = VEthGetStats, | ||
291 | .ndo_start_xmit = VEthXmit, | ||
292 | .ndo_tx_timeout = VEthTimeout, | ||
293 | .ndo_change_mtu = eth_change_mtu, | ||
294 | .ndo_set_mac_address = eth_mac_addr, | ||
295 | .ndo_validate_addr = eth_validate_addr, | ||
296 | }; | ||
297 | |||
287 | tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) | 298 | tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) |
288 | { | 299 | { |
289 | tEplKernel Ret = kEplSuccessful; | 300 | tEplKernel Ret = kEplSuccessful; |
@@ -299,11 +310,7 @@ tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) | |||
299 | goto Exit; | 310 | goto Exit; |
300 | } | 311 | } |
301 | 312 | ||
302 | pVEthNetDevice_g->open = VEthOpen; | 313 | pVEthNetDevice_g->netdev_ops = &epl_netdev_ops; |
303 | pVEthNetDevice_g->stop = VEthClose; | ||
304 | pVEthNetDevice_g->get_stats = VEthGetStats; | ||
305 | pVEthNetDevice_g->hard_start_xmit = VEthXmit; | ||
306 | pVEthNetDevice_g->tx_timeout = VEthTimeout; | ||
307 | pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT; | 314 | pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT; |
308 | pVEthNetDevice_g->destructor = free_netdev; | 315 | pVEthNetDevice_g->destructor = free_netdev; |
309 | 316 | ||