diff options
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 24 |
2 files changed, 21 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index c4f1b046c3b..07ab8a5c1c4 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -916,7 +916,7 @@ 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 | ||
919 | static struct net_device_ops qeth_l2_netdev_ops = { | 919 | static const struct net_device_ops qeth_l2_netdev_ops = { |
920 | .ndo_open = qeth_l2_open, | 920 | .ndo_open = qeth_l2_open, |
921 | .ndo_stop = qeth_l2_stop, | 921 | .ndo_stop = qeth_l2_stop, |
922 | .ndo_get_stats = qeth_get_stats, | 922 | .ndo_get_stats = qeth_get_stats, |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 68d623ab7e6..3d04920b9bb 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2894,7 +2894,7 @@ qeth_l3_neigh_setup(struct net_device *dev, struct neigh_parms *np) | |||
2894 | return 0; | 2894 | return 0; |
2895 | } | 2895 | } |
2896 | 2896 | ||
2897 | static struct net_device_ops qeth_l3_netdev_ops = { | 2897 | static const struct net_device_ops qeth_l3_netdev_ops = { |
2898 | .ndo_open = qeth_l3_open, | 2898 | .ndo_open = qeth_l3_open, |
2899 | .ndo_stop = qeth_l3_stop, | 2899 | .ndo_stop = qeth_l3_stop, |
2900 | .ndo_get_stats = qeth_get_stats, | 2900 | .ndo_get_stats = qeth_get_stats, |
@@ -2909,6 +2909,22 @@ static struct net_device_ops qeth_l3_netdev_ops = { | |||
2909 | .ndo_tx_timeout = qeth_tx_timeout, | 2909 | .ndo_tx_timeout = qeth_tx_timeout, |
2910 | }; | 2910 | }; |
2911 | 2911 | ||
2912 | static const struct net_device_ops qeth_l3_osa_netdev_ops = { | ||
2913 | .ndo_open = qeth_l3_open, | ||
2914 | .ndo_stop = qeth_l3_stop, | ||
2915 | .ndo_get_stats = qeth_get_stats, | ||
2916 | .ndo_start_xmit = qeth_l3_hard_start_xmit, | ||
2917 | .ndo_validate_addr = eth_validate_addr, | ||
2918 | .ndo_set_multicast_list = qeth_l3_set_multicast_list, | ||
2919 | .ndo_do_ioctl = qeth_l3_do_ioctl, | ||
2920 | .ndo_change_mtu = qeth_change_mtu, | ||
2921 | .ndo_vlan_rx_register = qeth_l3_vlan_rx_register, | ||
2922 | .ndo_vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid, | ||
2923 | .ndo_vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid, | ||
2924 | .ndo_tx_timeout = qeth_tx_timeout, | ||
2925 | .ndo_neigh_setup = qeth_l3_neigh_setup, | ||
2926 | }; | ||
2927 | |||
2912 | static int qeth_l3_setup_netdev(struct qeth_card *card) | 2928 | static int qeth_l3_setup_netdev(struct qeth_card *card) |
2913 | { | 2929 | { |
2914 | if (card->info.type == QETH_CARD_TYPE_OSAE) { | 2930 | if (card->info.type == QETH_CARD_TYPE_OSAE) { |
@@ -2919,12 +2935,12 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
2919 | #endif | 2935 | #endif |
2920 | if (!card->dev) | 2936 | if (!card->dev) |
2921 | return -ENODEV; | 2937 | return -ENODEV; |
2938 | card->dev->netdev_ops = &qeth_l3_netdev_ops; | ||
2922 | } else { | 2939 | } else { |
2923 | card->dev = alloc_etherdev(0); | 2940 | card->dev = alloc_etherdev(0); |
2924 | if (!card->dev) | 2941 | if (!card->dev) |
2925 | return -ENODEV; | 2942 | return -ENODEV; |
2926 | qeth_l3_netdev_ops.ndo_neigh_setup = | 2943 | card->dev->netdev_ops = &qeth_l3_osa_netdev_ops; |
2927 | qeth_l3_neigh_setup; | ||
2928 | 2944 | ||
2929 | /*IPv6 address autoconfiguration stuff*/ | 2945 | /*IPv6 address autoconfiguration stuff*/ |
2930 | qeth_l3_get_unique_id(card); | 2946 | qeth_l3_get_unique_id(card); |
@@ -2937,6 +2953,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
2937 | if (!card->dev) | 2953 | if (!card->dev) |
2938 | return -ENODEV; | 2954 | return -ENODEV; |
2939 | card->dev->flags |= IFF_NOARP; | 2955 | card->dev->flags |= IFF_NOARP; |
2956 | card->dev->netdev_ops = &qeth_l3_netdev_ops; | ||
2940 | qeth_l3_iqd_read_initial_mac(card); | 2957 | qeth_l3_iqd_read_initial_mac(card); |
2941 | } else | 2958 | } else |
2942 | return -ENODEV; | 2959 | return -ENODEV; |
@@ -2944,7 +2961,6 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) | |||
2944 | card->dev->ml_priv = card; | 2961 | card->dev->ml_priv = card; |
2945 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; | 2962 | card->dev->watchdog_timeo = QETH_TX_TIMEOUT; |
2946 | card->dev->mtu = card->info.initial_mtu; | 2963 | card->dev->mtu = card->info.initial_mtu; |
2947 | card->dev->netdev_ops = &qeth_l3_netdev_ops; | ||
2948 | SET_ETHTOOL_OPS(card->dev, &qeth_l3_ethtool_ops); | 2964 | SET_ETHTOOL_OPS(card->dev, &qeth_l3_ethtool_ops); |
2949 | card->dev->features |= NETIF_F_HW_VLAN_TX | | 2965 | card->dev->features |= NETIF_F_HW_VLAN_TX | |
2950 | NETIF_F_HW_VLAN_RX | | 2966 | NETIF_F_HW_VLAN_RX | |