Removed old compatibility stuff for 2.0.X kernels.

From now on, this code is for 2.1.X ONLY!
Old stuff is still in the separate branch.
This commit is contained in:
Fritz Elfert 1997-10-01 09:22:21 +00:00
parent 82b153010d
commit 8b306c76f8
33 changed files with 134 additions and 447 deletions

View File

@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.3 1997/09/25 17:25:41 fritz
* Support for adding cards at runtime.
* Support for new Firmware.
*
* Revision 1.2 1997/09/24 19:44:15 fritz
* Added MSN mapping support, some cleanup.
*
@ -374,7 +378,7 @@ actcapi_nextsmsg(act2000_card *card)
restore_flags(flags);
return n;
}
#undef DEBUG_MSG
#define DEBUG_MSG
#undef DEBUG_DATA_MSG
#undef DEBUG_DUMP_SKB

View File

@ -6,6 +6,10 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.5 1997/07/12 08:22:26 calle
* Correct bug in CARD_NR macro, so now more than one card will work.
* Allow card reset, even if card is in running state.
*
*
* Revision 1.4 1997/05/27 15:17:45 fritz
* Added changes for recent 2.1.x kernels:
@ -58,13 +62,11 @@ int irq = 15;
int showcapimsgs = 0; /* used in lli.c */
int loaddebug = 0;
#ifdef HAS_NEW_SYMTAB
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
MODULE_PARM(portbase, "i");
MODULE_PARM(irq, "2-15i");
MODULE_PARM(showcapimsgs, "0-3i");
MODULE_PARM(loaddebug, "0-1i");
#endif
/* ------------------------------------------------------------- */
@ -876,23 +878,10 @@ int detach_capi_interface(struct capi_interface_user *userp)
/* -------- Init & Cleanup ------------------------------------- */
/* ------------------------------------------------------------- */
#ifdef HAS_NEW_SYMTAB
EXPORT_SYMBOL(attach_capi_interface);
EXPORT_SYMBOL(detach_capi_interface);
EXPORT_SYMBOL(avmb1_addcard);
EXPORT_SYMBOL(avmb1_probecard);
#else
static struct symbol_table capidev_syms =
{
#include <linux/symtab_begin.h>
X(attach_capi_interface),
X(detach_capi_interface),
X(avmb1_addcard),
X(avmb1_probecard),
#include <linux/symtab_end.h>
};
#endif
/*
* init / exit functions
@ -907,11 +896,6 @@ int avmb1_init(void)
char *p;
char rev[10];
#ifndef HAS_NEW_SYMTAB
/* No symbols to export, hide all symbols */
register_symtab(&capidev_syms);
#endif
skb_queue_head_init(&recv_queue);
/* init_bh(CAPI_BH, do_capi_bh); */

View File

