ariadne: convert to net_device_ops
Subsystems (2)
PATCH 1/6 ariadne: convert to net_device_ops
---
drivers/net/ariadne.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-)
drivers/net/ariadne.c +13 -6
@@ -155,6 +155,18 @@ static struct zorro_driver ariadne_driver = { .remove = __devexit_p(ariadne_remove_one), }; +static const struct net_device_ops ariadne_netdev_ops = { + .ndo_open = ariadne_open, + .ndo_stop = ariadne_close, + .ndo_start_xmit = ariadne_start_xmit, + .ndo_tx_timeout = ariadne_tx_timeout, + .ndo_get_stats = ariadne_get_stats, + .ndo_set_multicast_list = set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +static int __devinit ariadne_init_one (struct zorro_dev *z,const struct zorro_device_id *ent) {
@@ -197,13 +209,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z, dev->mem_start =ZTWO_VADDR (mem_start); dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE ; - dev->open = &ariadne_open; - dev->stop = &ariadne_close; - dev->hard_start_xmit = &ariadne_start_xmit; - dev->tx_timeout = &ariadne_tx_timeout; + dev->netdev_ops = &ariadne_netdev_ops;; dev->watchdog_timeo =5 *HZ ; - dev->get_stats = &ariadne_get_stats; - dev->set_multicast_list = &set_multicast_list; err =register_netdev (dev);if (err) {
Quoted 1 line · Alexander Beregalov
Signed-off-by Alexander Beregalov <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 2 lines · Alexander Beregalov
Signed-off-by Alexander Beregalov <[email protected]>
...
drivers/net/ariadne.c static int __devinit ariadne_init_one(struct zorro_dev *z, · line 212
Quoted 9 lines
drivers/net/ariadne.c +1
-4@@ -197,13 +209,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z, dev->mem_start =ZTWO_VADDR (mem_start); dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE ; - dev->open = &ariadne_open; - dev->stop = &ariadne_close; - dev->hard_start_xmit = &ariadne_start_xmit; - dev->tx_timeout = &ariadne_tx_timeout; + dev->netdev_ops = &ariadne_netdev_ops;;
We don't really need two semicolons there but I suppose that they won't hurt.
Cheers, Jan
Alexander Beregalov
Acked-by Geert UytterhoevenQuoted 8 lines · Jan Ceuleers
Quoted 2 lines · Alexander Beregalov
Signed-off-by Alexander Beregalov <[email protected]>...
Quoted 4 lines
(quoted diff) +0
-0@@ -197,13 +209,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z, dev->mem_start = ZTWO_VADDR(mem_start); dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE;
Quoted 8 lines
Review static int __devinit ariadne_init_one(struct zorro_dev *z, · line 212
Quoted 5 lines
(quoted diff) +1
-4- dev->open = &ariadne_open; - dev->stop = &ariadne_close; - dev->hard_start_xmit = &ariadne_start_xmit; - dev->tx_timeout = &ariadne_tx_timeout; + dev->netdev_ops = &ariadne_netdev_ops;;We don't really need two semicolons there but I suppose that they won't hurt.
Thanks!
David, please apply this patch
---
From: Alexander Beregalov <[email protected]>
Subject: [PATCH 1/6] ariadne: convert to net_device_ops
---
drivers/net/ariadne.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-)
drivers/net/ariadne.c +13 -6
@@ -155,6 +155,18 @@ static struct zorro_driver ariadne_driver = { .remove = __devexit_p(ariadne_remove_one), }; +static const struct net_device_ops ariadne_netdev_ops = { + .ndo_open = ariadne_open, + .ndo_stop = ariadne_close, + .ndo_start_xmit = ariadne_start_xmit, + .ndo_tx_timeout = ariadne_tx_timeout, + .ndo_get_stats = ariadne_get_stats, + .ndo_set_multicast_list = set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +static int __devinit ariadne_init_one (struct zorro_dev *z,const struct zorro_device_id *ent) {
@@ -197,13 +209,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z, dev->mem_start =ZTWO_VADDR (mem_start); dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE ; - dev->open = &ariadne_open; - dev->stop = &ariadne_close; - dev->hard_start_xmit = &ariadne_start_xmit; - dev->tx_timeout = &ariadne_tx_timeout; + dev->netdev_ops = &ariadne_netdev_ops; dev->watchdog_timeo =5 *HZ ; - dev->get_stats = &ariadne_get_stats; - dev->set_multicast_list = &set_multicast_list; err =register_netdev (dev);if (err) {
David Miller
maintainerFrom: Alexander Beregalov <[email protected]>
Date: Fri, 10 Apr 2009 21:59:24 +0400
Quoted 17 lines · Jan Ceuleers
Quoted 8 lines
Quoted 2 lines · Alexander Beregalov
Signed-off-by Alexander Beregalov <[email protected]>...
Quoted 4 lines
drivers/net/ariadne.c +0
-0@@ -197,13 +209,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z, dev->mem_start =ZTWO_VADDR (mem_start); dev->mem_end = dev->mem_start+ARIADNE_RAM_SIZE ;Quoted 8 lines
drivers/net/ariadne.c static int __devinit ariadne_init_one(struct zorro_dev *z,
Quoted 5 lines
drivers/net/ariadne.c +1
-4- dev->open = &ariadne_open; - dev->stop = &ariadne_close; - dev->hard_start_xmit = &ariadne_start_xmit; - dev->tx_timeout = &ariadne_tx_timeout; + dev->netdev_ops = &ariadne_netdev_ops;;We don't really need two semicolons there but I suppose that they won't hurt.
Quoted 3 lines
Thanks!
David, please apply this patch
Just FYI I made sure to integrate this fixed up version.
From: Alexander Beregalov <[email protected]>
Date: Fri, 10 Apr 2009 07:24:07 +0400
Quoted 3 lines
Signed-off-by Alexander Beregalov <[email protected]>
Applied.