From patchwork Tue May 10 15:19:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gerrit-no-reply@lists.osmocom.org X-Patchwork-Id: 620688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3r42wK3nZwz9s9N for ; Wed, 11 May 2016 01:19:13 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 552C41AC84; Tue, 10 May 2016 15:19:12 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from 127.0.1.12 (unknown [127.0.1.12]) by lists.osmocom.org (Postfix) with ESMTPA id 054911AC79 for ; Tue, 10 May 2016 15:19:12 +0000 (UTC) Date: Tue, 10 May 2016 15:19:12 +0000 From: gerrit-no-reply@lists.osmocom.org Message-ID: X-Gerrit-MessageType: newchange Subject: Change in openbsc[master]: Fix DTX indicator in SI X-Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 X-Gerrit-ChangeURL: X-Gerrit-Commit: ca4f4ff80d94a4d39baf206c778456289325c66c MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2 X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: msuraev@sysmocom.de Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/40 Change subject: Fix DTX indicator in SI ...................................................................... Fix DTX indicator in SI Use libsmocore function to properly set DTX value in system information messages: the value depends on SI type. Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/system_information.c 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index fea6562..5c27862 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -458,12 +458,6 @@ return -EINVAL; } - /* allow/disallow DTXu */ - if (bts->network->dtx_enabled) - bts->si_common.cell_options.dtx = 0; - else - bts->si_common.cell_options.dtx = 2; - bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ bts->si_common.cell_sel_par.acs = 0; diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 0d96621..af3b07d 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -717,6 +718,14 @@ si3->cell_sel_par = bts->si_common.cell_sel_par; si3->rach_control = bts->si_common.rach_control; + /* allow/disallow DTXu */ + if (bts->network->dtx_enabled) + gsm48_set_dtx(&si3->cell_options, GSM48_MAY_USE, GSM48_MAY_USE, + true); + else + gsm48_set_dtx(&si3->cell_options, GSM48_SHALL_NOT, + GSM48_SHALL_NOT, true); + if ((bts->si_valid & (1 << SYSINFO_TYPE_2ter))) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); si_info.si2ter_indicator = 1; @@ -929,6 +938,14 @@ si6->cell_options = bts->si_common.cell_options; si6->ncc_permitted = bts->si_common.ncc_permitted; + /* allow/disallow DTXu */ + if (bts->network->dtx_enabled) + gsm48_set_dtx(&si6->cell_options, GSM48_MAY_USE, GSM48_MAY_USE, + false); + else + gsm48_set_dtx(&si6->cell_options, GSM48_SHALL_NOT, + GSM48_SHALL_NOT, false); + /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ return l2_plen;