Compare commits
12 Commits
mISDN_1_2_
...
master
Author | SHA1 | Date |
---|---|---|
Daniel Potts | cecb784778 | |
Andreas Eversberg | 19890b650c | |
Andreas Eversberg | f4a3d41cc4 | |
Andreas Eversberg | c4dd8765b4 | |
Andreas Eversberg | 34458d894d | |
Andreas Eversberg | c24e757ff4 | |
Nadi Sarrar | 4a64d3fbc2 | |
Chrisian Richter | fc245dc655 | |
Chrisian Richter | 81e9a9193e | |
Nadi Sarrar | 9d76bbabf0 | |
Andreas Eversberg | b70f8ddd1c | |
Chrisian Richter | c34e06a2dd |
|
@ -0,0 +1,8 @@
|
|||
mISDN-1-1-2:
|
||||
- added a workaround that fixes a kernel panic when bridging is done after already a few
|
||||
voice frames where transceived on both legs (like when you transfer a call from SIP 2 ISDN)
|
||||
- jollys mail has changed
|
||||
- minor tweaks to misdn-init and to the Kernel-Patch script
|
||||
- fix in CMX: sending is required even during PCM bridge, because sending data overrides bridging temporarily (for sending info tones during bridge)
|
||||
- enabled CMX audio processing for RX data in all cases, because it is essential
|
||||
- now it is save to free skb during interrupt, if memdebug is on
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ BASEDIR=$(shell pwd)
|
|||
|
||||
MAJOR=1
|
||||
MINOR=1
|
||||
SUBMINOR=1
|
||||
SUBMINOR=2
|
||||
|
||||
INSTALL_PREFIX := /
|
||||
export INSTALL_PREFIX
|
||||
|
|
42
config/mISDN
42
config/mISDN
|
@ -161,26 +161,28 @@ function parse_config
|
|||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
tmpcmd="${MODPROBE} --ignore-install hfcmulti type=${HFCMULTI_type[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_type[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_type[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
tmpcmd="${tmpcmd} protocol=${HFCMULTI_protocol[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_protocol[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_protocol[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
tmpcmd="${tmpcmd} layermask=${HFCMULTI_layermask[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_layermask[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_layermask[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
START_COMMANDS[${#START_COMMANDS[@]}]="${tmpcmd} ${HFCMULTI_options}"
|
||||
|
||||
if [ ! -z "${HFCMULTI_protocol[0]}" ]; then
|
||||
tmpcmd="${MODPROBE} --ignore-install hfcmulti type=${HFCMULTI_type[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_type[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_type[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
tmpcmd="${tmpcmd} protocol=${HFCMULTI_protocol[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_protocol[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_protocol[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
tmpcmd="${tmpcmd} layermask=${HFCMULTI_layermask[0]}"
|
||||
i=1
|
||||
while [ ! -z "${HFCMULTI_layermask[${i}]}" ]; do
|
||||
tmpcmd="${tmpcmd},${HFCMULTI_layermask[${i}]}"
|
||||
let "i = ${i} + 1"
|
||||
done
|
||||
START_COMMANDS[${#START_COMMANDS[@]}]="${tmpcmd} ${HFCMULTI_options}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${HFCPCI_protocol}" ]; then
|
||||
START_COMMANDS[${#START_COMMANDS[@]}]="${MODPROBE} --ignore-install hfcpci protocol=${HFCPCI_protocol} layermask=${HFCPCI_layermask}"
|
||||
|
|
|
@ -106,7 +106,7 @@ config MISDN_DSP
|
|||
echo cancelation, tone generation, and Blowfish encryption and
|
||||
decryption.
|
||||
It may use hardware features if available.
|
||||
E.g. it is required for PBX4Linux. Go to http://isdn.jolly.de
|
||||
E.g. it is required for PBX4Linux. Go to http://isdn.eversberg.eu
|
||||
and get more informations about this module and it's usage.
|
||||
If unsure, say 'N'.
|
||||
|
||||
|
@ -118,7 +118,7 @@ config MISDN_LOOP
|
|||
bchannel data from user space. Applications can directly
|
||||
access bchannels, so applications can be integrated into DSP
|
||||
audio processing.
|
||||
E.g. it is required for PBX4Linux. Go to http://isdn.jolly.de
|
||||
E.g. it is required for PBX4Linux. Go to http://isdn.eversberg.eu
|
||||
and get more informations about this module and it's usage.
|
||||
If unsure, say 'N'.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Audio support data for ISDN4Linux.
|
||||
*
|
||||
* Copyright 2002/2003 by Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright 2002/2003 by Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
|
@ -194,6 +194,7 @@ typedef struct _dsp {
|
|||
int tx_mix;
|
||||
tone_t tone;
|
||||
dtmf_t dtmf;
|
||||
int queue_dtmf; /* flags enabled dtmf, prior feature reply */
|
||||
int tx_volume, rx_volume;
|
||||
|
||||
/* conference stuff */
|
||||
|
@ -202,7 +203,7 @@ typedef struct _dsp {
|
|||
conf_member_t *member;
|
||||
|
||||
/* while we're waiting for the hw */
|
||||
u32 queue_conf_id;
|
||||
u32 queue_conf_id; /* stores conf id prior feature reply */
|
||||
|
||||
/* buffer stuff */
|
||||
int rx_W; /* current write pos for data without timestamp */
|
||||
|
@ -239,7 +240,7 @@ typedef struct _dsp {
|
|||
int bf_sync;
|
||||
|
||||
/* echo cancellation stuff */
|
||||
int queue_cancel[3];
|
||||
int queue_cancel[3]; /* stores cancel values prior feature reply */
|
||||
int cancel_enable;
|
||||
int cancel_hardware; /*we are using hw echo canc*/
|
||||
struct echo_can_state * ec; /**< == NULL: echo cancellation disabled;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Audio support data for mISDN_dsp.
|
||||
*
|
||||
* Copyright 2002/2003 by Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright 2002/2003 by Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Blowfish encryption/decryption for mISDN_dsp.
|
||||
*
|
||||
* Copyright Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Audio crossconnecting/conferrencing (hardware level).
|
||||
*
|
||||
* Copyright 2002 by Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright 2002 by Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
|
@ -995,7 +995,7 @@ dsp_cmx_receive(dsp_t *dsp, struct sk_buff *skb)
|
|||
|
||||
/* show where to write */
|
||||
#ifdef CMX_DEBUG
|
||||
printk( KERN_DEBUG "cmx_receive(dsp=%lx): rx_R(dsp) rx_W(dsp)=%05x len=%d %s\n", (u_long)dsp, dsp->rx_R, dsp->rx_W, len, dsp->inst.name);
|
||||
printk( KERN_DEBUG "cmx_receive(dsp=%lx): rx_R(dsp)=%05x rx_W(dsp)=%05x len=%d %s\n", (u_long)dsp, dsp->rx_R, dsp->rx_W, len, dsp->inst.name);
|
||||
#endif
|
||||
|
||||
/* write data into rx_buffer */
|
||||
|
@ -1036,7 +1036,11 @@ dsp_cmx_send_member(dsp_t *dsp, int len, s32 *c, int members)
|
|||
if (!dsp->b_active) /* if not active */
|
||||
return;
|
||||
|
||||
#if 1
|
||||
// NOTE: The following is not good, because we MUST send transmit data or
|
||||
// software tones during pcm brige. (The condition above expresses this
|
||||
// exactly. The card driver MUST disable bridging if data is in TX-
|
||||
// fifo, to allow temporarily transmit tones until fifo is empty again.
|
||||
#if 0
|
||||
/* If we have 2 members and we are connected to pcm_slot, it looks
|
||||
like we're bridged on the pcm, so why should we send anything ?
|
||||
*/
|
||||
|
@ -1275,7 +1279,7 @@ void dsp_cmx_send(void *data)
|
|||
}
|
||||
|
||||
/* transmission required */
|
||||
if (!mustmix && dsp->conf_id)
|
||||
if (!mustmix)
|
||||
dsp_cmx_send_member(dsp, dsp_poll, mixbuffer, members); // unused mixbuffer is given to prevent a potential null-pointer-bug
|
||||
}
|
||||
|
||||
|
@ -1307,8 +1311,7 @@ void dsp_cmx_send(void *data)
|
|||
/* process each member */
|
||||
list_for_each_entry(member, &conf->mlist, list) {
|
||||
/* transmission */
|
||||
if (member->dsp->conf_id)
|
||||
dsp_cmx_send_member(member->dsp, dsp_poll, mixbuffer, members);
|
||||
dsp_cmx_send_member(member->dsp, dsp_poll, mixbuffer, members);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
* Based on source code structure by
|
||||
* Karsten Keil (keil@isdn4linux.de)
|
||||
*
|
||||
|
@ -242,18 +242,27 @@ dsp_control_req(dsp_t *dsp, mISDN_head_t *hh, struct sk_buff *skb)
|
|||
#endif
|
||||
|
||||
dsp_dtmf_goertzel_init(dsp);
|
||||
dsp->dtmf.software = 0;
|
||||
dsp->dtmf.hardware = 0;
|
||||
|
||||
/* checking for hardware capability */
|
||||
spin_lock(&dsp->feature_lock);
|
||||
if (dsp->feature_state != FEAT_STATE_RECEIVED) {
|
||||
dsp->queue_dtmf=1;
|
||||
spin_unlock(&dsp->feature_lock);
|
||||
break;
|
||||
}
|
||||
spin_unlock(&dsp->feature_lock);
|
||||
if (dsp->features.hfc_dtmf) {
|
||||
dsp->dtmf.hardware = 1;
|
||||
dsp->dtmf.software = 0;
|
||||
} else {
|
||||
dsp->dtmf.hardware = 0;
|
||||
dsp->dtmf.software = 1;
|
||||
}
|
||||
break;
|
||||
case DTMF_TONE_STOP: /* turn off DTMF */
|
||||
if (dsp_debug & DEBUG_DSP_CORE)
|
||||
printk(KERN_DEBUG "%s: stop dtmf\n", __FUNCTION__);
|
||||
dsp->queue_dtmf=0;
|
||||
dsp->dtmf.hardware = 0;
|
||||
dsp->dtmf.software = 0;
|
||||
break;
|
||||
|
@ -452,39 +461,13 @@ dsp_from_up(mISDNinstance_t *inst, struct sk_buff *skb)
|
|||
if (skb->len < 1)
|
||||
return(-EINVAL);
|
||||
|
||||
if (!dsp->conf_id) {
|
||||
/* PROCESS TONES/TX-DATA ONLY */
|
||||
if (dsp->tone.tone) {
|
||||
/* -> copy tone */
|
||||
dsp_tone_copy(dsp, skb->data, skb->len);
|
||||
}
|
||||
/* send data to tx-buffer (if no tone is played) */
|
||||
spin_lock_irqsave(&dsp_obj.lock, flags);
|
||||
if (!dsp->tone.tone)
|
||||
dsp_cmx_transmit(dsp, skb);
|
||||
spin_unlock_irqrestore(&dsp_obj.lock, flags);
|
||||
|
||||
if (dsp->tx_volume)
|
||||
dsp_change_volume(skb, dsp->tx_volume);
|
||||
/* cancel echo */
|
||||
if (dsp->cancel_enable)
|
||||
dsp_cancel_tx(dsp, skb->data, skb->len);
|
||||
/* crypt */
|
||||
if (dsp->bf_enable)
|
||||
dsp_bf_encrypt(dsp, skb->data, skb->len);
|
||||
/* send packet */
|
||||
if (mISDN_queue_down(&dsp->inst, 0, skb)) {
|
||||
dev_kfree_skb(skb);
|
||||
printk(KERN_ERR "%s: failed to send tx-packet\n", __FUNCTION__);
|
||||
|
||||
return (-EIO);
|
||||
}
|
||||
|
||||
} else {
|
||||
/* send data to tx-buffer (if no tone is played) */
|
||||
spin_lock_irqsave(&dsp_obj.lock, flags);
|
||||
if (!dsp->tone.tone) {
|
||||
dsp_cmx_transmit(dsp, skb);
|
||||
}
|
||||
spin_unlock_irqrestore(&dsp_obj.lock, flags);
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
dev_kfree_skb(skb);
|
||||
break;
|
||||
case PH_CONTROL | REQUEST:
|
||||
|
||||
|
@ -584,15 +567,13 @@ dsp_from_down(mISDNinstance_t *inst, struct sk_buff *skb)
|
|||
if (dsp->rx_volume)
|
||||
dsp_change_volume(skb, dsp->rx_volume);
|
||||
|
||||
if (dsp->conf_id) {
|
||||
/* we need to process receive data if software */
|
||||
spin_lock_irqsave(&dsp_obj.lock, flags);
|
||||
if (dsp->pcm_slot_tx<0 && dsp->pcm_slot_rx<0) {
|
||||
/* process data from card at cmx */
|
||||
dsp_cmx_receive(dsp, skb);
|
||||
}
|
||||
spin_unlock_irqrestore(&dsp_obj.lock, flags);
|
||||
/* we need to process receive data if software */
|
||||
spin_lock_irqsave(&dsp_obj.lock, flags);
|
||||
if (dsp->pcm_slot_tx<0 && dsp->pcm_slot_rx<0) {
|
||||
/* process data from card at cmx */
|
||||
dsp_cmx_receive(dsp, skb);
|
||||
}
|
||||
spin_unlock_irqrestore(&dsp_obj.lock, flags);
|
||||
|
||||
if (dsp->rx_disabled) {
|
||||
/* if receive is not allowed */
|
||||
|
@ -797,12 +778,23 @@ dsp_feat(void *arg)
|
|||
spin_unlock(&dsp->feature_lock);
|
||||
|
||||
if (dsp->queue_conf_id) {
|
||||
/*work on queued conf id*/
|
||||
/* work on queued conf id*/
|
||||
dsp_cmx_conf(dsp, dsp->queue_conf_id );
|
||||
if (dsp_debug & DEBUG_DSP_CMX)
|
||||
dsp_cmx_debug(dsp);
|
||||
}
|
||||
|
||||
if (dsp->queue_dtmf) {
|
||||
/* work on queued dtmf */
|
||||
if (dsp->features.hfc_dtmf) {
|
||||
dsp->dtmf.software = 0;
|
||||
dsp->dtmf.hardware = 1;
|
||||
} else {
|
||||
dsp->dtmf.hardware = 0;
|
||||
dsp->dtmf.software = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (dsp->queue_cancel[2]) {
|
||||
dsp_cancel_init(dsp,
|
||||
dsp->queue_cancel[0],
|
||||
|
@ -863,7 +855,6 @@ new_dsp(mISDNstack_t *st, mISDN_pid_t *pid)
|
|||
/* set dsp feture timer */
|
||||
ndsp->feature_tl.function = (void *)dsp_feat;
|
||||
ndsp->feature_tl.data = (long) ndsp;
|
||||
ndsp->feature_state = FEAT_STATE_INIT;
|
||||
|
||||
if (dtmfthreshold < 20 || dtmfthreshold> 500) {
|
||||
dtmfthreshold=200;
|
||||
|
@ -873,8 +864,13 @@ new_dsp(mISDNstack_t *st, mISDN_pid_t *pid)
|
|||
spin_lock_init(&ndsp->feature_lock);
|
||||
init_timer(&ndsp->feature_tl);
|
||||
if (!(dsp_options & DSP_OPT_NOHARDWARE)) {
|
||||
ndsp->feature_state = FEAT_STATE_INIT;
|
||||
ndsp->feature_tl.expires = jiffies + (HZ / 100);
|
||||
add_timer(&ndsp->feature_tl);
|
||||
} else {
|
||||
// we don't need features, because we disabled them, so we must
|
||||
// set the state to *_RECEIVED
|
||||
ndsp->feature_state = FEAT_STATE_RECEIVED;
|
||||
}
|
||||
spin_lock_irqsave(&dsp_obj.lock, flags);
|
||||
/* append and register */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* DTMF decoder.
|
||||
*
|
||||
* Copyright by Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright by Andreas Eversberg (jolly@eversberg.eu)
|
||||
* based on different decoders such as ISDN4Linux
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Audio support data for ISDN4Linux.
|
||||
*
|
||||
* Copyright Andreas Eversberg (jolly@jolly.de)
|
||||
* Copyright Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* hfc_multi.c low level driver for hfc-4s/hfc-8s/hfc-e1 based cards
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
* ported to mqueue mechanism:
|
||||
* Peter Sprenger (sprengermoving-bytes.de)
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* NOTE: It is not compatible with TDMoIP nor "ISDN over IP".
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* loop.c loop driver for looped bchannel pairs
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <linux/stddef.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -177,6 +178,24 @@ __mid_dev_alloc_skb(unsigned int size, char *fn, int line)
|
|||
return(skb);
|
||||
}
|
||||
|
||||
void
|
||||
__mid_kfree_skb(struct sk_buff *skb)
|
||||
{
|
||||
if (skb->destructor)
|
||||
skb->destructor(skb);
|
||||
skb->destructor = NULL;
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
void
|
||||
__mid_dev_kfree_skb(struct sk_buff *skb)
|
||||
{
|
||||
if (skb->destructor)
|
||||
skb->destructor(skb);
|
||||
skb->destructor = NULL;
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
struct sk_buff
|
||||
*__mid_skb_clone(struct sk_buff *skb, int gfp_mask, char *fn, int line)
|
||||
{
|
||||
|
@ -280,6 +299,8 @@ EXPORT_SYMBOL(__mid_vmalloc);
|
|||
EXPORT_SYMBOL(__mid_vfree);
|
||||
EXPORT_SYMBOL(__mid_alloc_skb);
|
||||
EXPORT_SYMBOL(__mid_dev_alloc_skb);
|
||||
EXPORT_SYMBOL(__mid_kfree_skb);
|
||||
EXPORT_SYMBOL(__mid_dev_kfree_skb);
|
||||
EXPORT_SYMBOL(__mid_skb_clone);
|
||||
EXPORT_SYMBOL(__mid_skb_copy);
|
||||
EXPORT_SYMBOL(__mid_skb_realloc_headroom);
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#undef vfree
|
||||
#undef alloc_skb
|
||||
#undef dev_alloc_skb
|
||||
#undef kfree_skb
|
||||
#undef dev_kfree_skb
|
||||
#undef skb_clone
|
||||
#undef skb_copy
|
||||
#undef skb_realloc_headroom
|
||||
|
@ -21,6 +23,8 @@
|
|||
#define vfree(p) __mid_vfree(p)
|
||||
#define alloc_skb(a, b) __mid_alloc_skb(a, b, __FILE__, __LINE__)
|
||||
#define dev_alloc_skb(a) __mid_dev_alloc_skb(a, __FILE__, __LINE__)
|
||||
#define kfree_skb(a) __mid_kfree_skb(a)
|
||||
#define dev_kfree_skb(a) __mid_dev_kfree_skb(a)
|
||||
#define skb_clone(a, b) __mid_skb_clone(a, b, __FILE__, __LINE__)
|
||||
#define skb_copy(a, b) __mid_skb_copy(a, b, __FILE__, __LINE__)
|
||||
#define skb_realloc_headroom(a, b) __mid_skb_realloc_headroom(a, b, __FILE__, __LINE__)
|
||||
|
@ -33,6 +37,8 @@ extern void __mid_cleanup(void);
|
|||
extern int __mid_init(void);
|
||||
extern struct sk_buff *__mid_alloc_skb(unsigned int,int, char *, int);
|
||||
extern struct sk_buff *__mid_dev_alloc_skb(unsigned int,char *, int);
|
||||
extern void __mid_kfree_skb(struct sk_buff *);
|
||||
extern void __mid_dev_kfree_skb(struct sk_buff *);
|
||||
extern struct sk_buff *__mid_skb_clone(struct sk_buff *, int, char *, int);
|
||||
extern struct sk_buff *__mid_skb_copy(struct sk_buff *, int, char *, int);
|
||||
extern struct sk_buff *__mid_skb_realloc_headroom(struct sk_buff *, unsigned int, char *, int);
|
||||
|
|
|
@ -5,6 +5,21 @@
|
|||
* Copyright (C) 2005 Traverse Technologies P/L
|
||||
*
|
||||
* Based on HiSax NETJet driver by Karsten Keil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
* socket handling, transfer, receive-process for Voice over IP
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
* socket handling, transfer, receive-process for Voice over IP
|
||||
*
|
||||
* Author Andreas Eversberg (jolly@jolly.de)
|
||||
* Author Andreas Eversberg (jolly@eversberg.eu)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
60
misdn-init
60
misdn-init
|
@ -92,6 +92,8 @@ check_cmd mknod
|
|||
check_cmd bc
|
||||
check_cmd cut
|
||||
check_cmd wc
|
||||
check_cmd seq
|
||||
check_cmd sed
|
||||
|
||||
function check_asterisk {
|
||||
if ps ax | grep -v grep | grep asterisk > /dev/null ; then asterisk -rx "stop now" ; fi
|
||||
|
@ -119,7 +121,7 @@ function create_card_db
|
|||
addcard "4,0x4"
|
||||
done
|
||||
|
||||
for line in $(${LSPCI} -n | sed -n 's/^\(0000:\|\)\([0-9a-f]\{2\}:[0-9a-f]\{2\}.[0-9a-f]\{1\}\)\( Class \| \)[0-9a-f]\{4\}: 1397:\([0-9a-f]\{4\}\).*$/\4 \2/p'); do
|
||||
for line in $(${LSPCI} -n | ${SED} -n 's/^\(0000:\|\)\([0-9a-f]\{2\}:[0-9a-f]\{2\}.[0-9a-f]\{1\}\)\( Class \| \)[0-9a-f]\{4\}: 1397:\([0-9a-f]\{4\}\).*$/\4 \2/p'); do
|
||||
if [ ${skipnext} -eq 1 ]; then
|
||||
skipnext=0
|
||||
continue
|
||||
|
@ -174,6 +176,18 @@ function create_card_db
|
|||
echo "${cardline}"
|
||||
}
|
||||
|
||||
function expand
|
||||
{
|
||||
local IFS=$','
|
||||
for tok in $1; do
|
||||
if [ "$(echo $tok | ${SED} -ne 's/\([0-9]*\)-\([0-9]*\)/\1 \2/p')" != "" ]; then
|
||||
${SEQ} $(echo $tok | ${SED} -ne 's/\([0-9]*\)-[0-9]*/\1/p') $(echo $tok | ${SED} -ne 's/[0-9]*-\([0-9]*\)/\1/p')
|
||||
else
|
||||
echo $tok
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function load_card_modules {
|
||||
|
||||
carddb=$(create_card_db)
|
||||
|
@ -196,7 +210,7 @@ function load_card_modules {
|
|||
IFS=$'\n'
|
||||
skipnr=0
|
||||
|
||||
for line in $(sed -n -e '/^[^#]/p' ${misdn_init_conf});
|
||||
for line in $(${SED} -n -e '/^[^#]/p' ${misdn_init_conf});
|
||||
do
|
||||
var=$(echo "${line}" | ${CUT} -d "=" -f1)
|
||||
val=$(echo "${line}" | ${CUT} -d "=" -f2)
|
||||
|
@ -230,7 +244,7 @@ function load_card_modules {
|
|||
let "skipnr = ${skipnr} + 1"
|
||||
;;
|
||||
0x*)
|
||||
hfcmulti[${nr}]=$(echo ${mod} | sed -e "s/^0x\([0-9]*\)/\1/")
|
||||
hfcmulti[${nr}]=$(echo ${mod} | ${SED} -e "s/^0x\([0-9]*\)/\1/")
|
||||
let "hfcports = ${hfcports} + ${ports}"
|
||||
IFS=$','
|
||||
for li in ${opns}; do
|
||||
|
@ -244,53 +258,43 @@ function load_card_modules {
|
|||
esac
|
||||
;;
|
||||
te_ptp)
|
||||
IFS=$','
|
||||
for li in ${val}; do
|
||||
for li in $(expand "${val}"); do
|
||||
layermask[${li}]="0xf"
|
||||
protocol[${li}]=34 # 0x22 == 34
|
||||
done
|
||||
IFS=$'\n'
|
||||
;;
|
||||
te_ptmp)
|
||||
IFS=$','
|
||||
for li in ${val}; do
|
||||
for li in $(expand "${val}"); do
|
||||
layermask[${li}]="0xf"
|
||||
protocol[${li}]=2 # 0x2 == 2
|
||||
done
|
||||
IFS=$'\n'
|
||||
;;
|
||||
nt_*)
|
||||
IFS=$','
|
||||
for li in ${val}; do
|
||||
for li in $(expand "${val}"); do
|
||||
layermask[${li}]="0x3"
|
||||
protocol[${li}]=18 # 0x12 == 18
|
||||
done
|
||||
IFS=$'\n'
|
||||
;;
|
||||
te_capi_ptp)
|
||||
IFS=$','
|
||||
for li in ${val}; do
|
||||
for li in $(expand "${val}"); do
|
||||
layermask[${li}]="0x0"
|
||||
protocol[${li}]=34 # 0x22 == 34
|
||||
done
|
||||
IFS=$'\n'
|
||||
|
||||
export addcapi=1
|
||||
;;
|
||||
te_capi_ptmp)
|
||||
IFS=$','
|
||||
for li in ${val}; do
|
||||
for li in $(expand "${val}"); do
|
||||
layermask[${li}]="0x0"
|
||||
protocol[${li}]=2 # 0x2 == 2
|
||||
done
|
||||
IFS=$'\n'
|
||||
|
||||
export addcapi=1
|
||||
;;
|
||||
|
||||
option)
|
||||
port=`echo "${val}" | sed -e "s/^\([0-9]*\),.*/\1/"`
|
||||
opt=`echo "${val}" | sed -e "s/^[0-9]*,\(.*\)/\1/"`
|
||||
port=`echo "${val}" | ${SED} -e "s/^\([0-9]*\),.*/\1/"`
|
||||
opt=`echo "${val}" | ${SED} -e "s/^[0-9]*,\(.*\)/\1/"`
|
||||
|
||||
if [ -z ${protocol[${port}]} ]; then
|
||||
protocol[${port}]="0"
|
||||
|
@ -364,9 +368,9 @@ function load_card_modules {
|
|||
let "port_index = ${port_index} + 1"
|
||||
let "hfcports = ${hfcports} - 1"
|
||||
done
|
||||
hfcmulti_type="$(echo ${hfcmulti_type} | sed -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_prot="$(echo ${hfcmulti_prot} | sed -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_layer="$(echo ${hfcmulti_layer} | sed -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_type="$(echo ${hfcmulti_type} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_prot="$(echo ${hfcmulti_prot} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_layer="$(echo ${hfcmulti_layer} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
hfcmulti_cmd="${MODPROBE} --ignore-install hfcmulti ${hfcmulti_type} ${hfcmulti_prot} ${hfcmulti_layer}"
|
||||
if [ ! -z ${poll} ]; then
|
||||
hfcmulti_cmd="${hfcmulti_cmd} poll=${poll}"
|
||||
|
@ -428,8 +432,8 @@ function load_card_modules {
|
|||
let "port_index = ${port_index} + 1"
|
||||
done
|
||||
|
||||
other_prot="$(echo ${other_prot} | sed -e 's/^\(.*\),$/\1/')"
|
||||
other_layer="$(echo ${other_layer} | sed -e 's/^\(.*\),$/\1/')"
|
||||
other_prot="$(echo ${other_prot} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
other_layer="$(echo ${other_layer} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
other_cmd="${other_cmd} ${other_prot} ${other_layer} ${other_extra}"
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
|
@ -451,7 +455,7 @@ function unload_card_modules {
|
|||
|
||||
IFS=$'\n'
|
||||
|
||||
for line in $(sed -ne '/^[^#]/p' ${misdn_init_conf});
|
||||
for line in $(${SED} -ne '/^[^#]/p' ${misdn_init_conf});
|
||||
do
|
||||
var=$(echo "${line}" | ${CUT} -d "=" -f 1)
|
||||
val=$(echo "${line}" | ${CUT} -d "=" -f 2)
|
||||
|
@ -530,7 +534,7 @@ function create_misdn_init_conf {
|
|||
portline="${portline}${index},"
|
||||
let "index = ${index} + 1"
|
||||
done
|
||||
portline="$(echo ${portline} | sed -e 's/^\(.*\),$/\1/')"
|
||||
portline="$(echo ${portline} | ${SED} -e 's/^\(.*\),$/\1/')"
|
||||
|
||||
misdn_cfg_pt1="#
|
||||
# Configuration file for your misdn hardware
|
||||
|
@ -725,7 +729,7 @@ case "$1" in
|
|||
check_asterisk
|
||||
|
||||
|
||||
for mod in $(lsmod | sed -ne '/Module/!{s/\([^ ]*\).*/\1/;p}');
|
||||
for mod in $(lsmod | ${SED} -ne '/Module/!{s/\([^ ]*\).*/\1/;p}');
|
||||
do
|
||||
case "${mod}" in
|
||||
mISDN_capi | mISDN_dsp | l3udss1 | mISDN_l2 | mISDN_l1 | mISDN_isac )
|
||||
|
|
Loading…
Reference in New Issue