Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Hemminger and committed by
David S. Miller
0a0b9d2e 76288b4e

+12 -5
+12 -5
drivers/net/xen-netfront.c
··· 1105 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 1118 static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev) 1109 1119 { 1110 1120 int i, err; ··· 1171 1161 goto exit_free_tx; 1172 1162 } 1173 1163 1174 - netdev->open = xennet_open; 1175 - netdev->hard_start_xmit = xennet_start_xmit; 1176 - netdev->stop = xennet_close; 1164 + netdev->netdev_ops = &xennet_netdev_ops; 1165 + 1177 1166 netif_napi_add(netdev, &np->napi, xennet_poll, 64); 1178 - netdev->uninit = xennet_uninit; 1179 - netdev->change_mtu = xennet_change_mtu; 1180 1167 netdev->features = NETIF_F_IP_CSUM; 1181 1168 1182 1169 SET_ETHTOOL_OPS(netdev, &xennet_ethtool_ops);