wanpipe-7.0.27.tgz

This commit is contained in:
Harald Welte 2021-12-29 19:12:16 +01:00
parent ff69be317e
commit 0609879fad
33 changed files with 173 additions and 33 deletions

View File

@ -1,2 +1,2 @@
wanpipe_linux: git ver a362c80
wanpipe_common: git ver 25d1643
wanpipe_linux: git ver 3ef3ba3
wanpipe_common: git ver 682cb58

View File

@ -1 +1 @@
wanpipe-7.0.26
wanpipe-7.0.27

View File

@ -7,6 +7,14 @@ Copyright (c) 1995-2019 Sangoma Technologies Inc.
For more info visit: http://wiki.sangoma.com
------------------------------------------------------------------------------
* Tue Dec 26 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.27
==================================================================
- Support for Kernel version 4.18.x+
- Disable global poll_mode depending upon user choise using TE_IGNORE_POLL_MODE parameter
- Support perl environment for perl version 5.26
- Adding backward compatibilty for older kernels both debian as well as redhat
- Fix detection of loopback codes on T1 ESF
* Tue Apr 02 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.26
==================================================================
- Support for Kernel version 4.15+

29
Setup
View File

@ -281,7 +281,7 @@ check_kern_memcpy_to_msg ()
check_kern_dev_group_struct ()
{
if [ -e $SOURCEDIR/include/linux/device.h ];then
eval "awk 'BEGIN { s=0 } /\*\*dev_groups;/ { s=1; exit } END { print s }' $SOURCEDIR/include/linux/device.h >/dev/null 2>/dev/null"
eval "grep \"\*\*dev_groups;\" $SOURCEDIR/include/linux/device.h >/dev/null 2>/dev/null"
if [ $? -eq 0 ]; then
DEV_GRP_STRUCT="-DKERN_CLASS_DEV_GROUPS=1"
else
@ -289,7 +289,7 @@ check_kern_dev_group_struct ()
fi
PROTOCOL_DEFINES="$PROTOCOL_DEFINES $DEV_GRP_STRUCT "
elif [ -e $DEBSRCDIR/include/linux/device.h ];then
eval "awk 'BEGIN { s=0 } /\*\*dev_groups;/ { s=1; exit } END { print s }' $DEBSRCDIR/include/linux/device.h >/dev/null 2>/dev/null"
eval "grep \"\*\*dev_groups;\" $DEBSRCDIR/include/linux/device.h >/dev/null 2>/dev/null"
if [ $? -eq 0 ]; then
DEV_GRP_STRUCT="-DKERN_CLASS_DEV_GROUPS=1"
else
@ -362,6 +362,27 @@ check_kern_signal_feature ()
fi
}
check_kern_proto_ops_struct ()
{
if [ -e $SOURCEDIR/include/linux/net.h ];then
eval "grep -A2 \"*getname\" $SOURCEDIR/include/linux/net.h | grep \"sockaddr_len\" >/dev/null 2>/dev/null"
if [ $? -eq 0 ]; then
PROTO_OPS_UPDATE="-DKERN_CLASS_PROTO_OPS_UPDATE=1"
else
PROTO_OPS_UPDATE="-DKERN_CLASS_PROTO_OPS_UPDATE=0"
fi
PROTOCOL_DEFINES="$PROTOCOL_DEFINES $PROTO_OPS_UPDATE "
elif [ -e $DEBSRCDIR/include/linux/net.h ];then
eval "grep -A2 \"*getname\" $DEBSRCDIR/include/linux/net.h | grep \"sockaddr_len\" >/dev/null 2>/dev/null"
if [ $? -eq 0 ]; then
PROTO_OPS_UPDATE="-DKERN_CLASS_PROTO_OPS_UPDATE=1"
else
PROTO_OPS_UPDATE="-DKERN_CLASS_PROTO_OPS_UPDATE=0"
fi
PROTOCOL_DEFINES="$PROTOCOL_DEFINES $PROTO_OPS_UPDATE "
fi
}
# ----------------------------------------------------------------------------
# Display error message.
# ----------------------------------------------------------------------------
@ -3786,6 +3807,8 @@ CFLAGS="$CC -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dli
check_kern_signal_feature
check_kern_proto_ops_struct
if [ "$BRI_MODULE_TEST" = "YES" ]; then
PROTOCOL_DEFINES="$PROTOCOL_DEFINES -DBUILD_MOD_TESTER"
fi
@ -7563,7 +7586,7 @@ KERNEL_UNAME=`uname -r`
PKG_NAME=wanpipe
DISTR_NAME="WANPIPE"
PROD=wanrouter
PROD_VER=7.0.26
PROD_VER=7.0.27
PROD_HOME=`pwd`
META_CONF=$PROD_HOME/$PROD.rc
WAN_INTR_DIR=$PROD_HOME/interfaces

