wanpipe-3.5.25.tgz
This commit is contained in:
parent
1c0741b1c6
commit
88541d8e54
|
@ -1,2 +1,2 @@
|
|||
wanpipe_linux: git ver fe8b74a
|
||||
wanpipe_common: git ver 1b884cb
|
||||
wanpipe_linux: git ver 94892ae
|
||||
wanpipe_common: git ver 707f538
|
||||
|
|
|
@ -1 +1 @@
|
|||
wanpipe-3.5.24
|
||||
wanpipe-3.5.25
|
||||
|
|
21
ChangeLog
21
ChangeLog
|
@ -3,11 +3,30 @@ WANPIPE TDM VOICE - IP/WAN Package
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
Author: Nenad Corbic <ncorbic@sangoma.com>
|
||||
Copyright (c) 1995-2011 Sangoma Technologies Inc.
|
||||
Copyright (c) 1995-2012 Sangoma Technologies Inc.
|
||||
|
||||
For more info visit: http://wiki.sangoma.com
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
* Tue Feb 21 2012 Nenad Corbic <ncorbic@sangoma.com> - 3.5.25
|
||||
==================================================================
|
||||
|
||||
- Dahdi 2.6 support
|
||||
- Linux 3.2.6 support
|
||||
- Support for B610 Single FXS card
|
||||
- Support for B500 4 port BRI card
|
||||
- Reduced memory foot print of the driver
|
||||
by removing some unused statistics structures
|
||||
- New HWEC firmare v1.7.4 fixes delayed fax issus
|
||||
when fax is placed through the echo canceller.
|
||||
- Fixed BRI noise issue: Where a BRI channel could
|
||||
be started in a corrupted state.
|
||||
- New A108 firmware V44
|
||||
Fixes unreliable front end chip access on some
|
||||
newer sandy bridge architectures.
|
||||
Effect of this bug was unreliable T1/E1 link connection.
|
||||
- Added verbose help on wan_ec_client
|
||||
|
||||
* Tue Nov 15 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.24
|
||||
==================================================================
|
||||
|
||||
|
|
7
Makefile
7
Makefile
|
@ -130,7 +130,7 @@ else
|
|||
ZAP_PROT=TDM
|
||||
PROTS=DEF-TDM
|
||||
else
|
||||
ifneq (,$(wildcard $(ZAPDIR)/include/dahdi/kernel.h))
|
||||
ifneq (,$(wildcard $(ZAPDIR)/include/dahdi/version.h))
|
||||
ZAPDIR_PRIV=$(ZAPDIR)
|
||||
ENABLE_WANPIPEMON_ZAP=YES
|
||||
DAHDI_CFLAGS+= -DSTANDALONE_ZAPATA -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN_ZAPTEL -DDAHDI_ISSUES -DBUILDING_TONEZONE -I$(ZAPDIR)/include -I$(ZAPDIR)/include/dahdi -I$(ZAPDIR)/drivers/dahdi
|
||||
|
@ -139,6 +139,10 @@ else
|
|||
endif
|
||||
ZAP_PROT=TDM
|
||||
PROTS=DEF-TDM
|
||||
DAHDI_MAJOR := $(shell cat $(ZAPDIR)/include/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f1)
|
||||
DAHDI_MINOR := $(shell cat $(ZAPDIR)/include/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f2)
|
||||
DAHDI_VER=-DDAHDI_$(DAHDI_MAJOR)$(DAHDI_MINOR)
|
||||
DAHDI_CFLAGS+= $(DAHDI_VER)
|
||||
else
|
||||
ZAP_OPTS=
|
||||
ZAP_PROT=
|
||||
|
@ -239,6 +243,7 @@ clean: cleanup_local clean_util _cleanoldwanpipe
|
|||
.PHONY: _cleanoldwanpipe
|
||||
_cleanoldwanpipe: _checksrc
|
||||
@eval "./patches/build_links.sh"
|
||||
@eval "./patches/clean_old_wanpipe.sh $(WINCLUDE) $(KDIR)/include/linux"
|
||||
|
||||
|
||||
#Check for linux headers
|
||||
|
|
127
Setup
127
Setup
|
@ -305,13 +305,13 @@ welcome_zaptel()
|
|||
${DISTR_NAME} INSTALLATION FOR ZAPTEL
|
||||
|
||||
You are about to install ${DISTR_NAME} TDM Voice drivers
|
||||
for Asterisk/Zaptel framework.
|
||||
for Asterisk/Dahdi/Zaptel framework.
|
||||
|
||||
You will be prompted for path to ZAPTEL source.
|
||||
You will be prompted for path to DHADI/ZAPTEL source.
|
||||
|
||||
From Zaptel 1.4 and greater:
|
||||
wanpipe drivers compile into zaptel WITHOUT any
|
||||
zaptel patching or need to recompile zaptel.
|
||||
From Zaptel 1.4 and greater or Dahdi:
|
||||
wanpipe drivers compile into dahdi/zaptel WITHOUT any
|
||||
dahdi/zaptel patching or need to recompile zaptel.
|
||||
For Zaptel 1.2:
|
||||
wanpipe drivers will offer to patch zaptel for DCHAN HDLC
|
||||
optimization. Setup will offer you to recompile
|
||||
|
@ -479,8 +479,8 @@ WANPIPE installation is now complete. WANPIPE kernel drivers
|
|||
and configuration/debug utilities have been compiled and installed.
|
||||
|
||||
1) Proceed to configure the WANPIPE drivers:
|
||||
Asterisk/Zaptel : /usr/sbin/wancfg_zaptel
|
||||
Asterisk/Dahdi : /usr/sbin/wancfg_dahdi
|
||||
Asterisk/Zaptel : /usr/sbin/wancfg_zaptel
|
||||
TDM API : /usr/sbin/wancfg_tdmapi
|
||||
SMG SS7/BRI/PRI : /usr/sbin/wancfg_smg
|
||||
WAN Routing/API : /usr/sbin/wancfg
|
||||
|
@ -522,8 +522,8 @@ WANPIPE kernel modules:
|
|||
Drivers were not installed/compiled
|
||||
|
||||
1) Proceed to configure the WANPIPE drivers:
|
||||
Asterisk/Zaptel : /usr/sbin/wancfg_zaptel
|
||||
Asterisk/Dahdi : /usr/sbin/wancfg_dahdi
|
||||
Asterisk/Zaptel : /usr/sbin/wancfg_zaptel
|
||||
SMG SS7/BRI/PRI : /usr/sbin/wancfg_smg
|
||||
TDM API : /usr/sbin/wancfg_tdmapi
|
||||
WAN Routing/API : /usr/sbin/wancfg
|
||||
|
@ -1855,9 +1855,9 @@ WANPIPE UTILITIES SETUP
|
|||
|
||||
WANPIPE utilities are used to:
|
||||
1) create configuration files: for Zaptel and Asterisk
|
||||
/usr/sbin/wancfg_zaptel #Zaptel and Asterisk
|
||||
/usr/sbin/wancfg_dahdi #Dahdi and Asterisk
|
||||
/usr/sbin/wancfg_smg #BRI/SS7, Zaptel and Asterisk
|
||||
/usr/sbin/wancfg_zaptel #Zaptel and Asterisk
|
||||
/usr/sbin/wancfg_smg #BRI/SS7, Dahdi/Zaptel and Asterisk
|
||||
/usr/sbin/wancfg_tdmapi #TDM API
|
||||
2) create WANPIPE WAN/IP configuration files.
|
||||
(/usr/sbin/wancfg)
|
||||
|
@ -1888,9 +1888,9 @@ ENDOFTEXT
|
|||
return 0
|
||||
}
|
||||
|
||||
if [ ! -e $SOURCEDIR/include/asm ]; then
|
||||
if [ $KERN_VER -ne 30 ] && [ ! -e $SOURCEDIR/include/asm ]; then
|
||||
echo -e "
|
||||
WARNING: The Linux source in $SOURCEDIR has not been configured.
|
||||
WARNING: The Linux source in $SOURCEDIR has not been configured [$SOURCEDIR/include/asm].
|
||||
Please proceed to configure the source before compiling
|
||||
wanpipe utilities (ex: make menuconfig and make dep)."
|
||||
echo
|
||||
|
@ -2014,8 +2014,12 @@ WARNING: The Linux source in $SOURCEDIR has not been configured.
|
|||
WANCFG_DEFS=$WANCFG_DEFS" ENABLE_ZAPTEL_PARSER=YES ZAPINC=$ZAPTEL_SOURCE_DIR"
|
||||
if [ -d $ZAPTEL_SOURCE_DIR/dahdi ]; then
|
||||
WANCFG_DEFS=$WANCFG_DEFS" DAHDI_ISSUES=YES"
|
||||
# DAHDI_MAJOR=`cat $ZAPTEL_SOURCE_DIR/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f1`
|
||||
# DAHDI_MINOR=`cat $ZAPTEL_SOURCE_DIR/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f2`
|
||||
# WANCFG_DEFS=$WANCFG_DEFS" -DDAHDI_$DAHDI_MAJOR$DAHDI_MINOR"
|
||||
fi
|
||||
fi
|
||||
echo "make -C wancfg all CC=$CC WAN_VIRTUAL=$ROOT WANINCDIR=$WANPIPE_INCLUDE_DIR $WANCFG_DEFS" >> $CMP_LOG 2>> $CMP_LOG
|
||||
eval "make -C wancfg all CC=$CC WAN_VIRTUAL=$ROOT WANINCDIR=$WANPIPE_INCLUDE_DIR $WANCFG_DEFS >> $CMP_LOG 2>> $CMP_LOG"
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
|
@ -3309,30 +3313,35 @@ ENDOFTEXT
|
|||
# return 1
|
||||
# fi
|
||||
|
||||
eval "grep \"define *CONFIG_WAN_ROUTER *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "\n"
|
||||
echo "ERROR: The ${DISTR_NAME} drivers in $SOURCEDIR have been"
|
||||
echo " configured/compiled into the kernel."
|
||||
echo " It's usually recommended that drivers be compiled"
|
||||
echo " as modules."
|
||||
echo
|
||||
echo " Please contact Sangoma Tech Support"
|
||||
echo
|
||||
pause
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
eval "grep \"define *CONFIG_MODVERSIONS\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ $KERN_VER -ne 26 ] || [ $KERN_VER -ne 30 ]; then
|
||||
MODVER=" -DMODVERSIONS -include $SOURCEDIR/include/linux/modversions.h "
|
||||
if [ -e $SOURCEDIR/include/linux/autoconf.h ]; then
|
||||
eval "grep \"define *CONFIG_WAN_ROUTER *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "\n"
|
||||
echo "ERROR: The ${DISTR_NAME} drivers in $SOURCEDIR have been"
|
||||
echo " configured/compiled into the kernel."
|
||||
echo " It's usually recommended that drivers be compiled"
|
||||
echo " as modules."
|
||||
echo
|
||||
echo " Please contact Sangoma Tech Support"
|
||||
echo
|
||||
pause
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
eval "grep \"define *CONFIG_MODVERSIONS\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ $KERN_VER -ne 26 ] || [ $KERN_VER -ne 30 ]; then
|
||||
MODVER=" -DMODVERSIONS -include $SOURCEDIR/include/linux/modversions.h "
|
||||
fi
|
||||
MOD_ENABLED=y
|
||||
else
|
||||
MODVER=""
|
||||
MOD_ENALBED=n
|
||||
fi
|
||||
else
|
||||
MODVER=" -DMODVERSIONS -include $SOURCEDIR/include/linux/modversions.h "
|
||||
MOD_ENABLED=y
|
||||
else
|
||||
MODVER=""
|
||||
MOD_ENALBED=n
|
||||
fi
|
||||
|
||||
cd $DRIVER_TMP_DIR
|
||||
|
@ -3368,8 +3377,13 @@ ENDOFTEXT
|
|||
|
||||
echo
|
||||
echo -n "Checking for SMP support ..."
|
||||
eval "grep \"CONFIG_SMP *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ -e $SOURCEDIR/include/linux/autoconf.h ]; then
|
||||
eval "grep \"CONFIG_SMP *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
rc=$?
|
||||
else
|
||||
rc=0;
|
||||
fi
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo -e "Enabled.\n"
|
||||
CONFIG_SMP=YES;
|
||||
elif [ $FORCE_SMP ] && [ $FORCE_SMP=YES ]; then
|
||||
|
@ -3474,8 +3488,13 @@ CFLAGS="$CC -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dli
|
|||
fi
|
||||
|
||||
echo -n "Checking for REGPARM kernel option ..."
|
||||
eval "grep \"define *CONFIG_REGPARM *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ -e $SOURCEDIR/include/linux/autoconf.h ]; then
|
||||
eval "grep \"define *CONFIG_REGPARM *1\" $SOURCEDIR/include/linux/autoconf.h > /dev/null"
|
||||
rc=$?
|
||||
else
|
||||
rc=1
|
||||
fi
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo -e "Enabled.\n"
|
||||
REGPARM_OPT=".regparm"
|
||||
else
|
||||
|
@ -3516,6 +3535,14 @@ CFLAGS="$CC -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dli
|
|||
echo
|
||||
res=0
|
||||
fi
|
||||
|
||||
if [ $KERN_VER -eq 30 ]; then
|
||||
res=1;
|
||||
fi
|
||||
if [ $KERN_VER -eq 26 ] && [ $KLVL -gt 29 ]; then
|
||||
res=1;
|
||||
fi
|
||||
|
||||
if [ $res -eq 0 ]; then
|
||||
|
||||
echo -e "Enabled.\n"
|
||||
|
@ -3537,7 +3564,11 @@ CFLAGS="$CC -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dli
|
|||
|
||||
|
||||
|
||||
echo -n "Compiling General ${DISTR_NAME} Driver for 2.6.X Kernel ."
|
||||
if [ $KERN_VER -eq 26 ]; then
|
||||
echo -n "Compiling General ${DISTR_NAME} Driver for 2.6.X Kernel ."
|
||||
else
|
||||
echo -n "Compiling General ${DISTR_NAME} Driver for 3.X.X Kernel ."
|
||||
fi
|
||||
|
||||
|
||||
elif [ $KERN_VER -eq 24 ]; then
|
||||
|
@ -6797,7 +6828,9 @@ ENDOFTEXT
|
|||
echo "Dahdi source unmodified"
|
||||
echo " "
|
||||
TDM_DCHAN="(DCHAN)"
|
||||
PROTOCOL_DEFINES="$PROTOCOL_DEFINES -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN_ZAPTEL -DDAHDI_ISSUES"
|
||||
DAHDI_MAJOR=`cat $ZAPTEL_SOURCE_DIR/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f1`
|
||||
DAHDI_MINOR=`cat $ZAPTEL_SOURCE_DIR/dahdi/version.h | grep define | cut -d'"' -f2 | cut -d'.' -f2`
|
||||
PROTOCOL_DEFINES="$PROTOCOL_DEFINES -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN -DDAHDI_$DAHDI_MAJOR$DAHDI_MINOR -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN_ZAPTEL -DDAHDI_ISSUES"
|
||||
fi
|
||||
|
||||
#Check if dchan patch is already enabled
|
||||
|
@ -6913,7 +6946,7 @@ ENDOFTEXT
|
|||
TDM_PROT=YES
|
||||
if [ $zaptel_modified ] && [ $zaptel_modified -eq 1 ] && [ "$ZAPTEL_COMPILE_DISABLE" = "NO" ]; then
|
||||
echo
|
||||
getyn "Recompile/reinstall Zaptel (recommended) ?"
|
||||
getyn "Recompile/reinstall Dahdi/Zaptel (recommended) ?"
|
||||
if [ $? -eq 0 ]; then
|
||||
tdmv_compile_zaptel
|
||||
else
|
||||
|
@ -7147,8 +7180,8 @@ or
|
|||
commands:
|
||||
---------
|
||||
install : Install/Upgrade General Wanpipe
|
||||
zaptel : Install Wanpipe for Zaptel
|
||||
dahdi : Install Wanpipe for Dahdi
|
||||
zaptel : Install Wanpipe for Zaptel
|
||||
xmtp2_api : Install Wanpipe for MTP2 API mode
|
||||
|
||||
remove : Uninstall WANPIPE
|
||||
|
@ -7297,7 +7330,7 @@ KERNEL_UNAME=`uname -r`
|
|||
PKG_NAME=wanpipe
|
||||
DISTR_NAME="WANPIPE"
|
||||
PROD=wanrouter
|
||||
PROD_VER=3.5.24
|
||||
PROD_VER=3.5.25
|
||||
PROD_HOME=`pwd`
|
||||
META_CONF=$PROD_HOME/$PROD.rc
|
||||
WAN_INTR_DIR=$PROD_HOME/interfaces
|
||||
|
@ -7727,7 +7760,7 @@ if [ "$PKG_NAME" != "wanpipe-lite" ]; then
|
|||
exit 1;
|
||||
fi
|
||||
if [ ! -d "$ZAPTEL_INSTALL_DIR" ]; then
|
||||
echo "Error: Zaptel source directory not found: $ZAPTEL_INSTALL_DIR";
|
||||
echo "Error: Dahdi/Zaptel source directory not found: $ZAPTEL_INSTALL_DIR";
|
||||
exit 1;
|
||||
fi
|
||||
if [ ! -f "$ZAPTEL_INSTALL_DIR/Makefile" ]; then
|
||||
|
@ -7735,7 +7768,7 @@ if [ "$PKG_NAME" != "wanpipe-lite" ]; then
|
|||
exit 1;
|
||||
fi
|
||||
ZAPTEL_PATH_OP="YES";
|
||||
echo "Zaptel path defined as: $ZAPTEL_INSTALL_DIR"
|
||||
echo "Dahdi/Zaptel path defined as: $ZAPTEL_INSTALL_DIR"
|
||||
|
||||
set_zaptel_source_dir
|
||||
|
||||
|
@ -7748,7 +7781,7 @@ if [ "$PKG_NAME" != "wanpipe-lite" ]; then
|
|||
exit 1;
|
||||
fi
|
||||
if [ ! -d "$ZAPTEL_INSTALL_DIR" ]; then
|
||||
echo "Error: Zaptel source directory not found: $ZAPTEL_INSTALL_DIR";
|
||||
echo "Error: Dahdi/Zaptel source directory not found: $ZAPTEL_INSTALL_DIR";
|
||||
exit 1;
|
||||
fi
|
||||
if [ ! -f "$ZAPTEL_INSTALL_DIR/Makefile" ]; then
|
||||
|
@ -7756,7 +7789,7 @@ if [ "$PKG_NAME" != "wanpipe-lite" ]; then
|
|||
exit 1;
|
||||
fi
|
||||
ZAPTEL_PATH_OP="YES";
|
||||
echo "Zaptel path defined as: $ZAPTEL_INSTALL_DIR"
|
||||
echo "Dahdi/Zaptel path defined as: $ZAPTEL_INSTALL_DIR"
|
||||
|
||||
set_zaptel_source_dir
|
||||
|
||||
|
@ -8074,7 +8107,7 @@ following Environment variables.
|
|||
"
|
||||
|
||||
if [ $TDM_PROT = "YES" ]; then
|
||||
echo " 7. Zaptel Build Dir : $ZAPTEL_INSTALL_DIR "
|
||||
echo " 7. Dahdi/Zaptel Build Dir : $ZAPTEL_INSTALL_DIR "
|
||||
fi
|
||||
|
||||
echo
|
||||
|
|
|
@ -40,6 +40,9 @@ libsangoma_la_CFLAGS += -I$(libpripath)
|
|||
libsangoma_la_LDFLAGS += -L$(libpripath) -lpri
|
||||
endif
|
||||
|
||||
# We use powf in the gain code
|
||||
libsangoma_la_LDFLAGS += -lm
|
||||
|
||||
libsangoma_la_SOURCES = $(LIB_SOURCES)
|
||||
|
||||
lib_LIBRARIES = libsangoma.a
|
||||
|
|
|
@ -904,10 +904,17 @@ int open_sangoma_device()
|
|||
int i;
|
||||
int elapsed=0;
|
||||
int elapsed_cnt=0;
|
||||
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
long started, ended;
|
||||
started = GetTickCount();
|
||||
#else
|
||||
struct timeval started, ended;
|
||||
|
||||
gettimeofday(&started, NULL);
|
||||
|
||||
#endif
|
||||
|
||||
for (i=0;;i++) {
|
||||
elapsed_cnt++;
|
||||
sangoma_fe_reg_read(dev_fd, 0xF8, &data);
|
||||
|
@ -923,11 +930,26 @@ int open_sangoma_device()
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
ended = GetTickCount();
|
||||
#else
|
||||
gettimeofday(&ended, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
elapsed = ended - started;
|
||||
#else
|
||||
elapsed = (((ended.tv_sec * 1000) + ended.tv_usec / 1000) - ((started.tv_sec * 1000) + started.tv_usec / 1000));
|
||||
#endif
|
||||
|
||||
if (elapsed > 5000) {
|
||||
printf("FE Reg 0xF8 = Prev Data = 0x%X int_cnt=%08i tot_cnt %08i\n",prev_data,elapsed_cnt,i);
|
||||
#if defined(__WINDOWS__)
|
||||
started = GetTickCount();
|
||||
#else
|
||||
gettimeofday(&started, NULL);
|
||||
#endif
|
||||
|
||||
elapsed_cnt=0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: wanpipe
|
||||
Version: 3.5.24-0
|
||||
Version: 3.5.25-0
|
||||
Section: networking
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
|
|
|
@ -234,6 +234,7 @@ typedef struct aft_config
|
|||
static __inline u32 AFT_PORT_REG(sdla_t *card, u32 reg)
|
||||
{
|
||||
if (card->adptr_type == AFT_ADPTR_A600 ||
|
||||
card->adptr_type == AFT_ADPTR_B610 ||
|
||||
card->adptr_type == AFT_ADPTR_B601) {
|
||||
//A600 CASE
|
||||
if (reg < 0x100) {
|
||||
|
|
|
@ -93,6 +93,13 @@ enum {
|
|||
WP_DMA_ERROR_BIT
|
||||
};
|
||||
|
||||
enum {
|
||||
AFT_CARD_TYPE_ALL,
|
||||
AFT_CARD_TYPE_GLOBAL_ISR,
|
||||
AFT_CARD_TYPE_TDM_API,
|
||||
AFT_CARD_TYPE_ZAP_DAHDI
|
||||
};
|
||||
|
||||
/*================================================================
|
||||
* Trace Structure
|
||||
*================================================================*/
|
||||
|
@ -728,5 +735,6 @@ static wan_driver_version_t drv_version = { WANPIPE_VERSION_MAJOR,
|
|||
};
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,8 +48,10 @@
|
|||
extern int wp_a600_iface_init(void*, void*);
|
||||
|
||||
|
||||
#define IS_A600(fe) (((sdla_t*)(fe->card))->adptr_type == AFT_ADPTR_A600)
|
||||
#define IS_A600_CARD(card) (card->adptr_type == AFT_ADPTR_A600)
|
||||
#define IS_A600(fe) (((sdla_t*)(fe->card))->adptr_type == AFT_ADPTR_A600 || ((sdla_t*)(fe->card))->adptr_type == AFT_ADPTR_B610)
|
||||
#define IS_A600_CARD(card) (card->adptr_type == AFT_ADPTR_A600 || card->adptr_type == AFT_ADPTR_B610)
|
||||
|
||||
#define IS_B610(fe) (((sdla_t*)(fe->card))->adptr_type == AFT_ADPTR_B610)
|
||||
|
||||
#define IS_B601(fe) (((sdla_t*)(fe->card))->adptr_type == AFT_ADPTR_B601)
|
||||
#define IS_B601_CARD(card) (card->adptr_type == AFT_ADPTR_B601)
|
||||
|
|
|
@ -63,10 +63,12 @@
|
|||
#define MOD_TYPE_FXS 1
|
||||
#define MOD_TYPE_FXO 2
|
||||
#define MOD_TYPE_TEST 3
|
||||
#define MOD_TYPE_EMPTY 4
|
||||
#define WP_REMORA_DECODE_TYPE(type) \
|
||||
(type == MOD_TYPE_FXS) ? "FXS" : \
|
||||
(type == MOD_TYPE_FXO) ? "FXO" : \
|
||||
(type == MOD_TYPE_TEST) ? "TST" : \
|
||||
(type == MOD_TYPE_TEST) ? "EMPTY" : \
|
||||
"Unknown"
|
||||
|
||||
/* SPI interface */
|
||||
|
|
|
@ -37,6 +37,12 @@ typedef struct wp_tdmv_remora_ {
|
|||
struct dahdi_echocan_state ec[MAX_REMORA_MODULES]; /* echocan state for each channel */
|
||||
#endif
|
||||
struct zt_chan *chans_ptrs[MAX_REMORA_MODULES];
|
||||
|
||||
#ifdef DAHDI_26
|
||||
struct dahdi_device *ddev;
|
||||
struct device dev;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
struct zt_chan chans[MAX_REMORA_MODULES];
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
# include "wanpipe_edac_iface.h"
|
||||
# endif
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
** DEFINES and MACROS
|
||||
******************************************************************************/
|
||||
|
|
|
@ -137,7 +137,8 @@ enum {
|
|||
SDLA_HWLINEREGMAP,
|
||||
SDLA_CHANS_MAP,
|
||||
SDLA_RECOVERY_CLOCK_FLAG,
|
||||
SDLA_HWTYPE_USEDCNT
|
||||
SDLA_HWTYPE_USEDCNT,
|
||||
SDLA_PCI_DEV
|
||||
};
|
||||
|
||||
#define SDLA_MAX_CPUS 2
|
||||
|
@ -761,6 +762,8 @@ typedef struct sdla_hw_type_cnt
|
|||
unsigned char aft_b601_adapters;
|
||||
unsigned char aft_a700_adapters;
|
||||
unsigned char aft_b800_adapters;
|
||||
unsigned char aft_b500_adapters;
|
||||
unsigned char aft_b610_adapters;
|
||||
|
||||
unsigned char aft_x_adapters;
|
||||
unsigned char usb_adapters;
|
||||
|
@ -1256,6 +1259,7 @@ static __inline u32 SDLA_REG_OFF(sdlahw_card_t *hwcard, u32 reg)
|
|||
}
|
||||
|
||||
if (hwcard->adptr_type == AFT_ADPTR_A600 ||
|
||||
hwcard->adptr_type == AFT_ADPTR_B610 ||
|
||||
hwcard->adptr_type == AFT_ADPTR_B601) {
|
||||
if (reg < 0x100) {
|
||||
return (reg+0x1000);
|
||||
|
|
|
@ -82,11 +82,13 @@
|
|||
#define A400_REMORA_SHARK_SUBSYS_VENDOR 0xA400 /* AFT-REMORA SHARK analog board */
|
||||
|
||||
#define AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR 0xA500 /* AFT-ISDN BRI SHARK board */
|
||||
#define B500_SHARK_SUBSYS_VENDOR 0xB500 /* AFT-B500 SHARK BRI B500 board */
|
||||
#define A700_SHARK_SUBSYS_VENDOR 0xA700 /* AFT-700 SHARK FLEX-BRI board */
|
||||
#define AFT_56K_SHARK_SUBSYS_VENDOR 0xA056 /* AFT-56K SHARK board */
|
||||
|
||||
#define AFT_A600_SUBSYS_VENDOR 0xA600 /* AFT-600 Series board */
|
||||
#define AFT_B601_SUBSYS_VENDOR 0xA601 /* AFT-600 Series board */
|
||||
#define AFT_A600_SUBSYS_VENDOR 0xA600 /* AFT-B600 Series board */
|
||||
#define AFT_B601_SUBSYS_VENDOR 0xA601 /* AFT-B600 Series board */
|
||||
#define AFT_B610_SUBSYS_VENDOR 0xA610 /* AFT-B610 single FXS Series board */
|
||||
|
||||
#define AFT_B800_SUBSYS_VENDOR 0xB800 /* AFT-B800 2/4 FXO or 2/4 FXS board */
|
||||
|
||||
|
|
|
@ -148,6 +148,8 @@ enum {
|
|||
AFT_ADPTR_B601, /* AFT-B601 board */
|
||||
AFT_ADPTR_B800, /* AFT-B800 board */
|
||||
AFT_ADPTR_FLEXBRI, /* AFT-A700 FlexBRI board */
|
||||
AFT_ADPTR_B500, /* AFT B500 BRI board */
|
||||
AFT_ADPTR_B610, /* AFT-B610 Single FXS board */
|
||||
|
||||
AFT_ADPTR_LAST /* NOTE: Keep it as a last line */
|
||||
};
|
||||
|
@ -297,6 +299,7 @@ enum {
|
|||
(adapter_type == A200_ADPTR_ANALOG) ? "AFT-A200" : \
|
||||
(adapter_type == A400_ADPTR_ANALOG) ? "AFT-A400" : \
|
||||
(adapter_type == AFT_ADPTR_ISDN) ? "AFT-A500" : \
|
||||
(adapter_type == AFT_ADPTR_B500) ? "AFT-B500" : \
|
||||
(adapter_type == AFT_ADPTR_56K) ? "AFT-A056" : \
|
||||
(adapter_type == AFT_ADPTR_2SERIAL_V35X21) ? "AFT-A142" : \
|
||||
(adapter_type == AFT_ADPTR_4SERIAL_V35X21) ? "AFT-A144" : \
|
||||
|
@ -305,6 +308,7 @@ enum {
|
|||
(adapter_type == U100_ADPTR) ? "U100" : \
|
||||
(adapter_type == AFT_ADPTR_A600) ? "AFT-B600" : \
|
||||
(adapter_type == AFT_ADPTR_B601) ? "AFT-B601" : \
|
||||
(adapter_type == AFT_ADPTR_B610) ? "AFT-B610" : \
|
||||
(adapter_type == AFT_ADPTR_B800) ? "AFT-B800" : \
|
||||
(adapter_type == AFT_ADPTR_FLEXBRI) ? "AFT-B700" : \
|
||||
"UNKNOWN"
|
||||
|
|
|
@ -1046,5 +1046,7 @@ extern void disconnect_from_interrupt_line(sdla_t *card);
|
|||
int wp_aft_firmware_up_init(sdla_t* card, wandev_conf_t* conf); /* AFT Firmware Update support */
|
||||
#endif
|
||||
|
||||
extern sdla_t *aft_find_first_card_in_list(sdla_t *card, int type);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _WANPIPE_H */
|
||||
|
|
|
@ -170,6 +170,9 @@ int wanpipe_cdev_logger_create(wanpipe_cdev_t *cdev);
|
|||
int wp_ctrl_dev_create(void);
|
||||
void wp_ctrl_dev_delete(void);
|
||||
|
||||
int wanpipe_sys_dev_add(struct device *dev, struct device *parent, char *name);
|
||||
void wanpipe_sys_dev_del(struct device *dev);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -157,11 +157,12 @@ enum {
|
|||
card_type == WANOPT_AFT108) ? "A101/1D/A102/2D/4/4D/8" : \
|
||||
(card_type == WANOPT_AFT300) ? "A300" : \
|
||||
(card_type == WANOPT_AFT_ANALOG) ? "A200/A400/B600/B700/B800" : \
|
||||
(card_type == WANOPT_AFT_ISDN) ? "A500/B700" : \
|
||||
(card_type == WANOPT_AFT_ISDN) ? "A500/B700/B500" : \
|
||||
(card_type == WANOPT_AFT_56K) ? "A056" : \
|
||||
(card_type == WANOPT_AFT_SERIAL) ? "A14x" : \
|
||||
(card_type == WANOPT_USB_ANALOG) ? "U100" : \
|
||||
(card_type == WANOPT_AFT600) ? "A600" : \
|
||||
(card_type == WANOPT_AFT610) ? "A610" : \
|
||||
(card_type == WANOPT_AFT601) ? "B601" : \
|
||||
"Unknown"
|
||||
|
||||
|
@ -1089,6 +1090,8 @@ typedef struct {
|
|||
(cardtype == WANOPT_AFT_56K) ? "WANOPT_AFT_56K": \
|
||||
(cardtype == WANOPT_AFT300) ? "WANOPT_AFT300": \
|
||||
(cardtype == WANOPT_AFT600) ? "WANOPT_AFT600": \
|
||||
(cardtype == WANOPT_AFT610) ? "WANOPT_AFT610": \
|
||||
(cardtype == WANOPT_AFT601) ? "WANOPT_AFT601": \
|
||||
(cardtype == WANOPT_AFT_ISDN) ? "WANOPT_AFT_ISDN": "Invalid card")
|
||||
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ enum {
|
|||
#define WANOPT_USB_ANALOG 15
|
||||
#define WANOPT_AFT600 16
|
||||
#define WANOPT_AFT601 17
|
||||
#define WANOPT_AFT610 18
|
||||
|
||||
/*
|
||||
* Configuration options defines.
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
/******************************************************************************
|
||||
* sdla_tdmv.h
|
||||
*
|
||||
* Author: Alex Feldman <al.feldman@sangoma.com>
|
||||
*
|
||||
* Copyright: (c) 1995-2001 Sangoma Technologies Inc.
|
||||
*
|
||||
* 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 of the License, or (at your option) any later version.
|
||||
* ============================================================================
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __WANPIPE_DAHDI_ABSTR
|
||||
# define __WANPIPE_DAHDI_ABSTR
|
||||
|
||||
#ifdef __SDLA_TDMV_SRC
|
||||
# define WP_EXTERN
|
||||
#else
|
||||
# define WP_EXTERN extern
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
** DEFINES and MACROS
|
||||
******************************************************************************/
|
||||
|
||||
#if defined(WAN_KERNEL)
|
||||
|
||||
#include "zapcompat.h"
|
||||
#include "wanpipe_cdev_iface.h"
|
||||
|
||||
|
||||
#ifdef DAHDI_26
|
||||
|
||||
#define wp_dahdi_create_device(card, wp) __wp_dahdi_create_device(card,&wp->ddev,&wp->dev)
|
||||
static __inline int __wp_dahdi_create_device(sdla_t *card, struct dahdi_device **ddev, struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
int err;
|
||||
|
||||
*ddev = dahdi_create_device();
|
||||
if (!*ddev) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
card->hw_iface.getcfg(card->hw, SDLA_PCI_DEV, &pdev);
|
||||
err=wanpipe_sys_dev_add(dev, &pdev->dev, card->devname);
|
||||
if (err) {
|
||||
DEBUG_ERROR("%s: Error Failed to add wanpipe device \n",card->devname);
|
||||
dahdi_free_device(*ddev);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
(*ddev)->manufacturer = kmalloc(WP_DAHDI_MAX_STR_SZ,GFP_KERNEL);
|
||||
(*ddev)->hardware_id = kmalloc(WP_DAHDI_MAX_STR_SZ,GFP_KERNEL);
|
||||
(*ddev)->devicetype = kmalloc(WP_DAHDI_MAX_STR_SZ,GFP_KERNEL);
|
||||
(*ddev)->location = kmalloc(WP_DAHDI_MAX_STR_SZ,GFP_KERNEL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define wp_dahdi_free_device(wp) __wp_dahdi_free_device(wp->ddev, &wp->dev)
|
||||
static __inline int __wp_dahdi_free_device(struct dahdi_device *ddev, struct device *dev)
|
||||
{
|
||||
wanpipe_sys_dev_del(dev);
|
||||
|
||||
kfree(ddev->manufacturer);
|
||||
kfree(ddev->hardware_id);
|
||||
kfree(ddev->devicetype);
|
||||
kfree(ddev->location);
|
||||
dahdi_free_device(ddev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define wp_dahdi_register_device(wp) __wp_dahdi_register_device(wp->ddev, &wp->dev,&wp->span)
|
||||
static __inline int __wp_dahdi_register_device(struct dahdi_device *ddev, struct device *dev, struct dahdi_span *span)
|
||||
{
|
||||
list_add_tail(&span->device_node,
|
||||
&ddev->spans);
|
||||
return dahdi_register_device(ddev, dev);
|
||||
}
|
||||
|
||||
#define wp_dahdi_unregister_device(wp) __wp_dahdi_unregister_device(wp->ddev)
|
||||
static __inline void __wp_dahdi_unregister_device(struct dahdi_device *ddev)
|
||||
{
|
||||
dahdi_unregister_device(ddev);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define wp_dahdi_create_device(card,wp) __wp_dahdi_create_device(card,&wp->span)
|
||||
static __inline int __wp_dahdi_create_device(sdla_t *card, struct zt_span *span)
|
||||
{
|
||||
span->manufacturer = kmalloc(WP_DAHDI_MAX_STR_SZ,GFP_KERNEL);
|
||||
return 0;
|
||||
}
|
||||
#define wp_dahdi_free_device(wp) __wp_dahdi_free_device(&wp->span)
|
||||
static __inline int __wp_dahdi_free_device(struct zt_span *span)
|
||||
{
|
||||
kfree(span->manufacturer);
|
||||
span->manufacturer=NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define wp_dahdi_register_device(wp) __wp_dahdi_register_device(&wp->span)
|
||||
static __inline int __wp_dahdi_register_device(struct dahdi_span *span)
|
||||
{
|
||||
return zt_register(span, 0);
|
||||
}
|
||||
|
||||
#define wp_dahdi_unregister_device(wp) __wp_dahdi_unregister_device(&wp->span)
|
||||
static __inline void __wp_dahdi_unregister_device(struct dahdi_span *span)
|
||||
{
|
||||
zt_unregister(span);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAN_KERNEL */
|
||||
|
||||
#undef WP_EXTERN
|
||||
|
||||
#endif /* __SDLA_VOIP_H */
|
|
@ -281,9 +281,13 @@ extern void OutputLogString(const char *fmt, ...); /* Print to wanpipelog.txt (N
|
|||
#warning "WP_LOGGER_DISABLE Enabled"
|
||||
#endif
|
||||
|
||||
#ifdef WAN_DEBUG_EVENT_AS_KERN_DEBUG
|
||||
#define DEBUG_EVENT(format,msg...) printk(KERN_DEBUG format, ##msg)
|
||||
#else
|
||||
#define DEBUG_EVENT(format,msg...) printk(KERN_INFO format, ##msg)
|
||||
#define DEBUG_WARNING(format,msg...) printk(KERN_INFO format, ##msg)
|
||||
#define DEBUG_ERROR(format,msg...) printk(KERN_INFO format, ##msg)
|
||||
#endif
|
||||
#define DEBUG_WARNING(format,msg...) printk(KERN_WARNING format, ##msg)
|
||||
#define DEBUG_ERROR(format,msg...) printk(KERN_ERR format, ##msg)
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -893,7 +893,7 @@ typedef struct wan_rtp_pkt {
|
|||
#pragma pack()
|
||||
|
||||
|
||||
#if defined(HAVE_NET_DEVICE_OPS)
|
||||
#if defined(HAVE_NET_DEVICE_OPS) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
|
||||
|
||||
#define WAN_DECLARE_NETDEV_OPS(_ops_name) static struct net_device_ops _ops_name = {0};
|
||||
|
||||
|
@ -908,7 +908,11 @@ typedef struct wan_rtp_pkt {
|
|||
#define WAN_NETDEV_OPS_IOCTL(dev,ops,wan_ioctl) ops.ndo_do_ioctl = wan_ioctl
|
||||
#define WAN_NETDEV_OPS_MTU(dev,ops,wan_mtu) ops.ndo_change_mtu = wan_mtu
|
||||
#define WAN_NETDEV_OPS_CONFIG(dev,ops,wan_set_config) ops.ndo_set_config = wan_set_config
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
|
||||
#define WAN_NETDEV_OPS_SET_MULTICAST_LIST(dev,ops,wan_multicast_list)
|
||||
#else
|
||||
#define WAN_NETDEV_OPS_SET_MULTICAST_LIST(dev,ops,wan_multicast_list) ops.ndo_set_multicast_list = wan_multicast_list
|
||||
#endif
|
||||
//#define WAN_CHANGE_MTU(dev) dev->netdev_ops->ndo_change_mtu
|
||||
//#define WAN_XMIT(dev) dev->netdev_ops->ndo_start_xmit
|
||||
//#define WAN_IOCTL(dev) dev->netdev_ops->ndo_do_ioctl
|
||||
|
|
|
@ -37,6 +37,15 @@
|
|||
# define wp_devinet_ioctl(_cmd_,_rptr_) devinet_ioctl(_cmd_,_rptr_)
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
|
||||
#define wp_dev_name(dev) ((dev)->bus_id)
|
||||
#define wp_dev_set_name(dev, format, ...) \
|
||||
snprintf((dev)->bus_id, BUS_ID_SIZE, format, ## __VA_ARGS__);
|
||||
#else
|
||||
#define wp_dev_name dev_name
|
||||
#define wp_dev_set_name dev_set_name
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_ALIAS_NETDEV
|
||||
#define LINUX_2639 1
|
||||
#define wan_rwlock_init rwlock_init
|
||||
|
@ -106,59 +115,6 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
#ifdef HAVE_NET_DEVICE_OPS
|
||||
#define WAN_DECLARE_NETDEV_OPS(_ops_name) static struct net_device_ops _ops_name = {0};
|
||||
|
||||
#define WAN_NETDEV_OPS_BIND(dev,_ops_name) dev->netdev_ops = &_ops_name
|
||||
|
||||
#define WAN_NETDEV_OPS_INIT(dev,ops,wan_init) ops.ndo_init = wan_init
|
||||
#define WAN_NETDEV_OPS_OPEN(dev,ops,wan_open) ops.ndo_open = wan_open
|
||||
#define WAN_NETDEV_OPS_STOP(dev,ops,wan_stop) ops.ndo_stop = wan_stop
|
||||
#define WAN_NETDEV_OPS_XMIT(dev,ops,wan_send) ops.ndo_start_xmit = wan_send
|
||||
#define WAN_NETDEV_OPS_STATS(dev,ops,wan_stats) ops.ndo_get_stats = wan_stats
|
||||
#define WAN_NETDEV_OPS_TIMEOUT(dev,ops,wan_timeout) ops.ndo_tx_timeout = wan_timeout
|
||||
#define WAN_NETDEV_OPS_IOCTL(dev,ops,wan_ioctl) ops.ndo_do_ioctl = wan_ioctl
|
||||
#define WAN_NETDEV_OPS_MTU(dev,ops,wan_mtu) ops.ndo_change_mtu = wan_mtu
|
||||
#define WAN_NETDEV_OPS_CONFIG(dev,ops,wan_set_config) ops.ndo_set_config = wan_set_config
|
||||
#define WAN_NETDEV_OPS_SET_MULTICAST_LIST(dev,ops,wan_multicast_list) ops.ndo_set_multicast_list = wan_multicast_list
|
||||
//#define WAN_CHANGE_MTU(dev) dev->netdev_ops->ndo_change_mtu
|
||||
//#define WAN_XMIT(dev) dev->netdev_ops->ndo_start_xmit
|
||||
//#define WAN_IOCTL(dev) dev->netdev_ops->ndo_do_ioctl
|
||||
#define WAN_NETDEV_TEST_XMIT(dev) dev->netdev_ops->ndo_start_xmit
|
||||
#define WAN_NETDEV_XMIT(skb,dev) dev->netdev_ops->ndo_start_xmit(skb,dev)
|
||||
#define WAN_NETDEV_TEST_IOCTL(dev) dev->netdev_ops->ndo_do_ioctl
|
||||
#define WAN_NETDEV_IOCTL(dev,ifr,cmd) dev->netdev_ops->ndo_do_ioctl(dev,ifr,cmd)
|
||||
#define WAN_NETDEV_TEST_MTU(dev) dev->netdev_ops->ndo_change_mtu
|
||||
#define WAN_NETDEV_CHANGE_MTU(dev,skb) dev->netdev_ops->ndo_change_mtu(dev,skb)
|
||||
|
||||
#else
|
||||
#define WAN_DECLARE_NETDEV_OPS(_ops_name)
|
||||
#define WAN_NETDEV_OPS_BIND(dev,_ops_name)
|
||||
#define WAN_NETDEV_OPS_INIT(dev,ops,wan_init) dev->init = wan_init
|
||||
#define WAN_NETDEV_OPS_OPEN(dev,ops,wan_open) dev->open = wan_open
|
||||
#define WAN_NETDEV_OPS_STOP(dev,ops,wan_stop) dev->stop = wan_stop
|
||||
#define WAN_NETDEV_OPS_XMIT(dev,ops,wan_send) dev->hard_start_xmit = wan_send
|
||||
#define WAN_NETDEV_OPS_STATS(dev,ops,wan_stats) dev->get_stats = wan_stats
|
||||
#define WAN_NETDEV_OPS_TIMEOUT(dev,ops,wan_timeout) dev->tx_timeout = wan_timeout
|
||||
#define WAN_NETDEV_OPS_IOCTL(dev,ops,wan_ioctl) dev->do_ioctl = wan_ioctl
|
||||
#define WAN_NETDEV_OPS_MTU(dev,ops,wan_mtu) dev->change_mtu = wan_mtu
|
||||
#define WAN_NETDEV_OPS_CONFIG(dev,ops,wan_set_config) dev->set_config = wan_set_config
|
||||
#define WAN_NETDEV_OPS_SET_MULTICAST_LIST(dev,ops,wan_multicast_list) dev->set_multicast_list = wan_multicast_list
|
||||
//#define WAN_CHANGE_MTU(dev) dev->change_mtu
|
||||
//#define WAN_XMIT(dev) dev->hard_start_xmit
|
||||
//#define WAN_IOCTL(dev) dev->do_ioctl
|
||||
#define WAN_NETDEV_TEST_XMIT(dev) dev->hard_start_xmit
|
||||
#define WAN_NETDEV_XMIT(skb,dev) dev->hard_start_xmit(skb,dev)
|
||||
#define WAN_NETDEV_TEST_IOCTL(dev) dev->do_ioctl
|
||||
#define WAN_NETDEV_IOCTL(dev,ifr,cmd) dev->do_ioctl(dev,ifr,cmd)
|
||||
#define WAN_NETDEV_TEST_MTU(dev) dev->change_mtu
|
||||
#define WAN_NETDEV_CHANGE_MTU(dev,skb) dev->change_mtu(dev,skb)
|
||||
|
||||
#endif
|
||||
//////////////////////////
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) || defined(LINUX_FEAT_2624)
|
||||
# ifndef LINUX_FEAT_2624
|
||||
# define LINUX_FEAT_2624 1
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
#define WANPIPE_COMPANY "Sangoma Technologies Inc"
|
||||
|
||||
/********** LINUX **********/
|
||||
#define WANPIPE_VERSION "3.5.24"
|
||||
#define WANPIPE_VERSION "3.5.25"
|
||||
#define WANPIPE_SUB_VERSION "0"
|
||||
#define WANPIPE_LITE_VERSION "1.1.1"
|
||||
|
||||
#if defined(__LINUX__)
|
||||
#define WANPIPE_VERSION_MAJOR 3
|
||||
#define WANPIPE_VERSION_MINOR 5
|
||||
#define WANPIPE_VERSION_MINOR1 24
|
||||
#define WANPIPE_VERSION_MINOR1 25
|
||||
#define WANPIPE_VERSION_MINOR2 0
|
||||
#endif
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
|||
# define WANPIPE_VERSION_MINOR2 5 /* patch number for WANPIPE_VERSION_MINOR1 */
|
||||
# else
|
||||
# define WANPIPE_VERSION_MINOR1 44 /* frozen feature number */
|
||||
# define WANPIPE_VERSION_MINOR2 0 /* patch number for WANPIPE_VERSION_MINOR1 */
|
||||
# define WANPIPE_VERSION_MINOR2 5 /* patch number for WANPIPE_VERSION_MINOR1 */
|
||||
# endif
|
||||
|
||||
# undef VER_PRODUCTVERSION
|
||||
|
@ -61,11 +61,11 @@
|
|||
# define VER_PRODUCTVERSION 6,0,42,5
|
||||
# define VER_PRODUCTVERSION_STR "6.0.42.5"
|
||||
# else
|
||||
# define VER_PRODUCTVERSION 6,0,44,0
|
||||
# define VER_PRODUCTVERSION_STR "6.0.44.0"
|
||||
# define VER_PRODUCTVERSION 6,0,44,5
|
||||
# define VER_PRODUCTVERSION_STR "6.0.44.5"
|
||||
# endif
|
||||
|
||||
# define __BUILDDATE__ May 10, 2011
|
||||
# define __BUILDDATE__ Jan 11, 2012
|
||||
|
||||
# define VER_COMPANYNAME_STR "Sangoma Technologies Corporation"
|
||||
# define VER_LEGALCOPYRIGHT_YEARS "1984-2011"
|
||||
|
@ -81,7 +81,7 @@
|
|||
# define WANPIPE_SUB_VERSION_Windows "5"
|
||||
# else
|
||||
# define WANPIPE_VERSION_Windows "6.0.44"
|
||||
# define WANPIPE_SUB_VERSION_Windows "0"
|
||||
# define WANPIPE_SUB_VERSION_Windows "5"
|
||||
# endif
|
||||
|
||||
# define WANPIPE_VERSION_BETA_Windows 0
|
||||
|
|
|
@ -29,28 +29,22 @@
|
|||
# include <dahdi/user.h> // this will bring dahdi user stuff
|
||||
#endif
|
||||
|
||||
#define WP_DAHDI_MAX_STR_SZ 100
|
||||
|
||||
#undef DAHDI_25
|
||||
#undef DAHDI_24
|
||||
#undef DAHDI_22
|
||||
#undef DAHDI_23
|
||||
|
||||
#if defined(DAHDI_EVENT_READ_OVERRUN)
|
||||
#if defined(DAHDI_26)
|
||||
#define DAHDI_25
|
||||
#define DAHDI_24
|
||||
#define DAHDI_23
|
||||
#define DAHDI_22
|
||||
#elif defined(DAHDI_MAINT_ALARM_SIM)
|
||||
#elif defined(DAHDI_25)
|
||||
#define DAHDI_24
|
||||
#define DAHDI_23
|
||||
#define DAHDI_22
|
||||
#elif defined(DAHDI_AUDIO_NOTIFY)
|
||||
#elif defined(DAHDI_24)
|
||||
#define DAHDI_23
|
||||
#define DAHDI_22
|
||||
#elif defined(DAHDI_ECHOCANCEL_FAX_MODE)
|
||||
#elif defined(DAHDI_23)
|
||||
#define DAHDI_22
|
||||
#else
|
||||
/* Configuring for old 20 dahdi */
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -167,6 +161,14 @@
|
|||
#define zt_ec_span dahdi_ec_span
|
||||
#define zt_qevent_lock dahdi_qevent_lock
|
||||
|
||||
#if defined (DAHDI_26)
|
||||
#define WP_DAHDI_SET_STR_INFO(dev,name,...) sprintf((char*)(dev)->ddev->name, ## __VA_ARGS__);
|
||||
#define WP_DAHDI_INFO(dev,name) (dev)->ddev->name
|
||||
#else
|
||||
#define WP_DAHDI_SET_STR_INFO(dev,name,...) sprintf((char*)(dev)->span.name, ## __VA_ARGS__);
|
||||
#define WP_DAHDI_INFO(dev,name) (dev)->span.name
|
||||
#endif
|
||||
|
||||
#if defined(DAHDI_24) || defined(DAHDI_25)
|
||||
#define DAHDI_SPAN_OPS(span, func_name) span.ops->func_name
|
||||
#define WP_PRIV_FROM_SPAN(span_dev, str_type) container_of(span_dev,str_type,span)
|
||||
|
|
|
@ -461,8 +461,48 @@ int aft_bri_test_sync(sdla_t *card, int tx_only)
|
|||
|
||||
int aft_bri_led_ctrl(sdla_t *card, int color, int led_pos, int on)
|
||||
{
|
||||
BRI_FUNC();
|
||||
/* no control over LEDs on BRI card */
|
||||
u8 reg;
|
||||
u16 red_bit=0,green_bit=0;
|
||||
u32 port = WAN_FE_LINENO(&card->fe);
|
||||
AFT_FUNC_DEBUG();
|
||||
|
||||
if (card->adptr_type != AFT_ADPTR_B500) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
red_bit=port*2;
|
||||
green_bit=(port*2)+1;
|
||||
|
||||
reg=aft_bri_read_cpld(card,0x01);
|
||||
|
||||
DEBUG_TEST("%s: READ CPLD 0x%X\n",card->devname,reg);
|
||||
|
||||
/* INSERT LED CODE */
|
||||
switch (color){
|
||||
|
||||
case WAN_AFT_RED:
|
||||
if (on){
|
||||
wan_set_bit(red_bit,®);
|
||||
}else{
|
||||
wan_clear_bit(red_bit,®);
|
||||
}
|
||||
break;
|
||||
|
||||
case WAN_AFT_GREEN:
|
||||
if (on){
|
||||
wan_set_bit(green_bit,®);
|
||||
}else{
|
||||
wan_clear_bit(green_bit,®);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEBUG_TEST("%s: WRITE CPLD 0x%X red_bit %i green_bit %i port %i\n",
|
||||
card->devname, reg,red_bit, green_bit, port);
|
||||
aft_bri_write_cpld(card,0x01,reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -515,7 +555,7 @@ int aft_bri_global_chip_config(sdla_t *card)
|
|||
/*============ GLOBAL CHIP CONFIGURATION ===============*/
|
||||
|
||||
card->hw_iface.getcfg(card->hw, SDLA_HWCPU_USEDCNT, &used_cnt);
|
||||
|
||||
|
||||
if (used_cnt == 1) {
|
||||
/* Enable the chip/hdlc reset condition */
|
||||
reg=0;
|
||||
|
@ -564,6 +604,11 @@ int aft_bri_global_chip_config(sdla_t *card)
|
|||
|
||||
/* Reset HWEC and Set CPLD based on network sync */
|
||||
aft_bri_cpld0_set(card,1);
|
||||
|
||||
/* Turn on all LED lights by default */
|
||||
if (card->adptr_type == AFT_ADPTR_B500) {
|
||||
aft_bri_write_cpld(card,0x01,0xFF);
|
||||
}
|
||||
|
||||
wan_spin_unlock_irq(&card->wandev.lock,&flags);
|
||||
card->hw_iface.hw_unlock(card->hw,&smp_flags);
|
||||
|
@ -609,6 +654,11 @@ int aft_bri_global_chip_unconfig(sdla_t *card)
|
|||
if (used_cnt == 1) {
|
||||
/* Set Octasic to reset */
|
||||
aft_bri_cpld0_set(card,1);
|
||||
|
||||
/* Turn on all LED by default */
|
||||
if (card->adptr_type == AFT_ADPTR_B500) {
|
||||
aft_bri_write_cpld(card,0x01,0xFF);
|
||||
}
|
||||
|
||||
/* Disable the chip/hdlc reset condition */
|
||||
wan_set_bit(AFT_CHIPCFG_SFR_EX_BIT,®);
|
||||
|
|
|
@ -214,12 +214,6 @@ WAN_DECLARE_NETDEV_OPS(wan_netdev_ops)
|
|||
* Defines & Macros
|
||||
*================================================================*/
|
||||
|
||||
enum {
|
||||
AFT_CARD_TYPE_ALL,
|
||||
AFT_CARD_TYPE_GLOBAL_ISR,
|
||||
AFT_CARD_TYPE_TDM_API,
|
||||
AFT_CARD_TYPE_ZAP_DAHDI
|
||||
};
|
||||
|
||||
|
||||
/*=================================================================
|
||||
|
@ -301,7 +295,6 @@ static void disable_data_error_intr(sdla_t *card, unsigned char);
|
|||
|
||||
void aft_tx_fifo_under_recover (sdla_t *card, private_area_t *chan);
|
||||
static void aft_rx_fifo_over_recover(sdla_t *card, private_area_t *chan);
|
||||
static sdla_t * aft_find_first_card_in_list(sdla_t *card, int type);
|
||||
|
||||
|
||||
/* Bottom half handlers */
|
||||
|
@ -665,7 +658,9 @@ int wp_aft_a600_init (sdla_t* card, wandev_conf_t* conf)
|
|||
|
||||
ASSERT_AFT_HWDEV(card->wandev.card_type);
|
||||
|
||||
if (card->adptr_type != AFT_ADPTR_A600 && card->adptr_type != AFT_ADPTR_B601 ) {
|
||||
if (card->adptr_type != AFT_ADPTR_A600 &&
|
||||
card->adptr_type != AFT_ADPTR_B601 &&
|
||||
card->adptr_type != AFT_ADPTR_B610 ) {
|
||||
DEBUG_ERROR( "%s: Error: Attempting to configure for Analog on non B600 analog hw!\n",
|
||||
card->devname);
|
||||
return -EINVAL;
|
||||
|
@ -1421,7 +1416,12 @@ static int wan_aft_init (sdla_t *card, wandev_conf_t* conf)
|
|||
|
||||
if(IS_BRI_CARD(card) || IS_A700_CARD(card)){
|
||||
wan_set_bit(AFT_TDM_GLOBAL_ISR,&card->u.aft.chip_cfg_status);
|
||||
#if 0
|
||||
/* NC: The RING buffer on BRI cards has a hw bug.
|
||||
This option can caues bad audio on arbitrary
|
||||
restart of the FPGA */
|
||||
wan_set_bit(AFT_TDM_RING_BUF,&card->u.aft.chip_cfg_status);
|
||||
#endif
|
||||
} else if (card->wandev.config_id == WANCONFIG_AFT_ANALOG) {
|
||||
wan_set_bit(AFT_TDM_SW_RING_BUF,&card->u.aft.chip_cfg_status);
|
||||
}
|
||||
|
@ -3302,6 +3302,10 @@ static int new_if (wan_device_t* wandev, netdevice_t* dev, wanif_conf_t* conf)
|
|||
#if defined(CONFIG_PRODUCT_WANPIPE_TDM_VOICE)
|
||||
if (!err && card->u.aft.tdmv_zaptel_cfg){
|
||||
WAN_TDMV_CALL(software_init, (&card->wan_tdmv), err);
|
||||
if (err) {
|
||||
err=-EINVAL;
|
||||
goto new_if_cfg_skip;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}else{
|
||||
|
@ -3389,6 +3393,7 @@ new_if_cfg_skip:
|
|||
#if defined (BUILD_MOD_TESTER)
|
||||
handle_front_end_state(card,1);
|
||||
#endif
|
||||
aft_core_taskq_trigger(card,AFT_FE_LED);
|
||||
|
||||
card->hw_iface.hw_unlock(card->hw,&smp_flags);
|
||||
}
|
||||
|
@ -5555,7 +5560,7 @@ static void aft_rx_post_complete (sdla_t *card, private_area_t *chan,
|
|||
* flag. If data is not greater than 3, then
|
||||
* we have a 0 length frame. Thus discard
|
||||
* (only if HDLC engine enabled) */
|
||||
if (len <= 3) {
|
||||
if (len <= 3 || len >= chan->dma_mru) {
|
||||
|
||||
/* if we got an invalid hdlc frame and pkt_error is not set.
|
||||
we must indicate that the packet is bad and update statistics */
|
||||
|
@ -6634,7 +6639,7 @@ static int wp_aft_fifo_per_port_isr(sdla_t *card)
|
|||
return irq;
|
||||
}
|
||||
|
||||
static sdla_t * aft_find_first_card_in_list(sdla_t *card, int type)
|
||||
sdla_t * aft_find_first_card_in_list(sdla_t *card, int type)
|
||||
{
|
||||
void **card_list;
|
||||
u32 max_number_of_ports, i;
|
||||
|
@ -7438,8 +7443,7 @@ if (1){
|
|||
aft_critical_trigger(card);
|
||||
}
|
||||
|
||||
} else if (card->wandev.state == WAN_CONNECTED &&
|
||||
SYSTEM_TICKS-card->u.aft.sec_chk_cnt > (HZ/50)) {
|
||||
} else if (SYSTEM_TICKS-card->u.aft.sec_chk_cnt > (HZ/50)) {
|
||||
|
||||
card->u.aft.sec_chk_cnt=SYSTEM_TICKS;
|
||||
|
||||
|
@ -11589,7 +11593,11 @@ static int aft_tdmv_if_init(sdla_t *card, private_area_t *chan, wanif_conf_t *co
|
|||
|
||||
if(IS_BRI_CARD(card)){
|
||||
if(chan->dchan_time_slot >= 0){
|
||||
conf->active_ch = 0x4<<(WAN_FE_LINENO(&card->fe)*2);
|
||||
int fe_line=WAN_FE_LINENO(&card->fe);
|
||||
if (fe_line >= MAX_BRI_MODULES) {
|
||||
fe_line=fe_line-MAX_BRI_MODULES;
|
||||
}
|
||||
conf->active_ch = 0x4<<(fe_line*2);
|
||||
/* For the d-chan MUST set ONLY bit 2!! */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
# include "zapcompat.h"
|
||||
# include "sdla_tdmv.h"
|
||||
# include "aft_bri.h"
|
||||
# include "wanpipe_dahdi_abstr.h"
|
||||
|
||||
/*******************************************************************************
|
||||
** DEFINES AND MACROS
|
||||
|
@ -84,6 +85,11 @@ typedef struct wp_tdmv_bri_ {
|
|||
struct dahdi_echocan_state ec[MAX_BRI_LINES]; /* echocan state for each channel */
|
||||
#endif
|
||||
struct zt_chan *chans_ptrs[MAX_BRI_LINES];
|
||||
#ifdef DAHDI_26
|
||||
struct dahdi_device *ddev;
|
||||
struct device dev;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
struct zt_chan chans[MAX_BRI_LINES];
|
||||
unsigned long reg_module_map; /* Registered modules */
|
||||
|
@ -718,7 +724,7 @@ static int wp_tdmv_bri_software_init(wan_tdmv_t *wan_tdmv)
|
|||
|
||||
WP_DELAY(1000);
|
||||
|
||||
if (zt_register(&wr->span, 0)) {
|
||||
if (wp_dahdi_register_device(wr)) {
|
||||
|
||||
BRI_FUNC();
|
||||
DEBUG_EVENT("%s: Unable to register span with zaptel\n",
|
||||
|
@ -783,9 +789,12 @@ static void wp_tdmv_release(wp_tdmv_bri_t *wr)
|
|||
DEBUG_EVENT("%s: Unregister WAN FXS/FXO device from Zaptel!\n",
|
||||
wr->devname);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
zt_unregister(&wr->span);
|
||||
wp_dahdi_unregister_device(wr);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
}
|
||||
|
||||
wp_dahdi_free_device(wr);
|
||||
|
||||
wan_free(wr);
|
||||
return;
|
||||
}
|
||||
|
@ -874,21 +883,31 @@ static int wp_tdmv_bri_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
wan_spin_lock_init(&wr->lock, "wan_britdmv_lock");
|
||||
wan_spin_lock_init(&wr->tx_rx_lock, "wan_britdmv_txrx_lock");
|
||||
#ifdef DAHDI_ISSUES
|
||||
wr->span.manufacturer = "Sangoma Technologies";
|
||||
switch(card->adptr_type)
|
||||
{
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
strncpy(wr->span.devicetype, "B700", sizeof(wr->span.devicetype) );
|
||||
break;
|
||||
case AFT_ADPTR_ISDN:
|
||||
strncpy(wr->span.devicetype, "A500", sizeof(wr->span.devicetype) );
|
||||
break;
|
||||
default:
|
||||
strncpy(wr->span.devicetype, "Unknown", sizeof(wr->span.devicetype) );
|
||||
break;
|
||||
}
|
||||
|
||||
if (wp_dahdi_create_device(card,wr)) {
|
||||
wan_free(wr);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
snprintf(wr->span.location, sizeof(wr->span.location) -1, "SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
WP_DAHDI_SET_STR_INFO(wr,manufacturer,"Sangoma Technologies");
|
||||
|
||||
switch(card->adptr_type)
|
||||
{
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B700");
|
||||
break;
|
||||
case AFT_ADPTR_ISDN:
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "A500");
|
||||
break;
|
||||
case AFT_ADPTR_B500:
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B500");
|
||||
break;
|
||||
default:
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "UNKNOWN");
|
||||
break;
|
||||
}
|
||||
|
||||
WP_DAHDI_SET_STR_INFO(wr,location,"SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
|
||||
for (i = 0; i < sizeof(wr->chans)/sizeof(wr->chans[0]); i++) {
|
||||
wr->chans_ptrs[i] = &wr->chans[i];
|
||||
|
@ -928,6 +947,7 @@ static int wp_tdmv_bri_reg(
|
|||
wan_tdmv_t *wan_tdmv = &card->wan_tdmv;
|
||||
wp_tdmv_bri_t *wr = NULL;
|
||||
int i, channo = 0;
|
||||
int fe_line=WAN_FE_LINENO(fe);
|
||||
|
||||
BRI_FUNC();
|
||||
|
||||
|
@ -956,7 +976,15 @@ static int wp_tdmv_bri_reg(
|
|||
|
||||
/* The Zaptel Channel Number for BRI must be adjusted based on
|
||||
the module number to start from 0 */
|
||||
active_ch = active_ch>>(WAN_FE_LINENO(fe)*2);
|
||||
|
||||
/* MAX_BRI_MODULES = 12 ports. After 12 ports
|
||||
* Firmware starts using a different memory are for
|
||||
* physical timesltos, thus we start counting from 0 again */
|
||||
if (fe_line >= MAX_BRI_MODULES) {
|
||||
fe_line=fe_line-MAX_BRI_MODULES;
|
||||
}
|
||||
|
||||
active_ch = active_ch>>(fe_line*2);
|
||||
|
||||
for(i = 0; i < wr->max_timeslots; i++){
|
||||
if (wan_test_bit(i, &active_ch)){
|
||||
|
|
|
@ -604,7 +604,14 @@ static int wp_remora_chain_enable(sdla_fe_t *fe)
|
|||
|
||||
WAN_ASSERT_RC(fe->reset_fe == NULL,0);
|
||||
|
||||
if (IS_A600(fe) || IS_B601(fe)) {
|
||||
if (IS_B610(fe)) {
|
||||
for(mod_no = 0; mod_no < NUM_A600_ANALOG_FXO_PORTS; mod_no++) {
|
||||
fe->rm_param.mod[mod_no].type = MOD_TYPE_NONE;
|
||||
}
|
||||
fe->rm_param.mod[4].type = MOD_TYPE_FXS;
|
||||
return 0;
|
||||
|
||||
} else if (IS_A600(fe) || IS_B601(fe)) {
|
||||
for(mod_no = 0; mod_no < NUM_A600_ANALOG_FXO_PORTS; mod_no++) {
|
||||
fe->rm_param.mod[mod_no].type = MOD_TYPE_FXO;
|
||||
}
|
||||
|
@ -3199,6 +3206,39 @@ static void wp_remora_proslic_check_hook(sdla_fe_t *fe, int mod_no)
|
|||
#endif
|
||||
|
||||
#if defined(AFT_TDM_API_SUPPORT) || defined(AFT_API_SUPPORT)
|
||||
|
||||
#if 0
|
||||
static inline void wpapi_dtmfcheck_fakepolarity(wp_tdmv_remora_t *wr, int channo, unsigned char *rxbuf)
|
||||
{
|
||||
sdla_t *card = wr->card;
|
||||
sdla_fe_t *fe = &card->fe;
|
||||
int sample;
|
||||
int dtmf=1;
|
||||
|
||||
/* only look for sound on the line if dtmf flag is on, it is an fxo card and line is onhook */
|
||||
if (!dtmf || !(fe->rm_param.mod[channo].type == MOD_TYPE_FXO) || wr->mod[channo].fxo.offhook) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* don't look for noise if we're already processing it, or there is a ringing tone */
|
||||
if(!wr->mod[channo].fxo.readcid && !wr->mod[channo].fxo.wasringing &&
|
||||
fe->rm_param.intcount > wr->mod[channo].fxo.cidtimer + 400 ) {
|
||||
sample = ZT_XLAW((*rxbuf), (&(wr->chans[channo])));
|
||||
if (sample > 16000 || sample < -16000) {
|
||||
wr->mod[channo].fxo.readcid = 1;
|
||||
wr->mod[channo].fxo.cidtimer = fe->rm_param.intcount;
|
||||
DEBUG_TEST("DTMF CLIP on %i\n",channo+1);
|
||||
zt_qevent_lock(&wr->chans[channo], ZT_EVENT_POLARITY);
|
||||
}
|
||||
} else if(wr->mod[channo].fxo.readcid && fe->rm_param.intcount > wr->mod[channo].fxo.cidtimer + 2000) {
|
||||
/* reset flags if it's been a while */
|
||||
wr->mod[channo].fxo.cidtimer = fe->rm_param.intcount;
|
||||
wr->mod[channo].fxo.readcid = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* wp_remora_watchdog()
|
||||
*
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#if !defined (__WINDOWS__)
|
||||
# include "zapcompat.h" /* Map of Zaptel -> DAHDI definitions */
|
||||
# include "wanpipe_dahdi_abstr.h" /* Map of Zaptel -> DAHDI definitions */
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_TEST
|
||||
|
@ -855,11 +856,13 @@ static int wp_tdmv_remora_software_init(wan_tdmv_t *wan_tdmv)
|
|||
init_waitqueue_head(&wr->span.maintq);
|
||||
#endif
|
||||
#endif
|
||||
if (zt_register(&wr->span, 0)) {
|
||||
|
||||
if (wp_dahdi_register_device(wr)) {
|
||||
DEBUG_EVENT("%s: Unable to register span with zaptel\n",
|
||||
wr->devname);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (wr->span.spanno != wr->spanno +1){
|
||||
DEBUG_EVENT("\n");
|
||||
DEBUG_EVENT("WARNING: Span number %d is already used by another device!\n",
|
||||
|
@ -904,9 +907,11 @@ static void wp_tdmv_release(wp_tdmv_remora_t *wr)
|
|||
DEBUG_EVENT("%s: Unregister WAN FXS/FXO device from Zaptel!\n",
|
||||
wr->devname);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
zt_unregister(&wr->span);
|
||||
wp_dahdi_unregister_device(wr);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
}
|
||||
|
||||
wp_dahdi_free_device(wr);
|
||||
wan_free(wr);
|
||||
return;
|
||||
}
|
||||
|
@ -988,35 +993,44 @@ static int wp_tdmv_remora_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
card->wan_tdmv.sc = wr;
|
||||
wr->spanno = tdmv_conf->span_no-1;
|
||||
#ifdef DAHDI_ISSUES
|
||||
wr->span.manufacturer = "Sangoma Technologies";
|
||||
if (wp_dahdi_create_device(card,wr)) {
|
||||
wan_free(wr);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
WP_DAHDI_SET_STR_INFO(wr,manufacturer,"Sangoma Technologies");
|
||||
|
||||
switch(card->adptr_type){
|
||||
case A200_ADPTR_ANALOG:
|
||||
strncpy(wr->span.devicetype, "A200" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "A200");
|
||||
break;
|
||||
case A400_ADPTR_ANALOG:
|
||||
strncpy(wr->span.devicetype, "A400" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "A400");
|
||||
break;
|
||||
case AFT_ADPTR_B800:
|
||||
strncpy(wr->span.devicetype, "B800" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B800");
|
||||
break;
|
||||
case AFT_ADPTR_A600:
|
||||
strncpy(wr->span.devicetype, "B600" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B600");
|
||||
break;
|
||||
case AFT_ADPTR_B601:
|
||||
strncpy(wr->span.devicetype, "B601" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B601");
|
||||
break;
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
strncpy(wr->span.devicetype, "B700" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "B700");
|
||||
break;
|
||||
case U100_ADPTR:
|
||||
strncpy(wr->span.devicetype, "U100" , sizeof(wr->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "U100");
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(wr->span.location, sizeof(wr->span.location) - 1, "SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
WP_DAHDI_SET_STR_INFO(wr,location,"SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
|
||||
#ifndef DAHDI_26
|
||||
wr->span.irq = card->wandev.irq;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wr->span.irq = card->wandev.irq;
|
||||
wr->num = wp_remora_no++;
|
||||
wr->card = card;
|
||||
wr->devname = card->devname;
|
||||
|
|
|
@ -35,11 +35,13 @@
|
|||
# include "wanpipe_events.h"
|
||||
# include "if_wanpipe_common.h" /* for 'wanpipe_common_t' used in 'aft_core.h'*/
|
||||
# include "sdla_remora.h"
|
||||
# include "wanpipe_cdev_iface.h"
|
||||
|
||||
#if defined (__WINDOWS__)
|
||||
# include <wanpipe\csu_dsu.h>
|
||||
#else
|
||||
# include "zapcompat.h" /* Map of Zaptel -> DAHDI definitions */
|
||||
# include "wanpipe_dahdi_abstr.h"
|
||||
#endif
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -97,7 +99,6 @@
|
|||
extern short *__zt_mulaw;
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
static unsigned char wp_tdmv_ulaw[] = {
|
||||
0, 0, 0, 0, 0, 1, 1, 1,
|
||||
|
@ -176,6 +177,11 @@ typedef struct wp_tdmv_pvt_area
|
|||
struct dahdi_echocan_state ec[31]; /* echocan state for each channel */
|
||||
#endif
|
||||
struct zt_chan *chans_ptrs[31]; /* Channel ptrs */
|
||||
|
||||
#ifdef DAHDI_26
|
||||
struct dahdi_device *ddev;
|
||||
struct device dev;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
struct zt_chan chans[31]; /* Channels */
|
||||
|
@ -219,7 +225,7 @@ typedef struct wp_tdmv_pvt_area
|
|||
|
||||
unsigned long ec_fax_detect_timeout[31+1];
|
||||
unsigned int ec_off_on_fax;
|
||||
|
||||
|
||||
} wp_tdmv_softc_t;
|
||||
|
||||
|
||||
|
@ -420,6 +426,7 @@ static int wp_tdmv_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
sdla_t *card = (sdla_t*)pcard;
|
||||
wp_tdmv_softc_t *wp = NULL;
|
||||
wan_tdmv_t *tmp = NULL;
|
||||
int err=0;
|
||||
|
||||
#ifdef DAHDI_ISSUES
|
||||
int i;
|
||||
|
@ -428,6 +435,7 @@ static int wp_tdmv_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
WAN_ASSERT(card == NULL);
|
||||
WAN_ASSERT(tdmv_conf->span_no == 0);
|
||||
memset(&card->wan_tdmv, 0x0, sizeof(wan_tdmv_t));
|
||||
|
||||
/* We are forcing to register wanpipe devices at the same sequence
|
||||
* that it defines in /etc/zaptel.conf */
|
||||
WAN_LIST_FOREACH(tmp, &wan_tdmv_head, next){
|
||||
|
@ -453,37 +461,47 @@ static int wp_tdmv_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
memset(wp, 0x0, sizeof(wp_tdmv_softc_t));
|
||||
card->wan_tdmv.sc = wp;
|
||||
wp->spanno = tdmv_conf->span_no-1;
|
||||
|
||||
|
||||
#ifdef DAHDI_ISSUES
|
||||
wp->span.manufacturer = "Sangoma Technologies";
|
||||
err=wp_dahdi_create_device(card,wp);
|
||||
if (err) {
|
||||
wan_free(wp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
WP_DAHDI_SET_STR_INFO(wp,manufacturer,"Sangoma Technologies");
|
||||
|
||||
switch(card->adptr_type){
|
||||
case A101_ADPTR_1TE1:
|
||||
strncpy(wp->span.devicetype, "A102" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A101");
|
||||
break;
|
||||
case A101_ADPTR_2TE1:
|
||||
strncpy(wp->span.devicetype, "A102" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A102");
|
||||
break;
|
||||
case A200_ADPTR_ANALOG:
|
||||
strncpy(wp->span.devicetype, "A200" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A200");
|
||||
break;
|
||||
case A400_ADPTR_ANALOG:
|
||||
strncpy(wp->span.devicetype, "A400" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A400");
|
||||
break;
|
||||
case A104_ADPTR_4TE1:
|
||||
strncpy(wp->span.devicetype, "A104" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A104");
|
||||
break;
|
||||
case A108_ADPTR_8TE1:
|
||||
strncpy(wp->span.devicetype, "A108" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "A108");
|
||||
break;
|
||||
case AFT_ADPTR_B601:
|
||||
strncpy(wp->span.devicetype, "B601" , sizeof(wp->span.devicetype));
|
||||
WP_DAHDI_SET_STR_INFO(wp,devicetype, "B601");
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(wp->span.location, sizeof(wp->span.location) - 1, "SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
WP_DAHDI_SET_STR_INFO(wp,location,"SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
#endif
|
||||
|
||||
wp->span.irq = card->wandev.irq;
|
||||
#ifndef DAHDI_26
|
||||
wp->span.irq = card->wandev.irq;
|
||||
#endif
|
||||
wp->num = wp_card_no++;
|
||||
wp->card = card;
|
||||
wp->devname = card->devname;
|
||||
|
@ -720,8 +738,8 @@ static int wp_tdmv_remove(void* pcard)
|
|||
wan_clear_bit(WP_TDMV_RUNNING, &wp->flags);
|
||||
wan_clear_bit(WP_TDMV_UP, &wp->flags);
|
||||
wan_tdmv->sc = NULL;
|
||||
wp_tdmv_sigctrl(card, wp, 0, WP_TDMV_DISABLE);
|
||||
WAN_LIST_REMOVE(wan_tdmv, next);
|
||||
wp_tdmv_sigctrl(card, wp, 0, WP_TDMV_DISABLE);
|
||||
wp_tdmv_release(wp);
|
||||
}else{
|
||||
wan_tdmv->sc = NULL;
|
||||
|
@ -1305,8 +1323,8 @@ static int wp_tdmv_software_init(wan_tdmv_t *wan_tdmv)
|
|||
wp->chans[x].rxsig = 0x00;
|
||||
}
|
||||
|
||||
if (zt_register(&wp->span, 0)) {
|
||||
DEBUG_EVENT("%s: Unable to register span with zaptel\n",
|
||||
if (wp_dahdi_register_device(wp)) {
|
||||
DEBUG_EVENT("%s: Unable to register span with DAHDI\n",
|
||||
wp->devname);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -2477,16 +2495,27 @@ static int wp_tdmv_close(struct zt_chan *chan)
|
|||
*/
|
||||
static void wp_tdmv_release(wp_tdmv_softc_t *wp)
|
||||
{
|
||||
sdla_t *card;
|
||||
|
||||
WAN_ASSERT1(wp == NULL);
|
||||
WAN_ASSERT1(wp->card == NULL);
|
||||
|
||||
card=wp->card;
|
||||
|
||||
if (wan_test_bit(WP_TDMV_REGISTER, &wp->flags)){
|
||||
DEBUG_EVENT("%s: Unregister Wanpipe device from Zaptel!\n",
|
||||
wp->devname);
|
||||
wan_clear_bit(WP_TDMV_SIG_POLL, &wp->flags);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wp->flags);
|
||||
zt_unregister(&wp->span);
|
||||
|
||||
wp_dahdi_unregister_device(wp);
|
||||
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wp->flags);
|
||||
wan_skb_queue_purge(&wp->rbs_tx_q);
|
||||
}
|
||||
|
||||
wp_dahdi_free_device(wp);
|
||||
|
||||
wan_free(wp);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,11 +102,15 @@ void* sdla_tdmv_dummy_register(void)
|
|||
wpd->chan.pvt = wpd;
|
||||
#endif
|
||||
|
||||
#if defined(DAHDI_26)
|
||||
return NULL;
|
||||
#else
|
||||
if (zt_register(&wpd->span, 0)) {
|
||||
DEBUG_EVENT( "Failed to register Zaptel span (%s)!\n",__FUNCTION__);
|
||||
wan_free(wpd);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return wpd;
|
||||
}
|
||||
|
@ -120,7 +124,9 @@ int sdla_tdmv_dummy_unregister(void *wpd_ptr)
|
|||
|
||||
wpd=(sdla_tdmv_dummy_t *)wpd_ptr;
|
||||
|
||||
#if !defined(DAHDI_26)
|
||||
zt_unregister(&wpd->span);
|
||||
#endif
|
||||
wan_free(wpd);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
# include <wanpipe\csu_dsu.h>
|
||||
#else
|
||||
# include "zapcompat.h" /* Map of Zaptel -> DAHDI definitions */
|
||||
# include "wanpipe_dahdi_abstr.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -137,6 +138,11 @@ typedef struct wp_usb_tdmv_remora_ {
|
|||
struct dahdi_echocan_state ec[MAX_REMORA_MODULES]; /* echocan state for each channel */
|
||||
#endif
|
||||
struct zt_chan *chans_ptrs[MAX_REMORA_MODULES];
|
||||
#ifdef DAHDI_26
|
||||
struct dahdi_device *ddev;
|
||||
struct device dev;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
struct zt_chan chans[MAX_USB_REMORA_MODULES];
|
||||
unsigned long reg_module_map; /* Registered modules */
|
||||
|
@ -1308,11 +1314,14 @@ static int wp_usb_tdmv_remora_software_init(wan_tdmv_t *wan_tdmv)
|
|||
init_waitqueue_head(&wr->span.maintq);
|
||||
#endif
|
||||
#endif
|
||||
if (zt_register(&wr->span, 0)) {
|
||||
|
||||
|
||||
if (wp_dahdi_register_device(wr)) {
|
||||
DEBUG_EVENT("%s: Unable to register span with zaptel\n",
|
||||
wr->devname);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (wr->span.spanno != wr->spanno +1){
|
||||
DEBUG_EVENT("\n");
|
||||
DEBUG_EVENT("WARNING: Span number %d is already used by another device!\n",
|
||||
|
@ -1355,9 +1364,10 @@ static void wp_usb_tdmv_release(wp_usb_tdmv_remora_t *wr)
|
|||
DEBUG_EVENT("%s: Unregister WAN FXS/FXO device from Zaptel!\n",
|
||||
wr->devname);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
zt_unregister(&wr->span);
|
||||
wp_dahdi_unregister_device(wr);
|
||||
wan_clear_bit(WP_TDMV_REGISTER, &wr->flags);
|
||||
}
|
||||
wp_dahdi_free_device(wr);
|
||||
wan_free(wr);
|
||||
return;
|
||||
}
|
||||
|
@ -1445,6 +1455,16 @@ static int wp_usb_tdmv_remora_create(void* pcard, wan_tdmv_conf_t *tdmv_conf)
|
|||
wr->max_rxtx_len = 0;
|
||||
wan_spin_lock_irq_init(&wr->lockirq, "wan_rmtdmv_lock");
|
||||
wan_spin_lock_irq_init(&wr->tx_rx_lockirq, "wan_rmtdmv_txrx_lock");
|
||||
|
||||
if (wp_dahdi_create_device(card,wr)) {
|
||||
wan_free(wr);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
WP_DAHDI_SET_STR_INFO(wr,manufacturer,"Sangoma Technologies");
|
||||
WP_DAHDI_SET_STR_INFO(wr,devicetype, "U100");
|
||||
WP_DAHDI_SET_STR_INFO(wr,location,"SLOT=%d, BUS=%d", card->wandev.S514_slot_no, card->wandev.S514_bus_no);
|
||||
|
||||
#ifdef DAHDI_ISSUES
|
||||
for (i = 0; i < sizeof(wr->chans)/sizeof(wr->chans[0]); i++) {
|
||||
wr->chans_ptrs[i] = &wr->chans[i];
|
||||
|
|
|
@ -1016,6 +1016,7 @@ sdla_save_hw_probe (sdlahw_t* hw, int port)
|
|||
port=hw->line_no;
|
||||
break;
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -1094,6 +1095,7 @@ sdla_save_hw_probe (sdlahw_t* hw, int port)
|
|||
}
|
||||
break;
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
SDLA_PROBE_SPRINT(hwprobe->hw_info,
|
||||
sizeof(hwprobe->hw_info),
|
||||
SDLA_HWPROBE_A500_SH_FORMAT,
|
||||
|
@ -1394,6 +1396,7 @@ sdla_hwdev_a600_register(sdlahw_cpu_t* hwcpu, int *line_num)
|
|||
|
||||
sdlahw_t *hw;
|
||||
sdlahw_t *first_hw = NULL;
|
||||
sdlahw_card_t *hwcard;
|
||||
u32 reg;
|
||||
int mod_no;
|
||||
//int off = 0;
|
||||
|
@ -1401,6 +1404,8 @@ sdla_hwdev_a600_register(sdlahw_cpu_t* hwcpu, int *line_num)
|
|||
u32 serial_num_lo;
|
||||
u32 serial_num_hi;
|
||||
int err;
|
||||
|
||||
hwcard=hwcpu->hwcard;
|
||||
|
||||
WAN_ASSERT_RC(hwcpu == NULL, NULL);
|
||||
*line_num = 0;
|
||||
|
@ -1452,12 +1457,21 @@ sdla_hwdev_a600_register(sdlahw_cpu_t* hwcpu, int *line_num)
|
|||
for(mod_no = 0; mod_no < NUM_A600_ANALOG_PORTS; mod_no++){
|
||||
rm_mod_type[mod_no] = MOD_TYPE_NONE;
|
||||
}
|
||||
|
||||
if (hwcard->adptr_type == AFT_ADPTR_B610) {
|
||||
rm_mod_type [0] = MOD_TYPE_NONE;
|
||||
rm_mod_type [1] = MOD_TYPE_NONE;
|
||||
rm_mod_type [2] = MOD_TYPE_NONE;
|
||||
rm_mod_type [3] = MOD_TYPE_NONE;
|
||||
rm_mod_type [4] = MOD_TYPE_FXS;
|
||||
} else {
|
||||
rm_mod_type [0] = MOD_TYPE_FXO;
|
||||
rm_mod_type [1] = MOD_TYPE_FXO;
|
||||
rm_mod_type [2] = MOD_TYPE_FXO;
|
||||
rm_mod_type [3] = MOD_TYPE_FXO;
|
||||
rm_mod_type [4] = MOD_TYPE_FXS;
|
||||
}
|
||||
|
||||
rm_mod_type [0] = MOD_TYPE_FXO;
|
||||
rm_mod_type [1] = MOD_TYPE_FXO;
|
||||
rm_mod_type [2] = MOD_TYPE_FXO;
|
||||
rm_mod_type [3] = MOD_TYPE_FXO;
|
||||
rm_mod_type [4] = MOD_TYPE_FXS;
|
||||
|
||||
err = sdla_hwdev_register_analog(hwcpu, &first_hw, rm_mod_type, 0, NUM_A600_ANALOG_PORTS);
|
||||
if (err) {
|
||||
|
@ -1754,6 +1768,11 @@ sdla_hwdev_ISDN_register(sdlahw_cpu_t* hwcpu, int *lines_no)
|
|||
max_bri_modules_per_remora = 6;
|
||||
max_analog_modules_per_remora = 0;
|
||||
break;
|
||||
case AFT_ADPTR_B500:
|
||||
max_num_remoras = MAX_BRI_REMORAS;
|
||||
max_bri_modules_per_remora = 4;
|
||||
max_analog_modules_per_remora = 0;
|
||||
break;
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
max_num_remoras = 1;
|
||||
max_bri_modules_per_remora = 4;
|
||||
|
@ -1851,7 +1870,10 @@ sdla_hwdev_ISDN_register(sdlahw_cpu_t* hwcpu, int *lines_no)
|
|||
sdla_bus_write_4(hw,0x40,reg);
|
||||
|
||||
sdla_memory_unmap(hw);
|
||||
*lines_no = (hwcpu->lines_info[AFT_ADPTR_ISDN].total_line_no + hwcpu->lines_info[A200_ADPTR_ANALOG].total_line_no);
|
||||
*lines_no = (hwcpu->lines_info[AFT_ADPTR_ISDN].total_line_no +
|
||||
hwcpu->lines_info[AFT_ADPTR_B500].total_line_no +
|
||||
hwcpu->lines_info[AFT_ADPTR_FLEXBRI].total_line_no +
|
||||
hwcpu->lines_info[A200_ADPTR_ANALOG].total_line_no);
|
||||
return first_hw;
|
||||
}
|
||||
|
||||
|
@ -1958,6 +1980,7 @@ static int sdla_scan_bri_modules(sdlahw_t* hw, int *rm_mod_type, u_int8_t rm_no
|
|||
/* On A700, this bit is set when an analog module is inserted in BRI slot */
|
||||
switch(hw->hwcpu->hwcard->adptr_type) {
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
if((value >> 6) == 0x2){
|
||||
DEBUG_EVENT("%s: Remora number %d: Found 512khz Recovery clock remora.\n", hw->devname, rm_no);
|
||||
hw->hwcpu->hwcard->cpld_rev=1;
|
||||
|
@ -2259,6 +2282,7 @@ int sdla_get_hw_info(sdlahw_t* hw)
|
|||
sdla_bus_write_4(hw, SDLA_REG_OFF(hwcard, AFT_CHIP_CFG_REG), reg1);
|
||||
break;
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -2310,6 +2334,7 @@ int sdla_get_hw_info(sdlahw_t* hw)
|
|||
sdla_bus_write_4(hw, SDLA_REG_OFF(hwcard, AFT_CHIP_CFG_REG), reg1);
|
||||
break;
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
AFT_FUNC_DEBUG();
|
||||
/* Enable memory access */
|
||||
|
@ -2829,9 +2854,15 @@ static int sdla_aft_hw_select (sdlahw_card_t* hwcard, int cpu_no, int irq, void*
|
|||
hwcard->u_pci.bus_no, hwcard->u_pci.slot_no, irq);
|
||||
break;
|
||||
#endif
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_ISDN:
|
||||
hwcard->cfg_type = WANOPT_AFT_ISDN;
|
||||
sdla_adapter_cnt.aft_isdn_adapters++;
|
||||
|
||||
if (hwcard->adptr_type == AFT_ADPTR_ISDN) {
|
||||
sdla_adapter_cnt.aft_isdn_adapters++;
|
||||
} else {
|
||||
sdla_adapter_cnt.aft_b500_adapters++;
|
||||
}
|
||||
if ((hwcpu = sdla_hwcpu_register(hwcard, cpu_no, irq, dev)) == NULL){
|
||||
return 0;
|
||||
}
|
||||
|
@ -2948,6 +2979,29 @@ static int sdla_aft_hw_select (sdlahw_card_t* hwcard, int cpu_no, int irq, void*
|
|||
hwcard->core_rev,
|
||||
hwcard->u_pci.bus_no, hwcard->u_pci.slot_no, irq);
|
||||
break;
|
||||
case AFT_ADPTR_B610:
|
||||
hwcard->cfg_type = WANOPT_AFT_ANALOG;
|
||||
sdla_adapter_cnt.aft_b610_adapters++;
|
||||
|
||||
if ((hwcpu = sdla_hwcpu_register(hwcard, cpu_no, irq, dev)) == NULL){
|
||||
return 0;
|
||||
}
|
||||
/* FIXME: Temporary number of ports is 1 */
|
||||
lines_no = 1;
|
||||
if ((hw = sdla_hwdev_a600_register(hwcpu, &lines_no)) == NULL){
|
||||
sdla_hwcpu_unregister(hwcpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
number_of_cards++;
|
||||
DEBUG_EVENT("%s: %s %s FXS card found (%s rev.%X), cpu(s) 1, bus #%d, slot #%d, irq #%d\n",
|
||||
wan_drvname,
|
||||
hwcard->adptr_name,
|
||||
AFT_PCITYPE_DECODE(hwcard),
|
||||
AFT_CORE_ID_DECODE(hwcard->core_id),
|
||||
hwcard->core_rev,
|
||||
hwcard->u_pci.bus_no, hwcard->u_pci.slot_no, irq);
|
||||
break;
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
hwcard->cfg_type = WANOPT_AFT_ANALOG;
|
||||
|
@ -3237,6 +3291,10 @@ sdla_pci_probe_aft(sdlahw_t *hw, int bus_no, int slot_no, int irq)
|
|||
hwcard->adptr_type = AFT_ADPTR_ISDN;
|
||||
hwcard->adptr_subtype = AFT_SUBTYPE_SHARK;
|
||||
break;
|
||||
case B500_SHARK_SUBSYS_VENDOR:
|
||||
hwcard->adptr_type = AFT_ADPTR_B500;
|
||||
hwcard->adptr_subtype = AFT_SUBTYPE_SHARK;
|
||||
break;
|
||||
case AFT_56K_SHARK_SUBSYS_VENDOR:
|
||||
hwcard->adptr_type = AFT_ADPTR_56K;
|
||||
hwcard->adptr_subtype = AFT_SUBTYPE_SHARK;
|
||||
|
@ -3261,6 +3319,10 @@ sdla_pci_probe_aft(sdlahw_t *hw, int bus_no, int slot_no, int irq)
|
|||
hwcard->adptr_type = AFT_ADPTR_A600;
|
||||
hwcard->adptr_subtype = AFT_SUBTYPE_SHARK;
|
||||
break;
|
||||
case AFT_B610_SUBSYS_VENDOR:
|
||||
hwcard->adptr_type = AFT_ADPTR_B610;
|
||||
hwcard->adptr_subtype = AFT_SUBTYPE_SHARK;
|
||||
break;
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B800)
|
||||
case AFT_B800_SUBSYS_VENDOR:
|
||||
hwcard->adptr_type = AFT_ADPTR_B800;
|
||||
|
@ -3291,6 +3353,7 @@ sdla_pci_probe_aft(sdlahw_t *hw, int bus_no, int slot_no, int irq)
|
|||
case AFT_4TE1_SHARK_SUBSYS_VENDOR:
|
||||
case AFT_8TE1_SHARK_SUBSYS_VENDOR:
|
||||
case AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR:
|
||||
case B500_SHARK_SUBSYS_VENDOR:
|
||||
case AFT_56K_SHARK_SUBSYS_VENDOR:
|
||||
case AFT_2SERIAL_V35X21_SUBSYS_VENDOR:
|
||||
case AFT_4SERIAL_V35X21_SUBSYS_VENDOR:
|
||||
|
@ -3298,6 +3361,7 @@ sdla_pci_probe_aft(sdlahw_t *hw, int bus_no, int slot_no, int irq)
|
|||
case AFT_4SERIAL_RS232_SUBSYS_VENDOR:
|
||||
case AFT_A600_SUBSYS_VENDOR:
|
||||
case AFT_B601_SUBSYS_VENDOR:
|
||||
case AFT_B610_SUBSYS_VENDOR:
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B800)
|
||||
case AFT_B800_SUBSYS_VENDOR:
|
||||
#endif
|
||||
|
@ -4907,6 +4971,7 @@ void* sdla_register(sdlahw_iface_t* hw_iface, wandev_conf_t* conf, char* devname
|
|||
break;
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_BRI)
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
hw_iface->fe_read = sdla_shark_bri_read_fe;
|
||||
hw_iface->fe_write = sdla_shark_bri_write_fe;
|
||||
break;
|
||||
|
@ -4932,6 +4997,7 @@ void* sdla_register(sdlahw_iface_t* hw_iface, wandev_conf_t* conf, char* devname
|
|||
hw_iface->fe_write = sdla_shark_serial_write_fe;
|
||||
break;
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
hw_iface->fe_read = sdla_a600_read_fe;
|
||||
hw_iface->__fe_read = __sdla_a600_read_fe;
|
||||
hw_iface->fe_write = sdla_a600_write_fe;
|
||||
|
@ -4962,6 +5028,7 @@ void* sdla_register(sdlahw_iface_t* hw_iface, wandev_conf_t* conf, char* devname
|
|||
case A200_ADPTR_ANALOG:
|
||||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
case AFT_ADPTR_56K:
|
||||
case AFT_ADPTR_2SERIAL_V35X21:
|
||||
|
@ -4969,6 +5036,7 @@ void* sdla_register(sdlahw_iface_t* hw_iface, wandev_conf_t* conf, char* devname
|
|||
case AFT_ADPTR_2SERIAL_RS232:
|
||||
case AFT_ADPTR_4SERIAL_RS232:
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -5049,6 +5117,7 @@ void* sdla_register(sdlahw_iface_t* hw_iface, wandev_conf_t* conf, char* devname
|
|||
|
||||
/* ISDN-BRI logial used cnt */
|
||||
if (hwcard->adptr_type == AFT_ADPTR_ISDN ||
|
||||
hwcard->adptr_type == AFT_ADPTR_B500 ||
|
||||
hwcard->adptr_type == AFT_ADPTR_FLEXBRI){
|
||||
int port;
|
||||
/* Add special code for BRI */
|
||||
|
@ -5086,6 +5155,7 @@ int sdla_unregister(void** p_hw, char* devname)
|
|||
|
||||
/* ISDN-BRI logial used cnt */
|
||||
if (hwcpu->hwcard->adptr_type == AFT_ADPTR_ISDN ||
|
||||
hwcpu->hwcard->adptr_type == AFT_ADPTR_B500 ||
|
||||
hwcpu->hwcard->adptr_type == AFT_ADPTR_FLEXBRI) {
|
||||
|
||||
int port;
|
||||
|
@ -5453,6 +5523,7 @@ static int sdla_setup (void* phw, wandev_conf_t* conf)
|
|||
case A200_ADPTR_ANALOG:
|
||||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
case AFT_ADPTR_56K:
|
||||
case AFT_ADPTR_2SERIAL_V35X21:
|
||||
|
@ -5460,6 +5531,7 @@ static int sdla_setup (void* phw, wandev_conf_t* conf)
|
|||
case AFT_ADPTR_2SERIAL_RS232:
|
||||
case AFT_ADPTR_4SERIAL_RS232:
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -6149,6 +6221,7 @@ static int sdla_down (void* phw)
|
|||
case A200_ADPTR_ANALOG:
|
||||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
case AFT_ADPTR_56K:
|
||||
case AFT_ADPTR_2SERIAL_V35X21:
|
||||
|
@ -6156,6 +6229,7 @@ static int sdla_down (void* phw)
|
|||
case AFT_ADPTR_2SERIAL_RS232:
|
||||
case AFT_ADPTR_4SERIAL_RS232:
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -7962,7 +8036,9 @@ static int sdla_memory_map(sdlahw_t* hw)
|
|||
case A200_ADPTR_ANALOG:
|
||||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_B601)
|
||||
case AFT_ADPTR_B601:
|
||||
#endif
|
||||
|
@ -8245,6 +8321,8 @@ static int sdla_cmp_adapter_auto(sdlahw_t *hw, wandev_conf_t* conf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Allow old A102 config for A102 SHARK */
|
||||
if (hwcpu->cpu_no == cpu_no &&
|
||||
conf->card_type == WANOPT_AFT &&
|
||||
|
@ -8252,14 +8330,20 @@ static int sdla_cmp_adapter_auto(sdlahw_t *hw, wandev_conf_t* conf)
|
|||
/* Remap the card type to standard
|
||||
A104 Shark style. We are allowing
|
||||
and old config file for A101/2-SH */
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
if (cpu_no == SDLA_CPU_A) {
|
||||
conf->fe_cfg.line_no=1;
|
||||
} else {
|
||||
conf->fe_cfg.line_no=2;
|
||||
/* In A102 case we will have two hw devices one for port1 other for port2
|
||||
so if the hw device is already taken then look for the next one */
|
||||
if (hw->hwport[0].used == 0) {
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
if (cpu_no == SDLA_CPU_A) {
|
||||
conf->fe_cfg.line_no=1;
|
||||
} else {
|
||||
conf->fe_cfg.line_no=2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
/* Continue to next card */
|
||||
}
|
||||
|
||||
if (conf->config_id == WANCONFIG_AFT_TE1){
|
||||
|
@ -8304,7 +8388,7 @@ sdlahw_t* sdla_find_adapter(wandev_conf_t* conf, char* devname)
|
|||
}else if (conf && conf->S514_CPU_no[0] == 'A'){
|
||||
cpu_no = SDLA_CPU_A;
|
||||
}
|
||||
|
||||
|
||||
DBG_SDLADRV_HW_IFACE("%s(): devname: %s, conf->card_type: 0x%X (%s), conf->fe_cfg.line_no: %d\n",
|
||||
__FUNCTION__, devname, conf->card_type, CARD_WANOPT_DECODE(conf->card_type),
|
||||
conf->fe_cfg.line_no);
|
||||
|
@ -8400,10 +8484,16 @@ sdlahw_t* sdla_find_adapter(wandev_conf_t* conf, char* devname)
|
|||
/* Remap the card type to standard
|
||||
A104 Shark style. We are allowing
|
||||
and old config file for A101/2-SH */
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
conf->fe_cfg.line_no=1;
|
||||
goto adapter_found;
|
||||
|
||||
/* In A101 case we will have one hw devices for port1 this check
|
||||
is just a sanity check */
|
||||
|
||||
if (hw->hwport[0].used == 0) {
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
conf->fe_cfg.line_no=1;
|
||||
goto adapter_found;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allow old A102 config for A102 SHARK */
|
||||
|
@ -8414,14 +8504,19 @@ sdlahw_t* sdla_find_adapter(wandev_conf_t* conf, char* devname)
|
|||
/* Remap the card type to standard
|
||||
A104 Shark style. We are allowing
|
||||
and old config file for A101/2-SH */
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
if (cpu_no == SDLA_CPU_A) {
|
||||
conf->fe_cfg.line_no=1;
|
||||
} else {
|
||||
conf->fe_cfg.line_no=2;
|
||||
|
||||
/* In A102 case we will have two hw devices one for port1 other for port2
|
||||
so if the hw device is already taken then look for the next one */
|
||||
if (hw->hwport[0].used == 0) {
|
||||
conf->config_id = WANCONFIG_AFT_TE1;
|
||||
conf->card_type = WANOPT_AFT104;
|
||||
if (cpu_no == SDLA_CPU_A) {
|
||||
conf->fe_cfg.line_no=1;
|
||||
} else {
|
||||
conf->fe_cfg.line_no=2;
|
||||
}
|
||||
goto adapter_found;
|
||||
}
|
||||
goto adapter_found;
|
||||
}
|
||||
|
||||
if (conf->card_type == WANOPT_S51X &&
|
||||
|
@ -8493,6 +8588,7 @@ adapter_found:
|
|||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_56K:
|
||||
case AFT_ADPTR_A600:
|
||||
case AFT_ADPTR_B610:
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B800)
|
||||
case AFT_ADPTR_B800:
|
||||
#endif
|
||||
|
@ -8513,6 +8609,7 @@ adapter_found:
|
|||
|
||||
#if defined(CONFIG_PRODUCT_WANPIPE_AFT_BRI)
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
if (conf->fe_cfg.line_no < 1 || conf->fe_cfg.line_no > MAX_BRI_LINES){
|
||||
DEBUG_ERROR("%s: Error, Invalid ISDN port selected %d (Min=1 Max=%d)\n",
|
||||
devname, conf->fe_cfg.line_no, MAX_BRI_LINES);
|
||||
|
@ -9196,6 +9293,9 @@ static int sdla_getcfg(void* phw, int type, void* value)
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
case SDLA_PCI_DEV:
|
||||
*(sdla_pci_dev_t*)value=hwcard->u_pci.pci_dev;
|
||||
break;
|
||||
case SDLA_PCIEXTRAVER:
|
||||
*(u8*)value = hwcard->pci_extra_ver;
|
||||
break;
|
||||
|
@ -10900,6 +11000,7 @@ static int sdla_hw_read_cpld(void *phw, u16 off, u8 *data)
|
|||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B800)
|
||||
case AFT_ADPTR_B800:
|
||||
#endif
|
||||
|
@ -11066,6 +11167,7 @@ static int sdla_hw_write_cpld(void *phw, u16 off, u8 data)
|
|||
case A400_ADPTR_ANALOG:
|
||||
case AFT_ADPTR_FLEXBRI:
|
||||
case AFT_ADPTR_ISDN:
|
||||
case AFT_ADPTR_B500:
|
||||
#if defined (CONFIG_PRODUCT_WANPIPE_AFT_B800)
|
||||
case AFT_ADPTR_B800:
|
||||
#endif
|
||||
|
@ -11400,13 +11502,13 @@ int sdla_hwdev_register_bri(sdlahw_cpu_t *hwcpu, sdlahw_t **first_hw_p, int *rm_
|
|||
|
||||
memcpy(&hw->hwport[hw->max_port_no-1].hwprobe->hw_info_verbose[0],
|
||||
str, strlen(str));
|
||||
hw->adptr_type = AFT_ADPTR_ISDN;
|
||||
hw->adptr_type = hwcpu->hwcard->adptr_type;
|
||||
hw->chans_map = 0x03; /* 2 BRI bchans */
|
||||
hw->max_chans_num = 2;
|
||||
hw->bri_modtype = rm_mod_type_bri[mod_no];
|
||||
hwcpu->lines_info[AFT_ADPTR_ISDN].total_line_no++;
|
||||
hwcpu->lines_info[hwcpu->hwcard->adptr_type].total_line_no++;
|
||||
}
|
||||
hwcpu->lines_info[AFT_ADPTR_ISDN].line_map = line_map;
|
||||
hwcpu->lines_info[hwcpu->hwcard->adptr_type].line_map = line_map;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -991,6 +991,10 @@ static int setup (wan_device_t* wandev, wandev_conf_t* conf)
|
|||
DEBUG_EVENT("%s: Starting AFT B601 Hardware Init.\n",
|
||||
card->devname);
|
||||
err = wp_aft_a600_init(card,conf);
|
||||
} else if (card->adptr_type == AFT_ADPTR_B610) {
|
||||
DEBUG_EVENT("%s: Starting AFT B610 Hardware Init.\n",
|
||||
card->devname);
|
||||
err = wp_aft_a600_init(card,conf);
|
||||
} else {
|
||||
DEBUG_EVENT("%s: Starting AFT Analog Hardware Init.\n",
|
||||
card->devname);
|
||||
|
|
|
@ -151,6 +151,16 @@ static struct cdev wp_cdev_dev = {
|
|||
static wanpipe_cdev_device_t wandev;
|
||||
|
||||
|
||||
static struct device_attribute wanpipe_device_attrs[] = {
|
||||
__ATTR_NULL,
|
||||
};
|
||||
|
||||
static struct bus_type wanpipe_device_bus = {
|
||||
.name = "wanpipe_devices",
|
||||
.dev_attrs = wanpipe_device_attrs,
|
||||
};
|
||||
|
||||
|
||||
/*=========================================================
|
||||
* PUBLIC FUNCTIONS
|
||||
*========================================================*/
|
||||
|
@ -195,6 +205,12 @@ int wanpipe_global_cdev_init(void)
|
|||
unregister_chrdev_region(dev, WP_CDEV_MAX_MINORS);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = bus_register(&wanpipe_device_bus);
|
||||
if (err) {
|
||||
DEBUG_ERROR("%s(): Error registering bus!\n",__FUNCTION__);
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(&wandev,0,sizeof(wanpipe_cdev_device_t));
|
||||
|
@ -227,6 +243,8 @@ int wanpipe_global_cdev_free(void)
|
|||
#else
|
||||
cdev_del(&wp_cdev_dev);
|
||||
unregister_chrdev_region(MKDEV(WP_CDEV_MAJOR, 0), WP_CDEV_MAX_MINORS);
|
||||
|
||||
bus_unregister(&wanpipe_device_bus);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -898,6 +916,24 @@ static int wan_memcpy_toiovec(wan_iovec_t *iov, unsigned char *kdata, int len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int wanpipe_sys_dev_add(struct device *dev, struct device *parent, char *name)
|
||||
{
|
||||
device_initialize(dev);
|
||||
dev->parent = parent;
|
||||
dev->bus = &wanpipe_device_bus;
|
||||
wp_dev_set_name(dev,"%s",name);
|
||||
return device_add(dev);
|
||||
}
|
||||
|
||||
void wanpipe_sys_dev_del(struct device *dev)
|
||||
{
|
||||
device_del(dev);
|
||||
}
|
||||
|
||||
|
||||
EXPORT_SYMBOL(wanpipe_sys_dev_add);
|
||||
EXPORT_SYMBOL(wanpipe_sys_dev_del);
|
||||
|
||||
EXPORT_SYMBOL(wanpipe_global_cdev_init);
|
||||
EXPORT_SYMBOL(wanpipe_global_cdev_free);
|
||||
|
||||
|
|
|
@ -617,9 +617,24 @@ static void wp_logger_vInput(u_int32_t logger_type, u_int32_t evt_type, const ch
|
|||
vOutputLogString(fmt, *va_arg_list);
|
||||
#else
|
||||
{
|
||||
char msg[WP_MAX_NO_BYTES_IN_LOGGER_EVENT];
|
||||
wp_vsnprintf(msg, sizeof(msg) - 1,(const char *)fmt, *va_arg_list);
|
||||
printk(KERN_INFO "%s", msg);
|
||||
char msg[WP_MAX_NO_BYTES_IN_LOGGER_EVENT];
|
||||
wp_vsnprintf(msg, sizeof(msg) - 1,(const char *)fmt, *va_arg_list);
|
||||
switch (evt_type) {
|
||||
case SANG_LOGGER_ERROR:
|
||||
printk(KERN_ERR "%s", msg);
|
||||
break;
|
||||
case SANG_LOGGER_WARNING:
|
||||
printk(KERN_WARNING "%s", msg);
|
||||
break;
|
||||
case SANG_LOGGER_INFORMATION:
|
||||
default:
|
||||
#ifdef WAN_DEBUG_EVENT_AS_KERN_DEBUG
|
||||
printk(KERN_DEBUG "%s", msg);
|
||||
#else
|
||||
printk(KERN_INFO "%s", msg);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -849,6 +849,9 @@ static int probe_get_info(char* buf, char** start, off_t offs, int len, int dumm
|
|||
if (hw_cnt->aft_isdn_adapters){
|
||||
PROC_ADD_LINE(m, "A500=%d ", hw_cnt->aft_isdn_adapters);
|
||||
}
|
||||
if (hw_cnt->aft_b500_adapters){
|
||||
PROC_ADD_LINE(m, "B500=%d ", hw_cnt->aft_b500_adapters);
|
||||
}
|
||||
if (hw_cnt->aft_a700_adapters){
|
||||
PROC_ADD_LINE(m, "B700=%d ", hw_cnt->aft_a700_adapters);
|
||||
}
|
||||
|
@ -867,6 +870,9 @@ static int probe_get_info(char* buf, char** start, off_t offs, int len, int dumm
|
|||
if (hw_cnt->aft_b601_adapters){
|
||||
PROC_ADD_LINE(m, "B601=%d ", hw_cnt->aft_b601_adapters);
|
||||
}
|
||||
if (hw_cnt->aft_b610_adapters){
|
||||
PROC_ADD_LINE(m, "B610=%d ", hw_cnt->aft_b610_adapters);
|
||||
}
|
||||
if (hw_cnt->aft_b800_adapters){
|
||||
PROC_ADD_LINE(m, "B800=%d ", hw_cnt->aft_b800_adapters);
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
REL_SOFTWARE="OCT612x-01.04.01"
|
||||
REL_FIRMWARE="OCT6116FW-01.06.02"
|
||||
REL_FIRMWARE="OCT6116FW-01.07.04"
|
||||
IMG="OCT6126-128S.ima"
|
||||
|
||||
rm -f oct6100_api
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%define WANPIPE_VER wanpipe-modules
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.5.24
|
||||
%define version 3.5.25
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define MODULES_DIR /lib/modules
|
||||
|
@ -59,6 +59,25 @@ fi
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Feb 21 2012 Nenad Corbic <ncorbic@sangoma.com> - 3.5.25
|
||||
==================================================================
|
||||
|
||||
- Dahdi 2.6 support
|
||||
- Linux 3.2.6 support
|
||||
- Support for B610 Single FXS card
|
||||
- Support for B500 4 port BRI card
|
||||
- Reduced memory foot print of the driver
|
||||
by removing some unused statistics structures
|
||||
- New HWEC firmare v1.7.4 fixes delayed fax issus
|
||||
when fax is placed through the echo canceller.
|
||||
- Fixed BRI noise issue: Where a BRI channel could
|
||||
be started in a corrupted state.
|
||||
- New A108 firmware V44
|
||||
Fixes unreliable front end chip access on some
|
||||
newer sandy bridge architectures.
|
||||
Effect of this bug was unreliable T1/E1 link connection.
|
||||
- Added verbose help on wan_ec_client
|
||||
|
||||
* Tue Nov 15 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.24
|
||||
==================================================================
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%define WANPIPE_VER wanpipe-util
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.5.24
|
||||
%define version 3.5.25
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define UTILS_DIR /usr/sbin
|
||||
|
@ -229,6 +229,25 @@ chmod 755 /usr/local/sbin/setup-sangoma
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Feb 21 2012 Nenad Corbic <ncorbic@sangoma.com> - 3.5.25
|
||||
==================================================================
|
||||
|
||||
- Dahdi 2.6 support
|
||||
- Linux 3.2.6 support
|
||||
- Support for B610 Single FXS card
|
||||
- Support for B500 4 port BRI card
|
||||
- Reduced memory foot print of the driver
|
||||
by removing some unused statistics structures
|
||||
- New HWEC firmare v1.7.4 fixes delayed fax issus
|
||||
when fax is placed through the echo canceller.
|
||||
- Fixed BRI noise issue: Where a BRI channel could
|
||||
be started in a corrupted state.
|
||||
- New A108 firmware V44
|
||||
Fixes unreliable front end chip access on some
|
||||
newer sandy bridge architectures.
|
||||
Effect of this bug was unreliable T1/E1 link connection.
|
||||
- Added verbose help on wan_ec_client
|
||||
|
||||
* Tue Nov 15 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.24
|
||||
==================================================================
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define KERNEL_VERSION %{?kern_ver}
|
||||
%define WANPIPE_VER wanpipe
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.5.24
|
||||
%define version 3.5.25
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define UTILS_DIR /usr/sbin
|
||||
|
@ -246,6 +246,25 @@ chmod 755 /usr/local/sbin/setup-sangoma
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Feb 21 2012 Nenad Corbic <ncorbic@sangoma.com> - 3.5.25
|
||||
==================================================================
|
||||
|
||||
- Dahdi 2.6 support
|
||||
- Linux 3.2.6 support
|
||||
- Support for B610 Single FXS card
|
||||
- Support for B500 4 port BRI card
|
||||
- Reduced memory foot print of the driver
|
||||
by removing some unused statistics structures
|
||||
- New HWEC firmare v1.7.4 fixes delayed fax issus
|
||||
when fax is placed through the echo canceller.
|
||||
- Fixed BRI noise issue: Where a BRI channel could
|
||||
be started in a corrupted state.
|
||||
- New A108 firmware V44
|
||||
Fixes unreliable front end chip access on some
|
||||
newer sandy bridge architectures.
|
||||
Effect of this bug was unreliable T1/E1 link connection.
|
||||
- Added verbose help on wan_ec_client
|
||||
|
||||
* Tue Nov 15 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.24
|
||||
==================================================================
|
||||
|
||||
|
|
|
@ -126,6 +126,10 @@ cleanup ()
|
|||
#the subsys lock for LINUX
|
||||
check_module
|
||||
|
||||
if [ $g_rc -gt 0 ]; then
|
||||
exit $g_rc
|
||||
fi
|
||||
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
@ -829,10 +833,11 @@ config_devices()
|
|||
#Just because one card
|
||||
#fails to load do not stop
|
||||
#other cards from loading
|
||||
# if [ $? -ne 0 ]; then
|
||||
if [ $? -ne 0 ]; then
|
||||
g_rc=1;
|
||||
# #echo "Exiting rc = 3"
|
||||
# cleanup 3
|
||||
# fi
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
|
@ -1589,12 +1594,18 @@ print_wanrouter_status () {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
print_config_summary ()
|
||||
{
|
||||
local pfiles;
|
||||
local pfile;
|
||||
local pdev;
|
||||
local id=$(id -u)
|
||||
|
||||
PROC_FILE=~/proc_output.$$
|
||||
if [ -e /dev/shm ] && [ $id -eq 0 ]; then
|
||||
PROC_FILE=/dev/shm/proc_output.$$
|
||||
fi
|
||||
|
||||
|
||||
cd $WAN_HOME
|
||||
|
||||
|
@ -1692,10 +1703,14 @@ print_config_summary ()
|
|||
|
||||
if [ $OSYSTEM = "Linux" ]; then
|
||||
if [ -e /proc/net/wanrouter ]; then
|
||||
pstate=`cat /proc/net/wanrouter/status | grep $pdev | cut -d'|' -f4 | awk '{ gsub(" ", "") ; print }'`
|
||||
if [ ! -e $PROC_FILE ]; then
|
||||
cat /proc/net/wanrouter/status > $PROC_FILE
|
||||
fi
|
||||
pstate=`cat $PROC_FILE | grep "$pdev " | cut -d'|' -f4 | awk '{ gsub(" ", "") ; print }'`
|
||||
else
|
||||
pstate=""
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
check_module
|
||||
|
@ -1705,7 +1720,7 @@ print_config_summary ()
|
|||
pstate=""
|
||||
fi
|
||||
fi
|
||||
if [ -z $pstate ]; then
|
||||
if [ "$pstate" = "" ]; then
|
||||
echo -n "Inactive"
|
||||
else
|
||||
echo -n "$pstate"
|
||||
|
@ -1714,8 +1729,13 @@ print_config_summary ()
|
|||
echo
|
||||
|
||||
done
|
||||
|
||||
if [ -e $PROC_FILE ]; then
|
||||
rm -f $PROC_FILE
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
wanrouter_if_debug()
|
||||
{
|
||||
echo
|
||||
|
@ -2208,7 +2228,7 @@ init_global_params()
|
|||
{
|
||||
|
||||
if [ $OSYSTEM = "Linux" ]; then
|
||||
ROUTER_VERSION=3.5.24
|
||||
ROUTER_VERSION=3.5.25
|
||||
IFCONFIG_LIST=ifconfig
|
||||
MODULE_STAT=lsmod
|
||||
WAN_DRIVERS="wanpipe"
|
||||
|
@ -2282,7 +2302,7 @@ init_global_params()
|
|||
WANEC_MOD_DIR=/lib/modules/$(uname -r)/kernel/net/wanrouter
|
||||
fi
|
||||
else
|
||||
uname -r | grep "^3.0.*" > /dev/null
|
||||
uname -r | grep "^3.*.*" > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
MOD1=/lib/modules/$(uname -r)/kernel/drivers/net/wan/sdladrv
|
||||
MOD2=/lib/modules/$(uname -r)/kernel/net/wanrouter/wanrouter
|
||||
|
@ -2451,6 +2471,7 @@ WAN_PROG_LOCK=/var/lock/wanrouter_lock
|
|||
DEPMOD=YES
|
||||
LINEPROBE_PATH=/usr/sbin/lineprobe
|
||||
WANPIPE_IS_RUNNING=/var/run/wanpipe_is_running
|
||||
g_rc=0;
|
||||
|
||||
RUGGEDCOM=No
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,10 +1,19 @@
|
|||
AFT A108dm Firmware Change Log
|
||||
===============================
|
||||
|
||||
Release V44
|
||||
-----------
|
||||
Dec 12 2011
|
||||
Type: Recommended A108dm Firmware
|
||||
Fixes unreliable front end framer read/write: on newer motherboards.
|
||||
New motherboards and new pci/pcie bridges have exposed a timing
|
||||
issue in front end framer read/write routines. This can cause
|
||||
corrupting in read/write routines causing T1/E1 framer to be misconfigured.
|
||||
|
||||
Release V43
|
||||
-----------
|
||||
Aug 24 2010
|
||||
Type: Recommended A104dm Firmware
|
||||
Type: Recommended A108dm Firmware
|
||||
Fixes PCIe parity errors on some new Dell/HP/IBM servers causing
|
||||
PCI fatal error messages in the logs.
|
||||
Fixes the need for Windows to reboot after firmware update
|
||||
|
|
|
@ -37,7 +37,7 @@ endif
|
|||
SRCS = wan_aftup.c wan_aft_prg.c wan_aft_flash.c wan_aft_flash_shark.c wan_aft_flash_shark_ds.c
|
||||
SRCS += wan_pcie_ctrl.c wan_pcie_ctrl_plx.c wan_pcie_ctrl_tundra.c wan_aft_flash_a600.c
|
||||
SRCS += wan_usb_fwupdate.cpp mem.cpp
|
||||
CFLAGS = -Wall -O2 -D$(OS_TYPE) -D_DEBUG_=$(DEBUG) -lstdc++
|
||||
CFLAGS = -Wall -O2 -D$(OS_TYPE) -D_DEBUG_=$(DEBUG)
|
||||
CFLAGS += $(EXTRA_FLAGS)
|
||||
CFLAGS += -I/usr/include -I$(WANINCDIR) -I$(SYSINC)
|
||||
|
||||
|
@ -50,7 +50,7 @@ all: $(PROD)
|
|||
@echo "Ok."
|
||||
|
||||
wan_aftup: $(SRCS)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
$(CC) $(CFLAGS) -o $@ $^ -lstdc++
|
||||
|
||||
install:
|
||||
@echo "Installing Wanpipe Firmware update utility in $(WAN_VIRTUAL)/etc/wanpipe/util/wan_aftup"
|
||||
|
|
|
@ -433,7 +433,7 @@ static int aft_flash_id_shark(wan_aft_cpld_t *cpld, int mtype, int stype, int *f
|
|||
|
||||
man_code = aft_read_flash_byte_shark(cpld, stype, mtype, 0x00);
|
||||
if (man_code != MCODE_ST){
|
||||
printf("The current flash is not supported (man id %02X)!\n",
|
||||
printf("The current shark flash is not supported (man id %02X)!\n",
|
||||
man_code);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ static int aft_flash_id_shark(wan_aft_cpld_t *cpld, int mtype, int stype, int *f
|
|||
cpld->flash_index = M29W800DB_FID;
|
||||
break;
|
||||
default:
|
||||
printf("The current flash is not supported (dev id %02X)!\n",
|
||||
printf("The current shark ds flash is not supported (dev id %02X)!\n",
|
||||
device_code);
|
||||
return -EINVAL;
|
||||
break;
|
||||
|
|
|
@ -631,6 +631,7 @@ int board_reset(wan_aft_cpld_t *cpld, int clear)
|
|||
break;
|
||||
case AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR:
|
||||
case A700_SHARK_SUBSYS_VENDOR:
|
||||
case B500_SHARK_SUBSYS_VENDOR:
|
||||
if (clear) data &= ~0x06;
|
||||
else data |= 0x06;
|
||||
break;
|
||||
|
|
|
@ -177,6 +177,8 @@ aft_core_info_t aft_core_table[] = {
|
|||
"A056_0040_V", "A056_0040_V*.BIN", AFT_CORE_X400_SIZE },
|
||||
{ AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR, AFT_CHIP_X400, AFT_HDLC_CORE_ID, 0x01, 0x4F,
|
||||
"A500_0040_V", "A500_0040_V*.BIN", AFT_CORE_X400_SIZE },
|
||||
{ B500_SHARK_SUBSYS_VENDOR, AFT_CHIP_X400, AFT_HDLC_CORE_ID, 0x01, 0x4F,
|
||||
"B500_0040_V", "B500_0040_V*.BIN", AFT_CORE_X400_SIZE },
|
||||
{ A700_SHARK_SUBSYS_VENDOR, AFT_CHIP_X400, AFT_HDLC_CORE_ID, 0x01, 0x4F,
|
||||
"B700_0040_V", "B700_0040_V*.BIN", AFT_CORE_X400_SIZE },
|
||||
{ AFT_2SERIAL_RS232_SUBSYS_VENDOR, AFT_CHIP_X1000, AFT_HDLC_CORE_ID, 0x01, 0x4F,
|
||||
|
@ -482,6 +484,10 @@ static int wan_aftup_gettype(wan_aftup_t *aft, char *type)
|
|||
//strcpy(aft->prefix_fw, "AFT_RM");
|
||||
aft->cpld.adptr_type = AFT_ADPTR_ISDN;
|
||||
aft->cpld.iface = &aftup_shark_flash_iface;
|
||||
}else if (strncmp(type,"AFT-B500",8) == 0){
|
||||
//strcpy(aft->prefix_fw, "AFT_RM");
|
||||
aft->cpld.adptr_type = AFT_ADPTR_B500;
|
||||
aft->cpld.iface = &aftup_shark_flash_iface;
|
||||
}else if (strncmp(type,"AFT-B700",8) == 0){
|
||||
//strcpy(aft->prefix_fw, "AFT_RM");
|
||||
aft->cpld.adptr_type = AFT_ADPTR_FLEXBRI;
|
||||
|
@ -971,6 +977,7 @@ static int wan_aftup_update_card(wan_aftup_t *aft)
|
|||
break;
|
||||
case AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR:
|
||||
case A700_SHARK_SUBSYS_VENDOR:
|
||||
case B500_SHARK_SUBSYS_VENDOR:
|
||||
aft->cpld.iface = &aftup_shark_flash_iface;
|
||||
break;
|
||||
case AFT_2SERIAL_RS232_SUBSYS_VENDOR:
|
||||
|
@ -1109,6 +1116,7 @@ static int wan_pcie_ctrl(struct wan_aftup_head_t *head)
|
|||
break;
|
||||
case AFT_ISDN_BRI_SHARK_SUBSYS_VENDOR:
|
||||
case A700_SHARK_SUBSYS_VENDOR:
|
||||
case B500_SHARK_SUBSYS_VENDOR:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
|
|
@ -203,6 +203,7 @@ sub gen_zaptel_conf{
|
|||
my $zp_file='';
|
||||
my $tmpchan=1;
|
||||
my $tmpstr='';
|
||||
my $hwec_mode = $self->card->hwec_mode;
|
||||
|
||||
$zp_file.="\n\#Sangoma AFT-B".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
|
||||
$zp_file.="span=".$self->card->tdmv_span_no.",0,0,ccs,ami\n";
|
||||
|
@ -211,7 +212,7 @@ sub gen_zaptel_conf{
|
|||
$zp_file.="bchan=".$self->card->first_chan.",".$tmpchan."\n";
|
||||
|
||||
$tmpchan = $self->card->first_chan+1;
|
||||
$tmpstr.="echocanceller=mg2,".$self->card->first_chan."-".$tmpchan."\n";
|
||||
$tmpstr.="echocanceller=".$self->card->dahdi_echo.",".$self->card->first_chan."-".$tmpchan."\n";
|
||||
if ($self->card->dahdi_echo eq 'NO') {
|
||||
$zp_file.="#";
|
||||
}
|
||||
|
|
|
@ -300,6 +300,8 @@ my $is_zaptel=$FALSE;
|
|||
my $tdm_api_span_num=0;
|
||||
my $zaptel_installed=$FALSE;
|
||||
my $dahdi_installed=$FALSE;
|
||||
my $dahdi_ver_major=2;
|
||||
my $dahdi_ver_minor=4;
|
||||
my $modprobe_list=`$modules_loaded`;
|
||||
my $is_ss7_xmpt2_only = $FALSE;
|
||||
my $zaptel_dahdi_installed=$FALSE;
|
||||
|
@ -498,7 +500,7 @@ print "Sangoma cards configuration complete, exiting...\n\n";
|
|||
#######################################FUNCTIONS##################################################
|
||||
sub get_card_name{
|
||||
my ($card_name) = @_;
|
||||
if ( $card_name eq '600' || $card_name eq '700') {
|
||||
if ( $card_name eq '600' || $card_name eq '601' || $card_name eq '610' || $card_name eq '700') {
|
||||
$card_name = "B".$card_name;
|
||||
} else {
|
||||
#if ( $is_trillium == $TRUE ){
|
||||
|
@ -841,8 +843,37 @@ sub check_dahdi
|
|||
} else {
|
||||
$dahdi_installed=$FALSE;
|
||||
}
|
||||
|
||||
if($dahdi_installed==$TRUE) {
|
||||
check_dahdi_ver();
|
||||
}
|
||||
}
|
||||
|
||||
sub check_dahdi_ver
|
||||
{
|
||||
my $ver_major;
|
||||
my $ver_minor;
|
||||
my $str_tmp;
|
||||
my $strDahdi="DAHDI Tools Version";
|
||||
|
||||
$str_tmp = `dahdi_cfg -v 2>&1 | grep \"$strDahdi\" `;
|
||||
if ($str_tmp =~ m/(\d).(\d)/) {
|
||||
$ver_major = $1;
|
||||
$ver_minor = $2;
|
||||
#print "the major ver is $ver_major, minor version is $ver_minor.\n";
|
||||
}
|
||||
|
||||
$dahdi_echo='mg2';
|
||||
if ($ver_major > $dahdi_ver_major) {
|
||||
$dahdi_echo='HWEC';
|
||||
} elsif ($ver_major == $dahdi_ver_major) {
|
||||
if ($ver_minor > $dahdi_ver_minor) {
|
||||
$dahdi_echo='HWEC';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub apply_changes{
|
||||
my $asterisk_command='';
|
||||
my $bri_command='';
|
||||
|
@ -2177,10 +2208,6 @@ sub config_bri{
|
|||
$card->pci_slot($3);
|
||||
$card->pci_bus($4);
|
||||
|
||||
if($dahdi_installed == $TRUE && $is_smg == $FALSE && $is_tdm_api == $FALSE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo)
|
||||
}
|
||||
|
||||
my $hwec=0;
|
||||
if($6 gt 0){
|
||||
|
@ -2191,6 +2218,14 @@ sub config_bri{
|
|||
}else{
|
||||
$card->hwec_mode('YES');
|
||||
}
|
||||
|
||||
if($dahdi_installed == $TRUE && $is_smg == $FALSE && $is_tdm_api == $FALSE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo);
|
||||
if ($hwec == 0) {
|
||||
$card->dahdi_echo('mg2');
|
||||
}
|
||||
}
|
||||
|
||||
if ($card->card_model eq '500' || $card->card_model eq '700'){
|
||||
$num_bri_devices_total++;
|
||||
|
@ -2748,17 +2783,21 @@ sub config_t1e1{
|
|||
$card->fe_cpu($5);
|
||||
|
||||
my $hwec=0;
|
||||
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo)
|
||||
}
|
||||
|
||||
if ( $dev =~ /HWEC=(\d+)/){
|
||||
if($1 gt 0){
|
||||
$hwec=1;
|
||||
}
|
||||
}
|
||||
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo);
|
||||
if ($hwec == 0) {
|
||||
$card->dahdi_echo('mg2');
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( $dev =~ /A(\d+)(.*):.*SLOT=(\d+).*BUS=(\d+).*CPU=(\w+).*PORT=(\w+).*/)|| ($dev =~ /(\d+).(\w+\w+).*SLOT=(\d+).*BUS=(\d+).*(\w+).*PORT=(\d+).*HWEC=(\d+)/) ) {
|
||||
my $abc=0;
|
||||
}
|
||||
|
@ -3568,7 +3607,7 @@ sub config_analog{
|
|||
}
|
||||
$first_cfg=0;
|
||||
print "------------------------------------\n";
|
||||
print "Configuring analog cards [A200/A400/B600/B700/B800]\n";
|
||||
print "Configuring analog cards [A200/A400/B600/B610/B700/B800]\n";
|
||||
print "------------------------------------\n";
|
||||
|
||||
my $skip_card=$FALSE;
|
||||
|
@ -3593,18 +3632,22 @@ sub config_analog{
|
|||
$card->pci_bus($4);
|
||||
$card->fe_cpu($5);
|
||||
my $hwec=$7;
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo)
|
||||
}
|
||||
|
||||
if ($hwec==0){
|
||||
$card->hwec_mode('NO');
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
$card->hwec_mode('YES');
|
||||
|
||||
}
|
||||
if ($card->card_model eq '200' || $card->card_model eq '400' || $card->card_model eq '600' || $card->card_model eq '800' || ($card->card_model eq '700' && $6 == '5') || ($card->card_model eq '601' && $6 == '1') ){
|
||||
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo);
|
||||
if ($hwec == 0) {
|
||||
$card->dahdi_echo('mg2');
|
||||
}
|
||||
}
|
||||
|
||||
if ($card->card_model eq '200' || $card->card_model eq '400' || $card->card_model eq '600' || $card->card_model eq '610' || $card->card_model eq '800' || ($card->card_model eq '700' && $6 == '5') || ($card->card_model eq '601' && $6 == '1') ){
|
||||
$num_analog_devices_total++;
|
||||
if($silent==$FALSE) {
|
||||
system('clear');
|
||||
|
@ -3824,15 +3867,19 @@ sub config_usbfxo{
|
|||
$card->card_model($1);
|
||||
$card->pci_bus($2);
|
||||
my $hwec=$3;
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo)
|
||||
}
|
||||
|
||||
if ($hwec==0){
|
||||
$card->hwec_mode('NO');
|
||||
}else{
|
||||
$card->hwec_mode('YES');
|
||||
}
|
||||
if($dahdi_installed == $TRUE) {
|
||||
$card->dahdi_conf('YES');
|
||||
$card->dahdi_echo($dahdi_echo);
|
||||
if ($hwec == 0) {
|
||||
$card->dahdi_echo('mg2');
|
||||
}
|
||||
}
|
||||
if ($card->card_model eq 'U100'){
|
||||
$num_usb_devices_total++;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ all: wanconfig
|
|||
@echo "Ok."
|
||||
|
||||
wanconfig: $(SRCS) wanconfig.h
|
||||
$(CC) $(CFLAGS) -o $@ -lsangoma -lm $^
|
||||
$(CC) $(CFLAGS) -o $@ $^ -lsangoma -lm
|
||||
|
||||
install:
|
||||
@echo "Installing Wanpipe utilites in $(WAN_VIRTUAL)/usr/sbin"
|
||||
|
|
|
@ -86,13 +86,13 @@ blank [ \t]
|
|||
|
||||
"-v" { ec_client.verbose = 1; }
|
||||
"-vv" { ec_client.verbose = 2; }
|
||||
"--h" { help(0); exit(0); }
|
||||
"?" { help(0); exit(0); }
|
||||
"/?" { help(0); exit(0); }
|
||||
"help" { help(0); exit(0); }
|
||||
"--h1" { help(1); help1(1); exit(0); }
|
||||
"--help" { help(1); help1(1); exit(0); }
|
||||
"-help" { help(1); help1(1); exit(0); }
|
||||
"--h" { help(1); exit(0); }
|
||||
"?" { help(1); exit(0); }
|
||||
"/?" { help(1); exit(0); }
|
||||
"help" { help(1); exit(0); }
|
||||
"--h1" { help(1); exit(0); }
|
||||
"--help" { help(1); exit(0); }
|
||||
"-help" { help(1); exit(0); }
|
||||
|
||||
{digit}{digit}*{integer_suffix}? { /* decimal */
|
||||
s_lookup(token(DEC_CONSTANT));
|
||||
|
@ -259,6 +259,19 @@ static void help_extra(int verbose)
|
|||
printf(" sin|sout|rin|rout - EC port\n");
|
||||
printf(" all_ports - all EC ports\n");
|
||||
printf("\n");
|
||||
printf("Examples\n");
|
||||
printf("wan_ec_client wanpipe1 enable all #Enable ec on all channels\n");
|
||||
printf("wan_ec_client wanpipe1 enable 1-15.17-31 #Enable ec on 1 to 15 and 17 to 31 channels\n");
|
||||
printf("wan_ec_client wanpipe1 disable all #Disable ec on all channels\n");
|
||||
printf("wan_ec_client wanpipe1 disable 1-15.17-31 #Disable ec on 1 to 15 and 17 to 31 channels\n");
|
||||
printf("wanpipemon -i w1g1 -c ehw #List currently active ec on span 1\n");
|
||||
printf("wan_ec_client stats_full 1 #Read full config and stats of channel 1\n");
|
||||
printf("wan_ec_client stats 1 #Read abbreviated config and stats of channel 1\n");
|
||||
printf("wan_ec_client stats #Read global config and stats\n");
|
||||
printf("wan_ec_client wanpipe1 modify all --WANEC_DtmfToneRemoval=TRUE\n");
|
||||
printf("wan_ec_client wanpipe1 modify all --WANEC_DtmfToneRemoval=FALSE\n");
|
||||
printf("\nFor More info and detailed list of modify options\nDownload ftp://ftp.sangoma.com/linux/current_wanpipe/doc/WanpipeEC_API.pdf\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -277,13 +290,15 @@ int help(int verbose)
|
|||
printf(" disable <fe_chan> - Disable Echo canceller on specified channel(s)\n");
|
||||
printf(" de <fe_chan> [sout|rout] - Enable DTMF detection on specified channel(s)\n");
|
||||
printf(" dd <fe_chan> [sout|rout] - Disable DTMF detection on specified channel(s)\n");
|
||||
printf(" stats - Read Echo Canceller Chip/Image statistis\n");
|
||||
printf(" stats <fe_chan> - Read Echo Canceller channel statistis\n");
|
||||
printf(" hwimage - Read Echo Canceller image statistis\n");
|
||||
printf(" monitor <fe_chan> - Enable Debug monitoring for specified channel\n");
|
||||
printf(" monitor - Get debug data for previously specified channel\n");
|
||||
printf(" stats - Read Echo Canceller Chip/Image statistis\n");
|
||||
printf(" stats <fe_chan> - Read Echo Canceller channel statistis\n");
|
||||
printf(" hwimage - Read Echo Canceller image statistis\n");
|
||||
printf(" monitor <fe_chan> - Enable recording for 15sec on specified channel\n");
|
||||
printf(" monitor120 <fe_chan> - Enable recording for 120sec on specified channel\n");
|
||||
printf(" monitor - Read last recording for previously specified channel\n");
|
||||
printf("\n");
|
||||
if (!verbose) help_extra(verbose);
|
||||
help1(0);
|
||||
help_extra(verbose);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -316,8 +331,8 @@ static int help1(int verbose)
|
|||
int wan_ec_args_parse_and_run(int argc, char* argv[])
|
||||
{
|
||||
if (argc == 1){
|
||||
help(0);
|
||||
return 0;
|
||||
help(1);
|
||||
return 1;
|
||||
}
|
||||
targv = argv+1;
|
||||
arglim = argv+argc;
|
||||
|
|
|
@ -324,7 +324,7 @@ void yyerror(char* msg)
|
|||
{
|
||||
if (!ec_client.verbose){
|
||||
printf("> %s\n", msg);
|
||||
help (0);
|
||||
help (1);
|
||||
}else{
|
||||
printf("> %s (argv=%s,offset=%d)\n", msg, *targv, offset);
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21
wanpipe.spec
21
wanpipe.spec
|
@ -25,7 +25,7 @@
|
|||
#
|
||||
|
||||
%define NAME wanpipe
|
||||
%define VERSION 3.5.24
|
||||
%define VERSION 3.5.25
|
||||
%define RELEASE 0
|
||||
%define KVERSION %{?kernel}
|
||||
%define KSRC %{?ksrc}
|
||||
|
@ -259,6 +259,25 @@ fi
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Feb 21 2012 Nenad Corbic <ncorbic@sangoma.com> - 3.5.25
|
||||
==================================================================
|
||||
|
||||
- Dahdi 2.6 support
|
||||
- Linux 3.2.6 support
|
||||
- Support for B610 Single FXS card
|
||||
- Support for B500 4 port BRI card
|
||||
- Reduced memory foot print of the driver
|
||||
by removing some unused statistics structures
|
||||
- New HWEC firmare v1.7.4 fixes delayed fax issus
|
||||
when fax is placed through the echo canceller.
|
||||
- Fixed BRI noise issue: Where a BRI channel could
|
||||
be started in a corrupted state.
|
||||
- New A108 firmware V44
|
||||
Fixes unreliable front end chip access on some
|
||||
newer sandy bridge architectures.
|
||||
Effect of this bug was unreliable T1/E1 link connection.
|
||||
- Added verbose help on wan_ec_client
|
||||
|
||||
* Tue Nov 15 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.24
|
||||
==================================================================
|
||||
|
||||
|
|
Loading…
Reference in New Issue