@ -6,6 +6,10 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.2 1997/07/13 12:22:42 calle
* bug fix for more than one controller in connect_req.
* debugoutput now with contrnr.
*
*
* Revision 1.1 1997/03/04 21:50:28 calle
* Frirst version in isdn4linux
@ -508,7 +512,6 @@ void B1_handle_interrupt(avmb1_card * card)
if (!(skb = dev_alloc_skb(DataB3Len + MsgLen))) {
printk(KERN_ERR "b1lli: incoming packet dropped\n");
} else {
SET_SKB_FREE(skb);
memcpy(skb_put(skb, MsgLen), card->msgbuf, MsgLen);
memcpy(skb_put(skb, DataB3Len), card->databuf, DataB3Len);
CAPIMSG_SETDATA(skb->data, skb->data + MsgLen);
@ -540,7 +543,6 @@ void B1_handle_interrupt(avmb1_card * card)
if (!(skb = dev_alloc_skb(MsgLen))) {
printk(KERN_ERR "b1lli: incoming packet dropped\n");
} else {
SET_SKB_FREE(skb);
memcpy(skb_put(skb, MsgLen), card->msgbuf, MsgLen);
avmb1_handle_capimsg(card, ApplId, skb);
}

View File

@ -6,6 +6,11 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.2 1997/05/18 09:24:13 calle
* added verbose disconnect reason reporting to avmb1.
* some fixes in capi20 interface.
* changed info messages for B1-PCI
*
* Revision 1.1 1997/03/30 17:10:42 calle
* added support for AVM-B1-PCI card.
*
@ -33,9 +38,7 @@ static char *revision = "$Revision$";
/* ------------------------------------------------------------- */
#ifdef HAS_NEW_SYMTAB
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
#endif
/* ------------------------------------------------------------- */

View File

@ -6,6 +6,9 @@
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.5 1997/08/21 23:11:55 fritz
* Added changes for kernels >= 2.1.45
*
* Revision 1.4 1997/05/27 15:17:50 fritz
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
@ -45,9 +48,7 @@
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/skbuff.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <asm/poll.h>
#endif
#include <linux/capi.h>
#include <linux/kernelcapi.h>
@ -56,17 +57,13 @@
#include "capicmd.h"
#include "capidev.h"
#ifdef HAS_NEW_SYMTAB
MODULE_AUTHOR("Carsten Paeth (calle@calle.in-berlin.de)");
#endif
/* -------- driver information -------------------------------------- */
int capi_major = 68; /* allocated */
#ifdef HAS_NEW_SYMTAB
MODULE_PARM(capi_major, "i");
#endif
/* -------- global variables ---------------------------------------- */
@ -96,27 +93,14 @@ static void capi_signal(__u16 applid, __u32 minor)
/* -------- file_operations ----------------------------------------- */
#if LINUX_VERSION_CODE < 0x020100
static int capi_lseek(struct inode *inode, struct file *file,
off_t offset, int origin)
{
return -ESPIPE;
}
#else
static long long capi_llseek(struct inode *inode, struct file *file,
long long offset, int origin)
{
return -ESPIPE;
}
#endif
#if LINUX_VERSION_CODE < 0x020100
static int capi_read(struct inode *inode, struct file *file,
char *buf, int count)
#else
static long capi_read(struct inode *inode, struct file *file,
char *buf, unsigned long count)
#endif
{
unsigned int minor = MINOR(inode->i_rdev);
struct capidev *cdev;
@ -164,13 +148,8 @@ static long capi_read(struct inode *inode, struct file *file,
return copied;
}
#if LINUX_VERSION_CODE < 0x020100
static int capi_write(struct inode *inode, struct file *file,
const char *buf, int count)
#else
static long capi_write(struct inode *inode, struct file *file,
const char *buf, unsigned long count)
#endif
{
unsigned int minor = MINOR(inode->i_rdev);
struct capidev *cdev;
@ -215,40 +194,6 @@ static long capi_write(struct inode *inode, struct file *file,
return count;
}
#if (LINUX_VERSION_CODE < 0x020117)
static int capi_select(struct inode *inode, struct file *file,
int sel_type, select_table * wait)
{
unsigned int minor = MINOR(inode->i_rdev);
struct capidev *cdev;
if (!minor || minor > CAPI_MAXMINOR || !capidevs[minor].is_registered)
return -ENODEV;
cdev = &capidevs[minor];
switch (sel_type) {
case SEL_IN:
if (!skb_queue_empty(&cdev->recv_queue))
return 1;
/* fall througth */
case SEL_EX:
/* error conditions ? */
select_wait(&cdev->recv_wait, wait);
return 0;
case SEL_OUT:
/*
if (!queue_full())
return 1;
select_wait(&cdev->send_wait, wait);
return 0;
*/
return 1;
}
return 1;
}
#else
static unsigned int
capi_poll(struct file *file, poll_table * wait)
{
@ -270,7 +215,6 @@ capi_poll(struct file *file, poll_table * wait)
mask |= POLLIN | POLLRDNORM;
return mask;
}
#endif
static int capi_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
@ -452,7 +396,7 @@ static int capi_open(struct inode *inode, struct file *file)
return 0;
}
static CLOSETYPE
static int
capi_release(struct inode *inode, struct file *file)
{
unsigned int minor = MINOR(inode->i_rdev);
@ -461,7 +405,7 @@ capi_release(struct inode *inode, struct file *file)
if (minor >= CAPI_MAXMINOR || !capidevs[minor].is_open) {
printk(KERN_ERR "capi20: release minor %d ???\n", minor);
return CLOSEVAL;
return 0;
}
cdev = &capidevs[minor];
@ -479,24 +423,16 @@ capi_release(struct inode *inode, struct file *file)
cdev->is_open = 0;
MOD_DEC_USE_COUNT;
return CLOSEVAL;
return 0;
}
static struct file_operations capi_fops =
{
#if LINUX_VERSION_CODE < 0x020100
capi_lseek,
#else
capi_llseek,
#endif
capi_read,
capi_write,
NULL, /* capi_readdir */
#if (LINUX_VERSION_CODE < 0x020117)
capi_select,
#else
capi_poll,
#endif
capi_ioctl,
NULL, /* capi_mmap */
capi_open,

View File

@ -6,6 +6,10 @@
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.4 1997/07/13 12:22:43 calle
* bug fix for more than one controller in connect_req.
* debugoutput now with contrnr.
*
* Revision 1.3 1997/05/18 09:24:15 calle
* added verbose disconnect reason reporting to avmb1.
* some fixes in capi20 interface.
@ -51,10 +55,8 @@
static char *revision = "$Revision$";
int debugmode = 0;
#ifdef HAS_NEW_SYMTAB
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
MODULE_PARM(debugmode, "i");
#endif
/* -------- type definitions ----------------------------------------- */
@ -419,7 +421,6 @@ static void send_message(capidrv_contr * card, _cmsg * cmsg)
capi_cmsg2message(cmsg, cmsg->buf);
len = CAPIMSG_LEN(cmsg->buf);
skb = dev_alloc_skb(len);
SET_SKB_FREE(skb);
memcpy(skb_put(skb, len), cmsg->buf, len);
(*capifuncs->capi_put_message) (global.appid, skb);
}
@ -1511,7 +1512,6 @@ static int if_sendbuf(int id, int channel, struct sk_buff *skb)
printk(KERN_DEBUG "capidrv: only %d bytes headroom\n",
skb_headroom(skb));
#endif
SET_SKB_FREE(nskb);
memcpy(skb_put(nskb, msglen), sendcmsg.buf, msglen);
memcpy(skb_put(nskb, skb->len), skb->data, skb->len);
errcode = (*capifuncs->capi_put_message) (global.appid, nskb);
@ -1694,11 +1694,6 @@ int capidrv_init(void)
if (!capifuncs)
return -EIO;
#ifndef HAS_NEW_SYMTAB
/* No symbols to export, hide all symbols */
register_symtab(NULL);
#endif
if ((p = strchr(revision, ':'))) {
strcpy(rev, p + 1);
p = strchr(rev, '$');

View File

@ -7,6 +7,9 @@
* Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.4 1997/08/10 07:43:55 calle
* forgot to export symbol capi_info2str for 2.1.x
*
* Revision 1.3 1997/05/18 09:24:18 calle
* added verbose disconnect reason reporting to avmb1.
* some fixes in capi20 interface.
@ -935,7 +938,6 @@ char *capi_cmsg2str(_cmsg * cmsg)
}
#ifdef HAS_NEW_SYMTAB
EXPORT_SYMBOL(capi_cmsg2message);
EXPORT_SYMBOL(capi_message2cmsg);
EXPORT_SYMBOL(capi_cmsg_header);
@ -943,28 +945,11 @@ EXPORT_SYMBOL(capi_cmd2str);
EXPORT_SYMBOL(capi_cmsg2str);
EXPORT_SYMBOL(capi_message2str);
EXPORT_SYMBOL(capi_info2str);
#else
static struct symbol_table capifunc_syms =
{
#include <linux/symtab_begin.h>
X(capi_cmsg2message),
X(capi_message2cmsg),
X(capi_cmsg_header),
X(capi_cmd2str),
X(capi_cmsg2str),
X(capi_message2str),
X(capi_info2str),
#include <linux/symtab_end.h>
};
#endif
#ifdef MODULE
int init_module(void)
{
#ifndef HAS_NEW_SYMTAB
register_symtab(&capifunc_syms);
#endif
return 0;
}

View File

@ -6,6 +6,9 @@
* (c) Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.1 1997/03/04 21:50:36 calle
* Frirst version in isdn4linux
*
* Revision 2.2 1997/02/12 09:31:39 calle
* new version
*
@ -20,8 +23,4 @@
#include <linux/version.h>
#include <linux/isdnif.h>
#if LINUX_VERSION_CODE >= 0x020112 /* 2.1.18 */
#define HAS_NEW_SYMTAB
#endif
#endif /* __COMPAT_H__ */

View File

@ -7,6 +7,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.6 1997/09/11 17:26:58 keil
* Open B-channel if here are incomming packets
*
* Revision 2.5 1997/08/07 17:46:05 keil
* Fix Incomming Call without broadcast
*
@ -36,12 +39,7 @@
#include "hisax.h"
#ifdef MODULE
#if (LINUX_VERSION_CODE < 0x020111)
extern long mod_use_count_;
#define MOD_USE_COUNT mod_use_count_
#else
#define MOD_USE_COUNT ((&__this_module)->usecount)
#endif
#endif /* MODULE */
const char *lli_revision = "$Revision$";
@ -1953,11 +1951,7 @@ HiSax_command(isdn_ctrl * ic)
break;
#ifdef MODULE
case (55):
#if (LINUX_VERSION_CODE < 0x020111)
MOD_USE_COUNT = MOD_VISITED;
#else
MOD_USE_COUNT = 0;
#endif
HiSax_mod_inc_use_count();
break;
#endif /* MODULE */

View File

@ -5,6 +5,9 @@
*
*
* $Log$
* Revision 2.2 1997/09/11 17:24:46 keil
* Add new cards
*
* Revision 2.1 1997/07/27 21:41:35 keil
* version change
*
@ -232,7 +235,6 @@ int mem[] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
char *id = HiSaxID;
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_AUTHOR("Karsten Keil");
MODULE_PARM(type, "1-16i");
MODULE_PARM(protocol, "1-16i");
@ -244,7 +246,6 @@ MODULE_PARM(id, "s");
MODULE_PARM(io0, "1-16i");
MODULE_PARM(io1, "1-16i");
#endif
#endif
#endif
@ -427,11 +428,7 @@ HiSax_init(void)
/* No symbols to export, hide all symbols */
#ifdef MODULE
#if (LINUX_VERSION_CODE < 0x020111)
register_symtab(NULL);
#else
EXPORT_NO_SYMBOLS;
#endif
printk(KERN_NOTICE "HiSax: module installed\n");
#endif
return (0);

View File

@ -7,6 +7,9 @@
* This is an include file for fast inline IRQ stuff
*
* $Log$
* Revision 1.4 1997/08/15 17:48:02 keil
* cosmetic
*
* Revision 1.3 1997/07/27 21:38:36 keil
* new B-channel interface
*
@ -179,7 +182,6 @@ hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
if (!(skb = dev_alloc_skb(count)))
printk(KERN_WARNING "HSCX: receive out of memory\n");
else {
SET_SKB_FREE(skb);
memcpy(skb_put(skb, count), bcs->hw.hscx.rcvbuf, count);
skb_queue_tail(&bcs->rqueue, skb);
}
@ -195,7 +197,6 @@ hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
if (!(skb = dev_alloc_skb(32)))
printk(KERN_WARNING "HiSax: receive out of memory\n");
else {
SET_SKB_FREE(skb);
memcpy(skb_put(skb, 32), bcs->hw.hscx.rcvbuf, 32);
skb_queue_tail(&bcs->rqueue, skb);
}

View File

@ -6,6 +6,9 @@
*
*
* $Log$
* Revision 1.6 1997/08/15 17:47:08 keil
* avoid oops because a uninitialised timer
*
* Revision 1.5 1997/08/07 17:48:49 keil
* fix wrong parenthesis
*
@ -320,7 +323,6 @@ isac_interrupt(struct IsdnCardState *cs, u_char val)
if (!(skb = alloc_skb(count, GFP_ATOMIC)))
printk(KERN_WARNING "Elsa: D receive out of memory\n");
else {
SET_SKB_FREE(skb);
memcpy(skb_put(skb, count), cs->rcvbuf, count);
skb_queue_tail(&cs->rq, skb);
}

View File

@ -7,6 +7,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.2 1997/07/31 11:49:05 keil
* Eroor handling for no TEI assign
*
* Revision 2.1 1997/07/27 21:34:38 keil
* cosmetics
*
@ -306,7 +309,6 @@ send_uframe(struct PStack *st, u_char cmd, u_char cr)
printk(KERN_WARNING "isdl2 can't alloc sbbuff for send_uframe\n");
return;
}
SET_SKB_FREE(skb);
memcpy(skb_put(skb, i), tmp, i);
enqueue_super(st, skb);
}
@ -656,7 +658,6 @@ enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf)
printk(KERN_WARNING "isdl2 can't alloc sbbuff for enquiry_cr\n");
return;
}
SET_SKB_FREE(skb);
memcpy(skb_put(skb, i), tmp, i);
enqueue_super(st, skb);
}
@ -1043,7 +1044,6 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
"isdl2 pull_iqueue skb header(%d/%d) too short\n", i, p1);
oskb = skb;
skb = alloc_skb(oskb->len + i, GFP_ATOMIC);
SET_SKB_FREE(skb);
memcpy(skb_put(skb, i), header, i);
memcpy(skb_put(skb, oskb->len), oskb->data, oskb->len);
FreeSkb(oskb);

