git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netxen: update version to 4.0.73
[safe/jmp/linux-2.6]
/
drivers
/
net
/
wan
/
sealevel.c
diff --git
a/drivers/net/wan/sealevel.c
b/drivers/net/wan/sealevel.c
index
0941a26
..
61249f4
100644
(file)
--- a/
drivers/net/wan/sealevel.c
+++ b/
drivers/net/wan/sealevel.c
@@
-84,8
+84,7
@@
static int sealevel_open(struct net_device *d)
* Link layer up.
*/
* Link layer up.
*/
- switch (unit)
- {
+ switch (unit) {
case 0:
err = z8530_sync_dma_open(d, slvl->chan);
break;
case 0:
err = z8530_sync_dma_open(d, slvl->chan);
break;
@@
-133,8
+132,7
@@
static int sealevel_close(struct net_device *d)
hdlc_close(d);
netif_stop_queue(d);
hdlc_close(d);
netif_stop_queue(d);
- switch (unit)
- {
+ switch (unit) {
case 0:
z8530_sync_dma_close(d, slvl->chan);
break;
case 0:
z8530_sync_dma_close(d, slvl->chan);
break;
@@
-156,7
+154,8
@@
static int sealevel_ioctl(struct net_device *d, struct ifreq *ifr, int cmd)
* Passed network frames, fire them downwind.
*/
* Passed network frames, fire them downwind.
*/
-static int sealevel_queue_xmit(struct sk_buff *skb, struct net_device *d)
+static netdev_tx_t sealevel_queue_xmit(struct sk_buff *skb,
+ struct net_device *d)
{
return z8530_queue_xmit(dev_to_chan(d)->chan, skb);
}
{
return z8530_queue_xmit(dev_to_chan(d)->chan, skb);
}
@@
-169,6
+168,14
@@
static int sealevel_attach(struct net_device *dev, unsigned short encoding,
return -EINVAL;
}
return -EINVAL;
}
+static const struct net_device_ops sealevel_ops = {
+ .ndo_open = sealevel_open,
+ .ndo_stop = sealevel_close,
+ .ndo_change_mtu = hdlc_change_mtu,
+ .ndo_start_xmit = hdlc_start_xmit,
+ .ndo_do_ioctl = sealevel_ioctl,
+};
+
static int slvl_setup(struct slvl_device *sv, int iobase, int irq)
{
struct net_device *dev = alloc_hdlcdev(sv);
static int slvl_setup(struct slvl_device *sv, int iobase, int irq)
{
struct net_device *dev = alloc_hdlcdev(sv);
@@
-177,9
+184,7
@@
static int slvl_setup(struct slvl_device *sv, int iobase, int irq)
dev_to_hdlc(dev)->attach = sealevel_attach;
dev_to_hdlc(dev)->xmit = sealevel_queue_xmit;
dev_to_hdlc(dev)->attach = sealevel_attach;
dev_to_hdlc(dev)->xmit = sealevel_queue_xmit;
- dev->open = sealevel_open;
- dev->stop = sealevel_close;
- dev->do_ioctl = sealevel_ioctl;
+ dev->netdev_ops = &sealevel_ops;
dev->base_addr = iobase;
dev->irq = irq;
dev->base_addr = iobase;
dev->irq = irq;
@@
-259,7
+264,7
@@
static __init struct slvl_board *slvl_init(int iobase, int irq,
/* We want a fast IRQ for this device. Actually we'd like an even faster
IRQ ;) - This is one driver RtLinux is made for */
/* We want a fast IRQ for this device. Actually we'd like an even faster
IRQ ;) - This is one driver RtLinux is made for */
- if (request_irq(irq,
&
z8530_interrupt, IRQF_DISABLED,
+ if (request_irq(irq, z8530_interrupt, IRQF_DISABLED,
"SeaLevel", dev) < 0) {
printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq);
goto err_request_irq;
"SeaLevel", dev) < 0) {
printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq);
goto err_request_irq;
@@
-335,8
+340,7
@@
static void __exit slvl_shutdown(struct slvl_board *b)
z8530_shutdown(&b->board);
z8530_shutdown(&b->board);
- for (u = 0; u < 2; u++)
- {
+ for (u = 0; u < 2; u++) {
struct net_device *d = b->dev[u].chan->netdevice;
unregister_hdlc_device(d);
free_netdev(d);
struct net_device *d = b->dev[u].chan->netdevice;
unregister_hdlc_device(d);
free_netdev(d);
@@
-384,7
+388,7
@@
static int __init slvl_init_module(void)
static void __exit slvl_cleanup_module(void)
{
static void __exit slvl_cleanup_module(void)
{
- if(slvl_unit)
+ if
(slvl_unit)
slvl_shutdown(slvl_unit);
}
slvl_shutdown(slvl_unit);
}