HiSax -->mISDN

This commit is contained in:
Karsten Keil 2003-07-21 12:00:05 +00:00
parent 311d803413
commit ebc659e082
51 changed files with 1024 additions and 1024 deletions

View File

@ -5,9 +5,9 @@
DESTDIR =
KDIR := /usr/src/linux
TARGET := newhisax
TARGET := newmISDN
TARGETS := Rules.make arch scripts .config include $(TARGET)
TARGETDIR := drivers/isdn/hisax
TARGETDIR := drivers/isdn/mISDN
default: $(TARGETS)
@ -43,7 +43,7 @@ $(TARGET):
install: $(TARGETS)
$(MAKE) -f Makefile KDIR=$(KDIR) TARGETDIR=$(TARGETDIR) install_mod
install newinclude/linux/hisaxif.h /usr/include/linux
install newinclude/linux/mISDNif.h /usr/include/linux
modlist:
$(MAKE) -f Makefile KDIR=$(KDIR) TARGETDIR=$(TARGETDIR) modlist

View File

@ -1,4 +1,4 @@
# km_newhisax slave Makefile
# km_newmISDN slave Makefile
# (c) 10/2001 Karsten Keil <kkeil@suse.de>
#
KDIR = /usr/src/linux
@ -30,7 +30,7 @@ FINDHPATH += $(MYDIR)/newinclude/linux
MODLIB := $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
newhisax: $(TARGETDIR) depend newhisax_mod
newmISDN: $(TARGETDIR) depend newmISDN_mod
$(MAKE) -C $(TARGETDIR) CFLAGS="$(CFLAGS)" MAKING_MODULES=1 modules
dep-files: scripts/mkdep archdep include/linux/version.h
@ -50,7 +50,7 @@ install: install_mod
install_mod: modules_install
newhisax_mod:
newmISDN_mod:
echo patchlevel $(PATCHLEVEL)
mkdir -p modules
@ -58,7 +58,7 @@ else
TARGETMODDIR = ../misc
newhisax_mod:
newmISDN_mod:
echo patchlevel $(PATCHLEVEL)
install: install_mod

View File

@ -1,3 +1,3 @@
# new hisax driver as module
CONFIG_ISDN_DRV_NEWHISAX=m
# new mISDN driver as module
CONFIG_ISDN_DRV_NEWmISDN=m

View File

@ -11,72 +11,72 @@ O_TARGET := vmlinux-obj.o
# multi objects
SEDLFAXOBJ := sedl_fax.o debug.o helper.o fsm.o isar.o hisax_dch.o hisax_bch.o
SEDLFAXOBJ := sedl_fax.o debug.o helper.o fsm.o isar.o mISDN_dch.o mISDN_bch.o
FRITZOBJ := fritz_pci.o debug.o helper.o fsm.o hisax_dch.o hisax_bch.o
FRITZOBJ := fritz_pci.o debug.o helper.o fsm.o mISDN_dch.o mISDN_bch.o
HFC_PCIOBJ := hfc_pci.o debug.o helper.o hisax_dch.o hisax_bch.o
HFC_PCIOBJ := hfc_pci.o debug.o helper.o mISDN_dch.o mISDN_bch.o
hisaxisac-objs := isac.o arcofi.o debug.o
mISDNisac-objs := isac.o arcofi.o debug.o
OBJ_core := hisax_core.o hisax_stack.o hisax_dev.o helper.o
OBJ_l1 := hisax_l1.o helper.o debug.o fsm.o
OBJ_l2 := hisax_l2.o tei.o helper.o debug.o fsm.o
OBJ_l3udss1 := hisax_l3.o helper.o l3helper.o debug.o fsm.o l3_udss1.o
OBJ_core := mISDN_core.o mISDN_stack.o mISDN_dev.o helper.o
OBJ_l1 := mISDN_l1.o helper.o debug.o fsm.o
OBJ_l2 := mISDN_l2.o tei.o helper.o debug.o fsm.o
OBJ_l3udss1 := mISDN_l3.o helper.o l3helper.o debug.o fsm.o l3_udss1.o
OBJ_capi := capi.o contr.o listen.o appl.o plci.o cplci.o ncci.o asn1.o \
asn1_aoc.o asn1_comp.o asn1_generic.o asn1_diversion.o \
asn1_basic_service.o asn1_address.o asn1_enc.o capi_enc.o \
supp_serv.o helper.o l3helper.o debug.o fsm.o
OBJ_dtmf := hisax_dtmf.o helper.o debug.o
OBJ_dtmf := mISDN_dtmf.o helper.o debug.o
ifdef CONFIG_I4L_CAPI_LAYER
i4lcapi-objs := i4l_capi.o helper.o l3helper.o debug.o fsm.o
endif
LX_OBJS += hisax_core.o
LX_OBJS += mISDN_core.o
ifdef MEMDBG
EXTRA_CFLAGS += -DMEMDBG
MX_OBJS += memdbg.o
endif
#ifeq ($(CONFIG_ISDN_DRV_HISAX),y)
# O_TARGET += hisax.o
#ifeq ($(CONFIG_ISDN_DRV_mISDN),y)
# O_TARGET += mISDN.o
#else
# ifeq ($(CONFIG_ISDN_DRV_HISAX),m)
# O_TARGET += hisax.o
# M_OBJS += hisax.o
# ifeq ($(CONFIG_ISDN_DRV_mISDN),m)
# O_TARGET += mISDN.o
# M_OBJS += mISDN.o
# endif
#endif
export-objs := hisax_core.o isac.o
export-objs := mISDN_core.o isac.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) :=
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxcore.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) :=
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNcore.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxisac.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNisac.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += fritzpci.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += sedlfax.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hfcpci.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += fritzpci.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += sedlfax.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += hfcpci.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxl1.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxl2.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += l3udss1.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxcapi.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += hisaxdtmf.o
obj-$(CONFIG_ISDN_DRV_NEWHISAX) += i4lcapi.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNl1.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNl2.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += l3udss1.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNcapi.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += mISDNdtmf.o
obj-$(CONFIG_ISDN_DRV_NEWmISDN) += i4lcapi.o
M_OBJS := $(obj-m)
include $(TOPDIR)/Rules.make
hisaxcore.o: $(OBJ_core)
mISDNcore.o: $(OBJ_core)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
hisaxisac.o: $(hisaxisac-objs)
mISDNisac.o: $(mISDNisac-objs)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
@ -92,11 +92,11 @@ hfcpci.o: $(HFC_PCIOBJ)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
hisaxl1.o: $(OBJ_l1)
mISDNl1.o: $(OBJ_l1)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
hisaxl2.o: $(OBJ_l2)
mISDNl2.o: $(OBJ_l2)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
@ -104,11 +104,11 @@ l3udss1.o: $(OBJ_l3udss1)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
hisaxcapi.o: $(OBJ_capi)
mISDNcapi.o: $(OBJ_capi)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
hisaxdtmf.o: $(OBJ_dtmf)
mISDNdtmf.o: $(OBJ_dtmf)
$(RM) $@
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"

View File

@ -9,8 +9,8 @@
*/
#define __NO_VERSION__
#include "hisax_dch.h"
#include "hisaxl1.h"
#include "mISDN_dch.h"
#include "mISDNl1.h"
#include "isac.h"
#include "arcofi.h"
#include "debug.h"

View File

@ -2,7 +2,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "helper.h"
#ifndef __ASN1_H__

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "asn1_enc.h"

View File