View File

@ -710,6 +710,11 @@ int registry_write_front_end_cfg(HKEY hPortRegistryKey, port_cfg_t *port_cfg)
break;
}
iReturnCode = registry_set_integer_value(hPortRegistryKey, "TE_IGNORE_POLL_MODE", te_cfg->ignore_poll_mode);
if(iReturnCode){
break;
}
iReturnCode = registry_set_integer_value(hPortRegistryKey, "ACTIVE_CH", ENABLE_ALL_CHANNELS /*must be hardcoded*/);
if(iReturnCode){
break;

View File

@ -1,5 +1,5 @@
Package: wanpipe
Version: 7.0.26-0
Version: 7.0.27-0
Section: networking
Priority: optional
Architecture: all

View File

@ -463,6 +463,7 @@ typedef struct sdla_te_cfg {
u_int8_t ais_maintenance;
u_int8_t ais_auto_on_los;
u_int8_t ignore_debounce_alarm;
u_int8_t ignore_poll_mode;
} sdla_te_cfg_t;
/* Performamce monitor counters */

View File

@ -10,14 +10,14 @@
#define WANPIPE_COMPANY "Sangoma Technologies Inc"
/********** LINUX **********/
#define WANPIPE_VERSION "7.0.26"
#define WANPIPE_VERSION "7.0.27"
#define WANPIPE_SUB_VERSION "0"
#define WANPIPE_LITE_VERSION "1.1.1"
#if defined(__LINUX__)
#define WANPIPE_VERSION_MAJOR 7
#define WANPIPE_VERSION_MINOR 0
#define WANPIPE_VERSION_MINOR1 26
#define WANPIPE_VERSION_MINOR1 27
#define WANPIPE_VERSION_MINOR2 0
#endif

View File

@ -1772,7 +1772,9 @@ static int sdla_ds_te1_config(void* pfe)
/* Force FE POll mode. Stop using front end interrupts as they
are known to cause parity errors on modern systems. */
* are known to cause parity errors on modern systems.
* Also , only eable FE_POLL mode by default if ignore_poll_mode is not set */
if (fe->fe_cfg.cfg.te_cfg.ignore_poll_mode == WANOPT_NO)
fe->fe_cfg.poll_mode=WANOPT_YES;
/* Revision/Chip ID (Reg. 0x0D) */
@ -1892,6 +1894,10 @@ static int sdla_ds_te1_config(void* pfe)
}
}
if (fe->fe_cfg.poll_mode == WANOPT_YES){
/* Enable only basic framer interrupts */
sdla_ds_te1_intr_ctrl(fe, 0, WAN_TE_INTR_BASIC, WAN_FE_INTR_ENABLE, 0x00);
}
#if 0
/* FIXME: Enable all interrupt only when link is connected (event global) */
@ -2058,6 +2064,11 @@ static int sdla_ds_te1_disable_irq(void* pfe)
fe, 0,
(WAN_TE_INTR_GLOBAL|WAN_TE_INTR_BASIC|WAN_TE_INTR_PMON),
WAN_FE_INTR_MASK, 0x00);
} else {
/* Disable only basic framer interrupts */
sdla_ds_te1_intr_ctrl(
fe, 0, WAN_TE_INTR_BASIC, WAN_FE_INTR_MASK, 0x00
);
}
return 0;
}
@ -3356,7 +3367,7 @@ sdla_ds_te1_intr_ctrl(sdla_fe_t *fe, int dummy, u_int8_t type, u_int8_t mode, un
WAN_ASSERT(fe->write_fe_reg == NULL);
WAN_ASSERT(fe->read_fe_reg == NULL);
WAN_ASSERT(fe->fe_cfg.poll_mode == WANOPT_YES);
//WAN_ASSERT(fe->fe_cfg.poll_mode == WANOPT_YES);
if (!wan_test_bit(TE_CONFIGURED,(void*)&fe->te_param.critical)){
return 0;
@ -4013,22 +4024,10 @@ static int sdla_ds_te1_check_intr(sdla_fe_t *fe)
return 0;
}
static int sdla_ds_te1_intr(sdla_fe_t *fe)
static int sdla_ds_te1_intr_handler(sdla_fe_t *fe, int silent)
{
u_int8_t framer_istatus, liu_istatus, bert_istatus;
u_int8_t device_id;
int silent = 0;
WAN_ASSERT(fe->write_fe_reg == NULL);
WAN_ASSERT(fe->read_fe_reg == NULL);
device_id = WAN_TE1_DEVICE_ID;
if (device_id == DEVICE_ID_BAD){
DEBUG_EVENT(
"%s: ERROR: Failed to verify Device id (silent mode)!\n",
fe->name);
silent = 1;
}
framer_istatus = READ_REG(REG_GFISR);
liu_istatus = READ_REG(REG_GLISR);
bert_istatus = READ_REG(REG_GBISR);
@ -4052,6 +4051,25 @@ static int sdla_ds_te1_intr(sdla_fe_t *fe)
//WRITE_REG(REG_GBISR, (1<<WAN_FE_LINENO(fe)));
WRITE_REG(REG_GBISR, (1<<WAN_DS_REGBITMAP(fe)));
}
}
static int sdla_ds_te1_intr(sdla_fe_t *fe)
{
u_int8_t device_id;
int silent = 0;
WAN_ASSERT(fe->write_fe_reg == NULL);
WAN_ASSERT(fe->read_fe_reg == NULL);
device_id = WAN_TE1_DEVICE_ID;
if (device_id == DEVICE_ID_BAD){
DEBUG_EVENT(
"%s: ERROR: Failed to verify Device id (silent mode)!\n",
fe->name);
silent = 1;
}
sdla_ds_te1_intr_handler(fe, silent);
DEBUG_TE1("%s: FE Interrupt Alarms=0x%X\n",
fe->name,fe->fe_alarm);
@ -4568,6 +4586,9 @@ static int sdla_ds_te1_swirq(sdla_fe_t* fe)
sdla_ds_te1_swirq_alarm(fe, WAN_TE1_SWIRQ_TYPE_ALARM_RAI);
}
}
sdla_ds_te1_intr_handler(fe, 0);
return 0;
}

