diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
commit | b63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch) | |
tree | 0a343ce219e2b8b38a5d702d66032c57b83d9720 /drivers/net/wan | |
parent | a9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff) |
Merge with 2.4.0-test11.
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/comx-proto-lapb.c | 7 | ||||
-rw-r--r-- | drivers/net/wan/comx.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 14 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 7 |
4 files changed, 25 insertions, 8 deletions
diff --git a/drivers/net/wan/comx-proto-lapb.c b/drivers/net/wan/comx-proto-lapb.c index 0e2737ac3..acbb7f112 100644 --- a/drivers/net/wan/comx-proto-lapb.c +++ b/drivers/net/wan/comx-proto-lapb.c @@ -15,6 +15,9 @@ * Version 0.80 (99/06/14): * - cleaned up the source code a bit * - ported back to kernel, now works as non-module + * + * Changed (00/10/29, Henner Eisen): + * - comx_rx() / comxlapb_data_indication() return status. * */ @@ -359,7 +362,7 @@ static void comxlapb_disconnected(void *token, int reason) comx_status(ch->dev, ch->line_status); } -static void comxlapb_data_indication(void *token, struct sk_buff *skb) +static int comxlapb_data_indication(void *token, struct sk_buff *skb) { struct comx_channel *ch = token; @@ -373,7 +376,7 @@ static void comxlapb_data_indication(void *token, struct sk_buff *skb) skb->dev = ch->dev; skb->mac.raw = skb->data; - comx_rx(ch->dev, skb); + return comx_rx(ch->dev, skb); } static void comxlapb_data_transmit(void *token, struct sk_buff *skb) diff --git a/drivers/net/wan/comx.c b/drivers/net/wan/comx.c index f1e1ffdcb..47ba5cc74 100644 --- a/drivers/net/wan/comx.c +++ b/drivers/net/wan/comx.c @@ -46,6 +46,9 @@ * Version 0.85 (00/08/15): * - resource release on failure in comx_mkdir * - fix return value on failure at comx_write_proc + * + * Changed (00/10/29, Henner Eisen): + * - comx_rx() / comxlapb_data_indication() return status. */ #define VERSION "0.85" @@ -852,7 +855,7 @@ cleanup_filename_protocol: cleanup_filename_hardware: remove_proc_entry(FILENAME_HARDWARE, new_dir); cleanup_new_dir: - remove_proc_entry(dentry->d_name.name, &comx_root_dir); + remove_proc_entry(dentry->d_name.name, comx_root_dir); cleanup_dev: kfree(dev); return ret; diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 826fb02c6..eaba0cd34 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -16,6 +16,8 @@ * * History * LAPBETH 001 Jonathan Naylor Cloned from bpqether.c + * 2000-10-29 Henner Eisen lapb_data_indication() return status. + * 2000-11-14 Henner Eisen dev_hold/put, NETDEV_GOING_DOWN support */ #include <linux/errno.h> @@ -79,6 +81,7 @@ static struct lapbethdev { /* * Get the ethernet device for a LAPB device */ +#if 0 static __inline__ struct net_device *lapbeth_get_ether_dev(struct net_device *dev) { struct lapbethdev *lapbeth; @@ -87,7 +90,7 @@ static __inline__ struct net_device *lapbeth_get_ether_dev(struct net_device *de return (lapbeth != NULL) ? lapbeth->ethdev : NULL; } - +#endif /* * Get the LAPB device for the ethernet device */ @@ -136,6 +139,7 @@ static int lapbeth_check_devices(struct net_device *dev) result = 1; unregister_netdev(&lapbeth->axdev); + dev_put(lapbeth->ethdev); kfree(lapbeth); } @@ -185,7 +189,7 @@ static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packe return 0; } -static void lapbeth_data_indication(void *token, struct sk_buff *skb) +static int lapbeth_data_indication(void *token, struct sk_buff *skb) { struct lapbethdev *lapbeth = (struct lapbethdev *)token; unsigned char *ptr; @@ -198,7 +202,7 @@ static void lapbeth_data_indication(void *token, struct sk_buff *skb) skb->mac.raw = skb->data; skb->pkt_type = PACKET_HOST; - netif_rx(skb); + return netif_rx(skb); } /* @@ -418,6 +422,7 @@ static int lapbeth_new_device(struct net_device *dev) memset(lapbeth, 0, sizeof(struct lapbethdev)); + dev_hold(dev); lapbeth->ethdev = dev; lapbeth->ethname[sizeof(lapbeth->ethname)-1] = '\0'; @@ -436,6 +441,7 @@ static int lapbeth_new_device(struct net_device *dev) } if (k == MAXLAPBDEV) { + dev_put(dev); kfree(lapbeth); return -ENODEV; } @@ -445,6 +451,7 @@ static int lapbeth_new_device(struct net_device *dev) dev->init = lapbeth_dev_init; if (register_netdev(dev) != 0) { + dev_put(dev); kfree(lapbeth); return -EIO; } @@ -498,6 +505,7 @@ static int lapbeth_device_event(struct notifier_block *this,unsigned long event, lapbeth_new_device(dev); break; + case NETDEV_GOING_DOWN: case NETDEV_DOWN: /* ethernet device closed -> close LAPB interface */ if ((dev = lapbeth_get_x25_dev(dev)) != NULL) dev_close(dev); diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 5651ddeb2..1d8b6b1d8 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -9,6 +9,9 @@ * recommendations. Its primarily for testing purposes. If you wanted * to do CCITT then in theory all you need is to nick the HDLC async * checksum routines from ppp.c + * Changes: + * + * 2000-10-29 Henner Eisen lapb_data_indication() return status. */ #include <linux/module.h> @@ -390,9 +393,9 @@ static int x25_asy_xmit(struct sk_buff *skb, struct net_device *dev) * at the net layer. */ -static void x25_asy_data_indication(void *token, struct sk_buff *skb) +static int x25_asy_data_indication(void *token, struct sk_buff *skb) { - netif_rx(skb); + return netif_rx(skb); } /* |