diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2009-01-08 10:50:55 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-08 10:50:55 -0800 |
commit | 8403b13c7627df7104e450cbc845627bf25c8cd6 (patch) | |
tree | 4551a2f572d6a8f7da7a547d1fbde7a465ea23d3 /drivers/s390/net/qeth_l3_main.c | |
parent | cc883d16c3b7434c7da2c45b54a49c2a99e83db7 (diff) | |
download | op-kernel-dev-8403b13c7627df7104e450cbc845627bf25c8cd6.zip op-kernel-dev-8403b13c7627df7104e450cbc845627bf25c8cd6.tar.gz |
qeth: convert to net_device_ops
qeth_l2, qeth_l3 convert to net_device_ops.
qeth_l3 remove vlan neigh_setup hack since it does not work any longer
with the new net_device_ops.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index cfda1ec..eeeb35b 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -1831,28 +1831,6 @@ static void qeth_l3_vlan_rx_register(struct net_device *dev, static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) { - struct net_device *vlandev; - struct qeth_card *card = dev->ml_priv; - struct in_device *in_dev; - - if (card->info.type == QETH_CARD_TYPE_IQD) - return; - - vlandev = vlan_group_get_device(card->vlangrp, vid); - vlandev->neigh_setup = qeth_l3_neigh_setup; - - in_dev = in_dev_get(vlandev); -#ifdef CONFIG_SYSCTL - neigh_sysctl_unregister(in_dev->arp_parms); -#endif - neigh_parms_release(&arp_tbl, in_dev->arp_parms); - - in_dev->arp_parms = neigh_parms_alloc(vlandev, &arp_tbl); -#ifdef CONFIG_SYSCTL - neigh_sysctl_register(vlandev, in_dev->arp_parms, NET_IPV4, - NET_IPV4_NEIGH, "ipv4", NULL, NULL); -#endif - in_dev_put(in_dev); return; } @@ -2918,6 +2896,21 @@ qeth_l3_neigh_setup(struct net_device *dev, struct neigh_parms *np) return 0; } +static struct net_device_ops qeth_l3_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, +}; + static int qeth_l3_setup_netdev(struct qeth_card *card) { if (card->info.type == QETH_CARD_TYPE_OSAE) { @@ -2932,7 +2925,8 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) card->dev = alloc_etherdev(0); if (!card->dev) return -ENODEV; - card->dev->neigh_setup = qeth_l3_neigh_setup; + qeth_l3_netdev_ops.ndo_neigh_setup = + qeth_l3_neigh_setup; /*IPv6 address autoconfiguration stuff*/ qeth_l3_get_unique_id(card); @@ -2949,21 +2943,10 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) } else return -ENODEV; - card->dev->hard_start_xmit = qeth_l3_hard_start_xmit; card->dev->ml_priv = card; - card->dev->tx_timeout = &qeth_tx_timeout; card->dev->watchdog_timeo = QETH_TX_TIMEOUT; - card->dev->open = qeth_l3_open; - card->dev->stop = qeth_l3_stop; - card->dev->do_ioctl = qeth_l3_do_ioctl; - card->dev->get_stats = qeth_get_stats; - card->dev->change_mtu = qeth_change_mtu; - card->dev->set_multicast_list = qeth_l3_set_multicast_list; - card->dev->vlan_rx_register = qeth_l3_vlan_rx_register; - card->dev->vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid; - card->dev->vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid; card->dev->mtu = card->info.initial_mtu; - card->dev->set_mac_address = NULL; + 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 | |