aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:25:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:25:41 -0500
commit5fbbf5f648a9c4ef99276854f05b2255d1b004d3 (patch)
tree59c9ae762c3df2800e894001b3de58c5f1972486 /drivers/s390
parentce279e6ec91c49f2c5f59f7492e19d39edbf8bbd (diff)
parent56cf391a9462a4897ea660a6af3662dda5ae8c84 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (84 commits) wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev net: convert pegasus driver to net_device_ops bnx2x: Prevent eeprom set when driver is down net: switch kaweth driver to netdevops pcnet32: round off carrier watch timer i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE wimax: fix kconfig interactions with rfkill and input layers wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning r6040: bump release number to 0.20 r6040: warn about MAC address being unset r6040: check PHY status when bringing interface up r6040: make printks consistent with DRV_NAME gianfar: Fixup use of BUS_ID_SIZE mlx4_en: Returning real Max in get_ringparam mlx4_en: Consider inline packets on completion netdev: bfin_mac: enable bfin_mac net dev driver for BF51x qeth: convert to net_device_ops vlan: add neigh_setup dm9601: warn on invalid mac address ...
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_l2_main.c27
-rw-r--r--drivers/s390/net/qeth_l3_main.c53
2 files changed, 34 insertions, 46 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 591a2b3ae4cb..c4f1b046c3b1 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -916,6 +916,21 @@ static struct ethtool_ops qeth_l2_osn_ops = {
916 .get_drvinfo = qeth_core_get_drvinfo, 916 .get_drvinfo = qeth_core_get_drvinfo,
917}; 917};
918 918
919static struct net_device_ops qeth_l2_netdev_ops = {
920 .ndo_open = qeth_l2_open,
921 .ndo_stop = qeth_l2_stop,
922 .ndo_get_stats = qeth_get_stats,
923 .ndo_start_xmit = qeth_l2_hard_start_xmit,
924 .ndo_validate_addr = eth_validate_addr,
925 .ndo_set_multicast_list = qeth_l2_set_multicast_list,
926 .ndo_do_ioctl = qeth_l2_do_ioctl,
927 .ndo_set_mac_address = qeth_l2_set_mac_address,
928 .ndo_change_mtu = qeth_change_mtu,
929 .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid,
930 .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid,
931 .ndo_tx_timeout = qeth_tx_timeout,
932};
933
919static int qeth_l2_setup_netdev(struct qeth_card *card) 934static int qeth_l2_setup_netdev(struct qeth_card *card)
920{ 935{
921 switch (card->info.type) { 936 switch (card->info.type) {
@@ -937,19 +952,9 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
937 return -ENODEV; 952 return -ENODEV;
938 953
939 card->dev->ml_priv = card; 954 card->dev->ml_priv = card;
940 card->dev->tx_timeout = &qeth_tx_timeout;
941 card->dev->watchdog_timeo = QETH_TX_TIMEOUT; 955 card->dev->watchdog_timeo = QETH_TX_TIMEOUT;
942 card->dev->open = qeth_l2_open;
943 card->dev->stop = qeth_l2_stop;
944 card->dev->hard_start_xmit = qeth_l2_hard_start_xmit;
945 card->dev->do_ioctl = qeth_l2_do_ioctl;
946 card->dev->get_stats = qeth_get_stats;
947 card->dev->change_mtu = qeth_change_mtu;
948 card->dev->set_multicast_list = qeth_l2_set_multicast_list;
949 card->dev->vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid;
950 card->dev->vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid;
951 card->dev->set_mac_address = qeth_l2_set_mac_address;
952 card->dev->mtu = card->info.initial_mtu; 956 card->dev->mtu = card->info.initial_mtu;
957 card->dev->netdev_ops = &qeth_l2_netdev_ops;
953 if (card->info.type != QETH_CARD_TYPE_OSN) 958 if (card->info.type != QETH_CARD_TYPE_OSN)
954 SET_ETHTOOL_OPS(card->dev, &qeth_l2_ethtool_ops); 959 SET_ETHTOOL_OPS(card->dev, &qeth_l2_ethtool_ops);
955 else 960 else
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 4693ee4e7b98..68d623ab7e6e 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1829,28 +1829,6 @@ static void qeth_l3_vlan_rx_register(struct net_device *dev,
1829 1829
1830static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) 1830static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
1831{ 1831{
1832 struct net_device *vlandev;
1833 struct qeth_card *card = dev->ml_priv;
1834 struct in_device *in_dev;
1835
1836 if (card->info.type == QETH_CARD_TYPE_IQD)
1837 return;
1838
1839 vlandev = vlan_group_get_device(card->vlangrp, vid);
1840 vlandev->neigh_setup = qeth_l3_neigh_setup;
1841
1842 in_dev = in_dev_get(vlandev);
1843#ifdef CONFIG_SYSCTL
1844 neigh_sysctl_unregister(in_dev->arp_parms);
1845#endif
1846 neigh_parms_release(&arp_tbl, in_dev->arp_parms);
1847
1848 in_dev->arp_parms = neigh_parms_alloc(vlandev, &arp_tbl);
1849#ifdef CONFIG_SYSCTL
1850 neigh_sysctl_register(vlandev, in_dev->arp_parms, NET_IPV4,
1851 NET_IPV4_NEIGH, "ipv4", NULL, NULL);
1852#endif
1853 in_dev_put(in_dev);
1854 return; 1832 return;
1855} 1833}
1856 1834
@@ -2916,6 +2894,21 @@ qeth_l3_neigh_setup(struct net_device *dev, struct neigh_parms *np)
2916 return 0; 2894 return 0;
2917} 2895}
2918 2896
2897static struct net_device_ops qeth_l3_netdev_ops = {
2898 .ndo_open = qeth_l3_open,
2899 .ndo_stop = qeth_l3_stop,
2900 .ndo_get_stats = qeth_get_stats,
2901 .ndo_start_xmit = qeth_l3_hard_start_xmit,
2902 .ndo_validate_addr = eth_validate_addr,
2903 .ndo_set_multicast_list = qeth_l3_set_multicast_list,
2904 .ndo_do_ioctl = qeth_l3_do_ioctl,
2905 .ndo_change_mtu = qeth_change_mtu,
2906 .ndo_vlan_rx_register = qeth_l3_vlan_rx_register,
2907 .ndo_vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid,
2908 .ndo_vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid,
2909 .ndo_tx_timeout = qeth_tx_timeout,
2910};
2911
2919static int qeth_l3_setup_netdev(struct qeth_card *card) 2912static int qeth_l3_setup_netdev(struct qeth_card *card)
2920{ 2913{
2921 if (card->info.type == QETH_CARD_TYPE_OSAE) { 2914 if (card->info.type == QETH_CARD_TYPE_OSAE) {
@@ -2930,7 +2923,8 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
2930 card->dev = alloc_etherdev(0); 2923 card->dev = alloc_etherdev(0);
2931 if (!card->dev) 2924 if (!card->dev)
2932 return -ENODEV; 2925 return -ENODEV;
2933 card->dev->neigh_setup = qeth_l3_neigh_setup; 2926 qeth_l3_netdev_ops.ndo_neigh_setup =
2927 qeth_l3_neigh_setup;
2934 2928
2935 /*IPv6 address autoconfiguration stuff*/ 2929 /*IPv6 address autoconfiguration stuff*/
2936 qeth_l3_get_unique_id(card); 2930 qeth_l3_get_unique_id(card);
@@ -2947,21 +2941,10 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
2947 } else 2941 } else
2948 return -ENODEV; 2942 return -ENODEV;
2949 2943
2950 card->dev->hard_start_xmit = qeth_l3_hard_start_xmit;
2951 card->dev->ml_priv = card; 2944 card->dev->ml_priv = card;
2952 card->dev->tx_timeout = &qeth_tx_timeout;
2953 card->dev->watchdog_timeo = QETH_TX_TIMEOUT; 2945 card->dev->watchdog_timeo = QETH_TX_TIMEOUT;
2954 card->dev->open = qeth_l3_open;
2955 card->dev->stop = qeth_l3_stop;
2956 card->dev->do_ioctl = qeth_l3_do_ioctl;
2957 card->dev->get_stats = qeth_get_stats;
2958 card->dev->change_mtu = qeth_change_mtu;
2959 card->dev->set_multicast_list = qeth_l3_set_multicast_list;
2960 card->dev->vlan_rx_register = qeth_l3_vlan_rx_register;
2961 card->dev->vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid;
2962 card->dev->vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid;
2963 card->dev->mtu = card->info.initial_mtu; 2946 card->dev->mtu = card->info.initial_mtu;
2964 card->dev->set_mac_address = NULL; 2947 card->dev->netdev_ops = &qeth_l3_netdev_ops;
2965 SET_ETHTOOL_OPS(card->dev, &qeth_l3_ethtool_ops); 2948 SET_ETHTOOL_OPS(card->dev, &qeth_l3_ethtool_ops);
2966 card->dev->features |= NETIF_F_HW_VLAN_TX | 2949 card->dev->features |= NETIF_F_HW_VLAN_TX |
2967 NETIF_F_HW_VLAN_RX | 2950 NETIF_F_HW_VLAN_RX |