diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2009-01-09 03:43:57 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 14:02:42 -0800 |
commit | 69b3aa609cab34928931b86632316d065ba17ba3 (patch) | |
tree | 2da921bc5c2d3f59a14b8e773615bd31f8e61b37 | |
parent | 0e0b46d80f8768c465c14994aba91ee714b0d7b7 (diff) | |
download | kernel-crypto-69b3aa609cab34928931b86632316d065ba17ba3.tar.gz kernel-crypto-69b3aa609cab34928931b86632316d065ba17ba3.tar.xz kernel-crypto-69b3aa609cab34928931b86632316d065ba17ba3.zip |
ctcm: convert to net_device_ops
ctcm convert to net_device_ops.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/net/ctcm_main.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 2678573bece..8f2a888d0a0 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -1099,12 +1099,24 @@ static void ctcm_free_netdevice(struct net_device *dev) struct mpc_group *ctcmpc_init_mpc_group(struct ctcm_priv *priv); +static const 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, + .ndo_start_xmit = ctcm_tx, +}; + +static const struct net_device_ops ctcm_mpc_netdev_ops = { + .ndo_open = ctcm_open, + .ndo_stop = ctcm_close, + .ndo_get_stats = ctcm_stats, + .ndo_change_mtu = ctcm_change_mtu, + .ndo_start_xmit = ctcmpc_tx, +}; + 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; @@ -1157,12 +1169,12 @@ static struct net_device *ctcm_init_netdevice(struct ctcm_priv *priv) dev->mtu = MPC_BUFSIZE_DEFAULT - TH_HEADER_LENGTH - PDU_HEADER_LENGTH; - dev->hard_start_xmit = ctcmpc_tx; + dev->netdev_ops = &ctcm_mpc_netdev_ops; 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; + dev->netdev_ops = &ctcm_netdev_ops; dev->hard_header_len = LL_HEADER_LENGTH + 2; } |