diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-06 13:44:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-06 13:44:55 -0500 |
commit | 0a0b9d2edc3d7b56386dd980f7d17eaaad15cf6a (patch) | |
tree | 7958ad36403933aa3f24a9883a48594997c6cf33 /drivers/net/xen-netfront.c | |
parent | 76288b4e573e06318fda65678052cfbde98fed1d (diff) |
xen-netfront: convert to net_device_ops
Convert Xen device to new API.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r-- | drivers/net/xen-netfront.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 761635be9104..cd6184ee08ee 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -1105,6 +1105,16 @@ static void xennet_uninit(struct net_device *dev) | |||
1105 | gnttab_free_grant_references(np->gref_rx_head); | 1105 | gnttab_free_grant_references(np->gref_rx_head); |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | static const struct net_device_ops xennet_netdev_ops = { | ||
1109 | .ndo_open = xennet_open, | ||
1110 | .ndo_uninit = xennet_uninit, | ||
1111 | .ndo_stop = xennet_close, | ||
1112 | .ndo_start_xmit = xennet_start_xmit, | ||
1113 | .ndo_change_mtu = xennet_change_mtu, | ||
1114 | .ndo_set_mac_address = eth_mac_addr, | ||
1115 | .ndo_validate_addr = eth_validate_addr, | ||
1116 | }; | ||
1117 | |||
1108 | static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev) | 1118 | static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev) |
1109 | { | 1119 | { |
1110 | int i, err; | 1120 | int i, err; |
@@ -1161,12 +1171,9 @@ static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev | |||
1161 | goto exit_free_tx; | 1171 | goto exit_free_tx; |
1162 | } | 1172 | } |
1163 | 1173 | ||
1164 | netdev->open = xennet_open; | 1174 | netdev->netdev_ops = &xennet_netdev_ops; |
1165 | netdev->hard_start_xmit = xennet_start_xmit; | 1175 | |
1166 | netdev->stop = xennet_close; | ||
1167 | netif_napi_add(netdev, &np->napi, xennet_poll, 64); | 1176 | netif_napi_add(netdev, &np->napi, xennet_poll, 64); |
1168 | netdev->uninit = xennet_uninit; | ||
1169 | netdev->change_mtu = xennet_change_mtu; | ||
1170 | netdev->features = NETIF_F_IP_CSUM; | 1177 | netdev->features = NETIF_F_IP_CSUM; |
1171 | 1178 | ||
1172 | SET_ETHTOOL_OPS(netdev, &xennet_ethtool_ops); | 1179 | SET_ETHTOOL_OPS(netdev, &xennet_ethtool_ops); |