From 0bb90ed8880873c121b2eb436bec8a87b56d5641 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 29 Dec 2021 18:59:45 +0100 Subject: [PATCH] wanpipe-7.0.8.tgz --- .git_info | 4 +-- .router_version | 2 +- ChangeLog | 5 ++-- Setup | 2 +- api/libstelephony/PToneDecoder.cpp | 2 +- api/libstelephony/stelephony.cpp | 2 +- deb_control/wanpipe.deb | 2 +- patches/kdrivers/include/aft_core_private.h | 5 ++++ patches/kdrivers/include/aft_core_user.h | 1 + patches/kdrivers/include/wanpipe_version.h | 4 +-- patches/kdrivers/src/net/aft_core.c | 29 ++++++++++++++++++++- patches/kdrivers/src/net/sdla_gsm.c | 20 +++++++------- rpmspec/wanpipe-mod.rpmspec | 7 ++--- rpmspec/wanpipe-util.rpmspec | 7 ++--- rpmspec/wanpipe.rpmspec | 7 ++--- samples/wanrouter | 2 +- util/bwm-ng/src/bwm-ng.c | 2 +- util/bwm-ng/src/options.c | 6 ++++- util/wanpipemon/aftpipemon.c | 13 ++++----- wanpipe.spec | 7 ++--- 20 files changed, 85 insertions(+), 44 deletions(-) diff --git a/.git_info b/.git_info index 15463e4..043e4a4 100644 --- a/.git_info +++ b/.git_info @@ -1,2 +1,2 @@ -wanpipe_linux: git ver 23ab060 -wanpipe_common: git ver c71136f +wanpipe_linux: git ver f340d42 +wanpipe_common: git ver fb45280 diff --git a/.router_version b/.router_version index 7eb4ace..7a2aa36 100644 --- a/.router_version +++ b/.router_version @@ -1 +1 @@ -wanpipe-7.0.6 +wanpipe-7.0.8 diff --git a/ChangeLog b/ChangeLog index be0eb47..c641654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,14 +8,15 @@ Copyright (c) 1995-2013 Sangoma Technologies Inc. For more info visit: http://wiki.sangoma.com ------------------------------------------------------------------------------ -* Wed Sep 25 2013 Nenad Corbic - 7.0.6 +* Wed Nov 14 2013 Nenad Corbic - 7.0.8 ================================================================== -- Updated wanpipemon to trace on multipel dchan in a single span +- Updated wanpipemon to trace on multiple dchan in a single span eg: wanpipemon -i w1g1 -chan 1 -c trd If chan is not specificed then all dchans will be traced together. - Updated sample tapping application. Allow configuration for dchan and seven bit hdlc +- Fixed GSM drivers for Windows * Mon Jul 15 2013 Nenad Corbic - 7.0.5 ================================================================== diff --git a/Setup b/Setup index b9d6722..5b6c1ba 100755 --- a/Setup +++ b/Setup @@ -7338,7 +7338,7 @@ KERNEL_UNAME=`uname -r` PKG_NAME=wanpipe DISTR_NAME="WANPIPE" PROD=wanrouter -PROD_VER=7.0.6 +PROD_VER=7.0.8 PROD_HOME=`pwd` META_CONF=$PROD_HOME/$PROD.rc WAN_INTR_DIR=$PROD_HOME/interfaces diff --git a/api/libstelephony/PToneDecoder.cpp b/api/libstelephony/PToneDecoder.cpp index fba1a8b..56433ee 100644 --- a/api/libstelephony/PToneDecoder.cpp +++ b/api/libstelephony/PToneDecoder.cpp @@ -16,7 +16,7 @@ PhoneToneDecoder::PhoneToneDecoder(void) { rate = 8000; bufSize = 256; - printf("Init FSK demodulator rate:%d buffer:%d\n", rate, bufSize); + printf("Init FSK demodulator rate:%d buffer:%zu\n", rate, bufSize); fskInit = fskEnable = dtmfInit = dtmfEnable = false; diff --git a/api/libstelephony/stelephony.cpp b/api/libstelephony/stelephony.cpp index beae1e3..d112e90 100644 --- a/api/libstelephony/stelephony.cpp +++ b/api/libstelephony/stelephony.cpp @@ -158,7 +158,7 @@ void OnCallerID(void *callback_obj, char *Name, char *CallerNumber, char *Called CStelephony* stelObj = (CStelephony*)callback_obj; stelephony_callback_functions_t cbf; - DBG_STEL("%s(): Name: %s(%d), CallerNumber: %s(%d), CalledNumber: %s, DateTime: %s\r\n", + DBG_STEL("%s(): Name: %s(%zu), CallerNumber: %s(%zu), CalledNumber: %s, DateTime: %s\r\n", __FUNCTION__, Name, strlen(Name), CallerNumber, strlen(CallerNumber), CalledNumber, DateTime); stelObj->GetCallbackFunctions(&cbf); diff --git a/deb_control/wanpipe.deb b/deb_control/wanpipe.deb index e640e6d..af017c7 100644 --- a/deb_control/wanpipe.deb +++ b/deb_control/wanpipe.deb @@ -1,5 +1,5 @@ Package: wanpipe -Version: 7.0.6-0 +Version: 7.0.8-0 Section: networking Priority: optional Architecture: all diff --git a/patches/kdrivers/include/aft_core_private.h b/patches/kdrivers/include/aft_core_private.h index fed9560..8c1552c 100644 --- a/patches/kdrivers/include/aft_core_private.h +++ b/patches/kdrivers/include/aft_core_private.h @@ -13,6 +13,7 @@ # include "wanpipe_tdm_api.h" /* wanpipe_tdm_api_dev_t */ # include "aft_core_bert.h" /* wp_bert_t */ # include "wanpipe_mtp1.h" +# include "sdla_gsm.h" /*================================================================= @@ -492,6 +493,10 @@ typedef struct private_area u8 sw_hdlc_mode; void *sw_hdlc_dev; + unsigned int uart_rx_status; + char uart_rx_buffer[AFT_GSM_UART_RX_FIFO_SIZE]; + unsigned int uart_rx_sz; + #ifdef AFT_DMA_TRANSACTION #warning "AFT DMA Transaction History Enabled" diff --git a/patches/kdrivers/include/aft_core_user.h b/patches/kdrivers/include/aft_core_user.h index 8afb8bb..36770d6 100644 --- a/patches/kdrivers/include/aft_core_user.h +++ b/patches/kdrivers/include/aft_core_user.h @@ -353,6 +353,7 @@ typedef struct aft_driver_bh_stats { unsigned long rx_stack; unsigned long rx_bri_dchan; unsigned long tx_post; + unsigned long rx_gsm_dchan; }aft_driver_bh_stats_t; typedef struct aft_driver_port_task_stats { diff --git a/patches/kdrivers/include/wanpipe_version.h b/patches/kdrivers/include/wanpipe_version.h index c47197d..3e1e315 100644 --- a/patches/kdrivers/include/wanpipe_version.h +++ b/patches/kdrivers/include/wanpipe_version.h @@ -10,14 +10,14 @@ #define WANPIPE_COMPANY "Sangoma Technologies Inc" /********** LINUX **********/ -#define WANPIPE_VERSION "7.0.6" +#define WANPIPE_VERSION "7.0.8" #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 6 +#define WANPIPE_VERSION_MINOR1 8 #define WANPIPE_VERSION_MINOR2 0 #endif diff --git a/patches/kdrivers/src/net/aft_core.c b/patches/kdrivers/src/net/aft_core.c index aa8fbda..40639c0 100644 --- a/patches/kdrivers/src/net/aft_core.c +++ b/patches/kdrivers/src/net/aft_core.c @@ -6483,6 +6483,33 @@ static void wp_bh (void *data, int pending) } }while(skb); + if (wan_test_bit(0,&chan->uart_rx_status)){ + int uart_len=chan->uart_rx_sz; + if (uart_len && uart_len < sizeof(chan->uart_rx_buffer)) { + netskb_t *skb; + skb=wan_skb_alloc(uart_len+10); + if (skb) { + unsigned char *buf=wan_skb_put(skb,uart_len); + memcpy (buf,chan->uart_rx_buffer,uart_len); + + if (top_chan) { + wan_capture_trace_packet(chan->card, + &top_chan->trace_info, + skb,TRC_INCOMING_FRM); + } + + AFT_PERF_STAT_INC(card,bh,rx_gsm_dchan); + err=aft_bh_rx(chan, skb, 0, wan_skb_len(skb)); + if (err) { + wan_skb_free(skb); + } + } + } else { + WP_AFT_CHAN_ERROR_STATS(chan->chan_stats,rx_errors); + } + wan_clear_bit(0,&chan->uart_rx_status); + } + /* This case is only used for HDLC DMA Chain mode Not for transparent */ do { @@ -12350,7 +12377,7 @@ static int aft_dma_rx_tdmv(sdla_t *card, private_area_t *chan) err = card->wandev.fe_iface.watchdog(card); } } else { - if (card->u.aft.tdmv_mtu == 8) { + if (card->u.aft.tdmv_mtu == 8) { if (card->wandev.fe_iface.watchdog) { err = card->wandev.fe_iface.watchdog(card); } diff --git a/patches/kdrivers/src/net/sdla_gsm.c b/patches/kdrivers/src/net/sdla_gsm.c index 48a5566..1554d47 100644 --- a/patches/kdrivers/src/net/sdla_gsm.c +++ b/patches/kdrivers/src/net/sdla_gsm.c @@ -362,9 +362,6 @@ static int wp_gsm_watchdog(void *card_ptr) sdla_fe_t *fe = &card->fe; sdla_gsm_param_t *gsm_data = &fe->fe_param.gsm; private_area_t *chan = NULL; - netskb_t *skb = NULL; - unsigned char *skb_data_area = NULL; - char uart_rx_buffer[AFT_GSM_UART_RX_FIFO_SIZE]; int txlen = 0; int avail = 0; int kick_user = 0; @@ -379,6 +376,9 @@ static int wp_gsm_watchdog(void *card_ptr) wp_gsm_update_sim_status(card); chan = card->u.aft.dev_to_ch_map[GSM_DCHAN_LOGIC_CHAN]; + if (!chan || wan_test_bit(0,&chan->interface_down)) { + return 0; + } /* tx until done and call wanpipe_wake_stack() when finished */ wan_spin_lock_irq(&fe->lockirq, &flags); @@ -402,14 +402,12 @@ static int wp_gsm_watchdog(void *card_ptr) } } - /* service the rx fifo */ - avail = wp_gsm_uart_rx_fifo(card, uart_rx_buffer, sizeof(uart_rx_buffer)); - if (avail) { - skb = wan_skb_alloc(avail); - if (skb) { - skb_data_area = wan_skb_put(skb, avail); - memcpy(skb_data_area, uart_rx_buffer, avail); - wan_skb_queue_tail(&chan->wp_rx_bri_dchan_complete_list, skb); + if (!wan_test_bit(0,&chan->uart_rx_status)){ + /* service the rx fifo */ + avail = wp_gsm_uart_rx_fifo(card, chan->uart_rx_buffer, sizeof(chan->uart_rx_buffer)); + if (avail) { + chan->uart_rx_sz=avail; + wan_set_bit(0,&chan->uart_rx_status); WAN_TASKLET_SCHEDULE((&chan->common.bh_task)); } } diff --git a/rpmspec/wanpipe-mod.rpmspec b/rpmspec/wanpipe-mod.rpmspec index 098285b..61f53a7 100644 --- a/rpmspec/wanpipe-mod.rpmspec +++ b/rpmspec/wanpipe-mod.rpmspec @@ -1,6 +1,6 @@ %define WANPIPE_VER wanpipe-modules %define name %{WANPIPE_VER} -%define version 7.0.6 +%define version 7.0.8 %define release 0 %define serial 1 %define MODULES_DIR /lib/modules @@ -59,14 +59,15 @@ fi %changelog -* Wed Sep 25 2013 Nenad Corbic - 7.0.6 +* Wed Nov 14 2013 Nenad Corbic - 7.0.8 ================================================================== -- Updated wanpipemon to trace on multipel dchan in a single span +- Updated wanpipemon to trace on multiple dchan in a single span eg: wanpipemon -i w1g1 -chan 1 -c trd If chan is not specificed then all dchans will be traced together. - Updated sample tapping application. Allow configuration for dchan and seven bit hdlc +- Fixed GSM drivers for Windows * Mon Jul 15 2013 Nenad Corbic - 7.0.5 ================================================================== diff --git a/rpmspec/wanpipe-util.rpmspec b/rpmspec/wanpipe-util.rpmspec index 1393d3e..baaad2e 100644 --- a/rpmspec/wanpipe-util.rpmspec +++ b/rpmspec/wanpipe-util.rpmspec @@ -1,6 +1,6 @@ %define WANPIPE_VER wanpipe-util %define name %{WANPIPE_VER} -%define version 7.0.6 +%define version 7.0.8 %define release 0 %define serial 1 %define UTILS_DIR /usr/sbin @@ -229,14 +229,15 @@ chmod 755 /usr/local/sbin/setup-sangoma %changelog -* Wed Sep 25 2013 Nenad Corbic - 7.0.6 +* Wed Nov 14 2013 Nenad Corbic - 7.0.8 ================================================================== -- Updated wanpipemon to trace on multipel dchan in a single span +- Updated wanpipemon to trace on multiple dchan in a single span eg: wanpipemon -i w1g1 -chan 1 -c trd If chan is not specificed then all dchans will be traced together. - Updated sample tapping application. Allow configuration for dchan and seven bit hdlc +- Fixed GSM drivers for Windows * Mon Jul 15 2013 Nenad Corbic - 7.0.5 ================================================================== diff --git a/rpmspec/wanpipe.rpmspec b/rpmspec/wanpipe.rpmspec index 5f42d11..0aaa01d 100644 --- a/rpmspec/wanpipe.rpmspec +++ b/rpmspec/wanpipe.rpmspec @@ -1,7 +1,7 @@ %define KERNEL_VERSION %{?kern_ver} %define WANPIPE_VER wanpipe %define name %{WANPIPE_VER} -%define version 7.0.6 +%define version 7.0.8 %define release 0 %define serial 1 %define UTILS_DIR /usr/sbin @@ -246,14 +246,15 @@ chmod 755 /usr/local/sbin/setup-sangoma %changelog -* Wed Sep 25 2013 Nenad Corbic - 7.0.6 +* Wed Nov 14 2013 Nenad Corbic - 7.0.8 ================================================================== -- Updated wanpipemon to trace on multipel dchan in a single span +- Updated wanpipemon to trace on multiple dchan in a single span eg: wanpipemon -i w1g1 -chan 1 -c trd If chan is not specificed then all dchans will be traced together. - Updated sample tapping application. Allow configuration for dchan and seven bit hdlc +- Fixed GSM drivers for Windows * Mon Jul 15 2013 Nenad Corbic - 7.0.5 ================================================================== diff --git a/samples/wanrouter b/samples/wanrouter index 271c7b7..76409e3 100644 --- a/samples/wanrouter +++ b/samples/wanrouter @@ -2231,7 +2231,7 @@ init_global_params() { if [ $OSYSTEM = "Linux" ]; then - ROUTER_VERSION=7.0.6 + ROUTER_VERSION=7.0.8 IFCONFIG_LIST=ifconfig MODULE_STAT=lsmod WAN_DRIVERS="wanpipe" diff --git a/util/bwm-ng/src/bwm-ng.c b/util/bwm-ng/src/bwm-ng.c index 6a83dcc..e925ab3 100644 --- a/util/bwm-ng/src/bwm-ng.c +++ b/util/bwm-ng/src/bwm-ng.c @@ -105,7 +105,7 @@ inline void init() { #if EXTENDED_STATS avg_length=0; #endif - output_unit=BYTES_OUT; + output_unit=BITS_OUT; output_type=RATE_OUT; show_all_if=0; #ifdef HAVE_CURSES diff --git a/util/bwm-ng/src/options.c b/util/bwm-ng/src/options.c index fed1240..d0de4ac 100644 --- a/util/bwm-ng/src/options.c +++ b/util/bwm-ng/src/options.c @@ -169,6 +169,8 @@ char *token, *value; } buffer = (char*)malloc( sizeof(char) * 4096 ); + + dynamic=1; while( fgets( buffer, 4096, fp ) ) { value = trim_whitespace( buffer ); @@ -264,6 +266,8 @@ void get_cmdln_options(int argc, char *argv[]) { #endif #ifdef LONG_OPTIONS int option_index = 0; + dynamic=1; + output_unit=BITS_OUT; static struct option long_options[] = { {"timeout", 1, 0, 't'}, #ifdef PROC_NET_DEV @@ -480,7 +484,7 @@ void get_cmdln_options(int argc, char *argv[]) { #endif if ((output_unit==ERRORS_OUT && !net_input_method(input_method)) || (output_unit==PACKETS_OUT && input_method==LIBSTATDISK_IN)) - output_unit=BYTES_OUT; + output_unit=BITS_OUT; return; } diff --git a/util/wanpipemon/aftpipemon.c b/util/wanpipemon/aftpipemon.c index 0ac26c9..459957a 100644 --- a/util/wanpipemon/aftpipemon.c +++ b/util/wanpipemon/aftpipemon.c @@ -1103,12 +1103,7 @@ static void line_trace(int trace_mode) hdlc_trace_iface.usec = trace_iface.usec; curr_pos += sizeof(wan_trace_pkt_t); - - if (tdmv_chan) { - if (trace_pkt->channel != tdmv_chan) { - continue; - } - } + if (trace_pkt->real_length >= WAN_MAX_DATA_SIZE){ printf("\t:the frame data is to big (%u)!", @@ -1141,6 +1136,11 @@ static void line_trace(int trace_mode) continue; } + if (tdmv_chan) { + if (trace_pkt->channel != tdmv_chan) { + continue; + } + } /* if (raw_data) { @@ -1933,6 +1933,7 @@ static void aft_perf_stats( void ) printf("Rx ...............................%lu\n",aft_perf->bh.rx); printf("Rx Stack .........................%lu\n",aft_perf->bh.rx_stack); printf("Rx Bri Dchan .....................%lu\n",aft_perf->bh.rx_bri_dchan); + printf("Rx Gsm Dchan .....................%lu\n",aft_perf->bh.rx_gsm_dchan); printf("Tx Post ..........................%lu\n",aft_perf->bh.tx_post); printf(" Port Task\n"); printf("===========================================\n"); diff --git a/wanpipe.spec b/wanpipe.spec index d7ae175..34c23c3 100644 --- a/wanpipe.spec +++ b/wanpipe.spec @@ -25,7 +25,7 @@ # %define NAME wanpipe -%define VERSION 7.0.6 +%define VERSION 7.0.8 %define RELEASE 0 %define KVERSION %{?kernel} %define KSRC %{?ksrc} @@ -259,14 +259,15 @@ fi %changelog -* Wed Sep 25 2013 Nenad Corbic - 7.0.6 +* Wed Nov 14 2013 Nenad Corbic - 7.0.8 ================================================================== -- Updated wanpipemon to trace on multipel dchan in a single span +- Updated wanpipemon to trace on multiple dchan in a single span eg: wanpipemon -i w1g1 -chan 1 -c trd If chan is not specificed then all dchans will be traced together. - Updated sample tapping application. Allow configuration for dchan and seven bit hdlc +- Fixed GSM drivers for Windows * Mon Jul 15 2013 Nenad Corbic - 7.0.5 ==================================================================