diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:20 -0500 |
commit | a1799af4d7deefccdaa9d222a886fa1373dbb49a (patch) | |
tree | d9277bf2fb817f3c102be2d68a9098d8028cec56 /drivers/net | |
parent | bca5b8939f107e498b3fdc92b3a2d286a868d347 (diff) |
com20020: convert to net_devic_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/arcnet/com20020-isa.c | 2 | ||||
-rw-r--r-- | drivers/net/arcnet/com20020-pci.c | 3 | ||||
-rw-r--r-- | drivers/net/arcnet/com20020.c | 10 |
3 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c index ea53a940272f..db08fc24047a 100644 --- a/drivers/net/arcnet/com20020-isa.c +++ b/drivers/net/arcnet/com20020-isa.c | |||
@@ -151,6 +151,8 @@ static int __init com20020_init(void) | |||
151 | if (node && node != 0xff) | 151 | if (node && node != 0xff) |
152 | dev->dev_addr[0] = node; | 152 | dev->dev_addr[0] = node; |
153 | 153 | ||
154 | dev->netdev_ops = &com20020_netdev_ops; | ||
155 | |||
154 | lp = netdev_priv(dev); | 156 | lp = netdev_priv(dev); |
155 | lp->backplane = backplane; | 157 | lp->backplane = backplane; |
156 | lp->clockp = clockp & 7; | 158 | lp->clockp = clockp & 7; |
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index 8b51f632581d..dbf4de39754d 100644 --- a/drivers/net/arcnet/com20020-pci.c +++ b/drivers/net/arcnet/com20020-pci.c | |||
@@ -72,6 +72,9 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de | |||
72 | dev = alloc_arcdev(device); | 72 | dev = alloc_arcdev(device); |
73 | if (!dev) | 73 | if (!dev) |
74 | return -ENOMEM; | 74 | return -ENOMEM; |
75 | |||
76 | dev->netdev_ops = &com20020_netdev_ops; | ||
77 | |||
75 | lp = netdev_priv(dev); | 78 | lp = netdev_priv(dev); |
76 | 79 | ||
77 | pci_set_drvdata(pdev, dev); | 80 | pci_set_drvdata(pdev, dev); |
diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 103688358fb8..bbe8f2ccdadb 100644 --- a/drivers/net/arcnet/com20020.c +++ b/drivers/net/arcnet/com20020.c | |||
@@ -149,6 +149,14 @@ int com20020_check(struct net_device *dev) | |||
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | const struct net_device_ops com20020_netdev_ops = { | ||
153 | .ndo_open = arcnet_open, | ||
154 | .ndo_stop = arcnet_close, | ||
155 | .ndo_start_xmit = arcnet_send_packet, | ||
156 | .ndo_tx_timeout = arcnet_timeout, | ||
157 | .ndo_set_multicast_list = com20020_set_mc_list, | ||
158 | }; | ||
159 | |||
152 | /* Set up the struct net_device associated with this card. Called after | 160 | /* Set up the struct net_device associated with this card. Called after |
153 | * probing succeeds. | 161 | * probing succeeds. |
154 | */ | 162 | */ |
@@ -170,8 +178,6 @@ int com20020_found(struct net_device *dev, int shared) | |||
170 | lp->hw.copy_from_card = com20020_copy_from_card; | 178 | lp->hw.copy_from_card = com20020_copy_from_card; |
171 | lp->hw.close = com20020_close; | 179 | lp->hw.close = com20020_close; |
172 | 180 | ||
173 | dev->set_multicast_list = com20020_set_mc_list; | ||
174 | |||
175 | if (!dev->dev_addr[0]) | 181 | if (!dev->dev_addr[0]) |
176 | dev->dev_addr[0] = inb(ioaddr + BUS_ALIGN*8); /* FIXME: do this some other way! */ | 182 | dev->dev_addr[0] = inb(ioaddr + BUS_ALIGN*8); /* FIXME: do this some other way! */ |
177 | 183 | ||