aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r--drivers/net/mlx4/en_netdev.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 96e709d6440a..11b793ad2e1b 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -953,6 +953,23 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
953 return 0; 953 return 0;
954} 954}
955 955
956static const struct net_device_ops mlx4_netdev_ops = {
957 .ndo_open = mlx4_en_open,
958 .ndo_stop = mlx4_en_close,
959 .ndo_start_xmit = mlx4_en_xmit,
960 .ndo_get_stats = mlx4_en_get_stats,
961 .ndo_set_multicast_list = mlx4_en_set_multicast,
962 .ndo_set_mac_address = mlx4_en_set_mac,
963 .ndo_change_mtu = mlx4_en_change_mtu,
964 .ndo_tx_timeout = mlx4_en_tx_timeout,
965 .ndo_vlan_rx_register = mlx4_en_vlan_rx_register,
966 .ndo_vlan_rx_add_vid = mlx4_en_vlan_rx_add_vid,
967 .ndo_vlan_rx_kill_vid = mlx4_en_vlan_rx_kill_vid,
968#ifdef CONFIG_NET_POLL_CONTROLLER
969 .ndo_poll_controller = mlx4_en_netpoll,
970#endif
971};
972
956int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, 973int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
957 struct mlx4_en_port_profile *prof) 974 struct mlx4_en_port_profile *prof)
958{ 975{
@@ -1029,22 +1046,9 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
1029 /* 1046 /*
1030 * Initialize netdev entry points 1047 * Initialize netdev entry points
1031 */ 1048 */
1032 1049 dev->netdev_ops = &mlx4_netdev_ops;
1033 dev->open = &mlx4_en_open;
1034 dev->stop = &mlx4_en_close;
1035 dev->hard_start_xmit = &mlx4_en_xmit;
1036 dev->get_stats = &mlx4_en_get_stats;
1037 dev->set_multicast_list = &mlx4_en_set_multicast;
1038 dev->set_mac_address = &mlx4_en_set_mac;
1039 dev->change_mtu = &mlx4_en_change_mtu;
1040 dev->tx_timeout = &mlx4_en_tx_timeout;
1041 dev->watchdog_timeo = MLX4_EN_WATCHDOG_TIMEOUT; 1050 dev->watchdog_timeo = MLX4_EN_WATCHDOG_TIMEOUT;
1042 dev->vlan_rx_register = mlx4_en_vlan_rx_register; 1051
1043 dev->vlan_rx_add_vid = mlx4_en_vlan_rx_add_vid;
1044 dev->vlan_rx_kill_vid = mlx4_en_vlan_rx_kill_vid;
1045#ifdef CONFIG_NET_POLL_CONTROLLER
1046 dev->poll_controller = mlx4_en_netpoll;
1047#endif
1048 SET_ETHTOOL_OPS(dev, &mlx4_en_ethtool_ops); 1052 SET_ETHTOOL_OPS(dev, &mlx4_en_ethtool_ops);
1049 1053
1050 /* Set defualt MAC */ 1054 /* Set defualt MAC */