View File

@ -7,6 +7,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.1 1997/08/03 14:36:32 keil
* Implement RESTART procedure
*
* Revision 2.0 1997/07/27 21:15:42 keil
* New Callref based layer3
*
@ -171,7 +174,6 @@ l3_alloc_skb(int len)
printk(KERN_WARNING "HiSax: No skb for D-channel\n");
return (NULL);
}
SET_SKB_FREE(skb);
skb_reserve(skb, MAX_HEADER_LEN);
return (skb);
}

View File

@ -7,6 +7,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.2 1997/07/31 19:24:39 keil
* fixed a warning
*
* Revision 2.1 1997/07/31 11:50:16 keil
* ONE TEI and FIXED TEI handling
*
@ -121,7 +124,6 @@ put_tei_msg(struct PStack *st, u_char m_id, unsigned int ri, u_char tei)
printk(KERN_WARNING "HiSax: No skb for TEI manager\n");
return;
}
SET_SKB_FREE(skb);
bp = skb_put(skb, 3);
bp[0] = (TEI_SAPI << 2);
bp[1] = (GROUP_TEI << 1) | 0x1;

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.46 1997/08/21 22:38:33 fritz
* Fixed a typo.
*
* Revision 1.45 1997/06/21 10:42:06 fritz
* Added availability to select leased mode on only one channel.
*
@ -1785,11 +1788,7 @@ icn_init(void)
dev.firstload = 1;
/* No symbols to export, hide all symbols */
#if (LINUX_VERSION_CODE < 0x020111)
register_symtab(NULL);
#else
EXPORT_NO_SYMBOLS;
#endif
if ((p = strchr(revision, ':'))) {
strcpy(rev, p + 1);

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.26 1997/02/14 12:23:16 fritz
* Added support for new insmod parameter handling.
*
* Revision 1.25 1997/02/10 10:10:31 fritz
* Changes for Kernel 2.1.X compatibility.
* Enhanced initialization, can recover from
@ -300,7 +303,6 @@ static char *icn_id = "\0";
static char *icn_id2 = "\0";
#ifdef MODULE
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_AUTHOR("Fritz Elfert");
MODULE_PARM(portbase, "i");
MODULE_PARM_DESC(portbase, "Port adress of first card");
@ -311,7 +313,6 @@ MODULE_PARM_DESC(icn_id, "ID-String of first card");
MODULE_PARM(icn_id2, "s");
MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)");
#endif
#endif
#endif /* __KERNEL__ */

