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

sbni: convert to net_device_ops

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
7dd0b6e0 fe6c6fbb

+14 -6
+14 -6
drivers/net/wan/sbni.c
··· 206 206 } 207 207 } 208 208 209 + static const struct net_device_ops sbni_netdev_ops = { 210 + .ndo_open = sbni_open, 211 + .ndo_stop = sbni_close, 212 + .ndo_start_xmit = sbni_start_xmit, 213 + .ndo_set_multicast_list = set_multicast_list, 214 + .ndo_do_ioctl = sbni_ioctl, 215 + .ndo_change_mtu = eth_change_mtu, 216 + .ndo_set_mac_address = eth_mac_addr, 217 + .ndo_validate_addr = eth_validate_addr, 218 + }; 219 + 209 220 static void __init sbni_devsetup(struct net_device *dev) 210 221 { 211 222 ether_setup( dev ); 212 - dev->open = &sbni_open; 213 - dev->stop = &sbni_close; 214 - dev->hard_start_xmit = &sbni_start_xmit; 215 - dev->get_stats = &sbni_get_stats; 216 - dev->set_multicast_list = &set_multicast_list; 217 - dev->do_ioctl = &sbni_ioctl; 223 + dev->netdev_ops = &sbni_netdev_ops; 218 224 } 219 225 220 226 int __init sbni_probe(int unit) ··· 232 226 dev = alloc_netdev(sizeof(struct net_local), "sbni", sbni_devsetup); 233 227 if (!dev) 234 228 return -ENOMEM; 229 + 230 + dev->netdev_ops = &sbni_netdev_ops; 235 231 236 232 sprintf(dev->name, "sbni%d", unit); 237 233 netdev_boot_setup_check(dev);