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

at91_ether: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexander Beregalov and committed by
David S. Miller
531c6804 fefbfb1e

+19 -13
+19 -13
drivers/net/arm/at91_ether.c
··· 577 577 /* 578 578 * Enable/Disable promiscuous and multicast modes. 579 579 */ 580 - static void at91ether_set_rx_mode(struct net_device *dev) 580 + static void at91ether_set_multicast_list(struct net_device *dev) 581 581 { 582 582 unsigned long cfg; 583 583 ··· 808 808 /* 809 809 * Transmit packet. 810 810 */ 811 - static int at91ether_tx(struct sk_buff *skb, struct net_device *dev) 811 + static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev) 812 812 { 813 813 struct at91_private *lp = netdev_priv(dev); 814 814 ··· 828 828 829 829 dev->trans_start = jiffies; 830 830 } else { 831 - printk(KERN_ERR "at91_ether.c: at91ether_tx() called, but device is busy!\n"); 831 + printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); 832 832 return 1; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) 833 833 on this skb, he also reports -ENETDOWN and printk's, so either 834 834 we free and return(0) or don't free and return 1 */ ··· 965 965 } 966 966 #endif 967 967 968 + static const struct net_device_ops at91ether_netdev_ops = { 969 + .ndo_open = at91ether_open, 970 + .ndo_stop = at91ether_close, 971 + .ndo_start_xmit = at91ether_start_xmit, 972 + .ndo_get_stats = at91ether_stats, 973 + .ndo_set_multicast_list = at91ether_set_multicast_list, 974 + .ndo_set_mac_address = set_mac_address, 975 + .ndo_do_ioctl = at91ether_ioctl, 976 + .ndo_validate_addr = eth_validate_addr, 977 + .ndo_change_mtu = eth_change_mtu, 978 + #ifdef CONFIG_NET_POLL_CONTROLLER 979 + .ndo_poll_controller = at91ether_poll_controller, 980 + #endif 981 + }; 982 + 968 983 /* 969 984 * Initialize the ethernet interface 970 985 */ ··· 1020 1005 spin_lock_init(&lp->lock); 1021 1006 1022 1007 ether_setup(dev); 1023 - dev->open = at91ether_open; 1024 - dev->stop = at91ether_close; 1025 - dev->hard_start_xmit = at91ether_tx; 1026 - dev->get_stats = at91ether_stats; 1027 - dev->set_multicast_list = at91ether_set_rx_mode; 1028 - dev->set_mac_address = set_mac_address; 1008 + dev->netdev_ops = &at91ether_netdev_ops; 1029 1009 dev->ethtool_ops = &at91ether_ethtool_ops; 1030 - dev->do_ioctl = at91ether_ioctl; 1031 - #ifdef CONFIG_NET_POLL_CONTROLLER 1032 - dev->poll_controller = at91ether_poll_controller; 1033 - #endif 1034 1010 1035 1011 SET_NETDEV_DEV(dev, &pdev->dev); 1036 1012