From patchwork Wed May 18 11:09:11 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: 623510 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3r8s0F4B62z9t3n for ; Wed, 18 May 2016 21:09:17 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id AE7AB630A; Wed, 18 May 2016 11:09: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 1A5AB6304; Wed, 18 May 2016 11:09:11 +0000 (UTC) Date: Wed, 18 May 2016 11:09:11 +0000 From: Max Message-ID: X-Gerrit-MessageType: newchange Subject: [PATCH] openbsc[master]: Make si2q scheduling optional X-Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f X-Gerrit-ChangeURL: X-Gerrit-Commit: 1ae7aacc0d646cbca4dd63fb1ca1d85f6e781aa9 MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2-31-gb331dbd-dirty 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" Review at https://gerrit.osmocom.org/81 Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 --- M openbsc/src/libbsc/system_information.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/1 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..8e59817 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,13 @@ if (rc < 0) return rc; + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; }