View File

@ -2454,12 +2454,15 @@ static int wanpipe_tdm_api_ioctl_handle_tdm_api_cmd(wanpipe_tdm_api_dev_t *tdm_a
tdm_api->cfg.rbs_poll = usr_tdm_api.rbs_poll;
usr_tdm_api.result=SANG_STATUS_SUCCESS;
err=0;
DEBUG_EVENT("%s: Poll Timeout = %u, RBS POLL = %u and RBS enable Count = %d\n", tdm_api->name, tdm_card_dev->rbs_poll_timeout, tdm_api->cfg.rbs_poll, tdm_card_dev->rbs_enable_cnt);
}
} else {
tdm_card_dev->rbs_enable_cnt++;
usr_tdm_api.result=SANG_STATUS_SUCCESS;
err=0;
DEBUG_EVENT("%s: Poll Timeout = %u, RBS POLL = %u and RBS enable Count = %d\n", tdm_api->name, tdm_card_dev->rbs_poll_timeout, tdm_api->cfg.rbs_poll, tdm_card_dev->rbs_enable_cnt);
}
}

View File

@ -1754,9 +1754,13 @@ out:
* information. Not very useful for Sangoma's purposes.
*===========================================================*/
#if defined (KERN_CLASS_PROTO_OPS_UPDATE) && KERN_CLASS_PROTO_OPS_UPDATE > 0
static int wanpipe_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
#else
static int wanpipe_getname(struct socket *sock, struct sockaddr *uaddr,
int peer)
#endif
{
netdevice_t *dev;
struct sock *sk = sock->sk;
@ -1776,7 +1780,9 @@ static int wanpipe_getname(struct socket *sock, struct sockaddr *uaddr,
sll->sll_hatype = 0; /* Bad: we have no ARPHRD_UNSPEC */
sll->sll_halen = 0;
}
#if defined (KERN_CLASS_PROTO_OPS_UPDATE) && KERN_CLASS_PROTO_OPS_UPDATE > 0
*uaddr_len = sizeof(*sll);
#endif
return 0;
}

View File