View File

@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.8 1997/03/02 14:29:16 fritz
* More ttyI related cleanup.
*
* Revision 1.7 1997/02/03 22:44:11 fritz
* Reformatted according CodingStyle
*
@ -528,7 +531,6 @@ isdn_audio_goertzel(int *sample, modem_info * info)
info->line);
return;
}
SET_SKB_FREE(skb);
result = (int *) skb_put(skb, sizeof(int) * NCOEFF);
for (k = 0; k < NCOEFF; k++) {
sk = sk1 = sk2 = 0;

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.45 1997/08/21 23:11:41 fritz
* Added changes for kernels >= 2.1.45
*
* Revision 1.44 1997/05/27 15:17:23 fritz
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
@ -200,9 +203,7 @@
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/version.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <asm/poll.h>
#endif
#include <linux/isdn.h>
#include "isdn_common.h"
#include "isdn_tty.h"
@ -260,13 +261,6 @@ isdn_dumppkt(char *s, u_char * p, int len, int dumplen)
}
#endif
static __inline void
isdn_trash_skb(struct sk_buff *skb, int rw)
{
SET_SKB_FREE(skb);
kfree_skb(skb, rw);
}
static void
isdn_free_queue(struct sk_buff_head *queue)
{
@ -277,7 +271,7 @@ isdn_free_queue(struct sk_buff_head *queue)
cli();
if (skb_queue_len(queue))
while ((skb = skb_dequeue(queue)))
isdn_trash_skb(skb, FREE_READ);
kfree_skb(skb, FREE_READ);
restore_flags(flags);
}
@ -374,7 +368,7 @@ isdn_receive_skb_callback(int di, int channel, struct sk_buff *skb)
int i;
if ((i = isdn_dc2minor(di, channel)) == -1) {
isdn_trash_skb(skb, FREE_READ);
kfree_skb(skb, FREE_READ);
return;
}
/* Update statistics */
@ -383,13 +377,12 @@ isdn_receive_skb_callback(int di, int channel, struct sk_buff *skb)
if (isdn_net_rcv_skb(i, skb))
return;
/* No network-device found, deliver to tty or raw-channel */
SET_SKB_FREE(skb);
if (skb->len) {
if (isdn_tty_rcv_skb(i, di, channel, skb))
return;
wake_up_interruptible(&dev->drv[di]->rcv_waitq[channel]);
} else
isdn_trash_skb(skb, FREE_READ);
kfree_skb(skb, FREE_READ);
}
void
@ -752,7 +745,7 @@ isdn_readbchan(int di, int channel, u_char * buf, u_char * fp, int len, int user
ISDN_AUDIO_SKB_LOCK(skb) = 0;
#endif
skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]);
isdn_trash_skb(skb, FREE_READ);
kfree_skb(skb, FREE_READ);
} else {
/* Not yet emptied this buff, so it
* must stay in the queue, for further calls
@ -848,8 +841,8 @@ isdn_info_update(void)
wake_up_interruptible(&(dev->info_waitq));
}
static RWTYPE
isdn_read(struct inode *inode, struct file *file, char *buf, RWARG count)
static long
isdn_read(struct inode *inode, struct file *file, char *buf, unsigned long count)
{
uint minor = MINOR(inode->i_rdev);
int len = 0;
@ -922,14 +915,14 @@ isdn_read(struct inode *inode, struct file *file, char *buf, RWARG count)
return -ENODEV;
}
static LSTYPE
isdn_lseek(struct inode *inode, struct file *file, LSARG offset, int orig)
static long long
isdn_lseek(struct inode *inode, struct file *file, long long offset, int orig)
{
return -ESPIPE;
}
static RWTYPE
isdn_write(struct inode *inode, struct file *file, const char *buf, RWARG count)
static long
isdn_write(struct inode *inode, struct file *file, const char *buf, unsigned long count)
{
uint minor = MINOR(inode->i_rdev);
int drvidx;
@ -973,41 +966,6 @@ isdn_write(struct inode *inode, struct file *file, const char *buf, RWARG count)
return -ENODEV;
}
#if (LINUX_VERSION_CODE < 0x020117)
static int
isdn_select(struct inode *inode, struct file *file, int type, select_table * st)
{
uint minor = MINOR(inode->i_rdev);
int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
if (minor == ISDN_MINOR_STATUS) {
if (file->private_data)
return 1;
else {
if (st)
select_wait(&(dev->info_waitq), st);
return 0;
}
}
if (minor >= ISDN_MINOR_CTRL && minor <= ISDN_MINOR_CTRLMAX) {
if (drvidx < 0)
return -ENODEV;
if (dev->drv[drvidx]->stavail)
return 1;
else {
if (st)
select_wait(&(dev->drv[drvidx]->st_waitq), st);
return 0;
}
return 1;
}
#ifdef CONFIG_ISDN_PPP
if (minor <= ISDN_MINOR_PPPMAX)
return (isdn_ppp_select(minor - ISDN_MINOR_PPP, file, type, st));
#endif
return -ENODEV;
}
#else
static unsigned int
isdn_poll(struct file *file, poll_table * wait)
{
@ -1046,7 +1004,6 @@ isdn_poll(struct file *file, poll_table * wait)
printk(KERN_ERR "isdn_common: isdn_poll 2 -> what the hell\n");
return POLLERR;
}
#endif
static int
isdn_set_allcfg(char *src)
@ -1087,7 +1044,7 @@ isdn_set_allcfg(char *src)
restore_flags(flags);
return ret;
}
GET_USER(phone.phone[phone_len], src++);
get_user(phone.phone[phone_len], src++);
if ((phone.phone[phone_len] == ' ') ||
(phone.phone[phone_len] == '\0')) {
if (phone_len) {
@ -1487,7 +1444,7 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
while (1) {
if ((ret = verify_area(VERIFY_READ, p, 1)))
return ret;
GET_USER(bname[j], p++);
get_user(bname[j], p++);
switch (bname[j]) {
case '\0':
loop = 0;
@ -1646,7 +1603,7 @@ isdn_open(struct inode *ino, struct file *filep)
return -ENODEV;
}
static CLOSETYPE
static int
isdn_close(struct inode *ino, struct file *filep)
{
uint minor = MINOR(ino->i_rdev);
@ -1664,39 +1621,39 @@ isdn_close(struct inode *ino, struct file *filep)
else
dev->infochain = (infostruct *) (p->next);
kfree(p);
return CLOSEVAL;
return 0;
}
q = p;
p = (infostruct *) (p->next);
}
printk(KERN_WARNING "isdn: No private data while closing isdnctrl\n");
return CLOSEVAL;
return 0;
}
if (minor < ISDN_MINOR_CTRL) {
drvidx = isdn_minor2drv(minor);
if (drvidx < 0)
return CLOSEVAL;
return 0;
c.command = ISDN_CMD_UNLOCK;
c.driver = drvidx;
(void) dev->drv[drvidx]->interface->command(&c);
return CLOSEVAL;
return 0;
}
if (minor <= ISDN_MINOR_CTRLMAX) {
drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
if (drvidx < 0)
return CLOSEVAL;
return 0;
if (dev->profd == current)
dev->profd = NULL;
c.command = ISDN_CMD_UNLOCK;
c.driver = drvidx;
(void) dev->drv[drvidx]->interface->command(&c);
return CLOSEVAL;
return 0;
}
#ifdef CONFIG_ISDN_PPP
if (minor <= ISDN_MINOR_PPPMAX)
isdn_ppp_release(minor - ISDN_MINOR_PPP, filep);
#endif
return CLOSEVAL;
return 0;
}
static struct file_operations isdn_fops =
@ -1705,11 +1662,7 @@ static struct file_operations isdn_fops =
isdn_read,
isdn_write,
NULL, /* isdn_readdir */
#if (LINUX_VERSION_CODE < 0x020117)
isdn_select, /* isdn_select */
#else
isdn_poll, /* isdn_poll */
#endif
isdn_ioctl, /* isdn_ioctl */
NULL, /* isdn_mmap */
isdn_open,
@ -1887,7 +1840,6 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char * buf, int len,
return 0;
skb_reserve(skb, dev->drv[drvidx]->interface->hl_hdrlen);
SET_SKB_FREE(skb);
if (user)
copy_from_user(skb_put(skb, len), buf, len);
@ -2131,8 +2083,6 @@ isdn_init(void)
}
#endif /* CONFIG_ISDN_PPP */
isdn_export_syms();
strcpy(irev, isdn_revision);
strcpy(trev, isdn_tty_revision);
strcpy(nrev, isdn_net_revision);

