Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122059
b: refs/heads/master
c: 3addc56
h: refs/heads/master
i:
  122057: 465b30f
  122055: 2ec0083
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 22, 2008
1 parent ebd5b5e commit 459af06
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8126089f9f3ee2608b11dd6c629a71ae1806e4fc
refs/heads/master: 3addc568a656e9c8e313e78cfe7ea1e289bf6fd8
34 changes: 19 additions & 15 deletions trunk/drivers/net/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,23 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}

static const struct net_device_ops mlx4_netdev_ops = {
.ndo_open = mlx4_en_open,
.ndo_stop = mlx4_en_close,
.ndo_start_xmit = mlx4_en_xmit,
.ndo_get_stats = mlx4_en_get_stats,
.ndo_set_multicast_list = mlx4_en_set_multicast,
.ndo_set_mac_address = mlx4_en_set_mac,
.ndo_change_mtu = mlx4_en_change_mtu,
.ndo_tx_timeout = mlx4_en_tx_timeout,
.ndo_vlan_rx_register = mlx4_en_vlan_rx_register,
.ndo_vlan_rx_add_vid = mlx4_en_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = mlx4_en_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = mlx4_en_netpoll,
#endif
};

int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
struct mlx4_en_port_profile *prof)
{
Expand Down Expand Up @@ -1029,22 +1046,9 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
/*
* Initialize netdev entry points
*/

dev->open = &mlx4_en_open;
dev->stop = &mlx4_en_close;
dev->hard_start_xmit = &mlx4_en_xmit;
dev->get_stats = &mlx4_en_get_stats;
dev->set_multicast_list = &mlx4_en_set_multicast;
dev->set_mac_address = &mlx4_en_set_mac;
dev->change_mtu = &mlx4_en_change_mtu;
dev->tx_timeout = &mlx4_en_tx_timeout;
dev->netdev_ops = &mlx4_netdev_ops;
dev->watchdog_timeo = MLX4_EN_WATCHDOG_TIMEOUT;
dev->vlan_rx_register = mlx4_en_vlan_rx_register;
dev->vlan_rx_add_vid = mlx4_en_vlan_rx_add_vid;
dev->vlan_rx_kill_vid = mlx4_en_vlan_rx_kill_vid;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = mlx4_en_netpoll;
#endif

SET_ETHTOOL_OPS(dev, &mlx4_en_ethtool_ops);

/* Set defualt MAC */
Expand Down

0 comments on commit 459af06

Please sign in to comment.