@ -14,10 +14,10 @@
#include <linux/isapnp.h>
#include <linux/kernel_stat.h>
#include <linux/delay.h>
#include "hisax_dch.h"
#include "hisax_bch.h"
#include "mISDN_dch.h"
#include "mISDN_bch.h"
#include "isac.h"
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
@ -133,7 +133,7 @@ typedef struct _fritzpnppci {
u_int type;
u_int irq;
u_int addr;
hisax_HWlock_t lock;
mISDN_HWlock_t lock;
isac_chip_t isac;
hdlc_hw_t hdlc[2];
dchannel_t dch;
@ -143,14 +143,14 @@ typedef struct _fritzpnppci {
static int lock_dev(void *data, int nowait)
{
register hisax_HWlock_t *lock = &((fritzpnppci *)data)->lock;
register mISDN_HWlock_t *lock = &((fritzpnppci *)data)->lock;
return(lock_HW(lock, nowait));
}
static void unlock_dev(void *data)
{
register hisax_HWlock_t *lock = &((fritzpnppci *)data)->lock;
register mISDN_HWlock_t *lock = &((fritzpnppci *)data)->lock;
unlock_HW(lock);
}
@ -719,15 +719,15 @@ avm_pcipnp_interrupt(int intno, void *dev_id, struct pt_regs *regs)
}
static int
hdlc_down(hisaxif_t *hif, struct sk_buff *skb)
hdlc_down(mISDNif_t *hif, struct sk_buff *skb)
{
bchannel_t *bch;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
bch = hif->fdata;
if ((hh->prim == PH_DATA_REQ) ||
(hh->prim == (DL_DATA | REQUEST))) {
@ -840,7 +840,7 @@ static int init_card(fritzpnppci *fc)
lock_dev(fc, 0);
if (request_irq(fc->irq, avm_pcipnp_interrupt, SA_SHIRQ,
"AVM Fritz!PCI", fc)) {
printk(KERN_WARNING "HiSax: couldn't get interrupt %d\n",
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
fc->irq);
unlock_dev(fc);
return(-EIO);
@ -849,7 +849,7 @@ static int init_card(fritzpnppci *fc)
int ret;
ISAC_clear_pending_ints(&fc->dch);
if ((ret=ISAC_init(&fc->dch))) {
printk(KERN_WARNING "HiSax: ISAC_init failed with %d\n", ret);
printk(KERN_WARNING "mISDN: ISAC_init failed with %d\n", ret);
break;
}
clear_pending_hdlc_ints(fc);
@ -894,7 +894,7 @@ static int fritz_cnt;
static u_int protocol[MAX_CARDS];
static int layermask[MAX_CARDS];
static hisaxobject_t fritz;
static mISDNobject_t fritz;
static int debug;
#ifdef MODULE
@ -935,7 +935,7 @@ setup_fritz(fritzpnppci *fc)
if (check_region((fc->addr), 32)) {
printk(KERN_WARNING
"HiSax: %s config port %x-%x already in use\n",
"mISDN: %s config port %x-%x already in use\n",
"AVM Fritz!PCI",
fc->addr,
fc->addr + 31);
@ -991,7 +991,7 @@ setup_fritz(fritzpnppci *fc)
printk(KERN_WARNING "AVM unknown type %d\n", fc->type);
return(-ENODEV);
}
printk(KERN_INFO "HiSax: %s config irq:%d base:0x%X\n",
printk(KERN_INFO "mISDN: %s config irq:%d base:0x%X\n",
(fc->type == AVM_FRITZ_PCI) ? "AVM Fritz!PCI" :
(fc->type == AVM_FRITZ_PCIV2) ? "AVM Fritz!PCIv2" : "AVM Fritz!PnP",
fc->irq, fc->addr);
@ -1040,7 +1040,7 @@ release_card(fritzpnppci *card)
static int
fritz_manager(void *data, u_int prim, void *arg) {
fritzpnppci *card = fritz.ilist;
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
struct sk_buff *skb;
int channel = -1;
@ -1178,7 +1178,7 @@ fritz_manager(void *data, u_int prim, void *arg) {
static int __devinit setup_instance(fritzpnppci *card)
{
int i, err;
hisax_pid_t pid;
mISDN_pid_t pid;
pci_set_drvdata(card->pdev, card);
APPEND_TO_LIST(card, ((fritzpnppci *)fritz.ilist));
@ -1272,7 +1272,7 @@ static int __devinit fritzpci_probe(struct pci_dev *pdev, const struct pci_devic
return(err);
}
printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n",
printk(KERN_INFO "mISDN_fcpcipnp: found adapter %s at %s\n",
(char *) ent->driver_data, pdev->slot_name);
card->addr = pci_resource_start(pdev, 1);
@ -1299,7 +1299,7 @@ static int __devinit fritzpnp_probe(struct pci_dev *pdev, const struct isapnp_de
card->addr = pdev->resource[0].start;
card->irq = pdev->irq_resource[0].start;
printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at IO %#x irq %d\n",
printk(KERN_INFO "mISDN_fcpcipnp: found adapter %s at IO %#x irq %d\n",
(char *) ent->driver_data, card->addr, card->irq);
err = setup_instance(card);
@ -1336,7 +1336,7 @@ static int __init Fritz_init(void)
char tmp[64];
strcpy(tmp, avm_pci_rev);
printk(KERN_INFO "AVM Fritz PCI/PnP driver Rev. %s\n", HiSax_getrev(tmp));
printk(KERN_INFO "AVM Fritz PCI/PnP driver Rev. %s\n", mISDN_getrev(tmp));
SET_MODULE_OWNER(&fritz);
fritz.name = FritzName;
@ -1347,7 +1347,7 @@ static int __init Fritz_init(void)
fritz.BPROTO.protocol[2] = ISDN_PID_L2_B_TRANS;
fritz.prev = NULL;
fritz.next = NULL;
if ((err = HiSax_register(&fritz))) {
if ((err = mISDN_register(&fritz))) {
printk(KERN_ERR "Can't register Fritz PCI error(%d)\n", err);
return(err);
}
@ -1381,7 +1381,7 @@ static int __init Fritz_init(void)
static void __exit Fritz_cleanup(void)
{
int err;
if ((err = HiSax_unregister(&fritz))) {
if ((err = mISDN_unregister(&fritz))) {
printk(KERN_ERR "Can't unregister Fritz PCI error(%d)\n", err);
}
while(fritz.ilist) {

View File

@ -7,9 +7,9 @@
*/
#define __NO_VERSION__
#include <linux/hisaxif.h>
#include "hisaxl1.h"
#include "hisax_bch.h"
#include <linux/mISDNif.h>
#include "mISDNl1.h"
#include "mISDN_bch.h"
#include "helper.h"
static void
@ -18,8 +18,8 @@ bchannel_bh(bchannel_t *bch)
struct sk_buff *skb;
u_int pr;
int ret;
hisax_head_t *hh;
hisaxif_t *hif;
mISDN_head_t *hh;
mISDNif_t *hif;
if (!bch)
return;
@ -36,7 +36,7 @@ bchannel_bh(bchannel_t *bch)
if (test_and_clear_bit(B_XMTBUFREADY, &bch->event)) {
skb = bch->next_skb;
if (skb) {
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
bch->next_skb = NULL;
if (bch->inst.pid.protocol[2] == ISDN_PID_L2_B_TRANS)
pr = DL_DATA | CONFIRM;
@ -76,23 +76,23 @@ bchannel_bh(bchannel_t *bch)
int
init_bchannel(bchannel_t *bch) {
int devtyp = HISAX_RAW_DEVICE;
int devtyp = mISDN_RAW_DEVICE;
if (!(bch->blog = kmalloc(MAX_BLOG_SPACE, GFP_ATOMIC))) {
printk(KERN_WARNING
"HiSax: No memory for blog\n");
"mISDN: No memory for blog\n");
return(-ENOMEM);
}
if (!(bch->rx_buf = kmalloc(MAX_DATA_MEM, GFP_ATOMIC))) {
printk(KERN_WARNING
"HiSax: No memory for bchannel rx_buf\n");
"mISDN: No memory for bchannel rx_buf\n");
kfree(bch->blog);
bch->blog = NULL;
return (-ENOMEM);
}
if (!(bch->tx_buf = kmalloc(MAX_DATA_MEM, GFP_ATOMIC))) {
printk(KERN_WARNING
"HiSax: No memory for bchannel tx_buf\n");
"mISDN: No memory for bchannel tx_buf\n");
kfree(bch->blog);
bch->blog = NULL;
kfree(bch->rx_buf);
@ -113,7 +113,7 @@ init_bchannel(bchannel_t *bch) {
if (bch->inst.obj->ctrl(&bch->dev, MGR_GETDEVICE | REQUEST,
&devtyp)) {
printk(KERN_WARNING
"HiSax: no raw device for bchannel\n");
"mISDN: no raw device for bchannel\n");
}
}
return(0);
@ -143,7 +143,7 @@ free_bchannel(bchannel_t *bch) {
}
if (bch->inst.obj->ctrl(bch->dev, MGR_DELDEVICE | REQUEST, NULL)) {
printk(KERN_WARNING
"HiSax: del raw device error\n");
"mISDN: del raw device error\n");
} else
bch->dev = NULL;
return(0);

View File

@ -6,7 +6,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/tqueue.h>
#include <linux/smp.h>
#include <linux/ptrace.h>
@ -44,9 +44,9 @@ typedef struct _bchannel_t {
int protocol;
int Flag;
int debug;
hisaxstack_t *st;
hisaxinstance_t inst;
hisaxdevice_t *dev;
mISDNstack_t *st;
mISDNinstance_t inst;
mISDNdevice_t *dev;
void *hw;
u_char (*Read_Reg)(void *, int, u_char);
void (*Write_Reg)(void *, int, u_char, u_char);

View File

@ -5,17 +5,17 @@
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <asm/uaccess.h>
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"
static char *capi_revision = "$Revision$";
static int debug = 0;
static hisaxobject_t capi_obj;
static mISDNobject_t capi_obj;
static char MName[] = "HiSax Capi 2.0";
static char MName[] = "mISDN Capi 2.0";
#ifdef MODULE
MODULE_AUTHOR("Karsten Keil");
@ -43,7 +43,7 @@ void capidebug(int level, char *fmt, ...)
// ---------------------------------------------------------------------------
// registration to kernelcapi
int hisax_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
int mISDN_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
{
Contr_t *contr = ctrl->driverdata;
u_char *tmp;
@ -71,7 +71,7 @@ int hisax_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
return 0;
}
void hisax_reset_ctr(struct capi_ctr *ctrl)
void mISDN_reset_ctr(struct capi_ctr *ctrl)
{
Contr_t *contr = ctrl->driverdata;
@ -80,13 +80,13 @@ void hisax_reset_ctr(struct capi_ctr *ctrl)
contrReset(contr);
}
void hisax_remove_ctr(struct capi_ctr *ctrl)
void mISDN_remove_ctr(struct capi_ctr *ctrl)
{
if (CAPI_DBG_INFO & debug)
printk(KERN_DEBUG "%s\n", __FUNCTION__);
}
static char *hisax_procinfo(struct capi_ctr *ctrl)
static char *mISDN_procinfo(struct capi_ctr *ctrl)
{
Contr_t *contr = (ctrl->driverdata);
@ -98,7 +98,7 @@ static char *hisax_procinfo(struct capi_ctr *ctrl)
return contr->infobuf;
}
void hisax_register_appl(struct capi_ctr *ctrl,
void mISDN_register_appl(struct capi_ctr *ctrl,
__u16 ApplId, capi_register_params *rp)
{
Contr_t *contr = ctrl->driverdata;
@ -108,7 +108,7 @@ void hisax_register_appl(struct capi_ctr *ctrl,
contrRegisterAppl(contr, ApplId, rp);
}
void hisax_release_appl(struct capi_ctr *ctrl, __u16 ApplId)
void mISDN_release_appl(struct capi_ctr *ctrl, __u16 ApplId)
{
Contr_t *contr = ctrl->driverdata;
@ -117,19 +117,19 @@ void hisax_release_appl(struct capi_ctr *ctrl, __u16 ApplId)
contrReleaseAppl(contr, ApplId);
}
void hisax_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
void mISDN_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
{
Contr_t *contr = ctrl->driverdata;
contrSendMessage(contr, skb);
}
static int hisax_read_proc(char *page, char **start, off_t off,
static int mISDN_read_proc(char *page, char **start, off_t off,
int count, int *eof, struct capi_ctr *ctrl)
{
int len = 0;
len += sprintf(page+len, "hisax_read_proc\n");
len += sprintf(page+len, "mISDN_read_proc\n");
if (off+count >= len)
*eof = 1;
if (len < off)
@ -140,17 +140,17 @@ static int hisax_read_proc(char *page, char **start, off_t off,
struct capi_driver_interface *cdrv_if;
struct capi_driver hisax_driver = {
"hisax",
struct capi_driver mISDN_driver = {
"mISDN",
"0.01",
hisax_load_firmware,
hisax_reset_ctr,
hisax_remove_ctr,
hisax_register_appl,
hisax_release_appl,
hisax_send_message,
hisax_procinfo,
hisax_read_proc,
mISDN_load_firmware,
mISDN_reset_ctr,
mISDN_remove_ctr,
mISDN_register_appl,
mISDN_release_appl,
mISDN_send_message,
mISDN_procinfo,
mISDN_read_proc,
0,
0,
};
@ -158,9 +158,9 @@ struct capi_driver hisax_driver = {
int CapiNew(void)
{
printk(KERN_INFO "new %s instance\n", MName);
cdrv_if = attach_capi_driver(&hisax_driver);
cdrv_if = attach_capi_driver(&mISDN_driver);
if (!cdrv_if) {
printk(KERN_ERR "hisax: failed to attach capi_driver\n");
printk(KERN_ERR "mISDN: failed to attach capi_driver\n");
return -EIO;
}
init_listen();
@ -171,7 +171,7 @@ int CapiNew(void)
static int
capi20_manager(void *data, u_int prim, void *arg) {
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
int found=0;
BInst_t *binst = NULL;
Contr_t *ctrl = (Contr_t *)capi_obj.ilist;
@ -266,7 +266,7 @@ int Capi20Init(void)
{
int err;
printk(KERN_INFO "%s driver file version %s\n", MName, HiSax_getrev(capi_revision));
printk(KERN_INFO "%s driver file version %s\n", MName, mISDN_getrev(capi_revision));
SET_MODULE_OWNER(&capi_obj);
capi_obj.name = MName;
capi_obj.DPROTO.protocol[4] = ISDN_PID_L4_CAPI20;
@ -278,9 +278,9 @@ int Capi20Init(void)
capi_obj.ilist = NULL;
if ((err = CapiNew()))
return(err);
if ((err = HiSax_register(&capi_obj))) {
if ((err = mISDN_register(&capi_obj))) {
printk(KERN_ERR "Can't register %s error(%d)\n", MName, err);
detach_capi_driver(&hisax_driver);
detach_capi_driver(&mISDN_driver);
free_listen();
free_cplci();
free_ncci();
@ -294,17 +294,17 @@ void cleanup_module(void)
int err;
Contr_t *contr;
if ((err = HiSax_unregister(&capi_obj))) {
if ((err = mISDN_unregister(&capi_obj))) {
printk(KERN_ERR "Can't unregister User DSS1 error(%d)\n", err);
}
if (capi_obj.ilist) {
printk(KERN_WARNING "hisaxl3 contrlist not empty\n");
printk(KERN_WARNING "mISDNl3 contrlist not empty\n");
while((contr = capi_obj.ilist)) {
contrDestr(contr);
kfree(contr);
}
}
detach_capi_driver(&hisax_driver);
detach_capi_driver(&mISDN_driver);
free_listen();
free_cplci();
free_ncci();

View File

@ -2,10 +2,10 @@
*
*/
#ifndef __HISAX_CAPI_H__
#define __HISAX_CAPI_H__
#ifndef __mISDN_CAPI_H__
#define __mISDN_CAPI_H__
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/skbuff.h>
#include <linux/timer.h>
#include <linux/capi.h>
@ -40,7 +40,7 @@
#define CAPI_DBG_NCCI_L3 0x08000000
extern struct capi_driver_interface *cdrv_if;
extern struct capi_driver hisax_driver;
extern struct capi_driver mISDN_driver;
void init_listen(void);
void init_cplci(void);
@ -52,7 +52,7 @@ void capidebug(int, char *, ...);
#define SuppServiceCF 0x00000010
#define SuppServiceTP 0x00000002
#define HiSaxSupportedServices (SuppServiceCF | SuppServiceTP)
#define mISDNSupportedServices (SuppServiceCF | SuppServiceTP)
#define CAPIMSG_REQ_DATAHANDLE(m) (m[18] | (m[19]<<8))
#define CAPIMSG_RESP_DATAHANDLE(m) (m[12] | (m[13]<<8))
@ -157,14 +157,14 @@ struct FacConfParm {
typedef struct _BInst {
struct _BInst *prev;
struct _BInst *next;
hisaxstack_t *bst;
hisaxinstance_t inst;
mISDNstack_t *bst;
mISDNinstance_t inst;
} BInst_t;
typedef struct _Contr {
struct _Contr *prev;
struct _Contr *next;
hisaxinstance_t inst;
mISDNinstance_t inst;
BInst_t *binst;
struct capi_ctr *ctrl;
__u32 adrController;
@ -178,8 +178,8 @@ typedef struct _Contr {
__u16 lastInvokeId;
} Contr_t;
Contr_t *newContr(hisaxobject_t *, hisaxstack_t *, hisax_pid_t *);
int contrConstr(Contr_t *, hisaxstack_t *, hisax_pid_t *, hisaxobject_t *);
Contr_t *newContr(mISDNobject_t *, mISDNstack_t *, mISDN_pid_t *);
int contrConstr(Contr_t *, mISDNstack_t *, mISDN_pid_t *, mISDNobject_t *);
void contrDestr(Contr_t *contr);
void contrDebug(Contr_t *contr, __u32 level, char *fmt, ...);
void contrRegisterAppl(Contr_t *contr, __u16 ApplId, capi_register_params *rp);
@ -198,7 +198,7 @@ int contrDummyInd(Contr_t *, __u32, struct sk_buff *);
DummyProcess_t *contrNewDummyPc(Contr_t *contr);
DummyProcess_t *contrId2DummyPc(Contr_t *contr, __u16 invokeId);
int contrL4L3(Contr_t *, u_int, int, struct sk_buff *);
int contrL3L4(hisaxif_t *, struct sk_buff *);
int contrL3L4(mISDNif_t *, struct sk_buff *);
BInst_t *contrSelChannel(Contr_t *, u_int);
// ---------------------------------------------------------------------------
// struct Listen
@ -357,7 +357,7 @@ typedef struct _Ncci {
void ncciConstr(Ncci_t *ncci, Cplci_t *cplci);
void ncciDestr(Ncci_t *ncci);
void ncciSendMessage(Ncci_t *, struct sk_buff *);
int ncci_l3l4(hisaxif_t *, struct sk_buff *);
int ncci_l3l4(mISDNif_t *, struct sk_buff *);
void ncciLinkUp(Ncci_t *ncci);
void ncciLinkDown(Ncci_t *ncci);
void ncciInitSt(Ncci_t *ncci);

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "asn1.h"
int capiEncodeWord(__u8 *p, __u16 i)

View File

@ -2,21 +2,21 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"
#define contrDebug(contr, lev, fmt, args...) \
capidebug(lev, fmt, ## args)
int contrConstr(Contr_t *contr, hisaxstack_t *st, hisax_pid_t *pid, hisaxobject_t *ocapi)
int contrConstr(Contr_t *contr, mISDNstack_t *st, mISDN_pid_t *pid, mISDNobject_t *ocapi)
{
char tmp[10];
hisaxstack_t *cst = st->child;
mISDNstack_t *cst = st->child;
BInst_t *binst;
memset(contr, 0, sizeof(Contr_t));
memcpy(&contr->inst.pid, pid, sizeof(hisax_pid_t));
memcpy(&contr->inst.pid, pid, sizeof(mISDN_pid_t));
contr->adrController = st->id;
sprintf(contr->inst.name, "CAPI %d", st->id);
contr->inst.obj = ocapi;
@ -41,8 +41,8 @@ int contrConstr(Contr_t *contr, hisaxstack_t *st, hisax_pid_t *pid, hisaxobject_
cst = cst->next;
}
APPEND_TO_LIST(contr, ocapi->ilist);
sprintf(tmp, "HiSax%d", st->id);
contr->ctrl = cdrv_if->attach_ctr(&hisax_driver, tmp, contr);
sprintf(tmp, "mISDN%d", st->id);
contr->ctrl = cdrv_if->attach_ctr(&mISDN_driver, tmp, contr);
if (!contr->ctrl)
return -ENODEV;
contr->adrController = contr->ctrl->cnr;
@ -55,7 +55,7 @@ int contrConstr(Contr_t *contr, hisaxstack_t *st, hisax_pid_t *pid, hisaxobject_
void contrDestr(Contr_t *contr)
{
int i;
hisaxinstance_t *inst = &contr->inst;
mISDNinstance_t *inst = &contr->inst;
for (i = 0; i < CAPI_MAXAPPL; i++) {
if (contr->appls[i]) {
@ -323,17 +323,17 @@ static Plci_t
}
int
contrL3L4(hisaxif_t *hif, struct sk_buff *skb)
contrL3L4(mISDNif_t *hif, struct sk_buff *skb)
{
Contr_t *contr;
Plci_t *plci;
__u32 *id;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
contr = hif->fdata;
if (hh->prim == (CC_NEW_CR | INDICATION)) {
plci = contrNewPlci(contr);
@ -368,7 +368,7 @@ void contrPutStatus(Contr_t *contr, char *msg)
contrDebug(contr, CAPI_DBG_CONTR, "%s: %s", __FUNCTION__, msg);
}
Contr_t *newContr(hisaxobject_t *ocapi, hisaxstack_t *st, hisax_pid_t *pid)
Contr_t *newContr(mISDNobject_t *ocapi, mISDNstack_t *st, mISDN_pid_t *pid)
{
Contr_t *contr;
@ -392,7 +392,7 @@ Contr_t *newContr(hisaxobject_t *ocapi, hisaxstack_t *st, hisax_pid_t *pid)
BInst_t *contrSelChannel(Contr_t *contr, u_int channel)
{
hisaxstack_t *cst;
mISDNstack_t *cst;
BInst_t *binst;
channel_info_t ci;
int ret;

View File

@ -10,7 +10,7 @@
#include <linux/stddef.h>
#include <linux/config.h>
#include <linux/module.h>
#include "hisax_core.h"
#include "mISDN_core.h"
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
@ -18,9 +18,9 @@
#include <linux/smp_lock.h>
#endif
static char *hisax_core_revision = "$Revision$";
static char *mISDN_core_revision = "$Revision$";
hisaxobject_t *hisax_objects = NULL;
mISDNobject_t *mISDN_objects = NULL;
int core_debug;
static int debug;
@ -32,33 +32,33 @@ MODULE_AUTHOR("Karsten Keil");
MODULE_LICENSE("GPL");
#endif
MODULE_PARM(debug, "1i");
EXPORT_SYMBOL(HiSax_register);
EXPORT_SYMBOL(HiSax_unregister);
#define HiSaxInit init_module
EXPORT_SYMBOL(mISDN_register);
EXPORT_SYMBOL(mISDN_unregister);
#define mISDNInit init_module
#endif
typedef struct _hisax_thread {
typedef struct _mISDN_thread {
/* thread */
struct task_struct *thread;
wait_queue_head_t waitq;
struct semaphore *notify;
u_int Flags;
struct sk_buff_head workq;
} hisax_thread_t;
} mISDN_thread_t;
#define HISAX_TFLAGS_STARTED 1
#define HISAX_TFLAGS_RMMOD 2
#define HISAX_TFLAGS_ACTIV 3
#define HISAX_TFLAGS_TEST 4
#define mISDN_TFLAGS_STARTED 1
#define mISDN_TFLAGS_RMMOD 2
#define mISDN_TFLAGS_ACTIV 3
#define mISDN_TFLAGS_TEST 4
static hisax_thread_t hisax_thread;
static mISDN_thread_t mISDN_thread;
static moditem_t modlist[] = {
{"hisaxl1", ISDN_PID_L1_TE_S0},
{"hisaxl2", ISDN_PID_L2_LAPD},
{"hisaxl2", ISDN_PID_L2_B_X75SLP},
{"mISDNl1", ISDN_PID_L1_TE_S0},
{"mISDNl2", ISDN_PID_L2_LAPD},
{"mISDNl2", ISDN_PID_L2_B_X75SLP},
{"l3udss1", ISDN_PID_L3_DSS1USER},
{"hisaxdtmf", ISDN_PID_L2_B_TRANSDTMF},
{"mISDNdtmf", ISDN_PID_L2_B_TRANSDTMF},
{NULL, ISDN_PID_NONE}
};
@ -68,49 +68,49 @@ static moditem_t modlist[] = {
*/
static int
hisaxd(void *data)
mISDNd(void *data)
{
hisax_thread_t *hkt = data;
mISDN_thread_t *hkt = data;
#ifdef CONFIG_SMP
lock_kernel();
#endif
daemonize();
sigfillset(&current->blocked);
strcpy(current->comm,"hisaxd");
strcpy(current->comm,"mISDNd");
hkt->thread = current;
#ifdef CONFIG_SMP
unlock_kernel();
#endif
printk(KERN_DEBUG "hisaxd: kernel daemon started\n");
printk(KERN_DEBUG "mISDNd: kernel daemon started\n");
test_and_set_bit(HISAX_TFLAGS_STARTED, &hkt->Flags);
test_and_set_bit(mISDN_TFLAGS_STARTED, &hkt->Flags);
for (;;) {
int err;
struct sk_buff *skb;
hisax_headext_t *hhe;
mISDN_headext_t *hhe;
if (test_and_clear_bit(HISAX_TFLAGS_RMMOD, &hkt->Flags))
if (test_and_clear_bit(mISDN_TFLAGS_RMMOD, &hkt->Flags))
break;
if (hkt->notify != NULL)
up(hkt->notify);
interruptible_sleep_on(&hkt->waitq);
if (test_and_clear_bit(HISAX_TFLAGS_RMMOD, &hkt->Flags))
if (test_and_clear_bit(mISDN_TFLAGS_RMMOD, &hkt->Flags))
break;
while ((skb = skb_dequeue(&hkt->workq))) {
test_and_set_bit(HISAX_TFLAGS_ACTIV, &hkt->Flags);
test_and_set_bit(mISDN_TFLAGS_ACTIV, &hkt->Flags);
err = -EINVAL;
hhe=HISAX_HEADEXT_P(skb);
hhe=mISDN_HEADEXT_P(skb);
switch (hhe->what) {
case MGR_FUNCTION:
err=hhe->func.ctrl(hhe->data[0], hhe->prim, skb->data);
if (err) {
printk(KERN_WARNING "hisaxd: what(%x) prim(%x) failed err(%x)\n",
printk(KERN_WARNING "mISDNd: what(%x) prim(%x) failed err(%x)\n",
hhe->what, hhe->prim, err);
} else {
if (debug)
printk(KERN_DEBUG "hisaxd: what(%x) prim(%x) success\n",
printk(KERN_DEBUG "mISDNd: what(%x) prim(%x) success\n",
hhe->what, hhe->prim);
err--; /* to free skb */
}
@ -118,28 +118,28 @@ hisaxd(void *data)
case MGR_QUEUEIF:
err = hhe->func.iff(hhe->data[0], skb);
if (err) {
printk(KERN_WARNING "hisaxd: what(%x) prim(%x) failed err(%x)\n",
printk(KERN_WARNING "mISDNd: what(%x) prim(%x) failed err(%x)\n",
hhe->what, hhe->prim, err);
}
break;
default:
int_error();
printk(KERN_WARNING "hisaxd: what(%x) prim(%x) unknown\n",
printk(KERN_WARNING "mISDNd: what(%x) prim(%x) unknown\n",
hhe->what, hhe->prim);
err = -EINVAL;
break;
}
if (err)
kfree_skb(skb);
test_and_clear_bit(HISAX_TFLAGS_ACTIV, &hkt->Flags);
test_and_clear_bit(mISDN_TFLAGS_ACTIV, &hkt->Flags);
}
if (test_and_clear_bit(HISAX_TFLAGS_TEST, &hkt->Flags))
printk(KERN_DEBUG "hisaxd: test event done\n");
if (test_and_clear_bit(mISDN_TFLAGS_TEST, &hkt->Flags))
printk(KERN_DEBUG "mISDNd: test event done\n");
}
printk(KERN_DEBUG "hisaxd: daemon exit now\n");
test_and_clear_bit(HISAX_TFLAGS_STARTED, &hkt->Flags);
test_and_clear_bit(HISAX_TFLAGS_ACTIV, &hkt->Flags);
printk(KERN_DEBUG "mISDNd: daemon exit now\n");
test_and_clear_bit(mISDN_TFLAGS_STARTED, &hkt->Flags);
test_and_clear_bit(mISDN_TFLAGS_ACTIV, &hkt->Flags);
discard_queue(&hkt->workq);
hkt->thread = NULL;
if (hkt->notify != NULL)
@ -147,9 +147,9 @@ hisaxd(void *data)
return(0);
}
hisaxobject_t *
mISDNobject_t *
get_object(int id) {
hisaxobject_t *obj = hisax_objects;
mISDNobject_t *obj = mISDN_objects;
while(obj) {
if (obj->id == id)
@ -159,9 +159,9 @@ get_object(int id) {
return(NULL);
}
static hisaxobject_t *
static mISDNobject_t *
find_object(int protocol) {
hisaxobject_t *obj = hisax_objects;
mISDNobject_t *obj = mISDN_objects;
int err;
while (obj) {
@ -177,11 +177,11 @@ find_object(int protocol) {
return(NULL);
}
static hisaxobject_t *
static mISDNobject_t *
find_object_module(int protocol) {
int err;
moditem_t *m = modlist;
hisaxobject_t *obj;
mISDNobject_t *obj;
while (m->name != NULL) {
if (m->protocol == protocol) {
@ -210,10 +210,10 @@ find_object_module(int protocol) {
}
static void
remove_object(hisaxobject_t *obj) {
hisaxstack_t *st = hisax_stacklist;
hisaxlayer_t *layer;
hisaxinstance_t *inst, *tmp;
remove_object(mISDNobject_t *obj) {
mISDNstack_t *st = mISDN_stacklist;
mISDNlayer_t *layer;
mISDNinstance_t *inst, *tmp;
while (st) {
layer = st->lstack;
@ -235,7 +235,7 @@ remove_object(hisaxobject_t *obj) {
}
static int
dummy_if(hisaxif_t *hif, struct sk_buff *skb)
dummy_if(mISDNif_t *hif, struct sk_buff *skb)
{
if (!skb) {
printk(KERN_WARNING "%s: hif(%p) without skb\n",
@ -243,7 +243,7 @@ dummy_if(hisaxif_t *hif, struct sk_buff *skb)
return(-EINVAL);
}
if (debug & DEBUG_DUMMY_FUNC) {
hisax_head_t *hh = HISAX_HEAD_P(skb);
mISDN_head_t *hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: hif(%p) skb(%p) len(%d) prim(%x)\n",
__FUNCTION__, hif, skb, skb->len, hh->prim);
@ -252,13 +252,13 @@ dummy_if(hisaxif_t *hif, struct sk_buff *skb)
return(0);
}
hisaxinstance_t *
get_next_instance(hisaxstack_t *st, hisax_pid_t *pid)
mISDNinstance_t *
get_next_instance(mISDNstack_t *st, mISDN_pid_t *pid)
{
int err;
hisaxinstance_t *next;
mISDNinstance_t *next;
int layer, proto;
hisaxobject_t *obj;
mISDNobject_t *obj;
layer = get_lowlayer(pid->layermask);
proto = pid->protocol[layer];
@ -285,7 +285,7 @@ get_next_instance(hisaxstack_t *st, hisax_pid_t *pid)
}
static int
sel_channel(hisaxstack_t *st, channel_info_t *ci)
sel_channel(mISDNstack_t *st, channel_info_t *ci)
{
int err = -EINVAL;
@ -305,7 +305,7 @@ sel_channel(hisaxstack_t *st, channel_info_t *ci)
printk(KERN_WARNING "%s: no mgr st(%p)\n", __FUNCTION__, st);
}
if (err) {
hisaxstack_t *cst = st->child;
mISDNstack_t *cst = st->child;
int nr = 0;
ci->st.p = NULL;
@ -326,7 +326,7 @@ sel_channel(hisaxstack_t *st, channel_info_t *ci)
}
static int
disconnect_if(hisaxinstance_t *inst, u_int prim, hisaxif_t *hif) {
disconnect_if(mISDNinstance_t *inst, u_int prim, mISDNif_t *hif) {
int err = 0;
if (hif) {
@ -341,8 +341,8 @@ disconnect_if(hisaxinstance_t *inst, u_int prim, hisaxif_t *hif) {
}
static int
add_if(hisaxinstance_t *inst, u_int prim, hisaxif_t *hif) {
hisaxif_t *myif;
add_if(mISDNinstance_t *inst, u_int prim, mISDNif_t *hif) {
mISDNif_t *myif;
if (!inst)
return(-EINVAL);
@ -361,7 +361,7 @@ add_if(hisaxinstance_t *inst, u_int prim, hisaxif_t *hif) {
static char tmpbuf[4096];
static int
debugout(hisaxinstance_t *inst, logdata_t *log)
debugout(mISDNinstance_t *inst, logdata_t *log)
{
char *p = tmpbuf;
@ -375,13 +375,13 @@ debugout(hisaxinstance_t *inst, logdata_t *log)
}
static int
get_hdevice(hisaxdevice_t **dev, int *typ)
get_hdevice(mISDNdevice_t **dev, int *typ)
{
if (!dev)
return(-EINVAL);
if (!typ)
return(-EINVAL);
if (*typ == HISAX_RAW_DEVICE) {
if (*typ == mISDN_RAW_DEVICE) {
*dev = get_free_rawdevice();
if (!(*dev))
return(-ENODEV);
@ -393,16 +393,16 @@ get_hdevice(hisaxdevice_t **dev, int *typ)
static int
mgr_queue(void *data, u_int prim, struct sk_buff *skb)
{
hisax_headext_t *hhe = HISAX_HEADEXT_P(skb);
mISDN_headext_t *hhe = mISDN_HEADEXT_P(skb);
hhe->what = prim;
skb_queue_tail(&hisax_thread.workq, skb);
wake_up_interruptible(&hisax_thread.waitq);
skb_queue_tail(&mISDN_thread.workq, skb);
wake_up_interruptible(&mISDN_thread.waitq);
return(0);
}
static int central_manager(void *data, u_int prim, void *arg) {
hisaxstack_t *st = data;
mISDNstack_t *st = data;
switch(prim) {
case MGR_NEWSTACK | REQUEST:
@ -413,7 +413,7 @@ static int central_manager(void *data, u_int prim, void *arg) {
return(register_layer(st, arg));
case MGR_REGLAYER | REQUEST:
if (!register_layer(st, arg)) {
hisaxinstance_t *inst = arg;
mISDNinstance_t *inst = arg;
return(inst->obj->own_ctrl(arg, MGR_REGLAYER | CONFIRM, NULL));
}
return(-EINVAL);
@ -436,18 +436,18 @@ static int central_manager(void *data, u_int prim, void *arg) {
/* can sleep in case of module reload */
if (in_interrupt()) {
struct sk_buff *skb;
hisax_headext_t *hhe;
mISDN_headext_t *hhe;
skb = alloc_skb(sizeof(hisax_pid_t), GFP_ATOMIC);
hhe = HISAX_HEADEXT_P(skb);
skb = alloc_skb(sizeof(mISDN_pid_t), GFP_ATOMIC);
hhe = mISDN_HEADEXT_P(skb);
hhe->prim = prim;
hhe->what = MGR_FUNCTION;
hhe->data[0] = st;
/* FIXME: handling of optional pid parameters */
memcpy(skb_put(skb, sizeof(hisax_pid_t)), arg, sizeof(hisax_pid_t));
memcpy(skb_put(skb, sizeof(mISDN_pid_t)), arg, sizeof(mISDN_pid_t));
hhe->func.ctrl = central_manager;
skb_queue_tail(&hisax_thread.workq, skb);
wake_up_interruptible(&hisax_thread.waitq);
skb_queue_tail(&mISDN_thread.workq, skb);
wake_up_interruptible(&mISDN_thread.waitq);
return(0);
} else
return(set_stack(st, arg));
@ -477,100 +477,100 @@ static int central_manager(void *data, u_int prim, void *arg) {
}
void
hisaxlock_core(void) {
mISDNlock_core(void) {
#ifdef MODULE
MOD_INC_USE_COUNT;
#endif
}
void
hisaxunlock_core(void) {
mISDNunlock_core(void) {
#ifdef MODULE
MOD_DEC_USE_COUNT;
#endif
}
int HiSax_register(hisaxobject_t *obj) {
int mISDN_register(mISDNobject_t *obj) {
if (!obj)
return(-EINVAL);
obj->id = obj_id++;
APPEND_TO_LIST(obj, hisax_objects);
APPEND_TO_LIST(obj, mISDN_objects);
obj->ctrl = central_manager;
// register_prop
if (debug)
printk(KERN_DEBUG "HiSax_register %s id %x\n", obj->name,
printk(KERN_DEBUG "mISDN_register %s id %x\n", obj->name,
obj->id);
return(0);
}
int HiSax_unregister(hisaxobject_t *obj) {
int mISDN_unregister(mISDNobject_t *obj) {
if (!obj)
return(-EINVAL);
if (debug)
printk(KERN_DEBUG "HiSax_unregister %s %d refs\n",
printk(KERN_DEBUG "mISDN_unregister %s %d refs\n",
obj->name, obj->refcnt);
if (obj->DPROTO.protocol[0])
release_stacks(obj);
else
remove_object(obj);
REMOVE_FROM_LISTBASE(obj, hisax_objects);
REMOVE_FROM_LISTBASE(obj, mISDN_objects);
return(0);
}
int
HiSaxInit(void)
mISDNInit(void)
{
DECLARE_MUTEX_LOCKED(sem);
int err;
printk(KERN_INFO "Modular ISDN Stack core %s\n", hisax_core_revision);
printk(KERN_INFO "Modular ISDN Stack core %s\n", mISDN_core_revision);
core_debug = debug;
err = init_hisaxdev(debug);
err = init_mISDNdev(debug);
if (err)
return(err);
init_waitqueue_head(&hisax_thread.waitq);
skb_queue_head_init(&hisax_thread.workq);
hisax_thread.notify = &sem;
kernel_thread(hisaxd, (void *)&hisax_thread, 0);
init_waitqueue_head(&mISDN_thread.waitq);
skb_queue_head_init(&mISDN_thread.workq);
mISDN_thread.notify = &sem;
kernel_thread(mISDNd, (void *)&mISDN_thread, 0);
down(&sem);
hisax_thread.notify = NULL;
test_and_set_bit(HISAX_TFLAGS_TEST, &hisax_thread.Flags);
wake_up_interruptible(&hisax_thread.waitq);
mISDN_thread.notify = NULL;
test_and_set_bit(mISDN_TFLAGS_TEST, &mISDN_thread.Flags);
wake_up_interruptible(&mISDN_thread.waitq);
return(err);
}
#ifdef MODULE
void cleanup_module(void) {
DECLARE_MUTEX_LOCKED(sem);
hisaxstack_t *st;
mISDNstack_t *st;
if (hisax_thread.thread) {
/* abort hisaxd kernel thread */
hisax_thread.notify = &sem;
test_and_set_bit(HISAX_TFLAGS_RMMOD, &hisax_thread.Flags);
wake_up_interruptible(&hisax_thread.waitq);
if (mISDN_thread.thread) {
/* abort mISDNd kernel thread */
mISDN_thread.notify = &sem;
test_and_set_bit(mISDN_TFLAGS_RMMOD, &mISDN_thread.Flags);
wake_up_interruptible(&mISDN_thread.waitq);
down(&sem);
hisax_thread.notify = NULL;
mISDN_thread.notify = NULL;
}
free_hisaxdev();
if (hisax_objects) {
printk(KERN_WARNING "hisaxcore hisax_objects not empty\n");
free_mISDNdev();
if (mISDN_objects) {
printk(KERN_WARNING "mISDNcore mISDN_objects not empty\n");
}
if (hisax_stacklist) {
printk(KERN_WARNING "hisaxcore hisax_stacklist not empty\n");
st = hisax_stacklist;
if (mISDN_stacklist) {
printk(KERN_WARNING "mISDNcore mISDN_stacklist not empty\n");
st = mISDN_stacklist;
while (st) {
printk(KERN_WARNING "hisaxcore st %x in list\n",
printk(KERN_WARNING "mISDNcore st %x in list\n",
st->id);
if (st == st->next) {
printk(KERN_WARNING "hisaxcore st == next\n");
printk(KERN_WARNING "mISDNcore st == next\n");
break;
}
st = st->next;
}
}
printk(KERN_DEBUG "hisaxcore unloaded\n");
printk(KERN_DEBUG "mISDNcore unloaded\n");
}
#endif

View File

@ -6,18 +6,18 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "helper.h"
#ifdef MEMDBG
#include "memdbg.h"
#endif
#define HISAX_MAJOR 46
#define HISAX_MINOR_CORE 0
#define HISAX_MINOR_RAW_MIN 128
#define HISAX_MINOR_RAW_MAX 255
#define mISDN_MAJOR 46
#define mISDN_MINOR_CORE 0
#define mISDN_MINOR_RAW_MIN 128
#define mISDN_MINOR_RAW_MAX 255
#define HISAX_DEVBUF_SIZE 8192
#define mISDN_DEVBUF_SIZE 8192
/* debugging */
#define DEBUG_CORE_FUNC 0x0001
@ -28,38 +28,38 @@
#define DEBUG_RDATA 0x1000
#define DEBUG_WDATA 0x2000
/* from hisax_dev.c */
/* from mISDN_dev.c */
extern int init_hisaxdev(int);
extern int free_hisaxdev(void);
extern hisaxdevice_t *get_free_rawdevice(void);
extern int free_device(hisaxdevice_t *dev);
extern int init_mISDNdev(int);
extern int free_mISDNdev(void);
extern mISDNdevice_t *get_free_rawdevice(void);
extern int free_device(mISDNdevice_t *dev);
/* from hisax_stack.c */
/* from mISDN_stack.c */
extern hisaxstack_t *hisax_stacklist;
extern hisaxinstance_t *hisax_instlist;
extern mISDNstack_t *mISDN_stacklist;
extern mISDNinstance_t *mISDN_instlist;
extern void get_stack_info(iframe_t *);
extern int get_stack_cnt(void);
extern hisaxstack_t *get_stack4id(int);
extern hisaxstack_t *new_stack(hisaxstack_t *, hisaxinstance_t *);
extern int release_stack(hisaxstack_t *);
extern void release_stacks(hisaxobject_t *);
extern int set_stack(hisaxstack_t *, hisax_pid_t *);
extern int clear_stack(hisaxstack_t *);
extern hisaxlayer_t *getlayer4lay(hisaxstack_t *, int);
extern hisaxinstance_t *get_instance(hisaxstack_t *, int, int);
extern mISDNstack_t *get_stack4id(int);
extern mISDNstack_t *new_stack(mISDNstack_t *, mISDNinstance_t *);
extern int release_stack(mISDNstack_t *);
extern void release_stacks(mISDNobject_t *);
extern int set_stack(mISDNstack_t *, mISDN_pid_t *);
extern int clear_stack(mISDNstack_t *);
extern mISDNlayer_t *getlayer4lay(mISDNstack_t *, int);
extern mISDNinstance_t *get_instance(mISDNstack_t *, int, int);
/* from hisax_core.c */
/* from mISDN_core.c */
extern hisaxobject_t *hisax_objects;
extern mISDNobject_t *mISDN_objects;
extern int core_debug;
extern void hisaxlock_core(void);
extern void hisaxunlock_core(void);
extern int register_layer(hisaxstack_t *, hisaxinstance_t *);
extern int unregister_instance(hisaxinstance_t *);
extern hisaxinstance_t *get_next_instance(hisaxstack_t *, hisax_pid_t *);
extern hisaxobject_t *get_object(int);
extern hisaxinstance_t *get_instance4id(int);
extern void mISDNlock_core(void);
extern void mISDNunlock_core(void);
extern int register_layer(mISDNstack_t *, mISDNinstance_t *);
extern int unregister_instance(mISDNinstance_t *);
extern mISDNinstance_t *get_next_instance(mISDNstack_t *, mISDN_pid_t *);
extern mISDNobject_t *get_object(int);
extern mISDNinstance_t *get_instance4id(int);

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"
#include "dss1.h"

View File

@ -7,10 +7,10 @@
*/
#define __NO_VERSION__
#include <linux/hisaxif.h>
#include "hisaxl1.h"
#include <linux/mISDNif.h>
#include "mISDNl1.h"
#include "helper.h"
#include "hisax_dch.h"
#include "mISDN_dch.h"
static void
dchannel_bh(dchannel_t *dch)
@ -60,12 +60,12 @@ int
init_dchannel(dchannel_t *dch) {
if (!(dch->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) {
printk(KERN_WARNING
"HiSax: No memory for dlog\n");
"mISDN: No memory for dlog\n");
return(-ENOMEM);
}
if (!(dch->tx_buf = kmalloc(MAX_DFRAME_LEN_L1, GFP_ATOMIC))) {
printk(KERN_WARNING
"HiSax: No memory for dchannel tx_buf\n");
"mISDN: No memory for dchannel tx_buf\n");
kfree(dch->dlog);
dch->dlog = NULL;
return(-ENOMEM);

View File

@ -6,7 +6,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/tqueue.h>
#include <linux/smp.h>
#include <linux/ptrace.h>
@ -35,7 +35,7 @@
#define FLG_HW_INIT 13
typedef struct _dchannel_t {
hisaxinstance_t inst;
mISDNinstance_t inst;
u_int DFlags;
u_int type;
u_int ph_state;

View File

@ -7,17 +7,17 @@
*/
#define __NO_VERSION__
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include "debug.h"
#define HISAX_STATUS_BUFSIZE 4096
#define mISDN_STATUS_BUFSIZE 4096
static char tmpbuf[HISAX_STATUS_BUFSIZE];
static char tmpbuf[mISDN_STATUS_BUFSIZE];
void
vhisaxdebug(int id, char *head, char *fmt, va_list args)
vmISDNdebug(int id, char *head, char *fmt, va_list args)
{
/* if head == NULL the fmt contains the full info */
char *p = tmpbuf;
@ -30,17 +30,17 @@ vhisaxdebug(int id, char *head, char *fmt, va_list args)
}
void
hisaxdebug(int id, char *head, char *fmt, ...)
mISDNdebug(int id, char *head, char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vhisaxdebug(id, head, fmt, args);
vmISDNdebug(id, head, fmt, args);
va_end(args);
}
void
debugprint(hisaxinstance_t *inst, char *fmt, ...)
debugprint(mISDNinstance_t *inst, char *fmt, ...)
{
logdata_t log;
@ -52,7 +52,7 @@ debugprint(hisaxinstance_t *inst, char *fmt, ...)
}
char *
HiSax_getrev(const char *revision)
mISDN_getrev(const char *revision)
{
char *rev;
char *p;

View File

@ -6,8 +6,8 @@
*
*/
extern void vhisaxdebug(int id, char *head, char *fmt, va_list args);
extern void hisaxdebug(int id, char *head, char *fmt, ...);
extern char * HiSax_getrev(const char *revision);
extern void debugprint(hisaxinstance_t *inst, char *fmt, ...);
extern void vmISDNdebug(int id, char *head, char *fmt, va_list args);
extern void mISDNdebug(int id, char *head, char *fmt, ...);
extern char * mISDN_getrev(const char *revision);
extern void debugprint(mISDNinstance_t *inst, char *fmt, ...);
extern int QuickHex(char *, u_char *, int);

View File

@ -17,7 +17,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
@ -31,7 +31,7 @@ typedef struct _dtmf {
char last;
int idx;
int buf[DTMF_NPOINTS];
hisaxinstance_t inst;
mISDNinstance_t inst;
} dtmf_t;
#define FLG_DTMF_ULAW 1
@ -45,9 +45,9 @@ static int debug = 0;
#define DEBUG_DTMF_DETECT 0x100
#define DEBUG_DTMF_KOEFF 0x200
static hisaxobject_t dtmf_obj;
static mISDNobject_t dtmf_obj;
static char *hisax_dtmf_revision = "$Revision$";
static char *mISDN_dtmf_revision = "$Revision$";
/*
* Misc. lookup-tables.
@ -399,10 +399,10 @@ dtmf_reset(dtmf_t *dtmf)
}
static int
dtmf_from_up(hisaxif_t *hif, struct sk_buff *skb)
dtmf_from_up(mISDNif_t *hif, struct sk_buff *skb)
{
dtmf_t *dtmf;
hisax_head_t *hh;
mISDN_head_t *hh;
int *data;
int err = 0;
@ -412,7 +412,7 @@ dtmf_from_up(hisaxif_t *hif, struct sk_buff *skb)
if (!dtmf->inst.down.func) {
return(-ENXIO);
}
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
switch(hh->prim) {
case (PH_CONTROL | REQUEST):
if (skb->len >= sizeof(int)) {
@ -440,10 +440,10 @@ dtmf_from_up(hisaxif_t *hif, struct sk_buff *skb)
}
static int
dtmf_from_down(hisaxif_t *hif, struct sk_buff *skb)
dtmf_from_down(mISDNif_t *hif, struct sk_buff *skb)
{
dtmf_t *dtmf;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !hif->fdata || !skb)
return(-EINVAL);
@ -451,7 +451,7 @@ dtmf_from_down(hisaxif_t *hif, struct sk_buff *skb)
if (!dtmf->inst.up.func) {
return(-ENXIO);
}
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
switch(hh->prim) {
case (PH_DATA | CONFIRM):
hh->prim = DL_DATA | CONFIRM;
@ -480,7 +480,7 @@ dtmf_from_down(hisaxif_t *hif, struct sk_buff *skb)
static void
release_dtmf(dtmf_t *dtmf) {
hisaxinstance_t *inst = &dtmf->inst;
mISDNinstance_t *inst = &dtmf->inst;
if (inst->up.peer) {
inst->up.peer->obj->ctrl(inst->up.peer,
@ -496,7 +496,7 @@ release_dtmf(dtmf_t *dtmf) {
}
static int
new_dtmf(hisaxstack_t *st, hisax_pid_t *pid) {
new_dtmf(mISDNstack_t *st, mISDN_pid_t *pid) {
dtmf_t *n_dtmf;
int err;
@ -507,7 +507,7 @@ new_dtmf(hisaxstack_t *st, hisax_pid_t *pid) {
return(-ENOMEM);
}
memset(n_dtmf, 0, sizeof(dtmf_t));
memcpy(&n_dtmf->inst.pid, pid, sizeof(hisax_pid_t));
memcpy(&n_dtmf->inst.pid, pid, sizeof(mISDN_pid_t));
n_dtmf->inst.obj = &dtmf_obj;
n_dtmf->inst.data = n_dtmf;
if (!SetHandledPID(&dtmf_obj, &n_dtmf->inst.pid)) {
@ -561,7 +561,7 @@ MODULE_LICENSE("GPL");
static int
dtmf_manager(void *data, u_int prim, void *arg) {
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
dtmf_t *dtmf_l = dtmf_obj.ilist;
if (debug & DEBUG_DTMF_MGR)
@ -623,7 +623,7 @@ static int dtmf_init(void)
{
int err;
printk(KERN_INFO "DTMF modul version %s\n", HiSax_getrev(hisax_dtmf_revision));
printk(KERN_INFO "DTMF modul version %s\n", mISDN_getrev(mISDN_dtmf_revision));
SET_MODULE_OWNER(&dtmf_obj);
dtmf_obj.name = MName;
dtmf_obj.BPROTO.protocol[2] = ISDN_PID_L2_B_TRANSDTMF;
@ -631,7 +631,7 @@ static int dtmf_init(void)
dtmf_obj.prev = NULL;
dtmf_obj.next = NULL;
dtmf_obj.ilist = NULL;
if ((err = HiSax_register(&dtmf_obj))) {
if ((err = mISDN_register(&dtmf_obj))) {
printk(KERN_ERR "Can't register %s error(%d)\n", MName, err);
}
return(err);
@ -641,7 +641,7 @@ static void dtmf_cleanup(void)
{
int err;
if ((err = HiSax_unregister(&dtmf_obj))) {
if ((err = mISDN_unregister(&dtmf_obj))) {
printk(KERN_ERR "Can't unregister DTMF error(%d)\n", err);
}
if(dtmf_obj.ilist) {

View File

@ -7,20 +7,20 @@
*/
#define __NO_VERSION__
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "helper.h"
#undef DEBUG_LM
#undef DEBUG_IF
void
set_dchannel_pid(hisax_pid_t *pid, int protocol, int layermask)
set_dchannel_pid(mISDN_pid_t *pid, int protocol, int layermask)
{
if (!layermask)
layermask = ISDN_LAYER(0)| ISDN_LAYER(1) | ISDN_LAYER(2) |
ISDN_LAYER(3) | ISDN_LAYER(4);
memset(pid, 0, sizeof(hisax_pid_t));
memset(pid, 0, sizeof(mISDN_pid_t));
pid->layermask = layermask;
if (layermask & ISDN_LAYER(0))
pid->protocol[0] = ISDN_PID_L0_TE_S0;
@ -37,7 +37,7 @@ set_dchannel_pid(hisax_pid_t *pid, int protocol, int layermask)
}
int
bprotocol2pid(void *bp, hisax_pid_t *pid)
bprotocol2pid(void *bp, mISDN_pid_t *pid)
{
__u8 *p = bp;
__u16 *w = bp;
@ -70,7 +70,7 @@ bprotocol2pid(void *bp, hisax_pid_t *pid)
}
int
HasProtocol(hisaxobject_t *obj, int protocol)
HasProtocol(mISDNobject_t *obj, int protocol)
{
int layer;
int pmask;
@ -97,11 +97,11 @@ HasProtocol(hisaxobject_t *obj, int protocol)
}
int
SetHandledPID(hisaxobject_t *obj, hisax_pid_t *pid)
SetHandledPID(mISDNobject_t *obj, mISDN_pid_t *pid)
{
int layer;
int ret = 0;
hisax_pid_t sav;
mISDN_pid_t sav;
if (!obj || !pid) {
int_error();
@ -110,8 +110,8 @@ SetHandledPID(hisaxobject_t *obj, hisax_pid_t *pid)
#ifdef DEBUG_LM
printk(KERN_DEBUG "%s: %s LM(%x)\n", __FUNCTION__, obj->name, pid->layermask);
#endif
memcpy(&sav, pid, sizeof(hisax_pid_t));
memset(pid, 0, sizeof(hisax_pid_t));
memcpy(&sav, pid, sizeof(mISDN_pid_t));
memset(pid, 0, sizeof(mISDN_pid_t));
pid->global = sav.global;
if (!sav.layermask) {
printk(KERN_WARNING "%s: no layermask in pid\n", __FUNCTION__);
@ -136,7 +136,7 @@ SetHandledPID(hisaxobject_t *obj, hisax_pid_t *pid)
}
void
RemoveUsedPID(hisax_pid_t *pid, hisax_pid_t *used)
RemoveUsedPID(mISDN_pid_t *pid, mISDN_pid_t *used)
{
int layer;
@ -173,7 +173,7 @@ layermask2layer(int layermask) {
}
int
get_protocol(hisaxstack_t *st, int layer)
get_protocol(mISDNstack_t *st, int layer)
{
if (!st){
@ -235,10 +235,10 @@ int get_up_layer(int layermask) {
}
int
SetIF(hisaxinstance_t *owner, hisaxif_t *hif, u_int prim, void *upfunc,
SetIF(mISDNinstance_t *owner, mISDNif_t *hif, u_int prim, void *upfunc,
void *downfunc, void *data)
{
hisaxif_t *own_hif;
mISDNif_t *own_hif;
if (!owner) {
int_error();
@ -284,9 +284,9 @@ SetIF(hisaxinstance_t *owner, hisaxif_t *hif, u_int prim, void *upfunc,
}
int
ConnectIF(hisaxinstance_t *owner, hisaxinstance_t *peer)
ConnectIF(mISDNinstance_t *owner, mISDNinstance_t *peer)
{
hisaxif_t *hif;
mISDNif_t *hif;
if (!owner) {
int_error();
@ -312,7 +312,7 @@ ConnectIF(hisaxinstance_t *owner, hisaxinstance_t *peer)
return(peer->obj->own_ctrl(peer, MGR_SETIF | REQUEST, hif));
}
int DisConnectIF(hisaxinstance_t *inst, hisaxif_t *hif) {
int DisConnectIF(mISDNinstance_t *inst, mISDNif_t *hif) {
if (hif) {
if (hif->next && hif->next->owner) {

View File

@ -5,19 +5,19 @@
* This file is (c) under GNU PUBLIC LICENSE
*
*/
#ifndef _HISAX_HELPER_H
#define _HISAX_HELPER_H
#ifndef _mISDN_HELPER_H
#define _mISDN_HELPER_H
#include <linux/kernel.h>
#ifdef MEMDBG
#include "memdbg.h"
#endif
#define int_error() \
printk(KERN_ERR "hisax: INTERNAL ERROR in %s:%d\n", \
printk(KERN_ERR "mISDN: INTERNAL ERROR in %s:%d\n", \
__FILE__, __LINE__)
#define int_errtxt(fmt, arg...) \
printk(KERN_ERR "hisax: INTERNAL ERROR in %s:%d " fmt "\n", \
printk(KERN_ERR "mISDN: INTERNAL ERROR in %s:%d " fmt "\n", \
__FILE__, __LINE__, ## arg)
#define APPEND_TO_LIST(item,base) \
@ -82,17 +82,17 @@ alloc_uplinkD_skb(size_t size)
return(skb);
}
extern void set_dchannel_pid(hisax_pid_t *, int, int);
extern void set_dchannel_pid(mISDN_pid_t *, int, int);
extern int get_lowlayer(int);
extern int get_up_layer(int);
extern int get_down_layer(int);
extern int layermask2layer(int);
extern int get_protocol(hisaxstack_t *, int);
extern int HasProtocol(hisaxobject_t *, int);
extern int SetHandledPID(hisaxobject_t *, hisax_pid_t *);
extern void RemoveUsedPID(hisax_pid_t *, hisax_pid_t *);
extern int get_protocol(mISDNstack_t *, int);
extern int HasProtocol(mISDNobject_t *, int);
extern int SetHandledPID(mISDNobject_t *, mISDN_pid_t *);
extern void RemoveUsedPID(mISDN_pid_t *, mISDN_pid_t *);
static inline int HasProtocolP(hisaxobject_t *obj, int *PP)
static inline int HasProtocolP(mISDNobject_t *obj, int *PP)
{
if (!PP) {
int_error();
@ -101,20 +101,20 @@ static inline int HasProtocolP(hisaxobject_t *obj, int *PP)
return(HasProtocol(obj, *PP));
}
extern __inline__ void hisax_sethead(u_int prim, int dinfo, struct sk_buff *skb)
extern __inline__ void mISDN_sethead(u_int prim, int dinfo, struct sk_buff *skb)
{
hisax_head_t *hh = HISAX_HEAD_P(skb);
mISDN_head_t *hh = mISDN_HEAD_P(skb);
hh->prim = prim;
hh->dinfo = dinfo;
}
extern __inline__ int if_newhead(hisaxif_t *i, u_int prim, int dinfo,
extern __inline__ int if_newhead(mISDNif_t *i, u_int prim, int dinfo,
struct sk_buff *skb)
{
if (!i->func || !skb)
return(-ENXIO);
hisax_sethead(prim, dinfo, skb);
mISDN_sethead(prim, dinfo, skb);
return(i->func(i, skb));
}
@ -132,11 +132,11 @@ extern __inline__ struct sk_buff *create_link_skb(u_int prim, int dinfo,
skb_reserve(skb, reserve);
if (len)
memcpy(skb_put(skb, len), arg, len);
hisax_sethead(prim, dinfo, skb);
mISDN_sethead(prim, dinfo, skb);
return(skb);
}
extern __inline__ int if_link(hisaxif_t *i, u_int prim, int dinfo, int len,
extern __inline__ int if_link(mISDNif_t *i, u_int prim, int dinfo, int len,
void *arg, int reserve)
{
struct sk_buff *skb;
@ -163,4 +163,4 @@ extern void AddvarIE(struct sk_buff *, u_char *);
extern void AddIE(struct sk_buff *, u_char, u_char *);
extern void LogL3Msg(struct sk_buff *);
#endif /* _HISAX_HELPER_H */
#endif /* _mISDN_HELPER_H */

View File

@ -31,10 +31,10 @@
#include <linux/kernel_stat.h>
#include <linux/delay.h>
#include "hisax_dch.h"
#include "hisax_bch.h"
#include "mISDN_dch.h"
#include "mISDN_bch.h"
#include "hfc_pci.h"
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
#include <linux/isdn_compat.h>
@ -167,7 +167,7 @@ typedef struct _hfc_pci {
u_int cfg;
u_int irq;
hfcPCI_hw_t hw;
hisax_HWlock_t lock;
mISDN_HWlock_t lock;
dchannel_t dch;
bchannel_t bch[2];
} hfc_pci_t;
@ -175,14 +175,14 @@ typedef struct _hfc_pci {
static int lock_dev(void *data, int nowait)
{
register hisax_HWlock_t *lock = &((hfc_pci_t *)data)->lock;
register mISDN_HWlock_t *lock = &((hfc_pci_t *)data)->lock;
return(lock_HW(lock, nowait));
}
static void unlock_dev(void *data)
{
register hisax_HWlock_t *lock = &((hfc_pci_t *)data)->lock;
register mISDN_HWlock_t *lock = &((hfc_pci_t *)data)->lock;
unlock_HW(lock);
}
@ -1035,9 +1035,9 @@ receive_emsg(hfc_pci_t *hc)
ptr--;
*ptr++ = '\n';
*ptr = 0;
HiSax_putstatus(hc, NULL, cs->dlog);
mISDN_putstatus(hc, NULL, cs->dlog);
} else
HiSax_putstatus(hc, "LogEcho: ", "warning Frame too big (%d)", total - 3);
mISDN_putstatus(hc, "LogEcho: ", "warning Frame too big (%d)", total - 3);
}
}
@ -1273,16 +1273,16 @@ hfcpci_dbusy_timer(hfc_pci_t *hc)
/* Layer 1 D-channel hardware access */
/*************************************/
static int
HFCD_l1hw(hisaxif_t *hif, struct sk_buff *skb)
HFCD_l1hw(mISDNif_t *hif, struct sk_buff *skb)
{
dchannel_t *dch;
hfc_pci_t *hc;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
dch = hif->fdata;
hc = dch->inst.data;
ret = 0;
@ -1631,15 +1631,15 @@ mode_hfcpci(bchannel_t *bch, int bc, int protocol)
/* Layer2 -> Layer 1 Transfer */
/******************************/
static int
hfcpci_l2l1(hisaxif_t *hif, struct sk_buff *skb)
hfcpci_l2l1(mISDNif_t *hif, struct sk_buff *skb)
{
bchannel_t *bch;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
bch = hif->fdata;
if ((hh->prim == PH_DATA_REQ) ||
(hh->prim == (DL_DATA | REQUEST))) {
@ -1727,7 +1727,7 @@ HW_hfcD_bh(dchannel_t *dch)
hfc_pci_t *hc = dch->inst.data;
u_int prim = PH_SIGNAL | INDICATION;
u_int para = 0;
hisaxif_t *upif = &dch->inst.up;
mISDNif_t *upif = &dch->inst.up;
if (test_and_clear_bit(D_L1STATECHANGE, &dch->event)) {
if (!hc->hw.nt_mode) {
@ -1888,7 +1888,7 @@ static int init_card(hfc_pci_t *hc)
printk(KERN_INFO "HFC PCI: IRQ %d count %d\n", hc->irq, irq_cnt);
lock_dev(hc, 0);
if (request_irq(hc->irq, hfcpci_interrupt, SA_SHIRQ, "HFC PCI", hc)) {
printk(KERN_WARNING "HiSax: couldn't get interrupt %d\n",
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
hc->irq);
unlock_dev(hc);
return(-EIO);
@ -1936,7 +1936,7 @@ SelFreeBChannel(hfc_pci_t *hc, channel_info_t *ci)
{
bchannel_t *bch;
hfc_pci_t *hfc;
hisaxstack_t *bst;
mISDNstack_t *bst;
int cnr;
if (!ci)
@ -1987,7 +1987,7 @@ static int HFC_cnt;
static u_int protocol[MAX_CARDS];
static int layermask[MAX_CARDS];
static hisaxobject_t HFC_obj;
static mISDNobject_t HFC_obj;
static int debug;
#ifdef MODULE
@ -2043,7 +2043,7 @@ setup_hfcpci(hfc_pci_t *hc)
#error "not running on big endian machines now"
#endif
strcpy(tmp, hfcpci_revision);
printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp));
printk(KERN_INFO "mISDN: HFC-PCI driver Rev. %s\n", mISDN_getrev(tmp));
hc->hw.cirm = 0;
hc->dch.ph_state = 0;
while (id_list[i].vendor_id) {
@ -2068,7 +2068,7 @@ setup_hfcpci(hfc_pci_t *hc)
return (1);
}
hc->hw.pci_io = (char *) get_pcibase(dev_hfcpci, 1);
printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
printk(KERN_INFO "mISDN: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
} else {
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
return (1);
@ -2145,7 +2145,7 @@ release_card(hfc_pci_t *hc) {
static int
HFC_manager(void *data, u_int prim, void *arg) {
hfc_pci_t *card = HFC_obj.ilist;
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
struct sk_buff *skb;
int channel = -1;
@ -2292,8 +2292,8 @@ HFC_init(void)
{
int err,i;
hfc_pci_t *card, *prev;
hisax_pid_t pid;
hisaxstack_t *dst;
mISDN_pid_t pid;
mISDNstack_t *dst;
SET_MODULE_OWNER(&HFC_obj);
HFC_obj.name = HFCName;
@ -2307,14 +2307,14 @@ HFC_init(void)
ISDN_PID_L2_B_RAWDEV;
HFC_obj.prev = NULL;
HFC_obj.next = NULL;
if ((err = HiSax_register(&HFC_obj))) {
if ((err = mISDN_register(&HFC_obj))) {
printk(KERN_ERR "Can't register HFC PCI error(%d)\n", err);
return(err);
}
while (HFC_cnt < MAX_CARDS) {
if (!(card = kmalloc(sizeof(hfc_pci_t), GFP_ATOMIC))) {
printk(KERN_ERR "No kmem for HFCcard\n");
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
return(-ENOMEM);
}
memset(card, 0, sizeof(hfc_pci_t));
@ -2363,7 +2363,7 @@ HFC_init(void)
int_errtxt("card(%d) no previous HFC",
HFC_cnt);
if (!HFC_cnt)
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
else
err = 0;
return(err);
@ -2422,7 +2422,7 @@ HFC_init(void)
REMOVE_FROM_LISTBASE(card, ((hfc_pci_t *)HFC_obj.ilist));
kfree(card);
if (!HFC_cnt) {
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
err = -ENODEV;
} else
printk(KERN_INFO "HFC %d cards installed\n",
@ -2438,7 +2438,7 @@ HFC_init(void)
printk(KERN_ERR "MGR_ADDSTACK REQUEST dch err(%d)\n", err);
release_card(card);
if (!HFC_cnt)
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
else
err = 0;
return(err);
@ -2452,7 +2452,7 @@ HFC_init(void)
HFC_obj.ctrl(card->dch.inst.st,
MGR_DELSTACK | REQUEST, NULL);
if (!HFC_cnt)
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
else
err = 0;
return(err);
@ -2466,7 +2466,7 @@ HFC_init(void)
err);
HFC_obj.ctrl(dst, MGR_DELSTACK | REQUEST, NULL);
if (!HFC_cnt)
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
else
err = 0;
return(err);
@ -2475,7 +2475,7 @@ HFC_init(void)
if ((err = init_card(card))) {
HFC_obj.ctrl(dst, MGR_DELSTACK | REQUEST, NULL);
if (!HFC_cnt)
HiSax_unregister(&HFC_obj);
mISDN_unregister(&HFC_obj);
else
err = 0;
return(err);
@ -2490,7 +2490,7 @@ int
cleanup_module(void)
{
int err;
if ((err = HiSax_unregister(&HFC_obj))) {
if ((err = mISDN_unregister(&HFC_obj))) {
printk(KERN_ERR "Can't unregister HFC PCI error(%d)\n", err);
return(err);
}

View File

@ -64,7 +64,7 @@
#ifndef __hw_lock__
#define __hw_lock__
typedef struct _hisax_HWlock {
typedef struct _mISDN_HWlock {
u_long flags;
spinlock_t lock;
#ifdef SPIN_DEBUG
@ -80,7 +80,7 @@ typedef struct _hisax_HWlock {
u_int irq_ok;
u_int irq_fail;
#endif
} hisax_HWlock_t;
} mISDN_HWlock_t;
#define STATE_FLAG_BUSY 1
#define STATE_FLAG_INIRQ 2
@ -90,7 +90,7 @@ typedef struct _hisax_HWlock {
* returns 0 if the lock was aquired
* returns 1 if nowait != 0 and the lock is not aquired
*/
static inline int lock_HW(hisax_HWlock_t *lock, int nowait)
static inline int lock_HW(mISDN_HWlock_t *lock, int nowait)
{
register u_long flags;
#ifdef LOCK_STATISTIC
@ -148,7 +148,7 @@ static inline int lock_HW(hisax_HWlock_t *lock, int nowait)
return(0);
}
static inline void unlock_HW(hisax_HWlock_t *lock)
static inline void unlock_HW(mISDN_HWlock_t *lock)
{
if (!test_and_clear_bit(STATE_FLAG_BUSY, &lock->state)) {
printk(KERN_ERR "lock_HW: STATE_FLAG_BUSY not locked state(%x)\n",
@ -161,7 +161,7 @@ static inline void unlock_HW(hisax_HWlock_t *lock)
spin_unlock_irqrestore(&lock->lock, lock->flags);
}
static inline void lock_HW_init(hisax_HWlock_t *lock)
static inline void lock_HW_init(mISDN_HWlock_t *lock)
{
spin_lock_init(&lock->lock);
lock->state = 0;

View File

@ -15,7 +15,7 @@
#include <linux/isdnif.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "fsm.h"
#include "helper.h"
#include "dss1.h"
@ -28,7 +28,7 @@ typedef struct _i4l_channel i4l_channel_t;
typedef struct _i4l_capi i4l_capi_t;
struct _i4l_channel {
hisaxinstance_t inst;
mISDNinstance_t inst;
i4l_capi_t *drv;
int nr;
u_int Flags;
@ -44,8 +44,8 @@ struct _i4l_capi {
i4l_capi_t *prev;
i4l_capi_t *next;
isdn_if *interface;
hisaxinstance_t inst;
hisax_pid_t pid;
mISDNinstance_t inst;
mISDN_pid_t pid;
int idx;
int locks;
int debug;
@ -148,7 +148,7 @@ i4lm_debug(struct FsmInst *fi, char *fmt, ...)
#define MAX_CARDS 8
static i4l_capi_t *drvmap[MAX_CARDS];
static hisaxobject_t I4Lcapi;
static mISDNobject_t I4Lcapi;
static int debug;
@ -239,7 +239,7 @@ release_card(int idx) {
i4l_capi_t *ic = drvmap[idx];
i4l_channel_t *ch;
int i;
hisaxinstance_t *inst;
mISDNinstance_t *inst;
if (!ic)
return;
@ -271,15 +271,15 @@ static int
sendup(i4l_channel_t *ch, int Dchannel, int prim, struct sk_buff *skb)
{
int ret;
hisax_headext_t *hhe;
hisaxinstance_t *I;
mISDN_headext_t *hhe;
mISDNinstance_t *I;
if (!skb) {
skb = alloc_skb(8, GFP_ATOMIC);
if (!skb)
return(-ENOMEM);
}
hhe = HISAX_HEADEXT_P(skb);
hhe = mISDN_HEADEXT_P(skb);
hhe->prim = prim;
hhe->dinfo = ch->l4id;
if (ch->drv->debug & 0x4)
@ -558,7 +558,7 @@ i4l_icall(struct FsmInst *fi, int event, void *arg)
i4l_lock_drv(ch->drv);
if ((skb = alloc_skb(sizeof(int *) + 8, GFP_ATOMIC))) {
int **idp = (int **)skb_put(skb, sizeof(idp));
hisax_head_t *hh = HISAX_HEAD_P(skb);
mISDN_head_t *hh = mISDN_HEAD_P(skb);
*idp = &ch->l4id;
hh->prim = CC_NEW_CR | INDICATION;
@ -964,17 +964,17 @@ capi_releaseb(struct FsmInst *fi, int event, void *arg)
}
static int
Dchannel_i4l(hisaxif_t *hif, struct sk_buff *skb)
Dchannel_i4l(mISDNif_t *hif, struct sk_buff *skb)
{
int i, ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
i4l_capi_t *ic;
i4l_channel_t *ch;
if (!hif || !skb)
return(ret);
ic = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
if (ic->debug & 0x2)
printk(KERN_DEBUG "%s: prim(%x) id(%x)\n", __FUNCTION__, hh->prim, hh->dinfo);
if (!ic)
@ -1046,16 +1046,16 @@ Dchannel_i4l(hisaxif_t *hif, struct sk_buff *skb)
}
static int
Bchannel_i4l(hisaxif_t *hif, struct sk_buff *skb)
Bchannel_i4l(mISDNif_t *hif, struct sk_buff *skb)
{
i4l_channel_t *ch;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
ch = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
if (ch->drv->debug & 0x20)
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
switch(hh->prim) {
@ -1094,7 +1094,7 @@ I4Lcapi_receive_skb_callback(int drvidx, int channel, struct sk_buff *skb)
{
i4l_capi_t *ic = drvmap[drvidx];
i4l_channel_t *ch;
hisax_headext_t *hhe = HISAX_HEADEXT_P(skb);
mISDN_headext_t *hhe = mISDN_HEADEXT_P(skb);
int ret;
if (!ic) {
@ -1143,7 +1143,7 @@ i4l_sent_pkt(i4l_capi_t *drv, isdn_ctrl *c)
i4l_channel_t *ch = drv->ch;
struct sk_buff *skb;
int ret;
hisax_headext_t *hhe;
mISDN_headext_t *hhe;
if (c->arg < 0)
return -1;
@ -1158,7 +1158,7 @@ i4l_sent_pkt(i4l_capi_t *drv, isdn_ctrl *c)
if (skb_queue_len(&ch->sendq))
sendqueued(ch);
skb_trim(skb, 0);
hhe = HISAX_HEADEXT_P(skb);
hhe = mISDN_HEADEXT_P(skb);
hhe->prim |= CONFIRM;
if (in_interrupt()) {
hhe->func.iff = ch->inst.up.func;
@ -1315,7 +1315,7 @@ I4Lcapi_status_callback(isdn_ctrl *c)
static int
I4Lcapi_manager(void *data, u_int prim, void *arg) {
i4l_capi_t *card = I4Lcapi.ilist;
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
i4l_channel_t *channel = NULL;
int nr_ch = -2;
@ -1533,7 +1533,7 @@ I4Lcapi_init(void)
{
int err;
printk(KERN_INFO "I4L CAPI interface modul version %s\n", HiSax_getrev(i4lcapi_revision));
printk(KERN_INFO "I4L CAPI interface modul version %s\n", mISDN_getrev(i4lcapi_revision));
SET_MODULE_OWNER(&I4Lcapi);
I4Lcapi.name = I4L_capi_name;
I4Lcapi.own_ctrl = I4Lcapi_manager;
@ -1551,7 +1551,7 @@ I4Lcapi_init(void)
i4lfsm_s.strEvent = strI4LEvent;
i4lfsm_s.strState = strI4LState;
FsmNew(&i4lfsm_s, I4LFnList, I4L_FN_COUNT);
if ((err = HiSax_register(&I4Lcapi))) {
if ((err = mISDN_register(&I4Lcapi))) {
printk(KERN_ERR "Can't register I4L CAPI error(%d)\n", err);
FsmFree(&i4lfsm_s);
return(err);
@ -1569,7 +1569,7 @@ I4Lcapi_cleanup(void)
{
int err;
if ((err = HiSax_unregister(&I4Lcapi))) {
if ((err = mISDN_unregister(&I4Lcapi))) {
printk(KERN_ERR "Can't unregister I4Lcapi error(%d)\n", err);
return;
}

View File

@ -9,10 +9,10 @@
#define __NO_VERSION__
#include <linux/module.h>
#include "hisax_dch.h"
#include "mISDN_dch.h"
#include "isac.h"
#include "arcofi.h"
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
#ifdef CONFIG_KMOD
@ -53,7 +53,7 @@ isac_new_ph(dchannel_t *dch)
{
u_int prim = PH_SIGNAL | INDICATION;
u_int para = 0;
hisaxif_t *upif = &dch->inst.up;
mISDNif_t *upif = &dch->inst.up;
switch (dch->ph_state) {
case (ISAC_IND_RS):
@ -135,7 +135,7 @@ isac_empty_fifo(dchannel_t *dch, int count)
if (!dch->rx_skb) {
if (!(dch->rx_skb = alloc_uplinkD_skb(MAX_DFRAME_LEN_L1))) {
printk(KERN_WARNING "HiSax: D receive out of memory\n");
printk(KERN_WARNING "mISDN: D receive out of memory\n");
dch->write_reg(dch->inst.data, ISAC_CMDR, 0x80);
return;
}
@ -274,7 +274,7 @@ isac_retransmit(dchannel_t *dch)
dch->tx_idx = 0;
isac_fill_fifo(dch);
} else {
printk(KERN_WARNING "HiSax: ISAC XDU no TX_BUSY\n");
printk(KERN_WARNING "mISDN: ISAC XDU no TX_BUSY\n");
debugprint(&dch->inst, "ISAC XDU no TX_BUSY");
if (test_and_clear_bit(FLG_TX_NEXT, &dch->DFlags)) {
if (dch->next_skb) {
@ -570,15 +570,15 @@ ISAC_interrupt(dchannel_t *dch, u_char val)
}
int
ISAC_l1hw(hisaxif_t *hif, struct sk_buff *skb)
ISAC_l1hw(mISDNif_t *hif, struct sk_buff *skb)
{
dchannel_t *dch;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
dch = hif->fdata;
ret = 0;
if (hh->prim == PH_DATA_REQ) {
@ -730,7 +730,7 @@ dbusy_timer_handler(dchannel_t *dch)
if (dch->tx_idx) {
dch->tx_idx = 0;
} else {
printk(KERN_WARNING "HiSax: ISAC D-Channel Busy no tx_idx\n");
printk(KERN_WARNING "mISDN: ISAC D-Channel Busy no tx_idx\n");
debugprint(&dch->inst, "D-Channel Busy no tx_idx");
}
/* Transmitter reset */

View File

@ -133,4 +133,4 @@ extern void ISAC_free(dchannel_t *);
extern void ISAC_interrupt(dchannel_t *, u_char);
extern void ISAC_clear_pending_ints(dchannel_t *);
extern int ISAC_l1hw(hisaxif_t *, struct sk_buff *);
extern int ISAC_l1hw(mISDNif_t *, struct sk_buff *);

View File

@ -10,9 +10,9 @@
#define __NO_VERSION__
#include <linux/delay.h>
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "hisax_bch.h"
#include "mISDN_bch.h"
#include "isar.h"
#include "debug.h"
@ -45,7 +45,7 @@ waitforHIA(bchannel_t *bch, int timeout)
timeout--;
}
if (!timeout)
printk(KERN_WARNING "HiSax: ISAR waitforHIA timeout\n");
printk(KERN_WARNING "mISDN: ISAR waitforHIA timeout\n");
return(timeout);
}
@ -471,7 +471,7 @@ send_DLE_ETX(bchannel_t *bch)
skb_queue_tail(&bch->rqueue, skb);
bch_sched_event(bch, B_RCVBUFREADY);
} else {
printk(KERN_WARNING "HiSax: skb out of memory\n");
printk(KERN_WARNING "mISDN: skb out of memory\n");
}
}
@ -524,7 +524,7 @@ isar_rcv_frame(bchannel_t *bch)
skb_queue_tail(&bch->rqueue, skb);
bch_sched_event(bch, B_RCVBUFREADY);
} else {
printk(KERN_WARNING "HiSax: skb out of memory\n");
printk(KERN_WARNING "mISDN: skb out of memory\n");
bch->Write_Reg(bch->inst.data, 1, ISAR_IIA, 0);
}
break;
@ -602,7 +602,7 @@ isar_rcv_frame(bchannel_t *bch)
bch_sched_event(bch, B_LL_NOCARRIER);
}
} else {
printk(KERN_WARNING "HiSax: skb out of memory\n");
printk(KERN_WARNING "mISDN: skb out of memory\n");
bch->Write_Reg(bch->inst.data, 1, ISAR_IIA, 0);
}
break;
@ -1582,15 +1582,15 @@ isar_setup(bchannel_t *bch)
}
int
isar_down(hisaxif_t *hif, struct sk_buff *skb)
isar_down(mISDNif_t *hif, struct sk_buff *skb)
{
bchannel_t *bch;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
bch = hif->fdata;
ret = 0;
if ((hh->prim == PH_DATA_REQ) ||

View File

@ -234,5 +234,5 @@ extern int ISARVersion(bchannel_t *bch, char *s);
extern void isar_int_main(bchannel_t *bch);
extern int init_isar(bchannel_t *bch);
extern void free_isar(bchannel_t *bch);
extern int isar_down(hisaxif_t *, struct sk_buff *);
extern int isar_down(mISDNif_t *, struct sk_buff *);
extern int isar_load_firmware(bchannel_t *bch, u_char *buf, int size);

View File

@ -6,7 +6,7 @@
*
* This file is (c) under GNU PUBLIC LICENSE
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
* ../../../Documentation/isdn/mISDN.cert
*
* Thanks to Jan den Ouden
* Fritz Elfert
@ -15,13 +15,13 @@
#include <linux/module.h>
#include "hisaxl3.h"
#include "mISDNl3.h"
#include "helper.h"
#include "debug.h"
#include "dss1.h"
static int debug = 0;
static hisaxobject_t u_dss1;
static mISDNobject_t u_dss1;
const char *dss1_revision = "$Revision$";
@ -290,7 +290,7 @@ l3dss1_msg_without_setup(l3_process_t *pc, u_char cause)
l3dss1_message_cause(pc, MT_RELEASE_COMPLETE, cause);
break;
default:
printk(KERN_ERR "HiSax l3dss1_msg_without_setup wrong cause %d\n",
printk(KERN_ERR "mISDN l3dss1_msg_without_setup wrong cause %d\n",
cause);
}
release_l3_process(pc);
@ -680,7 +680,7 @@ l3dss1_release_cmpl_req(l3_process_t *pc, u_char pr, void *arg)
newl3state(pc, 0);
l3dss1_message(pc, MT_RELEASE_COMPLETE);
}
hisax_l3up(pc, CC_RELEASE_COMPLETE | CONFIRM, NULL);
mISDN_l3up(pc, CC_RELEASE_COMPLETE | CONFIRM, NULL);
release_l3_process(pc);
}
@ -760,7 +760,7 @@ l3dss1_release_cmpl(l3_process_t *pc, u_char pr, void *arg)
StopAllL3Timer(pc);
newl3state(pc, 0);
if (hisax_l3up(pc, CC_RELEASE_COMPLETE | INDICATION, skb))
if (mISDN_l3up(pc, CC_RELEASE_COMPLETE | INDICATION, skb))
dev_kfree_skb(skb);
release_l3_process(pc);
}
@ -785,7 +785,7 @@ l3dss1_alerting(l3_process_t *pc, u_char pr, void *arg)
newl3state(pc, 4);
if (ret)
l3dss1_std_ie_err(pc, ret);
if (hisax_l3up(pc, CC_ALERTING | INDICATION, skb))
if (mISDN_l3up(pc, CC_ALERTING | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -829,7 +829,7 @@ l3dss1_call_proc(l3_process_t *pc, u_char pr, void *arg)
L3AddTimer(&pc->timer, T310, CC_T310);
if (ret) /* STATUS for none mandatory IE errors after actions are taken */
l3dss1_std_ie_err(pc, ret);
if (hisax_l3up(pc, CC_PROCEEDING | INDICATION, skb))
if (mISDN_l3up(pc, CC_PROCEEDING | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -854,7 +854,7 @@ l3dss1_connect(l3_process_t *pc, u_char pr, void *arg)
newl3state(pc, 10);
if (ret)
l3dss1_std_ie_err(pc, ret);
if (hisax_l3up(pc, CC_CONNECT | INDICATION, skb))
if (mISDN_l3up(pc, CC_CONNECT | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -878,7 +878,7 @@ l3dss1_connect_ack(l3_process_t *pc, u_char pr, void *arg)
}
if (ret)
l3dss1_std_ie_err(pc, ret);
if (hisax_l3up(pc, CC_CONNECT_ACKNOWLEDGE | INDICATION, skb))
if (mISDN_l3up(pc, CC_CONNECT_ACKNOWLEDGE | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -909,7 +909,7 @@ l3dss1_disconnect(l3_process_t *pc, u_char pr, void *arg)
else
newl3state(pc, 12);
if (11 != ret) {
if (hisax_l3up(pc, CC_DISCONNECT | INDICATION, skb))
if (mISDN_l3up(pc, CC_DISCONNECT | INDICATION, skb))
dev_kfree_skb(skb);
} else if (!cause) {
l3dss1_release_req(pc, pr, NULL);
@ -964,7 +964,7 @@ l3dss1_setup_ack(l3_process_t *pc, u_char pr, void *arg)
L3AddTimer(&pc->timer, T304, CC_T304);
if (ret) /* STATUS for none mandatory IE errors after actions are taken */
l3dss1_std_ie_err(pc, ret);
if (hisax_l3up(pc, CC_SETUP_ACKNOWLEDGE | INDICATION, skb))
if (mISDN_l3up(pc, CC_SETUP_ACKNOWLEDGE | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -1079,7 +1079,7 @@ l3dss1_setup(l3_process_t *pc, u_char pr, void *arg)
if ((nskb = alloc_skb(sizeof(idp) + 8, GFP_ATOMIC))) {
idp = (int **)skb_put(nskb, sizeof(idp));
*idp = &pc->id;
err = hisax_l3up(pc, CC_NEW_CR | INDICATION, nskb);
err = mISDN_l3up(pc, CC_NEW_CR | INDICATION, nskb);
if (err)
dev_kfree_skb(nskb);
} else
@ -1092,7 +1092,7 @@ l3dss1_setup(l3_process_t *pc, u_char pr, void *arg)
dev_kfree_skb(skb);
return;
}
if (hisax_l3up(pc, CC_SETUP | INDICATION, skb))
if (mISDN_l3up(pc, CC_SETUP | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -1126,7 +1126,7 @@ l3dss1_release(l3_process_t *pc, u_char pr, void *arg)
l3dss1_message_cause(pc, MT_RELEASE_COMPLETE, cause);
else
l3dss1_message(pc, MT_RELEASE_COMPLETE);
if (hisax_l3up(pc, CC_RELEASE | INDICATION, skb))
if (mISDN_l3up(pc, CC_RELEASE | INDICATION, skb))
dev_kfree_skb(skb);
newl3state(pc, 0);
release_l3_process(pc);
@ -1187,7 +1187,7 @@ l3dss1_progress(l3_process_t *pc, u_char pr, void *arg) {
if (err)
l3dss1_std_ie_err(pc, err);
if (ERR_IE_COMPREHENSION != err) {
if (hisax_l3up(pc, CC_PROGRESS | INDICATION, skb))
if (mISDN_l3up(pc, CC_PROGRESS | INDICATION, skb))
dev_kfree_skb(skb);
} else
dev_kfree_skb(skb);
@ -1233,7 +1233,7 @@ l3dss1_notify(l3_process_t *pc, u_char pr, void *arg) {
if (err)
l3dss1_std_ie_err(pc, err);
if (ERR_IE_COMPREHENSION != err) {
if (hisax_l3up(pc, CC_NOTIFY | INDICATION, skb))
if (mISDN_l3up(pc, CC_NOTIFY | INDICATION, skb))
dev_kfree_skb(skb);
} else
dev_kfree_skb(skb);
@ -1247,7 +1247,7 @@ l3dss1_status_enq(l3_process_t *pc, u_char pr, void *arg) {
ret = check_infoelements(pc, skb, ie_STATUS_ENQUIRY);
l3dss1_std_ie_err(pc, ret);
l3dss1_status_send(pc, CAUSE_STATUS_RESPONSE);
if (hisax_l3up(pc, CC_STATUS_ENQUIRY | INDICATION, skb))
if (mISDN_l3up(pc, CC_STATUS_ENQUIRY | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -1263,7 +1263,7 @@ l3dss1_information(l3_process_t *pc, u_char pr, void *arg) {
L3DelTimer(&pc->timer);
L3AddTimer(&pc->timer, T302, CC_T302);
}
if (hisax_l3up(pc, CC_INFORMATION | INDICATION, skb))
if (mISDN_l3up(pc, CC_INFORMATION | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -1287,10 +1287,10 @@ l3dss1_release_ind(l3_process_t *pc, u_char pr, void *arg)
* set down layer 3 without sending any message
*/
newl3state(pc, 0);
err = hisax_l3up(pc, CC_RELEASE | INDICATION, skb);
err = mISDN_l3up(pc, CC_RELEASE | INDICATION, skb);
release_l3_process(pc);
} else {
err = hisax_l3up(pc, CC_RELEASE | INDICATION, skb);
err = mISDN_l3up(pc, CC_RELEASE | INDICATION, skb);
}
if (err)
dev_kfree_skb(skb);
@ -1300,7 +1300,7 @@ static void
l3dss1_restart(l3_process_t *pc, u_char pr, void *arg) {
struct sk_buff *skb = arg;
L3DelTimer(&pc->timer);
hisax_l3up(pc, CC_RELEASE | INDICATION, NULL);
mISDN_l3up(pc, CC_RELEASE | INDICATION, NULL);
release_l3_process(pc);
if (skb)
dev_kfree_skb(skb);
@ -1357,10 +1357,10 @@ l3dss1_status(l3_process_t *pc, u_char pr, void *arg) {
* state == 0, then we must set down layer 3
*/
newl3state(pc, 0);
ret = hisax_l3up(pc, CC_STATUS| INDICATION, skb);
ret = mISDN_l3up(pc, CC_STATUS| INDICATION, skb);
release_l3_process(pc);
} else
ret = hisax_l3up(pc, CC_STATUS | INDICATION, skb);
ret = mISDN_l3up(pc, CC_STATUS | INDICATION, skb);
if (ret)
dev_kfree_skb(skb);
}
@ -1380,7 +1380,7 @@ l3dss1_facility(l3_process_t *pc, u_char pr, void *arg)
dev_kfree_skb(skb);
return;
}
if (hisax_l3up(pc, CC_FACILITY | INDICATION, skb))
if (mISDN_l3up(pc, CC_FACILITY | INDICATION, skb))
dev_kfree_skb(skb);
}
@ -1395,7 +1395,7 @@ l3dss1_suspend_ack(l3_process_t *pc, u_char pr, void *arg) {
if ((ret = check_infoelements(pc, skb, ie_SUSPEND_ACKNOWLEDGE)))
if (pc->l3->debug & L3_DEB_WARN)
l3_debug(pc->l3, "SUSPACK check ie(%d)",ret);
if (hisax_l3up(pc, CC_SUSPEND_ACKNOWLEDGE | INDICATION, skb))
if (mISDN_l3up(pc, CC_SUSPEND_ACKNOWLEDGE | INDICATION, skb))
dev_kfree_skb(skb);
release_l3_process(pc);
}
@ -1425,7 +1425,7 @@ l3dss1_suspend_rej(l3_process_t *pc, u_char pr, void *arg)
return;
}
L3DelTimer(&pc->timer);
if (hisax_l3up(pc, CC_SUSPEND_REJECT | INDICATION, skb))
if (mISDN_l3up(pc, CC_SUSPEND_REJECT | INDICATION, skb))
dev_kfree_skb(skb);
newl3state(pc, 10);
if (ret) /* STATUS for none mandatory IE errors after actions are taken */
@ -1462,7 +1462,7 @@ l3dss1_resume_ack(l3_process_t *pc, u_char pr, void *arg)
return;
}
L3DelTimer(&pc->timer);
if (hisax_l3up(pc, CC_RESUME_ACKNOWLEDGE | INDICATION, skb))
if (mISDN_l3up(pc, CC_RESUME_ACKNOWLEDGE | INDICATION, skb))
dev_kfree_skb(skb);
newl3state(pc, 10);
if (ret) /* STATUS for none mandatory IE errors after actions are taken */
@ -1494,7 +1494,7 @@ l3dss1_resume_rej(l3_process_t *pc, u_char pr, void *arg)
return;
}
L3DelTimer(&pc->timer);
if (hisax_l3up(pc, CC_RESUME_REJECT | INDICATION, skb))
if (mISDN_l3up(pc, CC_RESUME_REJECT | INDICATION, skb))
dev_kfree_skb(skb);
newl3state(pc, 0);
if (ret) /* STATUS for none mandatory IE errors after actions are taken */
@ -1537,7 +1537,7 @@ l3dss1_global_restart(l3_process_t *pc, u_char pr, void *arg)
if ((ri & 7) == 7)
dss1man(up, CC_RESTART | REQUEST, NULL);
else if (up->bc == chan)
hisax_l3up(up, CC_RESTART | REQUEST, NULL);
mISDN_l3up(up, CC_RESTART | REQUEST, NULL);
up = up->next;
}
dev_kfree_skb(skb);
@ -1566,7 +1566,7 @@ l3dss1_t302(l3_process_t *pc, u_char pr, void *arg)
L3DelTimer(&pc->timer);
newl3state(pc, 11);
l3dss1_message_cause(pc, MT_DISCONNECT, CAUSE_INVALID_NUMBER);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
}
static void
@ -1593,7 +1593,7 @@ l3dss1_t303(l3_process_t *pc, u_char pr, void *arg)
kfree_skb(pc->t303skb);
pc->t303skb = NULL;
l3dss1_message_cause(pc, MT_RELEASE_COMPLETE, CAUSE_TIMER_EXPIRED);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
release_l3_process(pc);
}
@ -1603,7 +1603,7 @@ l3dss1_t304(l3_process_t *pc, u_char pr, void *arg)
L3DelTimer(&pc->timer);
newl3state(pc, 11);
l3dss1_message_cause(pc, MT_DISCONNECT, CAUSE_TIMER_EXPIRED);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
}
static void
@ -1625,7 +1625,7 @@ l3dss1_t310(l3_process_t *pc, u_char pr, void *arg)
L3DelTimer(&pc->timer);
newl3state(pc, 11);
l3dss1_message_cause(pc, MT_DISCONNECT, CAUSE_TIMER_EXPIRED);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
}
static void
@ -1634,7 +1634,7 @@ l3dss1_t313(l3_process_t *pc, u_char pr, void *arg)
L3DelTimer(&pc->timer);
newl3state(pc, 11);
l3dss1_message_cause(pc, MT_DISCONNECT, CAUSE_TIMER_EXPIRED);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
}
static void
@ -1650,7 +1650,7 @@ static void
l3dss1_t308_2(l3_process_t *pc, u_char pr, void *arg)
{
L3DelTimer(&pc->timer);
hisax_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
mISDN_l3up(pc, CC_TIMEOUT | INDICATION, NULL);
release_l3_process(pc);
}
@ -1662,7 +1662,7 @@ l3dss1_t318(l3_process_t *pc, u_char pr, void *arg)
pc->cause = 102; /* Timer expiry */
pc->para.loc = 0; /* local */
#endif
hisax_l3up(pc, CC_RESUME_REJECT | INDICATION, NULL);
mISDN_l3up(pc, CC_RESUME_REJECT | INDICATION, NULL);
newl3state(pc, 19);
l3dss1_message(pc, MT_RELEASE);
L3AddTimer(&pc->timer, T308, CC_T308_1);
@ -1676,7 +1676,7 @@ l3dss1_t319(l3_process_t *pc, u_char pr, void *arg)
pc->cause = 102; /* Timer expiry */
pc->para.loc = 0; /* local */
#endif
hisax_l3up(pc, CC_SUSPEND_REJECT | INDICATION, NULL);
mISDN_l3up(pc, CC_SUSPEND_REJECT | INDICATION, NULL);
newl3state(pc, 10);
}
@ -1702,7 +1702,7 @@ l3dss1_dl_reset(l3_process_t *pc, u_char pr, void *arg)
nskb = skb_clone(skb, GFP_ATOMIC);
l3dss1_disconnect_req(pc, pr, skb);
if (nskb) {
if (hisax_l3up(pc, CC_DISCONNECT | REQUEST, nskb))
if (mISDN_l3up(pc, CC_DISCONNECT | REQUEST, nskb))
dev_kfree_skb(nskb);
}
}
@ -1715,7 +1715,7 @@ l3dss1_dl_release(l3_process_t *pc, u_char pr, void *arg)
pc->cause = 0x1b; /* Destination out of order */
pc->para.loc = 0;
#endif
hisax_l3up(pc, DL_RELEASE | INDICATION, NULL);
mISDN_l3up(pc, DL_RELEASE | INDICATION, NULL);
release_l3_process(pc);
}
@ -1910,20 +1910,20 @@ global_handler(layer3_t *l3, int mt, struct sk_buff *skb)
}
static int
dss1_fromdown(hisaxif_t *hif, struct sk_buff *skb)
dss1_fromdown(mISDNif_t *hif, struct sk_buff *skb)
{
layer3_t *l3;
int i, cause, callState, ret = -EINVAL;
char *ptr;
l3_process_t *proc;
hisax_head_t *hh;
mISDN_head_t *hh;
Q931_info_t *qi;
if (!hif || !skb)
return(ret);
l3 = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
if (!l3)
return(ret);
@ -2086,17 +2086,17 @@ dss1_fromdown(hisaxif_t *hif, struct sk_buff *skb)
}
static int
dss1_fromup(hisaxif_t *hif, struct sk_buff *skb)
dss1_fromup(mISDNif_t *hif, struct sk_buff *skb)
{
layer3_t *l3;
int i, cr, ret = -EINVAL;
l3_process_t *proc;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
l3 = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
if (!l3)
return(ret);
@ -2124,7 +2124,7 @@ dss1_fromup(hisaxif_t *hif, struct sk_buff *skb)
return(ret);
}
if (!proc) {
printk(KERN_ERR "HiSax dss1 fromup without proc pr=%04x\n",
printk(KERN_ERR "mISDN dss1 fromup without proc pr=%04x\n",
hh->prim);
return(-EINVAL);
}
@ -2158,7 +2158,7 @@ dss1man(l3_process_t *proc, u_int pr, void *arg)
int i;
if (!proc) {
printk(KERN_ERR "HiSax dss1man without proc pr=%04x\n", pr);
printk(KERN_ERR "mISDN dss1man without proc pr=%04x\n", pr);
return(-EINVAL);
}
for (i = 0; i < MANSLLEN; i++)
@ -2183,7 +2183,7 @@ dss1man(l3_process_t *proc, u_int pr, void *arg)
static void
release_udss1(layer3_t *l3)
{
hisaxinstance_t *inst = &l3->inst;
mISDNinstance_t *inst = &l3->inst;
printk(KERN_DEBUG "release_udss1 refcnt %d l3(%p) inst(%p)\n",
u_dss1.refcnt, l3, inst);
@ -2202,7 +2202,7 @@ release_udss1(layer3_t *l3)
}
static int
new_udss1(hisaxstack_t *st, hisax_pid_t *pid)
new_udss1(mISDNstack_t *st, mISDN_pid_t *pid)
{
layer3_t *nl3;
int err;
@ -2214,7 +2214,7 @@ new_udss1(hisaxstack_t *st, hisax_pid_t *pid)
return(-ENOMEM);
}
memset(nl3, 0, sizeof(layer3_t));
memcpy(&nl3->inst.pid, pid, sizeof(hisax_pid_t));
memcpy(&nl3->inst.pid, pid, sizeof(mISDN_pid_t));
nl3->debug = debug;
nl3->inst.obj = &u_dss1;
if (!SetHandledPID(&u_dss1, &nl3->inst.pid)) {
@ -2233,7 +2233,7 @@ new_udss1(hisaxstack_t *st, hisax_pid_t *pid)
if (pid->protocol[3] & ISDN_PID_L3_DF_EXTCID)
test_and_set_bit(FLG_EXTCID, &nl3->Flag);
if (!(nl3->global = kmalloc(sizeof(l3_process_t), GFP_ATOMIC))) {
printk(KERN_ERR "HiSax can't get memory for dss1 global CR\n");
printk(KERN_ERR "mISDN can't get memory for dss1 global CR\n");
release_l3(nl3);
kfree(nl3);
return(-ENOMEM);
@ -2247,7 +2247,7 @@ new_udss1(hisaxstack_t *st, hisax_pid_t *pid)
L3InitTimer(nl3->global, &nl3->global->timer);
}
if (!(nl3->dummy = kmalloc(sizeof(l3_process_t), GFP_ATOMIC))) {
printk(KERN_ERR "HiSax can't get memory for dss1 dummy CR\n");
printk(KERN_ERR "mISDN can't get memory for dss1 dummy CR\n");
release_l3(nl3);
kfree(nl3);
return(-ENOMEM);
@ -2288,7 +2288,7 @@ MODULE_PARM(debug, "1i");
static int
udss1_manager(void *data, u_int prim, void *arg) {
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
layer3_t *l3l = u_dss1.ilist;
printk(KERN_DEBUG "udss1_manager data:%p prim:%x arg:%p\n", data, prim, arg);
@ -2345,7 +2345,7 @@ int UDSS1Init(void)
char tmp[32];
strcpy(tmp, dss1_revision);
printk(KERN_INFO "HiSax: DSS1 Rev. %s\n", HiSax_getrev(tmp));
printk(KERN_INFO "mISDN: DSS1 Rev. %s\n", mISDN_getrev(tmp));
SET_MODULE_OWNER(&u_dss1);
u_dss1.name = MName;
u_dss1.DPROTO.protocol[3] = ISDN_PID_L3_DSS1USER |
@ -2354,10 +2354,10 @@ int UDSS1Init(void)
u_dss1.own_ctrl = udss1_manager;
u_dss1.prev = NULL;
u_dss1.next = NULL;
HiSaxl3New();
if ((err = HiSax_register(&u_dss1))) {
mISDNl3New();
if ((err = mISDN_register(&u_dss1))) {
printk(KERN_ERR "Can't register %s error(%d)\n", MName, err);
HiSaxl3Free();
mISDNl3Free();
}
return(err);
}
@ -2367,14 +2367,14 @@ void cleanup_module(void)
{
int err;
if ((err = HiSax_unregister(&u_dss1))) {
if ((err = mISDN_unregister(&u_dss1))) {
printk(KERN_ERR "Can't unregister User DSS1 error(%d)\n", err);
}
if (u_dss1.ilist) {
printk(KERN_WARNING "hisaxl3 u_dss1 list not empty\n");
printk(KERN_WARNING "mISDNl3 u_dss1 list not empty\n");
while(u_dss1.ilist)
release_udss1(u_dss1.ilist);
}
HiSaxl3Free();
mISDNl3Free();
}
#endif

View File

@ -9,7 +9,7 @@
*/
#define __NO_VERSION__
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "dss1.h"
#include "helper.h"
@ -58,7 +58,7 @@ alloc_l3msg(int len, u_char type)
Q931_info_t *qi;
if (!(skb = alloc_skb(len + MAX_HEADER_LEN + L3_EXTRA_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "HiSax: No skb for L3\n");
printk(KERN_WARNING "mISDN: No skb for L3\n");
return (NULL);
}
skb_reserve(skb, MAX_HEADER_LEN);
@ -148,9 +148,9 @@ void LogL3Msg(struct sk_buff *skb)
u16 *ies;
int i,j;
Q931_info_t *qi = (Q931_info_t *)skb->data;
hisax_head_t *hh;
mISDN_head_t *hh;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "L3Msg prim(%x) id(%x) len(%d)\n",
hh->prim, hh->dinfo, skb->len);
if (skb->len < sizeof(Q931_info_t))

View File

@ -1,12 +1,12 @@
/* $Id$
*
* hisax_l1.c common low level stuff for I.430 layer1
* mISDN_l1.c common low level stuff for I.430 layer1
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
* ../../../Documentation/isdn/mISDN.cert
*
*/
@ -14,7 +14,7 @@ static char *l1_revision = "$Revision$";
#include <linux/config.h>
#include <linux/module.h>
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
@ -26,7 +26,7 @@ typedef struct _layer1 {
struct FsmTimer timer;
int debug;
int delay;
hisaxinstance_t inst;
mISDNinstance_t inst;
} layer1_t;
/* l1 status_info */
@ -43,7 +43,7 @@ typedef struct _status_info_l1 {
} status_info_l1_t;
static int debug = 0;
static hisaxobject_t isdnl1;
static mISDNobject_t isdnl1;
#define TIMER3_VALUE 7000
@ -78,7 +78,7 @@ static char *strL1SState[] =
"ST_L1_F8",
};
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
static
struct Fsm l1fsm_u =
{NULL, 0, 0, NULL, NULL};
@ -233,7 +233,7 @@ l1_info2_ind(struct FsmInst *fi, int event, void *arg)
{
layer1_t *l1 = fi->userdata;
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
if (test_bit(FLG_L1_UINT, &l1->Flags))
FsmChangeState(fi, ST_L1_SYNC2);
else
@ -247,7 +247,7 @@ l1_info4_ind(struct FsmInst *fi, int event, void *arg)
{
layer1_t *l1 = fi->userdata;
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
if (test_bit(FLG_L1_UINT, &l1->Flags))
FsmChangeState(fi, ST_L1_TRANS);
else
@ -276,7 +276,7 @@ l1_timer3(struct FsmInst *fi, int event, void *arg)
l1up(l1, PH_CONTROL | INDICATION, 0, 4, &db);
l1up(l1, PH_DEACTIVATE | INDICATION, 0, 0, NULL);
}
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
if (!test_bit(FLG_L1_UINT, &l1->Flags))
#endif
if (l1->l1m.state != ST_L1_F6) {
@ -384,7 +384,7 @@ static struct FsmNode L1SFnList[] =
#define L1S_FN_COUNT (sizeof(L1SFnList)/sizeof(struct FsmNode))
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
static void
l1_deact_req_u(struct FsmInst *fi, int event, void *arg)
{
@ -492,16 +492,16 @@ static struct FsmNode L1BFnList[] =
#define L1B_FN_COUNT (sizeof(L1BFnList)/sizeof(struct FsmNode))
static int
l1from_up(hisaxif_t *hif, struct sk_buff *skb)
l1from_up(mISDNif_t *hif, struct sk_buff *skb)
{
layer1_t *l1;
hisax_head_t *hh;
mISDN_head_t *hh;
int err = 0;
if (!hif || !hif->fdata || !skb)
return(-EINVAL);
l1 = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
switch(hh->prim) {
case (PH_DATA | REQUEST):
case (PH_CONTROL | REQUEST):
@ -527,7 +527,7 @@ l1from_up(hisaxif_t *hif, struct sk_buff *skb)
break;
default:
if (l1->debug)
hisaxdebug(l1->inst.st->id, NULL,
mISDNdebug(l1->inst.st->id, NULL,
"l1from_up msg %x unhandled", hh->prim);
err = -EINVAL;
break;
@ -538,16 +538,16 @@ l1from_up(hisaxif_t *hif, struct sk_buff *skb)
}
static int
l1from_down(hisaxif_t *hif, struct sk_buff *skb)
l1from_down(mISDNif_t *hif, struct sk_buff *skb)
{
layer1_t *l1;
hisax_head_t *hh;
mISDN_head_t *hh;
int err = 0;
if (!hif || !hif->fdata || !skb)
return(-EINVAL);
l1 = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
if (hh->prim == PH_DATA_IND) {
if (test_bit(FLG_L1_ACTTIMER, &l1->Flags))
FsmEvent(&l1->l1m, EV_TIMER_ACT, NULL);
@ -568,13 +568,13 @@ l1from_down(hisaxif_t *hif, struct sk_buff *skb)
else if (hh->dinfo == HW_POWERUP)
FsmEvent(&l1->l1m, EV_POWER_UP, NULL);
else if (l1->debug)
hisaxdebug(l1->inst.st->id, NULL,
mISDNdebug(l1->inst.st->id, NULL,
"l1from_down ctrl ind %x unhandled", hh->dinfo);
} else if (hh->prim == (PH_CONTROL | CONFIRM)) {
if (hh->dinfo == HW_DEACTIVATE)
FsmEvent(&l1->l1m, EV_DEACT_CNF, NULL);
else if (l1->debug)
hisaxdebug(l1->inst.st->id, NULL,
mISDNdebug(l1->inst.st->id, NULL,
"l1from_down ctrl cnf %x unhandled", hh->dinfo);
} else if (hh->prim == (PH_SIGNAL | INDICATION)) {
if (hh->dinfo == ANYSIGNAL)
@ -588,11 +588,11 @@ l1from_down(hisaxif_t *hif, struct sk_buff *skb)
else if (hh->dinfo == INFO4_P10)
FsmEvent(&l1->l1m, EV_INFO4_IND, NULL);
else if (l1->debug)
hisaxdebug(l1->inst.st->id, NULL,
mISDNdebug(l1->inst.st->id, NULL,
"l1from_down sig %x unhandled", hh->dinfo);
} else {
if (l1->debug)
hisaxdebug(l1->inst.st->id, NULL,
mISDNdebug(l1->inst.st->id, NULL,
"l1from_down msg %x unhandled", hh->prim);
err = -EINVAL;
}
@ -603,7 +603,7 @@ l1from_down(hisaxif_t *hif, struct sk_buff *skb)
static void
release_l1(layer1_t *l1) {
hisaxinstance_t *inst = &l1->inst;
mISDNinstance_t *inst = &l1->inst;
FsmDelTimer(&l1->timer, 0);
if (inst->up.peer) {
@ -620,7 +620,7 @@ release_l1(layer1_t *l1) {
}
static int
new_l1(hisaxstack_t *st, hisax_pid_t *pid) {
new_l1(mISDNstack_t *st, mISDN_pid_t *pid) {
layer1_t *nl1;
int err;
@ -631,7 +631,7 @@ new_l1(hisaxstack_t *st, hisax_pid_t *pid) {
return(-ENOMEM);
}
memset(nl1, 0, sizeof(layer1_t));
memcpy(&nl1->inst.pid, pid, sizeof(hisax_pid_t));
memcpy(&nl1->inst.pid, pid, sizeof(mISDN_pid_t));
nl1->inst.obj = &isdnl1;
nl1->inst.data = nl1;
if (!SetHandledPID(&isdnl1, &nl1->inst.pid)) {
@ -702,7 +702,7 @@ MODULE_LICENSE("GPL");
static int
l1_manager(void *data, u_int prim, void *arg) {
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
layer1_t *l1l = isdnl1.ilist;
printk(KERN_DEBUG "l1_manager data:%p prim:%x arg:%p\n", data, prim, arg);
@ -764,7 +764,7 @@ int Isdnl1Init(void)
{
int err;
printk(KERN_INFO "ISDN L1 driver version %s\n", HiSax_getrev(l1_revision));
printk(KERN_INFO "ISDN L1 driver version %s\n", mISDN_getrev(l1_revision));
SET_MODULE_OWNER(&isdnl1);
isdnl1.name = MName;
isdnl1.DPROTO.protocol[1] = ISDN_PID_L1_TE_S0;
@ -772,7 +772,7 @@ int Isdnl1Init(void)
isdnl1.prev = NULL;
isdnl1.next = NULL;
isdnl1.ilist = NULL;
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
isdnl1.DPROTO.protocol[1] |= ISDN_PID_L1_TE_U;
l1fsm_u.state_count = L1U_STATE_COUNT;
l1fsm_u.event_count = L1_EVENT_COUNT;
@ -790,9 +790,9 @@ int Isdnl1Init(void)
l1fsm_b.strEvent = strL1Event;
l1fsm_b.strState = strL1BState;
FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT);
if ((err = HiSax_register(&isdnl1))) {
if ((err = mISDN_register(&isdnl1))) {
printk(KERN_ERR "Can't register %s error(%d)\n", MName, err);
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
FsmFree(&l1fsm_u);
#endif
FsmFree(&l1fsm_s);
@ -806,15 +806,15 @@ void cleanup_module(void)
{
int err;
if ((err = HiSax_unregister(&isdnl1))) {
if ((err = mISDN_unregister(&isdnl1))) {
printk(KERN_ERR "Can't unregister ISDN layer 1 error(%d)\n", err);
}
if(isdnl1.ilist) {
printk(KERN_WARNING "hisaxl1 inst list not empty\n");
printk(KERN_WARNING "mISDNl1 inst list not empty\n");
while(isdnl1.ilist)
release_l1(isdnl1.ilist);
}
#ifdef HISAX_UINTERFACE
#ifdef mISDN_UINTERFACE
FsmFree(&l1fsm_u);
#endif
FsmFree(&l1fsm_s);

View File

@ -6,7 +6,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include "fsm.h"
#ifdef MEMDBG
#include "memdbg.h"

View File

@ -4,11 +4,11 @@
*
* This file is (c) under GNU PUBLIC LICENSE
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
* ../../../Documentation/isdn/mISDN.cert
*
*/
#include <linux/module.h>
#include "hisaxl2.h"
#include "mISDNl2.h"
#include "helper.h"
#include "debug.h"
@ -17,7 +17,7 @@ static char *l2_revision = "$Revision$";
static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
static int debug = 0;
static hisaxobject_t isdnl2;
static mISDNobject_t isdnl2;
static
struct Fsm l2fsm = {NULL, 0, 0, NULL, NULL};
@ -116,7 +116,7 @@ l2up_create(layer2_t *l2, u_int prim, int dinfo, int len, void *arg)
static int
l2down_skb(layer2_t *l2, struct sk_buff *skb) {
hisaxif_t *down = &l2->inst.down;
mISDNif_t *down = &l2->inst.down;
int ret = -ENXIO;
if (down->func)
@ -129,7 +129,7 @@ l2down_skb(layer2_t *l2, struct sk_buff *skb) {
static int
l2down_raw(layer2_t *l2, struct sk_buff *skb)
{
hisax_head_t *hh = HISAX_HEAD_P(skb);
mISDN_head_t *hh = mISDN_HEAD_P(skb);
if (hh->prim == PH_DATA_REQ) {
if (test_and_set_bit(FLG_L1_BUSY, &l2->flag)) {
@ -144,7 +144,7 @@ l2down_raw(layer2_t *l2, struct sk_buff *skb)
static int
l2down(layer2_t *l2, u_int prim, int dinfo, struct sk_buff *skb)
{
hisax_sethead(prim, dinfo, skb);
mISDN_sethead(prim, dinfo, skb);
return(l2down_raw(l2, skb));
}
@ -164,17 +164,17 @@ l2down_create(layer2_t *l2, u_int prim, int dinfo, int len, void *arg)
}
static int
l2_chain_down(hisaxif_t *hif, struct sk_buff *skb) {
l2_chain_down(mISDNif_t *hif, struct sk_buff *skb) {
if (!hif || !hif->fdata)
return(-EINVAL);
return(l2down_raw(hif->fdata, skb));
}
static int
ph_data_confirm(hisaxif_t *up, hisax_head_t *hh, struct sk_buff *skb) {
ph_data_confirm(mISDNif_t *up, mISDN_head_t *hh, struct sk_buff *skb) {
layer2_t *l2 = up->fdata;
struct sk_buff *nskb = skb;
hisaxif_t *next = up->next;
mISDNif_t *next = up->next;
int ret = -EAGAIN;
if (test_bit(FLG_L1_BUSY, &l2->flag)) {
@ -662,11 +662,11 @@ l2_mdl_assign(struct FsmInst *fi, int event, void *arg)
{
layer2_t *l2 = fi->userdata;
struct sk_buff *skb = arg;
hisax_head_t *hh;
mISDN_head_t *hh;
FsmChangeState(fi, ST_L2_3);
skb_trim(skb, 0);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
hh->prim = MDL_ASSIGN | INDICATION;
hh->dinfo = 0;
if (l2_tei(l2->tm, skb))
@ -1239,7 +1239,7 @@ l2_got_tei(struct FsmInst *fi, int event, void *arg)
{
layer2_t *l2 = fi->userdata;
struct sk_buff *skb = arg;
hisax_head_t *hh = HISAX_HEAD_P(skb);
mISDN_head_t *hh = mISDN_HEAD_P(skb);
l2->tei = hh->dinfo;
dev_kfree_skb(skb);
@ -1762,7 +1762,7 @@ static struct FsmNode L2FnList[] =
#define L2_FN_COUNT (sizeof(L2FnList)/sizeof(struct FsmNode))
static int
ph_data_indication(layer2_t *l2, hisax_head_t *hh, struct sk_buff *skb) {
ph_data_indication(layer2_t *l2, mISDN_head_t *hh, struct sk_buff *skb) {
u_char *datap = skb->data;
int ret = -EINVAL;
int psapi, ptei;
@ -1831,17 +1831,17 @@ ph_data_indication(layer2_t *l2, hisax_head_t *hh, struct sk_buff *skb) {
}
static int
l2from_down(hisaxif_t *hif, struct sk_buff *askb)
l2from_down(mISDNif_t *hif, struct sk_buff *askb)
{
layer2_t *l2;
int ret = -EINVAL;
struct sk_buff *cskb = askb;
hisax_head_t *hh, sh;
mISDN_head_t *hh, sh;
if (!hif || !askb)
return(-EINVAL);
l2 = hif->fdata;
hh = HISAX_HEAD_P(askb);
hh = mISDN_HEAD_P(askb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
if (!l2) {
if (hif->next && hif->next->func)
@ -1917,15 +1917,15 @@ l2from_down(hisaxif_t *hif, struct sk_buff *askb)
}
static int
l2from_up(hisaxif_t *hif, struct sk_buff *skb) {
l2from_up(mISDNif_t *hif, struct sk_buff *skb) {
layer2_t *l2;
hisax_head_t *hh;
mISDN_head_t *hh;
int ret = -EINVAL;
if (!hif || !skb)
return(ret);
l2 = hif->fdata;
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
if (!l2)
return(ret);
@ -1980,12 +1980,12 @@ l2from_up(hisaxif_t *hif, struct sk_buff *skb) {
int
tei_l2(layer2_t *l2, struct sk_buff *skb)
{
hisax_head_t *hh;
mISDN_head_t *hh;
int ret = -EINVAL;
if (!l2 || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
switch(hh->prim) {
case (MDL_UNITDATA | REQUEST):
@ -2023,7 +2023,7 @@ l2m_debug(struct FsmInst *fi, char *fmt, ...)
static void
release_l2(layer2_t *l2)
{
hisaxinstance_t *inst = &l2->inst;
mISDNinstance_t *inst = &l2->inst;
FsmDelTimer(&l2->t200, 21);
FsmDelTimer(&l2->t203, 16);
@ -2057,7 +2057,7 @@ release_l2(layer2_t *l2)
}
static int
new_l2(hisaxstack_t *st, hisax_pid_t *pid, layer2_t **newl2) {
new_l2(mISDNstack_t *st, mISDN_pid_t *pid, layer2_t **newl2) {
layer2_t *nl2;
int err;
u_char *p;
@ -2072,7 +2072,7 @@ new_l2(hisaxstack_t *st, hisax_pid_t *pid, layer2_t **newl2) {
nl2->debug = debug;
nl2->inst.obj = &isdnl2;
nl2->inst.extentions = EXT_INST_CLONE;
memcpy(&nl2->inst.pid, pid, sizeof(hisax_pid_t));
memcpy(&nl2->inst.pid, pid, sizeof(mISDN_pid_t));
if (!SetHandledPID(&isdnl2, &nl2->inst.pid)) {
int_error();
return(-ENOPROTOOPT);
@ -2184,22 +2184,22 @@ new_l2(hisaxstack_t *st, hisax_pid_t *pid, layer2_t **newl2) {
}
static int
clone_l2(layer2_t *l2, hisaxinstance_t **new_ip) {
clone_l2(layer2_t *l2, mISDNinstance_t **new_ip) {
int err;
layer2_t *nl2;
hisaxif_t *nif;
hisaxstack_t *st;
mISDNif_t *nif;
mISDNstack_t *st;
if (!l2)
return(-EINVAL);
if (!new_ip)
return(-EINVAL);
st = (hisaxstack_t *)*new_ip;
st = (mISDNstack_t *)*new_ip;
if (!st)
return(-EINVAL);
if (!l2->inst.down.peer)
return(-EINVAL);
if (!(nif = kmalloc(sizeof(hisaxif_t), GFP_ATOMIC))) {
if (!(nif = kmalloc(sizeof(mISDNif_t), GFP_ATOMIC))) {
printk(KERN_ERR "clone l2 no if mem\n");
return(-ENOMEM);
}
@ -2209,7 +2209,7 @@ clone_l2(layer2_t *l2, hisaxinstance_t **new_ip) {
printk(KERN_ERR "clone l2 failed err(%d)\n", err);
return(err);
}
memset(nif, 0, sizeof(hisaxif_t));
memset(nif, 0, sizeof(mISDNif_t));
nl2->cloneif = nif;
nif->func = l2from_down;
nif->fdata = nl2;
@ -2278,7 +2278,7 @@ MODULE_PARM(debug, "1i");
static int
l2_manager(void *data, u_int prim, void *arg) {
hisaxinstance_t *inst = data;
mISDNinstance_t *inst = data;
layer2_t *l2l = isdnl2.ilist;;
printk(KERN_DEBUG "%s: data:%p prim:%x arg:%p\n", __FUNCTION__,
@ -2316,7 +2316,7 @@ l2_manager(void *data, u_int prim, void *arg) {
return(-EINVAL);
}
if (arg) {
hisaxif_t *hif = arg;
mISDNif_t *hif = arg;
if (hif->stat & IF_UP) {
hif->fdata = l2l;
hif->func = l2_chain_down;
@ -2356,7 +2356,7 @@ int Isdnl2Init(void)
{
int err;
printk(KERN_INFO "ISDN L2 driver version %s\n", HiSax_getrev(l2_revision));
printk(KERN_INFO "ISDN L2 driver version %s\n", mISDN_getrev(l2_revision));
SET_MODULE_OWNER(&isdnl2);
isdnl2.name = MName;
isdnl2.DPROTO.protocol[2] = ISDN_PID_L2_LAPD |
@ -2372,7 +2372,7 @@ int Isdnl2Init(void)
l2fsm.strState = strL2State;
FsmNew(&l2fsm, L2FnList, L2_FN_COUNT);
TEIInit();
if ((err = HiSax_register(&isdnl2))) {
if ((err = mISDN_register(&isdnl2))) {
printk(KERN_ERR "Can't register %s error(%d)\n", MName, err);
FsmFree(&l2fsm);
}
@ -2384,11 +2384,11 @@ void cleanup_module(void)
{
int err;
if ((err = HiSax_unregister(&isdnl2))) {
if ((err = mISDN_unregister(&isdnl2))) {
printk(KERN_ERR "Can't unregister ISDN layer 2 error(%d)\n", err);
}
if(isdnl2.ilist) {
printk(KERN_WARNING "hisaxl2 l2 list not empty\n");
printk(KERN_WARNING "mISDNl2 l2 list not empty\n");
while(isdnl2.ilist)
release_l2(isdnl2.ilist);
}

View File

@ -6,7 +6,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/skbuff.h>
#include "fsm.h"
#ifdef MEMDBG
@ -46,8 +46,8 @@ typedef struct _layer2 {
struct FsmTimer t200, t203;
int T200, N200, T203;
int debug;
hisaxinstance_t inst;
hisaxif_t *cloneif;
mISDNinstance_t inst;
mISDNif_t *cloneif;
struct sk_buff *windowar[MAX_WINDOW];
struct sk_buff *down_skb;
struct sk_buff_head i_queue;
@ -86,7 +86,7 @@ typedef struct _status_info_l2 {
int tei_debug;
} status_info_l2_t;
/* from hisax_l2.c */
/* from mISDN_l2.c */
extern int tei_l2(layer2_t *l2, struct sk_buff *skb);
/* from tei.c */

View File

@ -4,14 +4,14 @@
*
* This file is (c) under GNU PUBLIC LICENSE
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
* ../../../Documentation/isdn/mISDN.cert
*
* Thanks to Jan den Ouden
* Fritz Elfert
*
*/
#define __NO_VERSION__
#include "hisaxl3.h"
#include "mISDNl3.h"
#include "helper.h"
const char *l3_revision = "$Revision$";
@ -220,7 +220,7 @@ l3_alloc_skb(int len)
struct sk_buff *skb;
if (!(skb = alloc_skb(len + MAX_HEADER_LEN + IFRAME_HEAD_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "HiSax: No skb for D-channel\n");
printk(KERN_WARNING "mISDN: No skb for D-channel\n");
return (NULL);
}
skb_reserve(skb, MAX_HEADER_LEN + IFRAME_HEAD_SIZE);
@ -232,7 +232,7 @@ no_l3_proto(struct PStack *st, int pr, void *arg)
{
struct sk_buff *skb = arg;
HiSax_putstatus(st->l1.hardware, "L3", "no D protocol");
mISDN_putstatus(st->l1.hardware, "L3", "no D protocol");
if (skb) {
dev_kfree_skb(skb);
}
@ -241,7 +241,7 @@ no_l3_proto(struct PStack *st, int pr, void *arg)
static int
no_l3_proto_spec(struct PStack *st, isdn_ctrl *ic)
{
printk(KERN_WARNING "HiSax: no specific protocol handler for proto %lu\n",ic->arg & 0xFF);
printk(KERN_WARNING "mISDN: no specific protocol handler for proto %lu\n",ic->arg & 0xFF);
return(-1);
}
*/
@ -278,7 +278,7 @@ l3_process_t
l3_process_t *p;
if (!(p = kmalloc(sizeof(l3_process_t), GFP_ATOMIC))) {
printk(KERN_ERR "HiSax can't get memory for cr %d\n", cr);
printk(KERN_ERR "mISDN can't get memory for cr %d\n", cr);
return (NULL);
}
memset(p, 0, sizeof(l3_process_t));
@ -298,7 +298,7 @@ release_l3_process(l3_process_t *p)
if (!p)
return;
l3 = p->l3;
hisax_l3up(p, CC_RELEASE_CR | INDICATION, NULL);
mISDN_l3up(p, CC_RELEASE_CR | INDICATION, NULL);
REMOVE_FROM_LISTBASE(p, l3->proc);
StopAllL3Timer(p);
kfree(p);
@ -331,7 +331,7 @@ l3ml3p(layer3_t *l3, int pr)
}
int
hisax_l3up(l3_process_t *l3p, u_int prim, struct sk_buff *skb)
mISDN_l3up(l3_process_t *l3p, u_int prim, struct sk_buff *skb)
{
layer3_t *l3;
int err = -EINVAL;
@ -556,7 +556,7 @@ release_l3(layer3_t *l3)
}
void
HiSaxl3New(void)
mISDNl3New(void)
{
l3fsm.state_count = L3_STATE_COUNT;
l3fsm.event_count = L3_EVENT_COUNT;
@ -566,7 +566,7 @@ HiSaxl3New(void)
}
void
HiSaxl3Free(void)
mISDNl3Free(void)
{
FsmFree(&l3fsm);
}

View File

@ -4,7 +4,7 @@
*
*/
#include <linux/hisaxif.h>
#include <linux/mISDNif.h>
#include <linux/skbuff.h>
#include "fsm.h"
#ifdef MEMDBG
@ -60,7 +60,7 @@ typedef struct _layer3 {
u_int id;
int debug;
u_int Flag;
hisaxinstance_t inst;
mISDNinstance_t inst;
struct sk_buff_head squeue;
} layer3_t;
@ -82,11 +82,11 @@ extern l3_process_t *getl3proc(layer3_t *, int);
extern l3_process_t *getl3proc4id(layer3_t *, int);
extern l3_process_t *new_l3_process(layer3_t *, int, int);
extern u_char *findie(u_char *, int, u_char, int);
extern int hisax_l3up(l3_process_t *, u_int, struct sk_buff *);
extern int mISDN_l3up(l3_process_t *, u_int, struct sk_buff *);
extern int getcallref(u_char * p);
extern int newcallref(void);
extern void init_l3(layer3_t *);
extern void release_l3(layer3_t *);
extern void HiSaxl3New(void);
extern void HiSaxl3Free(void);
extern void mISDNl3New(void);
extern void mISDNl3Free(void);
extern void l3_debug(layer3_t *, char *, ...);

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "helper.h"
#include "debug.h"
#include "dss1.h"
@ -368,11 +368,11 @@ void ncciConstr(Ncci_t *ncci, Cplci_t *cplci)
void ncciInitSt(Ncci_t *ncci)
{
hisax_pid_t pid;
mISDN_pid_t pid;
int retval;
Cplci_t *cplci = ncci->cplci;
memset(&pid, 0, sizeof(hisax_pid_t));
memset(&pid, 0, sizeof(mISDN_pid_t));
pid.layermask = ISDN_LAYER(1) | ISDN_LAYER(2) | ISDN_LAYER(3) |
ISDN_LAYER(4);
if (test_bit(PLCI_FLAG_OUTGOING, &cplci->plci->flags))
@ -417,7 +417,7 @@ void ncciInitSt(Ncci_t *ncci)
return;
}
capidebug(CAPI_DBG_NCCI, "ncciInitSt ncci->binst(%p)\n", ncci->binst);
memset(&ncci->binst->inst.pid, 0, sizeof(hisax_pid_t));
memset(&ncci->binst->inst.pid, 0, sizeof(mISDN_pid_t));
ncci->binst->inst.data = ncci;
ncci->binst->inst.pid.layermask = ISDN_LAYER(4);
ncci->binst->inst.pid.protocol[4] = ISDN_PID_L4_B_CAPI20;
@ -693,15 +693,15 @@ void ncciSendMessage(Ncci_t *ncci, struct sk_buff *skb)
}
int ncci_l3l4(hisaxif_t *hif, struct sk_buff *skb)
int ncci_l3l4(mISDNif_t *hif, struct sk_buff *skb)
{
Ncci_t *ncci;
int ret = -EINVAL;
hisax_head_t *hh;
mISDN_head_t *hh;
if (!hif || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
ncci = hif->fdata;
switch (hh->prim) {
// we're not using the Fsm for DL_DATA for performance reasons

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "dss1.h"
#include "helper.h"
#include "debug.h"

View File

@ -32,11 +32,11 @@
#include <linux/kernel_stat.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
#include "hisax_dch.h"
#include "hisax_bch.h"
#include "mISDN_dch.h"
#include "mISDN_bch.h"
#include "isac.h"
#include "isar.h"
#include "hisaxl1.h"
#include "mISDNl1.h"
#include "helper.h"
#include "debug.h"
@ -113,7 +113,7 @@ typedef struct _sedl_fax {
u_int addr;
u_int isac;
u_int isar;
hisax_HWlock_t lock;
mISDN_HWlock_t lock;
isar_reg_t ir;
isac_chip_t isac_hw;
isar_hw_t isar_hw[2];
@ -123,14 +123,14 @@ typedef struct _sedl_fax {
static int lock_dev(void *data, int nowait)
{
register hisax_HWlock_t *lock = &((sedl_fax *)data)->lock;
register mISDN_HWlock_t *lock = &((sedl_fax *)data)->lock;
return(lock_HW(lock, nowait));
}
static void unlock_dev(void *data)
{
register hisax_HWlock_t *lock = &((sedl_fax *)data)->lock;
register mISDN_HWlock_t *lock = &((sedl_fax *)data)->lock;
unlock_HW(lock);
}
@ -419,7 +419,7 @@ static int init_card(sedl_fax *sf)
sf->dch.inst.name, sf->irq, irq_cnt, smp_processor_id());
lock_dev(sf, 0);
if (request_irq(sf->irq, irq_func, shared, "speedfax", sf)) {
printk(KERN_WARNING "HiSax: couldn't get interrupt %d\n",
printk(KERN_WARNING "mISDN: couldn't get interrupt %d\n",
sf->irq);
unlock_dev(sf);
return(-EIO);
@ -429,7 +429,7 @@ static int init_card(sedl_fax *sf)
ISAC_clear_pending_ints(&sf->dch);
if ((ret=ISAC_init(&sf->dch))) {
printk(KERN_WARNING "HiSax: ISAC_init failed with %d\n", ret);
printk(KERN_WARNING "mISDN: ISAC_init failed with %d\n", ret);
break;
}
init_isar(&sf->bch[0]);
@ -469,7 +469,7 @@ static int init_card(sedl_fax *sf)
#define MAX_CARDS 4
#define MODULE_PARM_T "1-4i"
static int sedl_cnt;
static hisaxobject_t speedfax;
static mISDNobject_t speedfax;
static int debug;
static u_int protocol[MAX_CARDS];
static u_int io[MAX_CARDS];
@ -503,7 +503,7 @@ setup_speedfax(sedl_fax *sf, u_int io_cfg, u_int irq_cfg)
u16 sub_vendor_id, sub_id;
strcpy(tmp, Sedlfax_revision);
printk(KERN_INFO "HiSax: Sedlbauer speedfax driver Rev. %s\n", HiSax_getrev(tmp));
printk(KERN_INFO "mISDN: Sedlbauer speedfax driver Rev. %s\n", mISDN_getrev(tmp));
sf->subtyp = 0;
bytecnt = 16;
@ -565,7 +565,7 @@ setup_speedfax(sedl_fax *sf, u_int io_cfg, u_int irq_cfg)
if (check_region(sf->cfg, bytecnt)) {
printk(KERN_WARNING
"HiSax: %s config port %x-%x already in use\n",
"mISDN: %s config port %x-%x already in use\n",
Sedlbauer_Types[sf->subtyp],
sf->cfg,
sf->cfg + bytecnt);
@ -666,7 +666,7 @@ release_card(sedl_fax *card) {
static int
speedfax_manager(void *data, u_int prim, void *arg) {
sedl_fax *card = speedfax.ilist;
hisaxinstance_t *inst=data;
mISDNinstance_t *inst=data;
int channel = -1;
struct sk_buff *skb;
@ -817,7 +817,7 @@ Speedfax_init(void)
{
int err,i;
sedl_fax *card;
hisax_pid_t pid;
mISDN_pid_t pid;
SET_MODULE_OWNER(&speedfax);
speedfax.name = SpeedfaxName;
@ -833,14 +833,14 @@ Speedfax_init(void)
speedfax.prev = NULL;
speedfax.next = NULL;
if ((err = HiSax_register(&speedfax))) {
if ((err = mISDN_register(&speedfax))) {
printk(KERN_ERR "Can't register Speedfax error(%d)\n", err);
return(err);
}
while (sedl_cnt < MAX_CARDS) {
if (!(card = kmalloc(sizeof(sedl_fax), GFP_ATOMIC))) {
printk(KERN_ERR "No kmem for card\n");
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
return(-ENOMEM);
}
memset(card, 0, sizeof(sedl_fax));
@ -886,7 +886,7 @@ Speedfax_init(void)
kfree(card);
card = NULL;
if (!sedl_cnt) {
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
err = -ENODEV;
} else
printk(KERN_INFO "sedlfax %d cards installed\n",
@ -900,7 +900,7 @@ Speedfax_init(void)
printk(KERN_ERR "MGR_ADDSTACK REQUEST dch err(%d)\n", err);
release_card(card);
if (!sedl_cnt)
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
else
err = 0;
return(err);
@ -911,7 +911,7 @@ Speedfax_init(void)
printk(KERN_ERR "MGR_ADDSTACK bchan error %d\n", err);
speedfax.ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
if (!sedl_cnt)
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
else
err = 0;
return(err);
@ -921,7 +921,7 @@ Speedfax_init(void)
printk(KERN_ERR "MGR_SETSTACK REQUEST dch err(%d)\n", err);
speedfax.ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
if (!sedl_cnt)
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
else
err = 0;
return(err);
@ -929,7 +929,7 @@ Speedfax_init(void)
if ((err = init_card(card))) {
speedfax.ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
if (!sedl_cnt)
HiSax_unregister(&speedfax);
mISDN_unregister(&speedfax);
else
err = 0;
return(err);
@ -944,7 +944,7 @@ int
cleanup_module(void)
{
int err;
if ((err = HiSax_unregister(&speedfax))) {
if ((err = mISDN_unregister(&speedfax))) {
printk(KERN_ERR "Can't unregister Speedfax PCI error(%d)\n", err);
return(err);
}

View File

@ -6,15 +6,15 @@
*
*/
#include "hisax_core.h"
#include "mISDN_core.h"
hisaxstack_t *hisax_stacklist = NULL;
hisaxinstance_t *hisax_instlist = NULL;
mISDNstack_t *mISDN_stacklist = NULL;
mISDNinstance_t *mISDN_instlist = NULL;
int
get_stack_cnt(void) {
int cnt = 0;
hisaxstack_t *st = hisax_stacklist;
mISDNstack_t *st = mISDN_stacklist;
while(st) {
cnt++;
@ -25,9 +25,9 @@ get_stack_cnt(void) {
void
get_stack_info(iframe_t *frm) {
hisaxstack_t *cst, *st;
mISDNstack_t *cst, *st;
stack_info_t *si;
hisaxlayer_t *lay;
mISDNlayer_t *lay;
st = get_stack4id(frm->addr);
if (!st)
@ -41,7 +41,7 @@ get_stack_info(iframe_t *frm) {
si->mgr = st->mgr->id;
else
si->mgr = 0;
memcpy(&si->pid, &st->pid, sizeof(hisax_pid_t));
memcpy(&si->pid, &st->pid, sizeof(mISDN_pid_t));
si->instcnt = 0;
lay = st->lstack;
while(lay) {
@ -65,13 +65,13 @@ get_stack_info(iframe_t *frm) {
}
static int
get_free_stackid(hisaxstack_t *mst, int flag) {
get_free_stackid(mISDNstack_t *mst, int flag) {
int id=1;
hisaxstack_t *st;
mISDNstack_t *st;
if (!mst) {
while(id<127) {
st = hisax_stacklist;
st = mISDN_stacklist;
while (st) {
if (st->id == id)
break;
@ -86,7 +86,7 @@ get_free_stackid(hisaxstack_t *mst, int flag) {
id = mst->id | FLG_CLONE_STACK;
while(id < CLONE_ID_MAX) {
id += CLONE_ID_INC;
st = hisax_stacklist;
st = mISDN_stacklist;
while (st) {
if (st->id == id)
break;
@ -112,10 +112,10 @@ get_free_stackid(hisaxstack_t *mst, int flag) {
return(0);
}
hisaxstack_t *
mISDNstack_t *
get_stack4id(int id)
{
hisaxstack_t *cst, *st = hisax_stacklist;
mISDNstack_t *cst, *st = mISDN_stacklist;
if (core_debug & DEBUG_CORE_FUNC)
@ -136,11 +136,11 @@ get_stack4id(int id)
return(NULL);
}
hisaxlayer_t *
getlayer4lay(hisaxstack_t *st, int layermask)
mISDNlayer_t *
getlayer4lay(mISDNstack_t *st, int layermask)
{
hisaxlayer_t *layer;
hisaxinstance_t *inst;
mISDNlayer_t *layer;
mISDNinstance_t *inst;
if (!st) {
int_error();
@ -156,11 +156,11 @@ getlayer4lay(hisaxstack_t *st, int layermask)
return(layer);
}
hisaxinstance_t *
get_instance(hisaxstack_t *st, int layer_nr, int protocol)
mISDNinstance_t *
get_instance(mISDNstack_t *st, int layer_nr, int protocol)
{
hisaxlayer_t *layer;
hisaxinstance_t *inst=NULL;
mISDNlayer_t *layer;
mISDNinstance_t *inst=NULL;
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "get_instance st(%p) lnr(%d) prot(%x)\n",
@ -196,10 +196,10 @@ out:
return(inst);
}
hisaxinstance_t *
mISDNinstance_t *
get_instance4id(int id)
{
hisaxinstance_t *inst = hisax_instlist;
mISDNinstance_t *inst = mISDN_instlist;
while(inst) {
if (inst->id == id)
@ -210,7 +210,7 @@ get_instance4id(int id)
}
int
get_layermask(hisaxlayer_t *layer)
get_layermask(mISDNlayer_t *layer)
{
int mask = 0;
@ -220,9 +220,9 @@ get_layermask(hisaxlayer_t *layer)
}
int
insertlayer(hisaxstack_t *st, hisaxlayer_t *layer, int layermask)
insertlayer(mISDNstack_t *st, mISDNlayer_t *layer, int layermask)
{
hisaxlayer_t *item;
mISDNlayer_t *item;
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "%s(%p, %p, %x)\n",
@ -251,19 +251,19 @@ insertlayer(hisaxstack_t *st, hisaxlayer_t *layer, int layermask)
return(0);
}
hisaxstack_t *
new_stack(hisaxstack_t *master, hisaxinstance_t *inst)
mISDNstack_t *
new_stack(mISDNstack_t *master, mISDNinstance_t *inst)
{
hisaxstack_t *newst;
mISDNstack_t *newst;
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "create %s stack inst(%p)\n",
master ? "child" : "master", inst);
if (!(newst = kmalloc(sizeof(hisaxstack_t), GFP_ATOMIC))) {
printk(KERN_ERR "kmalloc hisax_stack failed\n");
if (!(newst = kmalloc(sizeof(mISDNstack_t), GFP_ATOMIC))) {
printk(KERN_ERR "kmalloc mISDN_stack failed\n");
return(NULL);
}
memset(newst, 0, sizeof(hisaxstack_t));
memset(newst, 0, sizeof(mISDNstack_t));
if (!master) {
if (inst && inst->st) {
newst->id = get_free_stackid(inst->st, FLG_CLONE_STACK);
@ -277,7 +277,7 @@ new_stack(hisaxstack_t *master, hisaxinstance_t *inst)
if (master) {
APPEND_TO_LIST(newst, master->child);
} else {
APPEND_TO_LIST(newst, hisax_stacklist);
APPEND_TO_LIST(newst, mISDN_stacklist);
}
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "Stack id %x added\n", newst->id);
@ -288,9 +288,9 @@ new_stack(hisaxstack_t *master, hisaxinstance_t *inst)
static int
release_layers(hisaxstack_t *st, u_int prim) {
hisaxinstance_t *inst;
hisaxlayer_t *layer;
release_layers(mISDNstack_t *st, u_int prim) {
mISDNinstance_t *inst;
mISDNlayer_t *layer;
int cnt = 0;
while((layer = st->lstack)) {
@ -313,9 +313,9 @@ release_layers(hisaxstack_t *st, u_int prim) {
}
int
release_stack(hisaxstack_t *st) {
release_stack(mISDNstack_t *st) {
int err;
hisaxstack_t *cst;
mISDNstack_t *cst;
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "%s: st(%p)\n", __FUNCTION__, st);
@ -334,19 +334,19 @@ release_stack(hisaxstack_t *st) {
printk(KERN_WARNING "release_stack err(%d)\n", err);
return(err);
}
REMOVE_FROM_LISTBASE(st, hisax_stacklist);
REMOVE_FROM_LISTBASE(st, mISDN_stacklist);
kfree(st);
return(0);
}
void
release_stacks(hisaxobject_t *obj) {
hisaxstack_t *st, *tmp;
hisaxlayer_t *layer;
hisaxinstance_t *inst;
release_stacks(mISDNobject_t *obj) {
mISDNstack_t *st, *tmp;
mISDNlayer_t *layer;
mISDNinstance_t *inst;
int rel;
st = hisax_stacklist;
st = mISDN_stacklist;
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "%s: obj(%p) %s\n",
__FUNCTION__, obj, obj->name);
@ -381,8 +381,8 @@ release_stacks(hisaxobject_t *obj) {
static void
get_free_instid(hisaxstack_t *st, hisaxinstance_t *inst) {
hisaxinstance_t *il = hisax_instlist;
get_free_instid(mISDNstack_t *st, mISDNinstance_t *inst) {
mISDNinstance_t *il = mISDN_instlist;
inst->id = get_lowlayer(inst->pid.layermask)<<20;
inst->id |= FLG_INSTANCE;
@ -396,7 +396,7 @@ get_free_instid(hisaxstack_t *st, hisaxinstance_t *inst) {
return;
}
inst->id += INST_ID_INC;
il = hisax_instlist;
il = mISDN_instlist;
continue;
}
il = il->next;
@ -405,8 +405,8 @@ get_free_instid(hisaxstack_t *st, hisaxinstance_t *inst) {
}
int
register_layer(hisaxstack_t *st, hisaxinstance_t *inst) {
hisaxlayer_t *layer = NULL;
register_layer(mISDNstack_t *st, mISDNinstance_t *inst) {
mISDNlayer_t *layer = NULL;
int refinc = 0;
if (!inst)
@ -429,11 +429,11 @@ register_layer(hisaxstack_t *st, hisaxinstance_t *inst) {
st->id, layer->inst->id);
return(-EBUSY);
}
} else if (!(layer = kmalloc(sizeof(hisaxlayer_t), GFP_ATOMIC))) {
} else if (!(layer = kmalloc(sizeof(mISDNlayer_t), GFP_ATOMIC))) {
int_errtxt("no mem for layer %x", inst->pid.layermask);
return(-ENOMEM);
}
memset(layer, 0, sizeof(hisaxlayer_t));
memset(layer, 0, sizeof(mISDNlayer_t));
insertlayer(st, layer, inst->pid.layermask);
layer->inst = inst;
}
@ -454,13 +454,13 @@ register_layer(hisaxstack_t *st, hisaxinstance_t *inst) {
inst->st = st;
if (refinc)
inst->obj->refcnt++;
APPEND_TO_LIST(inst, hisax_instlist);
APPEND_TO_LIST(inst, mISDN_instlist);
return(0);
}
int
unregister_instance(hisaxinstance_t *inst) {
hisaxlayer_t *layer;
unregister_instance(mISDNinstance_t *inst) {
mISDNlayer_t *layer;
int err = 0;
if (!inst)
@ -481,7 +481,7 @@ unregister_instance(hisaxinstance_t *inst) {
if (inst->st && (inst->st->mgr != inst))
inst->st = NULL;
}
REMOVE_FROM_LISTBASE(inst, hisax_instlist);
REMOVE_FROM_LISTBASE(inst, mISDN_instlist);
inst->prev = inst->next = NULL;
inst->id = 0;
inst->obj->refcnt--;
@ -489,21 +489,21 @@ unregister_instance(hisaxinstance_t *inst) {
}
int
set_stack(hisaxstack_t *st, hisax_pid_t *pid) {
set_stack(mISDNstack_t *st, mISDN_pid_t *pid) {
int err;
hisaxinstance_t *inst;
hisaxlayer_t *hl;
mISDNinstance_t *inst;
mISDNlayer_t *hl;
if (!st || !pid) {
int_error();
return(-EINVAL);
}
memcpy(&st->pid, pid, sizeof(hisax_pid_t));
memcpy(&st->pid, pid, sizeof(mISDN_pid_t));
if (!st->mgr || !st->mgr->obj || !st->mgr->obj->ctrl) {
int_error();
return(-EINVAL);
}
memcpy(&st->mgr->pid, pid, sizeof(hisax_pid_t));
memcpy(&st->mgr->pid, pid, sizeof(mISDN_pid_t));
if (!SetHandledPID(st->mgr->obj, &st->mgr->pid)) {
int_error();
return(-ENOPROTOOPT);
@ -547,12 +547,12 @@ set_stack(hisaxstack_t *st, hisax_pid_t *pid) {
}
int
clear_stack(hisaxstack_t *st) {
clear_stack(mISDNstack_t *st) {
if (!st)
return(-EINVAL);
if (core_debug & DEBUG_CORE_FUNC)
printk(KERN_DEBUG "%s: st(%p)\n", __FUNCTION__, st);
memset(&st->pid, 0, sizeof(hisax_pid_t));
memset(&st->pid, 0, sizeof(mISDN_pid_t));
return(release_layers(st, MGR_UNREGLAYER | REQUEST));
}

View File

@ -2,7 +2,7 @@
*
*/
#include "hisax_capi.h"
#include "mISDN_capi.h"
#include "asn1_comp.h"
#include "asn1_enc.h"
#include "dss1.h"
@ -302,14 +302,14 @@ int applGetSupportedServices(Appl_t *appl, struct FacReqParm *facReqParm,
struct FacConfParm *facConfParm)
{
facConfParm->u.GetSupportedServices.SupplementaryServiceInfo = CapiSuccess;
facConfParm->u.GetSupportedServices.SupportedServices = HiSaxSupportedServices;
facConfParm->u.GetSupportedServices.SupportedServices = mISDNSupportedServices;
return CapiSuccess;
}
int applFacListen(Appl_t *appl, struct FacReqParm *facReqParm,
struct FacConfParm *facConfParm)
{
if (facReqParm->u.Listen.NotificationMask &~ HiSaxSupportedServices) {
if (facReqParm->u.Listen.NotificationMask &~ mISDNSupportedServices) {
facConfParm->u.Info.SupplementaryServiceInfo = CapiSupplementaryServiceNotSupported;
} else {
appl->NotificationMask = facReqParm->u.Listen.NotificationMask;

View File

@ -4,11 +4,11 @@
*
* This file is (c) under GNU PUBLIC LICENSE
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
* ../../../Documentation/isdn/mISDN.cert
*
*/
#define __NO_VERSION__
#include "hisaxl2.h"
#include "mISDNl2.h"
#include "helper.h"
#include "debug.h"
#include <linux/random.h>
@ -113,7 +113,7 @@ put_tei_msg(teimgr_t *tm, u_char m_id, unsigned int ri, u_char tei)
bp[7] = (tei << 1) | 1;
skb = create_link_skb(MDL_UNITDATA | REQUEST, DINFO_SKB, 8, bp, 0);
if (!skb) {
printk(KERN_WARNING "HiSax: No skb for TEI manager\n");
printk(KERN_WARNING "mISDN: No skb for TEI manager\n");
return;
}
if (tei_l2(tm->l2, skb))
@ -400,12 +400,12 @@ tei_ph_data_ind(teimgr_t *tm, int dtyp, struct sk_buff *skb)
int
l2_tei(teimgr_t *tm, struct sk_buff *skb)
{
hisax_head_t *hh;
mISDN_head_t *hh;
int ret = -EINVAL;
if (!tm || !skb)
return(ret);
hh = HISAX_HEAD_P(skb);
hh = mISDN_HEAD_P(skb);
printk(KERN_DEBUG "%s: prim(%x)\n", __FUNCTION__, hh->prim);
switch(hh->prim) {
case (MDL_UNITDATA | INDICATION):
@ -416,7 +416,7 @@ l2_tei(teimgr_t *tm, struct sk_buff *skb)
tm->tei_m.printdebug(&tm->tei_m,
"fixed assign tei %d", tm->l2->tei);
skb_trim(skb, 0);
hisax_sethead(MDL_ASSIGN | REQUEST, tm->l2->tei, skb);
mISDN_sethead(MDL_ASSIGN | REQUEST, tm->l2->tei, skb);
if (!tei_l2(tm->l2, skb))
return(0);
// cs->cardmsg(cs, MDL_ASSIGN | REQUEST, NULL);

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,8 @@
*
*/
#ifndef HISAXIF_H
#define HISAXIF_H
#ifndef mISDNIF_H
#define mISDNIF_H
#include <stdarg.h>
#include <linux/types.h>
@ -238,19 +238,19 @@
#define ISDN_PID_L3_DF_PTP 0x00100000
#define ISDN_PID_L3_DF_EXTCID 0x00200000
#define HISAX_CORE_DEVICE 0
#define HISAX_RAW_DEVICE 128
#define mISDN_CORE_DEVICE 0
#define mISDN_RAW_DEVICE 128
#define FLG_HISAXPORT_BUSY 1
#define FLG_HISAXPORT_ENABLED 2
#define FLG_HISAXPORT_BLOCK 3
#define FLG_HISAXPORT_OPEN 4
#define FLG_HISAXPORT_ONEFRAME 5
#define FLG_mISDNPORT_BUSY 1
#define FLG_mISDNPORT_ENABLED 2
#define FLG_mISDNPORT_BLOCK 3
#define FLG_mISDNPORT_OPEN 4
#define FLG_mISDNPORT_ONEFRAME 5
#define MAX_LAYER_NR 7
#define ISDN_LAYER(n) (1<<n)
#define LAYER_OUTRANGE(layer) ((layer<0) || (layer>MAX_LAYER_NR))
#define HISAX_MAX_IDLEN 16
#define mISDN_MAX_IDLEN 16
#define IF_NOACTIV 0x00000000
#define IF_DOWN 0x01000000
@ -350,17 +350,17 @@ typedef struct _moditem {
int protocol;
} moditem_t;
typedef struct _hisax_pid {
typedef struct _mISDN_pid {
int protocol[MAX_LAYER_NR +1];
void *param[MAX_LAYER_NR +1];
__u16 global;
int layermask;
} hisax_pid_t;
} mISDN_pid_t;
typedef struct _stack_info {
u_int id;
int extentions;
hisax_pid_t pid;
mISDN_pid_t pid;
int mgr;
int instcnt;
int inst[MAX_LAYER_NR +1];
@ -369,12 +369,12 @@ typedef struct _stack_info {
} stack_info_t;
typedef struct _layer_info {
char name[HISAX_MAX_IDLEN];
char name[mISDN_MAX_IDLEN];
int object_id;
int extentions;
int id;
int st;
hisax_pid_t pid;
mISDN_pid_t pid;
} layer_info_t;
@ -443,20 +443,20 @@ typedef struct _Q931_info {
#include <linux/isdn_compat.h>
#include <linux/skbuff.h>
typedef struct _hisaxif hisaxif_t;
typedef struct _mISDNif mISDNif_t;
typedef int (ctrl_func_t)(void *, u_int, void *);
typedef int (if_func_t)(struct _hisaxif *, struct sk_buff *);
typedef int (if_func_t)(struct _mISDNif *, struct sk_buff *);
typedef int (lock_func_t)(void *, int);
typedef void (unlock_func_t)(void *);
typedef struct _hisax_head {
typedef struct _mISDN_head {
u_int prim;
int dinfo;
} hisax_head_t;
} mISDN_head_t;
#define HISAX_HEAD_P(s) ((hisax_head_t *)&s->cb[0])
#define mISDN_HEAD_P(s) ((mISDN_head_t *)&s->cb[0])
typedef struct _hisax_headext {
typedef struct _mISDN_headext {
u_int prim;
int dinfo;
u_int what;
@ -466,105 +466,105 @@ typedef struct _hisax_headext {
if_func_t *iff;
void *func;
} func;
} hisax_headext_t;
} mISDN_headext_t;
#define HISAX_HEADEXT_P(s) ((hisax_headext_t *)&s->cb[0])
#define mISDN_HEADEXT_P(s) ((mISDN_headext_t *)&s->cb[0])
typedef struct _hisaxobject {
struct _hisaxobject *prev;
struct _hisaxobject *next;
typedef struct _mISDNobject {
struct _mISDNobject *prev;
struct _mISDNobject *next;
char *name;
int id;
int refcnt;
hisax_pid_t DPROTO;
hisax_pid_t BPROTO;
mISDN_pid_t DPROTO;
mISDN_pid_t BPROTO;
ctrl_func_t *own_ctrl;
ctrl_func_t *ctrl;
void *ilist;
struct module *owner;
} hisaxobject_t;
} mISDNobject_t;
struct _hisaxif {
struct _hisaxif *prev;
struct _hisaxif *next;
struct _mISDNif {
struct _mISDNif *prev;
struct _mISDNif *next;
int extentions;
int stat;
struct _hisaxstack *st;
struct _hisaxinstance *owner;
struct _hisaxinstance *peer;
struct _mISDNstack *st;
struct _mISDNinstance *owner;
struct _mISDNinstance *peer;
if_func_t *func;
void *fdata;
};
typedef struct _hisaxinstance {
struct _hisaxinstance *prev;
struct _hisaxinstance *next;
char name[HISAX_MAX_IDLEN];
typedef struct _mISDNinstance {
struct _mISDNinstance *prev;
struct _mISDNinstance *next;
char name[mISDN_MAX_IDLEN];
int extentions;
u_int id;
hisax_pid_t pid;
struct _hisaxstack *st;
hisaxobject_t *obj;
mISDN_pid_t pid;
struct _mISDNstack *st;
mISDNobject_t *obj;
void *data;
hisaxif_t up;
hisaxif_t down;
mISDNif_t up;
mISDNif_t down;
lock_func_t *lock;
unlock_func_t *unlock;
} hisaxinstance_t;
} mISDNinstance_t;
typedef struct _hisaxlayer {
struct _hisaxlayer *prev;
struct _hisaxlayer *next;
hisaxinstance_t *inst;
} hisaxlayer_t;
typedef struct _mISDNlayer {
struct _mISDNlayer *prev;
struct _mISDNlayer *next;
mISDNinstance_t *inst;
} mISDNlayer_t;
typedef struct _hisaxstack {
struct _hisaxstack *prev;
struct _hisaxstack *next;
typedef struct _mISDNstack {
struct _mISDNstack *prev;
struct _mISDNstack *next;
u_int id;
int extentions;
hisax_pid_t pid;
hisaxlayer_t *lstack;
hisaxinstance_t *mgr;
struct _hisaxstack *child;
} hisaxstack_t;
mISDN_pid_t pid;
mISDNlayer_t *lstack;
mISDNinstance_t *mgr;
struct _mISDNstack *child;
} mISDNstack_t;
typedef struct _hisaxport {
typedef struct _mISDNport {
wait_queue_head_t procq;
spinlock_t lock;
hisaxif_t pif;
mISDNif_t pif;
int Flag;
int size;
int cnt;
u_char *buf;
u_char *ip;
u_char *op;
} hisaxport_t;
} mISDNport_t;
typedef struct _hisaxdevice {
struct _hisaxdevice *prev;
struct _hisaxdevice *next;
typedef struct _mISDNdevice {
struct _mISDNdevice *prev;
struct _mISDNdevice *next;
int minor;
struct semaphore io_sema;
int open_mode;
hisaxport_t rport;
hisaxport_t wport;
mISDNport_t rport;
mISDNport_t wport;
struct _devicelayer *layer;
struct _devicestack *stack;
struct _hisaxtimer *timer;
} hisaxdevice_t;
struct _mISDNtimer *timer;
} mISDNdevice_t;
/* common helper functions */
extern int put_hisax_header(struct sk_buff *, iframe_t *);
extern int bprotocol2pid(void *, hisax_pid_t *);
extern int SetIF(hisaxinstance_t *, hisaxif_t *, u_int, void *, void *, void *);
extern int ConnectIF(hisaxinstance_t *, hisaxinstance_t *);
extern int DisConnectIF(hisaxinstance_t *, hisaxif_t *);
extern int put_mISDN_header(struct sk_buff *, iframe_t *);
extern int bprotocol2pid(void *, mISDN_pid_t *);
extern int SetIF(mISDNinstance_t *, mISDNif_t *, u_int, void *, void *, void *);
extern int ConnectIF(mISDNinstance_t *, mISDNinstance_t *);
extern int DisConnectIF(mISDNinstance_t *, mISDNif_t *);
/* global exported functions */
extern int HiSax_register(hisaxobject_t *obj);
extern int HiSax_unregister(hisaxobject_t *obj);
extern int mISDN_register(mISDNobject_t *obj);
extern int mISDN_unregister(mISDNobject_t *obj);
#endif /* __KERNEL__ */
#endif /* HISAXIF_H */
#endif /* mISDNIF_H */

View File

@ -1,21 +1,21 @@
Vendor: SuSE GmbH, Nuernberg, Germany
Distribution: SuSE Linux 8.2 (i386)
Name: km_newhisax
Name: km_newmISDN
Release: 2
Packager: feedback@suse.de
Copyright: Karsten Keil GPL
Group: unsorted
Provides: hisaxcapi_modules
Provides: mISDNcapi_modules
Autoreqprov: on
Version: 1.1
Summary: capi driver for hisax
Source: newhisax-%{version}-%{release}.tar.bz2
Summary: capi driver for mISDN
Source: newmISDN-%{version}-%{release}.tar.bz2
#Patch: isdn4k-utils.dif
Buildroot: /var/tmp/newhisax.build
Buildroot: /var/tmp/newmISDN.build
%description
This package provides the new hisax capidriver sourcecode for kernelmodules
This package provides the new mISDN capidriver sourcecode for kernelmodules
Attention!!! These modules are alpha code and experimental, they may be
crash your machine. Here is no support from SuSE for it.
@ -26,7 +26,7 @@ Authors:
SuSE series: unsorted
%prep
%setup -n newhisax
%setup -n newmISDN
#%patch
%build
@ -34,16 +34,16 @@ mv Makefile.standalone Makefile
%install
rm -f -r $RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT/usr/src/kernel-modules/newhisax
DESTDIR=$RPM_BUILD_ROOT/usr/src/kernel-modules/newmISDN
mkdir -p $DESTDIR
install -p Makefile* $DESTDIR
install -p Rules.make.ext $DESTDIR
install -p add.config $DESTDIR
mkdir -p $DESTDIR/newinclude/linux
install -p include/linux/*.h $DESTDIR/newinclude/linux
mkdir -p $DESTDIR/drivers/isdn/hisax
install -p drivers/isdn/hisax/Makefile $DESTDIR/drivers/isdn/hisax
install -p drivers/isdn/hisax/*.[ch] $DESTDIR/drivers/isdn/hisax
mkdir -p $DESTDIR/drivers/isdn/mISDN
install -p drivers/isdn/mISDN/Makefile $DESTDIR/drivers/isdn/mISDN
install -p drivers/isdn/mISDN/*.[ch] $DESTDIR/drivers/isdn/mISDN
#
%{?suse_check}
@ -51,10 +51,10 @@ install -p drivers/isdn/hisax/*.[ch] $DESTDIR/drivers/isdn/hisax
%clean
%files
%dir %attr (-,root,root) /usr/src/kernel-modules/newhisax
%attr (-,root,root) /usr/src/kernel-modules/newhisax/*
%dir %attr (-,root,root) /usr/src/kernel-modules/newmISDN
%attr (-,root,root) /usr/src/kernel-modules/newmISDN/*
%changelog -n km_newhisax
%changelog -n km_newmISDN
* Mon Oct 01 2001 - kkeil@suse.de
- first version

View File

@ -148,7 +148,7 @@ if [ $# != 0 ]; then
$DODIFF $i $KERNELDIR/$i
done
else
for i in drivers/isdn/hisax/*.[ch] ; do
for i in drivers/isdn/mISDN/*.[ch] ; do
$DODIFF $i $KERNELDIR/$i
done
for i in include/linux/*.h ; do
@ -159,7 +159,7 @@ else
$DODIFF $i $KERNELDIR/$i
fi
done
for i in drivers/isdn/hisax/Makefile \
for i in drivers/isdn/mISDN/Makefile \
; do
if [ -f $i.kernel ] ; then
dodiff $i.kernel $KERNELDIR/$i