s390: net drivers convert to net_device_ops
Subsystems (5)
cover s390: net drivers convert to net_device_ops
Hi Dave,
here are the remaining (fixed) net_device_ops patches for s390 net drivers
lcs: convert to net_device_ops
ctcm: convert to net_device_ops
netiucv: convert to net_device_ops
claw: convert to net_device_ops
qeth: fix usage of netdev_ops
Thanks,
Frank
PATCH 1/5 lcs: convert to net_device_ops
From: Frank Blaschka <[email protected]>
lcs convert to net_device_ops.
--- drivers/s390/net/lcs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/s390/net/lcs.c +16 -5
@@ -2097,6 +2097,20 @@ lcs_register_netdev(struct ccwgroup_devi/** * lcs_new_device will be called by setting the group device online. */ +static const struct net_device_ops lcs_netdev_ops = { + .ndo_open = lcs_open_device, + .ndo_stop = lcs_stop_device, + .ndo_get_stats = lcs_getstats, + .ndo_start_xmit = lcs_start_xmit, +}; + +static const struct net_device_ops lcs_mc_netdev_ops = { + .ndo_open = lcs_open_device, + .ndo_stop = lcs_stop_device, + .ndo_get_stats = lcs_getstats, + .ndo_start_xmit = lcs_start_xmit, + .ndo_set_multicast_list = lcs_set_multicast_list, +};static int lcs_new_device (struct ccwgroup_device *ccwgdev)
@@ -2164,14 +2178,11 @@ lcs_new_device(struct ccwgroup_device *c goto out; card->dev = dev; card->dev->ml_priv = card; - card->dev->open = lcs_open_device; - card->dev->stop = lcs_stop_device; - card->dev->hard_start_xmit = lcs_start_xmit; - card->dev->get_stats = lcs_getstats; + card->dev->netdev_ops = &lcs_netdev_ops;memcpy (card->dev->dev_addr, card->mac,LCS_MAC_LENGTH );#ifdef CONFIG_IP_MULTICAST if (!lcs_check_multicast_support (card)) - card->dev->set_multicast_list = lcs_set_multicast_list; + card->dev->netdev_ops = &lcs_mc_netdev_ops;#endif netdev_out:lcs_set_allowed_threads (card,0xffffffff );
PATCH 2/5 ctcm: convert to net_device_ops
In reply to [email protected]From: Frank Blaschka <[email protected]>
ctcm convert to net_device_ops.
--- drivers/s390/net/ctcm_main.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/s390/net/ctcm_main.c +18 -6
@@ -1099,12 +1099,24 @@ static void ctcm_free_netdevice(struct nstruct 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_netd 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 ; }
PATCH 3/5 netiucv: convert to net_device_ops
In reply to [email protected]From: Frank Blaschka <[email protected]>
netiucv convert to net_device_ops.
--- drivers/s390/net/netiucv.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/s390/net/netiucv.c +9 -5
@@ -1876,20 +1876,24 @@ static void netiucv_free_netdevice(struc/** * Initialize a net device. (Called from kernel in alloc_netdev()) */ +static const struct net_device_ops netiucv_netdev_ops = { + .ndo_open = netiucv_open, + .ndo_stop = netiucv_close, + .ndo_get_stats = netiucv_stats, + .ndo_start_xmit = netiucv_tx, + .ndo_change_mtu = netiucv_change_mtu, +}; +static void netiucv_setup_netdevice (struct net_device *dev) { dev->mtu =NETIUCV_MTU_DEFAULT ; - dev->hard_start_xmit = netiucv_tx; - dev->open = netiucv_open; - dev->stop = netiucv_close; - dev->get_stats = netiucv_stats; - dev->change_mtu = netiucv_change_mtu; dev->destructor = netiucv_free_netdevice; dev->hard_header_len =NETIUCV_HDRLEN ; dev->addr_len =0 ; dev->type =ARPHRD_SLIP ; dev->tx_queue_len =NETIUCV_QUEUELEN_DEFAULT ; dev->flags =IFF_POINTOPOINT |IFF_NOARP ; + dev->netdev_ops = &netiucv_netdev_ops; }/**
PATCH 4/5 claw: convert to net_device_ops
In reply to [email protected]From: Frank Blaschka <[email protected]>
claw convert to net_device_ops.
--- drivers/s390/net/claw.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/s390/net/claw.c +9 -5
@@ -2816,22 +2816,26 @@ claw_free_netdevice(struct net_device ** Initialize everything of the net device except the name and the * channel structs. */ +static const struct net_device_ops claw_netdev_ops = { + .ndo_open = claw_open, + .ndo_stop = claw_release, + .ndo_get_stats = claw_stats, + .ndo_start_xmit = claw_tx, + .ndo_change_mtu = claw_change_mtu, +}; +static void claw_init_netdevice (struct net_device * dev) {CLAW_DBF_TEXT (2 , setup,"init_dev" );CLAW_DBF_TEXT_ (2 , setup,"%s" , dev->name); dev->mtu =CLAW_DEFAULT_MTU_SIZE ; - dev->hard_start_xmit = claw_tx; - dev->open = claw_open; - dev->stop = claw_release; - dev->get_stats = claw_stats; - dev->change_mtu = claw_change_mtu; dev->hard_header_len =0 ; dev->addr_len =0 ; dev->type =ARPHRD_SLIP ; dev->tx_queue_len =1300 ; dev->flags =IFF_POINTOPOINT |IFF_NOARP ; + dev->netdev_ops = &claw_netdev_ops;CLAW_DBF_TEXT (2 , setup,"initok" );return ; }
PATCH 5/5 qeth: fix usage of netdev_ops
In reply to [email protected]From: Frank Blaschka <[email protected]>
Have separate netdev_ops for OSA and HiperSocket/TR.
--- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-)
drivers/s390/net/qeth_l2_main.c +1 -1
@@ -916,7 +916,7 @@ static struct ethtool_ops qeth_l2_osn_op .get_drvinfo = qeth_core_get_drvinfo, }; -static struct net_device_ops qeth_l2_netdev_ops = { +static const struct net_device_ops qeth_l2_netdev_ops = { .ndo_open = qeth_l2_open, .ndo_stop = qeth_l2_stop, .ndo_get_stats = qeth_get_stats,
drivers/s390/net/qeth_l3_main.c +20 -4
@@ -2894,7 +2894,7 @@ qeth_l3_neigh_setup(struct net_device *dreturn 0 ; } -static struct net_device_ops qeth_l3_netdev_ops = { +static const struct net_device_ops qeth_l3_netdev_ops = { .ndo_open = qeth_l3_open, .ndo_stop = qeth_l3_stop, .ndo_get_stats = qeth_get_stats,
@@ -2909,6 +2909,22 @@ static struct net_device_ops qeth_l3_net .ndo_tx_timeout = qeth_tx_timeout, }; +static const struct net_device_ops qeth_l3_osa_netdev_ops = { + .ndo_open = qeth_l3_open, + .ndo_stop = qeth_l3_stop, + .ndo_get_stats = qeth_get_stats, + .ndo_start_xmit = qeth_l3_hard_start_xmit, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_multicast_list = qeth_l3_set_multicast_list, + .ndo_do_ioctl = qeth_l3_do_ioctl, + .ndo_change_mtu = qeth_change_mtu, + .ndo_vlan_rx_register = qeth_l3_vlan_rx_register, + .ndo_vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid, + .ndo_vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid, + .ndo_tx_timeout = qeth_tx_timeout, + .ndo_neigh_setup = qeth_l3_neigh_setup, +}; +static int qeth_l3_setup_netdev (struct qeth_card *card) {if (card->info.type ==QETH_CARD_TYPE_OSAE ) {
@@ -2919,12 +2935,12 @@ static int qeth_l3_setup_netdev(struct q#endif if (!card->dev)return -ENODEV ; + card->dev->netdev_ops = &qeth_l3_netdev_ops; }else { card->dev =alloc_etherdev (0 );if (!card->dev)return -ENODEV ; - qeth_l3_netdev_ops.ndo_neigh_setup = - qeth_l3_neigh_setup; + card->dev->netdev_ops = &qeth_l3_osa_netdev_ops;/*IPv6 address autoconfiguration stuff*/ qeth_l3_get_unique_id (card);
@@ -2937,6 +2953,7 @@ static int qeth_l3_setup_netdev(struct qif (!card->dev)return -ENODEV ; card->dev->flags |=IFF_NOARP ; + card->dev->netdev_ops = &qeth_l3_netdev_ops;qeth_l3_iqd_read_initial_mac (card); }else return -ENODEV ;
@@ -2944,7 +2961,6 @@ static int qeth_l3_setup_netdev(struct q card->dev->ml_priv = card; card->dev->watchdog_timeo =QETH_TX_TIMEOUT ; card->dev->mtu = card->info.initial_mtu; - card->dev->netdev_ops = &qeth_l3_netdev_ops;SET_ETHTOOL_OPS (card->dev, &qeth_l3_ethtool_ops); card->dev->features |=NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
Re: [patch 1/5] lcs: convert to net_device_ops
In reply to [email protected]From: [email protected]
Date: Fri, 09 Jan 2009 14:43:56 +0100
Quoted 5 lines
From: Frank Blaschka <[email protected]>
lcs convert to
net_device_ops.Signed-off-by Frank Blaschka <[email protected]>
Applied.
Re: [patch 2/5] ctcm: convert to net_device_ops
In reply to [email protected]From: [email protected]
Date: Fri, 09 Jan 2009 14:43:57 +0100
Quoted 5 lines
From: Frank Blaschka <[email protected]>
ctcm convert to
net_device_ops.Signed-off-by Frank Blaschka <[email protected]>
Applied.
Re: [patch 3/5] netiucv: convert to net_device_ops
In reply to [email protected]From: [email protected]
Date: Fri, 09 Jan 2009 14:43:58 +0100
Quoted 5 lines
From: Frank Blaschka <[email protected]>
netiucv convert to
net_device_ops.Signed-off-by Frank Blaschka <[email protected]>
Applied.
Re: [patch 4/5] claw: convert to net_device_ops
In reply to [email protected]From: [email protected]
Date: Fri, 09 Jan 2009 14:43:59 +0100
Quoted 5 lines
From: Frank Blaschka <[email protected]>
claw convert to
net_device_ops.Signed-off-by Frank Blaschka <[email protected]
Applied.
Re: [patch 5/5] qeth: fix usage of netdev_ops
In reply to [email protected]From: [email protected]
Date: Fri, 09 Jan 2009 14:44:00 +0100
Quoted 5 lines
From: Frank Blaschka <[email protected]>
Have separate
netdev_opsfor OSA and HiperSocket/TR.Signed-off-by Frank Blaschka <[email protected]>
Applied.