a2065: convert to net_device_ops
Subsystems (2)
PATCH 1/5 a2065: convert to net_device_ops
--- drivers/net/a2065.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
drivers/net/a2065.c +12 -5
@@ -692,6 +692,17 @@ static struct zorro_driver a2065_driver = { .remove = __devexit_p(a2065_remove_one), }; +static const struct net_device_ops lance_netdev_ops = { + .ndo_open = lance_open, + .ndo_stop = lance_close, + .ndo_start_xmit = lance_start_xmit, + .ndo_tx_timeout = lance_tx_timeout, + .ndo_set_multicast_list = lance_set_multicast, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +static int __devinit a2065_init_one (struct zorro_dev *z,const struct zorro_device_id *ent) {
@@ -753,12 +764,8 @@ static int __devinit a2065_init_one(struct zorro_dev *z, priv->rx_ring_mod_mask =RX_RING_MOD_MASK ; priv->tx_ring_mod_mask =TX_RING_MOD_MASK ; - dev->open = &lance_open; - dev->stop = &lance_close; - dev->hard_start_xmit = &lance_start_xmit; - dev->tx_timeout = &lance_tx_timeout; + dev->netdev_ops = &lance_netdev_ops; dev->watchdog_timeo =5 *HZ ; - dev->set_multicast_list = &lance_set_multicast; dev->dma =0 ;init_timer (&priv->multicast_timer);
Signature · 1 line
1.6.2.3
PATCH 2/5 atarilance: convert to net_device_ops
--- drivers/net/atarilance.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
drivers/net/atarilance.c +11 -7
@@ -453,6 +453,16 @@ static noinline int __init addr_accessible(volatile void *regp, int wordflag,return ( ret ); } +static const struct net_device_ops lance_netdev_ops = { + .ndo_open = lance_open, + .ndo_stop = lance_close, + .ndo_start_xmit = lance_start_xmit, + .ndo_set_multicast_list = set_multicast_list, + .ndo_set_mac_address = lance_set_mac_address, + .ndo_tx_timeout = lance_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +};static unsigned long __init lance_probe1 (struct net_device *dev,struct lance_addr *init_rec )
@@ -623,15 +633,9 @@ static unsigned long __init lance_probe1( struct net_device *dev,if (did_version++ ==0 )DPRINTK (1 , ( version )); -/* The LANCE-specific entries in the device structure. */ - dev->open = &lance_open; - dev->hard_start_xmit = &lance_start_xmit; - dev->stop = &lance_close; - dev->set_multicast_list = &set_multicast_list; - dev->set_mac_address = &lance_set_mac_address; + dev->netdev_ops = &lance_netdev_ops;/* XXX MSch */ - dev->tx_timeout = lance_tx_timeout; dev->watchdog_timeo =TX_TIMEOUT ;return (1 );
Signature · 1 line
1.6.2.3
PATCH 3/5 au1000: convert to net_device_ops
--- drivers/net/au1000_eth.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-)
drivers/net/au1000_eth.c +15 -8
@@ -1004,12 +1004,12 @@ static void au1000_tx_timeout(struct net_device *dev)netif_wake_queue (dev); } -static void set_rx_mode (struct net_device *dev) +static void au1000_multicast_list (struct net_device *dev) {struct au1000_private *aup =netdev_priv (dev);if (au1000_debug >4 ) -printk ("%s: set_rx_mode: flags=%x\n" , dev->name, dev->flags); +printk ("%s: au1000_multicast_list: flags=%x\n" , dev->name, dev->flags);if (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ aup->mac->control |=MAC_PROMISCUOUS ;
@@ -1047,6 +1047,18 @@ static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)return phy_mii_ioctl (aup->phy_dev,if_mii (rq), cmd); } +static const struct net_device_ops au1000_netdev_ops = { + .ndo_open = au1000_open, + .ndo_stop = au1000_close, + .ndo_start_xmit = au1000_tx, + .ndo_set_multicast_list = au1000_multicast_list, + .ndo_do_ioctl = au1000_ioctl, + .ndo_tx_timeout = au1000_tx_timeout, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +}; +static struct net_device *au1000_probe (int port_num) {static unsigned version_printed =0 ;
@@ -1197,13 +1209,8 @@ static struct net_device * au1000_probe(int port_num) dev->base_addr = base; dev->irq = irq; - dev->open = au1000_open; - dev->hard_start_xmit = au1000_tx; - dev->stop = au1000_close; - dev->set_multicast_list = &set_rx_mode; - dev->do_ioctl = &au1000_ioctl; + dev->netdev_ops = &au1000_netdev_ops;SET_ETHTOOL_OPS (dev, &au1000_ethtool_ops); - dev->tx_timeout = au1000_tx_timeout; dev->watchdog_timeo =ETH_TX_TIMEOUT ;/*
Signature · 1 line
1.6.2.3
PATCH 4/5 bfin_mac: convert to net_device_ops
--- drivers/net/bfin_mac.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-)
drivers/net/bfin_mac.c +15 -9
@@ -979,6 +979,20 @@ static int bfin_mac_open(struct net_device *dev)return 0 ; } +static const struct net_device_ops bfin_mac_netdev_ops = { + .ndo_open = bfin_mac_open, + .ndo_stop = bfin_mac_close, + .ndo_start_xmit = bfin_mac_hard_start_xmit, + .ndo_set_mac_address = bfin_mac_set_mac_address, + .ndo_tx_timeout = bfin_mac_timeout, + .ndo_set_multicast_list = bfin_mac_set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = bfin_mac_poll, +#endif +}; +/* * * this makes the board clean up everything that it can
@@ -1086,15 +1100,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)/* Fill in the fields of the device structure with ethernet values. */ ether_setup (ndev); - ndev->open = bfin_mac_open; - ndev->stop = bfin_mac_close; - ndev->hard_start_xmit = bfin_mac_hard_start_xmit; - ndev->set_mac_address = bfin_mac_set_mac_address; - ndev->tx_timeout = bfin_mac_timeout; - ndev->set_multicast_list = bfin_mac_set_multicast_list; -#ifdef CONFIG_NET_POLL_CONTROLLER - ndev->poll_controller = bfin_mac_poll; -#endif + ndev->netdev_ops = &bfin_mac_netdev_ops; ndev->ethtool_ops = &bfin_mac_ethtool_ops;spin_lock_init (&lp->lock);
Signature · 1 line
1.6.2.3
PATCH 5/5 declance: convert to net_device_ops
--- drivers/net/declance.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
drivers/net/declance.c +12 -5
@@ -1010,6 +1010,17 @@ static void lance_set_multicast_retry(unsigned long _opaque)lance_set_multicast (dev); } +static const struct net_device_ops lance_netdev_ops = { + .ndo_open = lance_open, + .ndo_stop = lance_close, + .ndo_start_xmit = lance_start_xmit, + .ndo_tx_timeout = lance_tx_timeout, + .ndo_set_multicast_list = lance_set_multicast, + .ndo_change_mtu = eth_change_mtu, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, +}; +static int __init dec_lance_probe (struct device *bdev,const int type) {static unsigned version_printed;
@@ -1223,12 +1234,8 @@ static int __init dec_lance_probe(struct device *bdev, const int type)printk (", addr = %pM, irq = %d\n" , dev->dev_addr, dev->irq); - dev->open = &lance_open; - dev->stop = &lance_close; - dev->hard_start_xmit = &lance_start_xmit; - dev->tx_timeout = &lance_tx_timeout; + dev->netdev_ops = &lance_netdev_ops; dev->watchdog_timeo =5 *HZ ; - dev->set_multicast_list = &lance_set_multicast;/* lp->ll is the location of the registers for lance card */ lp->ll = ll;
Signature · 1 line
1.6.2.3
Re: [PATCH 5/5] declance: convert to net_device_ops
From: Alexander Beregalov <[email protected]>
Date: Wed, 15 Apr 2009 08:30:25 +0400
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>
Applied.
Re: [PATCH 4/5] bfin_mac: convert to net_device_ops
In reply to Alexander BeregalovFrom: Alexander Beregalov <[email protected]>
Date: Wed, 15 Apr 2009 08:30:24 +0400
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>
Applied.
Re: [PATCH 3/5] au1000: convert to net_device_ops
In reply to Alexander BeregalovFrom: Alexander Beregalov <[email protected]>
Date: Wed, 15 Apr 2009 08:30:23 +0400
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>
Applied.
Re: [PATCH 2/5] atarilance: convert to net_device_ops
In reply to Alexander BeregalovFrom: Alexander Beregalov <[email protected]>
Date: Wed, 15 Apr 2009 08:30:22 +0400
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>
Applied.
From: Alexander Beregalov <[email protected]>
Date: Wed, 15 Apr 2009 08:30:21 +0400
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>
Applied.