Patchwork [2/4] ctcm: convert to net_device_ops

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date Jan. 9, 2009, 9:01 a.m.
Message ID <20090109090221.211457000@de.ibm.com>
Download mbox | patch
Permalink /patch/17480/
State Superseded
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - Jan. 9, 2009, 9:01 a.m.
From: Frank Blaschka <frank.blaschka@de.ibm.com>

ctcm convert to net_device_ops.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/ctcm_main.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Patch

Index: git_linus/drivers/s390/net/ctcm_main.c
===================================================================
--- git_linus.orig/drivers/s390/net/ctcm_main.c
+++ git_linus/drivers/s390/net/ctcm_main.c
@@ -1099,15 +1099,19 @@  static void ctcm_free_netdevice(struct n
 
 struct mpc_group *ctcmpc_init_mpc_group(struct ctcm_priv *priv);
 
+static struct net_device_ops ctcm_netdev_ops = {
+	.ndo_open		= ctcm_open,
+	.ndo_stop		= ctcm_close,
+	.ndo_get_stats		= ctcm_stats,
+	.ndo_change_mtu	   	= ctcm_change_mtu,
+};
+
 void static ctcm_dev_setup(struct net_device *dev)
 {
-	dev->open = ctcm_open;
-	dev->stop = ctcm_close;
-	dev->get_stats = ctcm_stats;
-	dev->change_mtu = ctcm_change_mtu;
 	dev->type = ARPHRD_SLIP;
 	dev->tx_queue_len = 100;
 	dev->flags = IFF_POINTOPOINT | IFF_NOARP;
+	dev->netdev_ops = &ctcm_netdev_ops;
 }
 
 /*
@@ -1157,12 +1161,12 @@  static struct net_device *ctcm_init_netd
 		dev->mtu = MPC_BUFSIZE_DEFAULT -
 				TH_HEADER_LENGTH - PDU_HEADER_LENGTH;
 
-		dev->hard_start_xmit = ctcmpc_tx;
+		ctcm_netdev_ops.ndo_start_xmit = ctcmpc_tx;
 		dev->hard_header_len = TH_HEADER_LENGTH + PDU_HEADER_LENGTH;
 		priv->buffer_size = MPC_BUFSIZE_DEFAULT;
 	} else {
 		dev->mtu = CTCM_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2;
-		dev->hard_start_xmit = ctcm_tx;
+		ctcm_netdev_ops.ndo_start_xmit = ctcm_tx;
 		dev->hard_header_len = LL_HEADER_LENGTH + 2;
 	}