1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-11 10:49:21 +02:00
openwrt-xburst/target/linux/ar71xx/patches-2.6.30/802-ag71xx-use-netdev-ops.patch
juhosg 8340e482c9 [ar71xx] refresh 2.6.30 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16973 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-07-25 09:14:47 +00:00

34 lines
1.0 KiB
Diff

--- a/drivers/net/ag71xx/ag71xx_main.c
+++ b/drivers/net/ag71xx/ag71xx_main.c
@@ -791,6 +791,17 @@ static void ag71xx_set_multicast_list(st
/* TODO */
}
+static const struct net_device_ops ag71xx_netdev_ops = {
+ .ndo_open = ag71xx_open,
+ .ndo_stop = ag71xx_stop,
+ .ndo_start_xmit = ag71xx_hard_start_xmit,
+ .ndo_set_multicast_list = ag71xx_set_multicast_list,
+ .ndo_do_ioctl = ag71xx_do_ioctl,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+};
+
static int __init ag71xx_probe(struct platform_device *pdev)
{
struct net_device *dev;
@@ -875,11 +886,7 @@ static int __init ag71xx_probe(struct pl
}
dev->base_addr = (unsigned long)ag->mac_base;
- dev->open = ag71xx_open;
- dev->stop = ag71xx_stop;
- dev->hard_start_xmit = ag71xx_hard_start_xmit;
- dev->set_multicast_list = ag71xx_set_multicast_list;
- dev->do_ioctl = ag71xx_do_ioctl;
+ dev->netdev_ops = &ag71xx_netdev_ops;
dev->ethtool_ops = &ag71xx_ethtool_ops;
dev->tx_timeout = ag71xx_tx_timeout;