@ -1,6 +1,6 @@
%define WANPIPE_VER wanpipe-modules
%define name %{WANPIPE_VER}
%define version 7.0.26
%define version 7.0.27
%define release 0
%define serial 1
%define MODULES_DIR /lib/modules
@ -58,6 +58,14 @@ fi
%changelog
* Tue Dec 26 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.27
==================================================================
- Support for Kernel version 4.18.x+
- Disable global poll_mode depending upon user choise using TE_IGNORE_POLL_MODE parameter
- Support perl environment for perl version 5.26
- Adding backward compatibilty for older kernels both debian as well as redhat
- Fix detection of loopback codes on T1 ESF
* Tue Apr 02 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.26
==================================================================
- Support for Kernel version 4.15+

View File

@ -1,6 +1,6 @@
%define WANPIPE_VER wanpipe-util
%define name %{WANPIPE_VER}
%define version 7.0.26
%define version 7.0.27
%define release 0
%define serial 1
%define UTILS_DIR /usr/sbin
@ -228,6 +228,14 @@ chmod 755 /usr/local/sbin/setup-sangoma
%changelog
* Tue Dec 26 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.27
==================================================================
- Support for Kernel version 4.18.x+
- Disable global poll_mode depending upon user choise using TE_IGNORE_POLL_MODE parameter
- Support perl environment for perl version 5.26
- Adding backward compatibilty for older kernels both debian as well as redhat
- Fix detection of loopback codes on T1 ESF
* Tue Apr 02 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.26
==================================================================
- Support for Kernel version 4.15+

View File

@ -1,7 +1,7 @@
%define KERNEL_VERSION %{?kern_ver}
%define WANPIPE_VER wanpipe
%define name %{WANPIPE_VER}
%define version 7.0.26
%define version 7.0.27
%define release 0
%define serial 1
%define UTILS_DIR /usr/sbin
@ -245,6 +245,14 @@ chmod 755 /usr/local/sbin/setup-sangoma
%changelog
* Tue Dec 26 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.27
==================================================================
- Support for Kernel version 4.18.x+
- Disable global poll_mode depending upon user choise using TE_IGNORE_POLL_MODE parameter
- Support perl environment for perl version 5.26
- Adding backward compatibilty for older kernels both debian as well as redhat
- Fix detection of loopback codes on T1 ESF
* Tue Apr 02 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.26
==================================================================
- Support for Kernel version 4.15+

View File

@ -2231,7 +2231,7 @@ init_global_params()
{
if [ $OSYSTEM = "Linux" ]; then
ROUTER_VERSION=7.0.26
ROUTER_VERSION=7.0.27
IFCONFIG_LIST=ifconfig
MODULE_STAT=lsmod
WAN_DRIVERS="wanpipe"

View File

@ -1,5 +1,9 @@
#!/bin/bash -p
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -1,5 +1,9 @@
#!/bin/sh
home=`pwd`
#include the current directory where the script is present
#as a part of perl environment i.e. in @INC because Perl 5.26 and greater
#doesnot include current directory due to security reason
export PERL_USE_UNSAFE_INC=1
cd $home
read_meta_conf ()

View File

@ -284,6 +284,7 @@ static key_word_t common_conftab[] = /* Common configuration parameters */
{ "TE_SIG_MODE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, sig_mode), DTYPE_UCHAR },
{ "TE_IGNORE_YEL", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, ignore_yel_alarm), DTYPE_UCHAR },
{ "TE_IGNORE_DEBOUNCE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, ignore_debounce_alarm), DTYPE_UCHAR },
{ "TE_IGNORE_POLL_MODE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, ignore_poll_mode), DTYPE_UCHAR },
{ "TE_AIS_MAINTENANCE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, ais_maintenance), DTYPE_UCHAR },
{ "TE_AIS_AUTO_ON_LOS", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_te_cfg_t, ais_auto_on_los), DTYPE_UCHAR },
/* T1/E1 Front-End parameters (old style) */

View File

@ -25,7 +25,7 @@
#
%define NAME wanpipe
%define VERSION 7.0.26
%define VERSION 7.0.27
%define RELEASE 0
%define KVERSION %{?kernel}
%define KSRC %{?ksrc}
@ -259,6 +259,14 @@ fi
################################################################################
%changelog
* Tue Dec 26 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.27
==================================================================
- Support for Kernel version 4.18.x+
- Disable global poll_mode depending upon user choise using TE_IGNORE_POLL_MODE parameter
- Support perl environment for perl version 5.26
- Adding backward compatibilty for older kernels both debian as well as redhat
- Fix detection of loopback codes on T1 ESF
* Tue Apr 02 2019 Pushkar Singh <psingh@sangoma.com> - 7.0.26
==================================================================
- Support for Kernel version 4.15+