* [PATCH 1/5] a2065: convert to net_device_ops
@ 2009-04-15 4:30 Alexander Beregalov
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
2009-04-15 4:57 ` [PATCH 1/5] a2065: " David Miller
0 siblings, 2 replies; 10+ messages in thread
From: Alexander Beregalov @ 2009-04-15 4:30 UTC (permalink / raw)
To: netdev; +Cc: Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/a2065.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index d0d0c2f..02f64d5 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -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);
--
1.6.2.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/5] atarilance: convert to net_device_ops
2009-04-15 4:30 [PATCH 1/5] a2065: convert to net_device_ops Alexander Beregalov
@ 2009-04-15 4:30 ` Alexander Beregalov
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
2009-04-15 4:57 ` [PATCH 2/5] atarilance: " David Miller
2009-04-15 4:57 ` [PATCH 1/5] a2065: " David Miller
1 sibling, 2 replies; 10+ messages in thread
From: Alexander Beregalov @ 2009-04-15 4:30 UTC (permalink / raw)
To: netdev; +Cc: Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/atarilance.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c
index 2d81f6a..5425ab0 100644
--- a/drivers/net/atarilance.c
+++ b/drivers/net/atarilance.c
@@ -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 );
--
1.6.2.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/5] au1000: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
@ 2009-04-15 4:30 ` Alexander Beregalov
2009-04-15 4:30 ` [PATCH 4/5] bfin_mac: " Alexander Beregalov
2009-04-15 4:58 ` [PATCH 3/5] au1000: " David Miller
2009-04-15 4:57 ` [PATCH 2/5] atarilance: " David Miller
1 sibling, 2 replies; 10+ messages in thread
From: Alexander Beregalov @ 2009-04-15 4:30 UTC (permalink / raw)
To: netdev; +Cc: Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/au1000_eth.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 4274e4a..d58c105 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -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;
/*
--
1.6.2.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/5] bfin_mac: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
@ 2009-04-15 4:30 ` Alexander Beregalov
2009-04-15 4:30 ` [PATCH 5/5] declance: " Alexander Beregalov
2009-04-15 4:58 ` [PATCH 4/5] bfin_mac: " David Miller
2009-04-15 4:58 ` [PATCH 3/5] au1000: " David Miller
1 sibling, 2 replies; 10+ messages in thread
From: Alexander Beregalov @ 2009-04-15 4:30 UTC (permalink / raw)
To: netdev; +Cc: Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/bfin_mac.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9afe809..9326aef 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -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);
--
1.6.2.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/5] declance: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 4/5] bfin_mac: " Alexander Beregalov
@ 2009-04-15 4:30 ` Alexander Beregalov
2009-04-15 4:58 ` David Miller
2009-04-15 4:58 ` [PATCH 4/5] bfin_mac: " David Miller
1 sibling, 1 reply; 10+ messages in thread
From: Alexander Beregalov @ 2009-04-15 4:30 UTC (permalink / raw)
To: netdev; +Cc: Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/declance.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index 861c867..b62405a 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -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;
--
1.6.2.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 4/5] bfin_mac: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 4/5] bfin_mac: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 5/5] declance: " Alexander Beregalov
@ 2009-04-15 4:58 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2009-04-15 4:58 UTC (permalink / raw)
To: a.beregalov; +Cc: netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 15 Apr 2009 08:30:24 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/5] au1000: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 4/5] bfin_mac: " Alexander Beregalov
@ 2009-04-15 4:58 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2009-04-15 4:58 UTC (permalink / raw)
To: a.beregalov; +Cc: netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 15 Apr 2009 08:30:23 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/5] atarilance: convert to net_device_ops
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
@ 2009-04-15 4:57 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2009-04-15 4:57 UTC (permalink / raw)
To: a.beregalov; +Cc: netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 15 Apr 2009 08:30:22 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5] a2065: convert to net_device_ops
2009-04-15 4:30 [PATCH 1/5] a2065: convert to net_device_ops Alexander Beregalov
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
@ 2009-04-15 4:57 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2009-04-15 4:57 UTC (permalink / raw)
To: a.beregalov; +Cc: netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Wed, 15 Apr 2009 08:30:21 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-04-15 4:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 4:30 [PATCH 1/5] a2065: convert to net_device_ops Alexander Beregalov
2009-04-15 4:30 ` [PATCH 2/5] atarilance: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 3/5] au1000: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 4/5] bfin_mac: " Alexander Beregalov
2009-04-15 4:30 ` [PATCH 5/5] declance: " Alexander Beregalov
2009-04-15 4:58 ` David Miller
2009-04-15 4:58 ` [PATCH 4/5] bfin_mac: " David Miller
2009-04-15 4:58 ` [PATCH 3/5] au1000: " David Miller
2009-04-15 4:57 ` [PATCH 2/5] atarilance: " David Miller
2009-04-15 4:57 ` [PATCH 1/5] a2065: " David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).