View File

@ -21,6 +21,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.6 1997/02/28 02:32:44 fritz
* Cleanup: Moved some tty related stuff from isdn_common.c
* to isdn_tty.c
* Bugfix: Bisync protocol did not behave like documented.
*
* Revision 1.5 1997/02/10 10:05:45 fritz
* More changes for Kernel 2.1.X
* Symbol information moved to isdn_syms.c
@ -66,11 +71,6 @@ extern int isdn_readbchan(int, int, u_char *, u_char *, int, int);
extern int isdn_get_free_channel(int, int, int, int, int);
extern int isdn_writebuf_skb_stub(int, int, struct sk_buff *);
extern int register_isdn(isdn_if * i);
#if (LINUX_VERSION_CODE < 0x020111)
extern void isdn_export_syms(void);
#else
#define isdn_export_syms()
#endif
#if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
extern void isdn_dumppkt(char *, u_char *, int, int);
#endif

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.49 1997/08/21 14:38:13 fritz
* Bugfix: Did not compile without SyncPPP.
*
* Revision 1.48 1997/06/22 11:57:15 fritz
* Added ability to adjust slave triggerlevel.
*
@ -234,11 +237,7 @@ isdn_net_unreachable(struct device *dev, struct sk_buff *skb, char *reason)
{
printk(KERN_DEBUG "isdn_net: %s: %s, send ICMP\n",
dev->name, reason);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0
#if (LINUX_VERSION_CODE < 0x02010f) /* 2.1.15 */
,dev
#endif
);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
}
static void
@ -1384,38 +1383,6 @@ isdn_net_header(struct sk_buff *skb, struct device *dev, unsigned short type,
}
/* We don't need to send arp, because we have point-to-point connections. */
#if (LINUX_VERSION_CODE < 0x02010F)
static int
isdn_net_rebuild_header(void *buff, struct device *dev, unsigned long dst,
struct sk_buff *skb)
{
isdn_net_local *lp = dev->priv;
int ret = 0;
if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
struct ethhdr *eth = (struct ethhdr *) buff;
/*
* Only ARP/IP is currently supported
*/
if (eth->h_proto != htons(ETH_P_IP)) {
printk(KERN_WARNING
"isdn_net: %s don't know how to resolve type %d addresses?\n",
dev->name, (int) eth->h_proto);
memcpy(eth->h_source, dev->dev_addr, dev->addr_len);
return 0;
}
/*
* Try to get ARP to resolve the header.
*/
#ifdef CONFIG_INET
ret = arp_find(eth->h_dest, dst, dev, dev->pa_addr, skb) ? 1 : 0;
#endif
}
return ret;
}
#else
static int
isdn_net_rebuild_header(struct sk_buff *skb)
{
@ -1446,7 +1413,7 @@ isdn_net_rebuild_header(struct sk_buff *skb)
}
return ret;
}
#endif
/*
* Interface-setup. (called just after registering a new interface)
*/
@ -1467,21 +1434,13 @@ isdn_net_init(struct device *ndev)
return -ENODEV;
}
ether_setup(ndev);
#if (LINUX_VERSION_CODE < 0x02010F)
lp->org_hcb = ndev->header_cache_bind;
#else
lp->org_hhc = ndev->hard_header_cache;
#endif
lp->org_hcu = ndev->header_cache_update;
/* Setup the generic properties */
ndev->hard_header = NULL;
#if (LINUX_VERSION_CODE < 0x02010F)
ndev->header_cache_bind = NULL;
#else
ndev->hard_header_cache = NULL;
#endif
ndev->header_cache_update = NULL;
ndev->mtu = 1500;
ndev->flags = IFF_NOARP;
@ -2261,29 +2220,17 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
if (cfg->p_encap != p->local.p_encap) {
if (cfg->p_encap == ISDN_NET_ENCAP_RAWIP) {
p->dev.hard_header = NULL;
#if (LINUX_VERSION_CODE < 0x02010F)
p->dev.header_cache_bind = NULL;
#else
p->dev.hard_header_cache = NULL;
#endif
p->dev.header_cache_update = NULL;
p->dev.flags = IFF_NOARP;
} else {
p->dev.hard_header = isdn_net_header;
if (cfg->p_encap == ISDN_NET_ENCAP_ETHER) {
#if (LINUX_VERSION_CODE < 0x02010F)
p->dev.header_cache_bind = p->local.org_hcb;
#else
p->dev.hard_header_cache = p->local.org_hhc;
#endif
p->dev.header_cache_update = p->local.org_hcu;
p->dev.flags = IFF_BROADCAST | IFF_MULTICAST;
} else {
#if (LINUX_VERSION_CODE < 0x02010F)
p->dev.header_cache_bind = NULL;
#else
p->dev.hard_header_cache = NULL;
#endif
p->dev.header_cache_update = NULL;
p->dev.flags = IFF_NOARP;
}

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.29 1997/08/21 23:11:44 fritz
* Added changes for kernels >= 2.1.45
*
* Revision 1.28 1997/06/17 13:05:57 hipp
* Applied Eric's underflow-patches (slightly modified)
* more compression changes (but disabled at the moment)
@ -135,9 +138,7 @@
#include <linux/module.h>
#include <linux/version.h>
#include <linux/isdn.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <asm/poll.h>
#endif
#include "isdn_common.h"
#include "isdn_ppp.h"
#include "isdn_net.h"
@ -662,50 +663,6 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
return 0;
}
#if (LINUX_VERSION_CODE < 0x020117)
int
isdn_ppp_select(int min, struct file *file, int type, select_table * st)
{
struct ippp_buf_queue *bf,
*bl;
unsigned long flags;
struct ippp_struct *is;
is = file->private_data;
if (is->debug & 0x2)
printk(KERN_DEBUG "isdn_ppp_select: minor: %d, type: %d \n", min, type);
if (!(is->state & IPPP_OPEN))
return -EINVAL;
switch (type) {
case SEL_IN:
save_flags(flags);
cli();
bl = is->last;
bf = is->first;
/*
* if IPPP_NOBLOCK is set we return even if we have nothing to read
*/
if (bf->next == bl && !(is->state & IPPP_NOBLOCK)) {
select_wait(&is->wq, st);
restore_flags(flags);
return 0;
}
is->state &= ~IPPP_NOBLOCK;
restore_flags(flags);
return 1;
case SEL_OUT:
/* we're always ready to send .. */
return 1;
case SEL_EX:
select_wait(&is->wq1, st);
return 0;
}
return 1;
}
#else
unsigned int
isdn_ppp_poll(struct file *file, poll_table * wait)
{
@ -750,8 +707,6 @@ isdn_ppp_poll(struct file *file, poll_table * wait)
restore_flags(flags);
return mask;
}
#endif
/*
* fill up isdn_ppp_read() queue ..
@ -901,7 +856,6 @@ isdn_ppp_write(int min, struct file *file, const char *buf, int count)
printk(KERN_WARNING "isdn_ppp_write: out of memory!\n");
return count;
}
SET_SKB_FREE(skb);
if (copy_from_user(skb_put(skb, count), buf, count))
return -EFAULT;
if (is->debug & 0x40) {
@ -1001,7 +955,6 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
if (skb->data[0] == 0xff && skb->data[1] == 0x03)
skb_pull(skb, 2);
else if (is->pppcfg & SC_REJ_COMP_AC) {
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
return; /* discard it silently */
}
@ -1126,7 +1079,6 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
if (!q) {
net_dev->ib.modify = 0;
printk(KERN_WARNING "ippp/MPPP: Bad! Can't alloc sq node!\n");
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
return; /* discard */
}
@ -1208,7 +1160,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
if (slhc_remember(ippp_table[net_dev->local.ppp_slot]->slcomp, skb->data, skb->len) <= 0) {
printk(KERN_WARNING "isdn_ppp: received illegal VJC_UNCOMP frame!\n");
net_dev->local.stats.rx_dropped++;
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
return;
}
@ -1229,8 +1180,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
int pkt_len;
skb = dev_alloc_skb(skb_old->len + 40);
SET_SKB_FREE(skb_old);
if (!skb) {
printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name);
net_dev->local.stats.rx_dropped++;
@ -1245,7 +1194,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
skb->data, skb_old->len);
dev_kfree_skb(skb_old, 0 /* FREE_READ */ );
if (pkt_len < 0) {
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
lp->stats.rx_dropped++;
return;
@ -1256,7 +1204,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
#else
printk(KERN_INFO "isdn: Ooopsa .. VJ-Compression support not compiled into isdn driver.\n");
lp->stats.rx_dropped++;
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
return;
#endif
@ -1266,7 +1213,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
/* fall through */
default:
isdn_ppp_fill_rq(skb->data, skb->len, proto, lp->ppp_slot); /* push data to pppd device */
SET_SKB_FREE(skb);
dev_kfree_skb(skb, 0 /* FREE_READ */ );
return;
}
@ -1402,7 +1348,6 @@ isdn_ppp_xmit(struct sk_buff *skb, struct device *dev)
int pktlen;
new_skb->dev = skb->dev;
SET_SKB_FREE(new_skb);
skb_put(new_skb, skb->len);
buf = skb->data;
@ -1519,10 +1464,8 @@ isdn_ppp_free_sqqueue(isdn_net_dev * p)
p->ib.sq = NULL;
while (q) {
struct sqqueue *qn = q->next;
if (q->skb) {
SET_SKB_FREE(q->skb);
if (q->skb)
dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
}
kfree(q);
q = qn;
}
@ -1537,7 +1480,6 @@ isdn_ppp_free_mpqueue(isdn_net_dev * p)
while (q) {
struct mpqueue *ql = q->next;
SET_SKB_FREE(q->skb);
dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
kfree(q);
q = ql;
@ -1712,7 +1654,6 @@ isdn_ppp_fill_mpqueue(isdn_net_dev * dev, struct sk_buff **skb, int BEbyte, long
if (!(*skb)) {
while (q) {
struct mpqueue *ql = q->next;
SET_SKB_FREE(q->skb);
dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
kfree(q);
q = ql;
@ -1725,7 +1666,6 @@ isdn_ppp_fill_mpqueue(isdn_net_dev * dev, struct sk_buff **skb, int BEbyte, long
struct mpqueue *ql = q->next;
memcpy((*skb)->data + cnt, q->skb->data, q->skb->len);
cnt += q->skb->len;
SET_SKB_FREE(q->skb);
dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
kfree(q);
q = ql;
@ -1786,7 +1726,6 @@ isdn_ppp_cleanup_mpqueue(isdn_net_dev * dev, long min_sqno)
q->next->last = NULL;
while (q) {
ql = q->last;
SET_SKB_FREE(q->skb);
printk(KERN_DEBUG "ippp, freeing packet with sqno: %ld\n",q->sqno);
dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
kfree(q);
@ -2027,7 +1966,6 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc
{
#if 1
printk(KERN_ERR "compression not included!\n");
SET_SKB_FREE(skb);
dev_kfree_skb(skb,FREE_WRITE);
return NULL;
#else
@ -2037,7 +1975,6 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc
*/
if(!is->link_compressor) {
printk(KERN_ERR "ippp: no (link) compressor defined!\n");
SET_SKB_FREE(skb);
dev_kfree_skb(skb,FREE_WRITE);
return NULL;
}
@ -2054,7 +1991,6 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc
*/
if(!master->compressor) {
printk(KERN_ERR "ippp: no (link) compressor defined!\n");
SET_SKB_FREE(skb);
dev_kfree_skb(skb,FREE_WRITE);
return NULL;
}
@ -2121,7 +2057,6 @@ static struct sk_buff *isdn_ppp_compress(struct sk_buff *skb_in,int *proto,
ret = (compressor->compress)(stat,skb_in,skb_out,*proto);
if(!ret) {
SET_SKB_FREE(skb_out);
dev_kfree_skb(skb_out,0);
return skb_in;
}

View File

@ -19,6 +19,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.10 1997/06/17 13:06:00 hipp
* Applied Eric's underflow-patches (slightly modified)
* more compression changes (but disabled at the moment)
* changed one copy_to_user() to run with enabled IRQs
* a few MP changes
* changed 'proto' handling in the isdn_ppp receive code
*
* Revision 1.9 1997/02/11 18:32:59 fritz
* Bugfix in isdn_ppp_free_mpqueue().
*
@ -63,11 +70,7 @@ extern int isdn_ppp_bind(isdn_net_local *);
extern int isdn_ppp_xmit(struct sk_buff *, struct device *);
extern void isdn_ppp_receive(isdn_net_dev *, isdn_net_local *, struct sk_buff *);
extern int isdn_ppp_dev_ioctl(struct device *, struct ifreq *, int);
#if (LINUX_VERSION_CODE < 0x020117)
extern int isdn_ppp_select(int, struct file *, int, select_table *);
#else
extern unsigned int isdn_ppp_poll(struct file *, poll_table *);
#endif
extern int isdn_ppp_ioctl(int, struct file *, unsigned int, unsigned long);
extern void isdn_ppp_release(int, struct file *);
extern int isdn_ppp_dial_slave(char *);

View File

@ -17,6 +17,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.3 1997/02/16 01:02:47 fritz
* Added GPL-Header, Id and Log
*
*/
#include <linux/config.h>
#include <linux/module.h>
@ -27,26 +30,5 @@
#endif
#include "isdn_common.h"
#if (LINUX_VERSION_CODE < 0x020111)
static int has_exported;
static struct symbol_table isdn_syms = {
#include <linux/symtab_begin.h>
X(register_isdn),
#include <linux/symtab_end.h>
};
void
isdn_export_syms(void)
{
if (has_exported)
return;
register_symtab(&isdn_syms);
has_exported = 1;
}
#else
EXPORT_SYMBOL(register_isdn);
#endif

View File

@ -20,6 +20,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.41 1997/05/27 15:17:31 fritz
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
* queue_task_* -> queue_task
* clear/set_bit -> test_and_... where apropriate.
* changed type of hard_header_cache parameter.
*
* Revision 1.40 1997/03/24 22:55:27 fritz
* Added debug code for status callbacks.
*
@ -268,7 +275,6 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
if (info->emu.mdmreg[12] & 128)
tty->flip.flag_buf_ptr[len - 1] = 0xff;
queue_task(&tty->flip.tqueue, &tq_timer);
SET_SKB_FREE(skb);
kfree_skb(skb, FREE_READ);
return 1;
}
@ -364,7 +370,6 @@ isdn_tty_rcv_skb(int i, int di, int channel, struct sk_buff *skb)
#endif
) {
/* If Modem not listening, drop data */
SET_SKB_FREE(skb);
kfree_skb(skb, FREE_READ);
return 1;
}
@ -376,7 +381,6 @@ isdn_tty_rcv_skb(int i, int di, int channel, struct sk_buff *skb)
if (skb_headroom(skb) < sizeof(isdn_audio_skb)) {
printk(KERN_WARNING
"isdn_audio: insufficient skb_headroom, dropping\n");
SET_SKB_FREE(skb);
kfree_skb(skb, FREE_READ);
return 1;
}
@ -447,16 +451,12 @@ isdn_tty_cleanup_xmit(modem_info * info)
save_flags(flags);
cli();
if (skb_queue_len(&info->xmit_queue))
while ((skb = skb_dequeue(&info->xmit_queue))) {
SET_SKB_FREE(skb);
while ((skb = skb_dequeue(&info->xmit_queue)))
kfree_skb(skb, FREE_WRITE);
}
#ifdef CONFIG_ISDN_AUDIO
if (skb_queue_len(&info->dtmf_queue))
while ((skb = skb_dequeue(&info->dtmf_queue))) {
SET_SKB_FREE(skb);
while ((skb = skb_dequeue(&info->dtmf_queue)))
kfree_skb(skb, FREE_WRITE);
}
#endif
restore_flags(flags);
}
@ -485,7 +485,6 @@ isdn_tty_tint(modem_info * info)
}
if (slen < 0) {
/* Error: no channel, already shutdown, or wrong parameter */
SET_SKB_FREE(skb);
dev_kfree_skb(skb, FREE_WRITE);
return;
}
@ -583,7 +582,7 @@ isdn_tty_end_vrx(const char *buf, int c, int from_user)
while (c--) {
if (from_user)
GET_USER(ch, buf);
get_user(ch, buf);
else
ch = *buf;
if ((ch != 0x11) && (ch != 0x13))
@ -703,7 +702,6 @@ isdn_tty_senddown(modem_info * info)
}
}
#endif /* CONFIG_ISDN_AUDIO */
SET_SKB_FREE(skb);
if (info->emu.mdmreg[13] & 2)
/* Add T.70 simplified header */
memcpy(skb_push(skb, 4), "\1\0\1\0", 4);
@ -1297,7 +1295,7 @@ isdn_tty_set_modem_info(modem_info * info, uint cmd, uint * value)
uint arg;
int pre_dtr;
GET_USER(arg, (uint *) value);
get_user(arg, (uint *) value);
switch (cmd) {
case TIOCMBIS:
#ifdef ISDN_DEBUG_MODEM_IOCTL
@ -1407,7 +1405,7 @@ isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
error = verify_area(VERIFY_READ, (void *) arg, sizeof(long));
if (error)
return error;
GET_USER(arg, (ulong *) arg);
get_user(arg, (ulong *) arg);
tty->termios->c_cflag =
((tty->termios->c_cflag & ~CLOCAL) |
(arg ? CLOCAL : 0));
@ -3250,7 +3248,7 @@ isdn_tty_edit_at(const char *p, int count, modem_info * info, int user)
for (cnt = count; cnt > 0; p++, cnt--) {
if (user)
GET_USER(c, p);
get_user(c, p);
else
c = *p;
total++;

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.1 1997/03/24 23:02:04 fritz
* Added isdnloop driver.
*
*/
#include "isdnloop.h"
@ -1508,11 +1511,7 @@ isdnloop_init(void)
char rev[10];
/* No symbols to export, hide all symbols */
#if (LINUX_VERSION_CODE < 0x020111)
register_symtab(NULL);
#else
EXPORT_NO_SYMBOLS;
#endif
if ((p = strchr(revision, ':'))) {
strcpy(rev, p + 1);

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.1 1997/03/24 23:02:05 fritz
* Added isdnloop driver.
*
*/
#ifndef isdnloop_h
@ -120,12 +123,10 @@ static isdnloop_card *cards = (isdnloop_card *) 0;
static char *isdnloop_id = "\0";
#ifdef MODULE
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_AUTHOR("Fritz Elfert");
MODULE_PARM(isdnloop_id, "s");
MODULE_PARM_DESC(isdnloop_id, "ID-String of first card");
#endif
#endif
#endif /* __KERNEL__ */

View File

@ -147,9 +147,6 @@ int capi_conn_resp(struct pcbit_chan* chan, struct sk_buff **skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
*(skb_put(*skb, 1)) = 0x01; /* ACCEPT_CALL */
*(skb_put(*skb, 1)) = 0;
@ -170,8 +167,6 @@ int capi_conn_active_req(struct pcbit_chan* chan, struct sk_buff **skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
#ifdef DEBUG
@ -200,8 +195,6 @@ int capi_conn_active_resp(struct pcbit_chan* chan, struct sk_buff **skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
return 2;
@ -222,8 +215,6 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct sk_buff **skb,
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
/* Layer2 protocol */
@ -285,8 +276,6 @@ int capi_activate_transp_req(struct pcbit_chan *chan, struct sk_buff **skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
@ -338,8 +327,6 @@ int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff ** skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = chan->callref;
*(skb_put(*skb, 1)) = chan->layer2link;
@ -357,8 +344,6 @@ int capi_disc_req(ushort callref, struct sk_buff **skb, u_char cause)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2) ) = callref;
*(skb_put(*skb, 1)) = 2; /* Cause.Length = 2; */
@ -382,8 +367,6 @@ int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb)
return -1;
}
SET_SKB_FREE((*skb));
*((ushort*) skb_put(*skb, 2)) = chan->callref;
return 2;

View File

@ -731,8 +731,6 @@ void pcbit_l3_receive(struct pcbit_dev * dev, ulong msg,
#endif
}
SET_SKB_FREE(skb);
kfree_skb(skb, FREE_READ);
}

View File

@ -380,10 +380,8 @@ pcbit_receive(struct pcbit_dev *dev)
return;
#else
/* discard previous queued frame */
if (dev->read_frame->skb) {
SET_SKB_FREE(dev->read_frame->skb);
if (dev->read_frame->skb)
kfree_skb(dev->read_frame->skb, FREE_READ);
}
kfree(dev->read_frame);
dev->read_frame = NULL;
#endif
@ -648,10 +646,8 @@ pcbit_l2_err_recover(unsigned long data)
dev->w_busy = dev->r_busy = 1;
if (dev->read_frame) {
if (dev->read_frame->skb) {
SET_SKB_FREE(dev->read_frame->skb);
if (dev->read_frame->skb)
kfree_skb(dev->read_frame->skb, FREE_READ);
}
kfree(dev->read_frame);
dev->read_frame = NULL;
}

View File

@ -35,10 +35,8 @@ extern void pcbit_terminate(int board);
extern int pcbit_init_dev(int board, int mem_base, int irq);
#ifdef MODULE
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
#endif
#define pcbit_init init_module
#endif
@ -87,11 +85,7 @@ int pcbit_init(void)
}
/* No symbols to export, hide all symbols */
#if (LINUX_VERSION_CODE < 0x020111)
register_symtab(NULL);
#else
EXPORT_NO_SYMBOLS;
#endif
return 0;
}

View File

@ -29,13 +29,8 @@
#define NULL 0x0
#if LINUX_VERSION_CODE < 66363 /* Linux 1.3.59 there was a change to interrupts */
#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d)
#define FREE_IRQ(a,b) free_irq(a)
#else
#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
#define FREE_IRQ(a,b) free_irq(a,b)
#endif
#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
#define FREE_IRQ(a,b) free_irq(a,b)
inline char *strcpy(char *, const char *);

View File

@ -38,12 +38,10 @@ int irq_supported(int irq_x)
}
#ifdef MODULE
#if (LINUX_VERSION_CODE > 0x020111)
MODULE_PARM(io, "1-4i");
MODULE_PARM(irq, "1-4i");
MODULE_PARM(ram, "1-4i");
MODULE_PARM(do_reset, "i");
#endif
#define init_sc init_module
#else
/*