netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/10] Staging: et131x: convert to netdev_ops
@ 2009-03-29 15:25 Alexander Beregalov
  2009-03-29 20:49 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Beregalov @ 2009-03-29 15:25 UTC (permalink / raw)
  To: gregkh, linux-kernel, netdev



Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---

 drivers/staging/et131x/et131x_netdev.c |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c
index de65972..951c73d 100644
--- a/drivers/staging/et131x/et131x_netdev.c
+++ b/drivers/staging/et131x/et131x_netdev.c
@@ -112,6 +112,19 @@ void et131x_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
 void et131x_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
 void et131x_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
 
+static const struct net_device_ops et131x_netdev_ops = {
+	.ndo_open		= et131x_open,
+	.ndo_stop		= et131x_close,
+	.ndo_start_xmit		= et131x_tx,
+	.ndo_set_multicast_list	= et131x_multicast,
+	.ndo_tx_timeout		= et131x_tx_timeout,
+	.ndo_change_mtu		= et131x_change_mtu,
+	.ndo_set_mac_address	= et131x_set_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_get_stats		= et131x_stats,
+	.ndo_do_ioctl		= et131x_ioctl,
+};
+
 /**
  * et131x_device_alloc
  *
@@ -142,16 +155,8 @@ struct net_device *et131x_device_alloc(void)
 	 */
 	//netdev->init               = &et131x_init;
 	//netdev->set_config = &et131x_config;
-	netdev->get_stats = &et131x_stats;
-	netdev->open = &et131x_open;
-	netdev->stop = &et131x_close;
-	netdev->do_ioctl = &et131x_ioctl;
-	netdev->set_multicast_list = &et131x_multicast;
-	netdev->hard_start_xmit = &et131x_tx;
-	netdev->tx_timeout = &et131x_tx_timeout;
 	netdev->watchdog_timeo = ET131X_TX_TIMEOUT;
-	netdev->change_mtu = &et131x_change_mtu;
-	netdev->set_mac_address = &et131x_set_mac_addr;
+	netdev->netdev_ops = &et131x_netdev_ops;
 
 	//netdev->ethtool_ops        = &et131x_ethtool_ops;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/10] Staging: et131x: convert to netdev_ops
  2009-03-29 15:25 [PATCH 3/10] Staging: et131x: 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:25:33 +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:25 [PATCH 3/10] Staging: et131x: 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;
as well as URLs for NNTP newsgroup(s).